Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[HACK] Ban individual users from uploadi
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-05-17 16:51:46
Ban user from torrents upload

Go to PhPMyAdmin and run this query:

ALTER TABLE `users` ADD `uploadbanned` char(3) NOT NULL default 'no';


Now Edit account-details.php

Find code

$forumbanned = $user["forumbanned"] == 'yes';


Add After:

$uploadbanned = $user["uploadbanned"] == 'yes';


Find code:

print("<tr><td>Forum Banned: </td><td align=left><input name=forumbanned value=yes type=radio" . ($forumbanned ? " checked" : "") . ">Yes <input name=forumbanned value=no type=radio" . (!$forumbanned ? " checked" : "") . ">No</td></tr>\n");


Add after code:

print("<tr><td>Torrents Submit Banned: </td><td align=left><input name=uploadbanned value=yes type=radio" . ($uploadbanned ? " checked" : "") . ">Yes <input name=uploadbanned value=no type=radio" . (!$uploadbanned ? " checked" : "") . ">No</td></tr>\n");


In admin-modtasks.php:

FInd code

$forumbanned = $_POST["forumbanned"];


Add after code:

$uploadbanned = $_POST["uploadbanned"];


Find code

mysql_query("UPDATE users SET title='$title', downloaded='$downloaded', uploaded='$uploaded', signature='$signature', avatar='$avatar', ip='$ip', donated='$donated', forumbanned='$forumbanned',  warned='$warned',  modcomment='$modcomment', enabled='$enabled', invites='$invites' WHERE id=$userid");  


Add For Exemple after:

forumbanned='$forumbanned',


Add this bit of code :

uploadbanned='$uploadbanned',


In torrents-upload.php

Find code

if($CURUSER["can_upload"]=="no")

show_error_msg("Error","You do not have permission to upload",1);

Add after code

////////////////////////Torrent Submit Banned?///////////////////////////////////////////////////
$subbanned = mysql_query("SELECT id FROM users WHERE id=$CURUSER[id] AND uploadbanned='no' LIMIT 1") or err('Tracker error (1)');

if (mysql_num_rows($subbanned) < 1){

stdhead("Upload Banned");

begin_frame("You are Banned from Torrents Upload");

echo "<center><br><BR><B>You don't respect Torrent submission rules, a Admin had banned you from Torrents Upload.<br><b>";

echo "<br>If you have any complain, contact us :<ahref=mailto:$SITEEMAIL>$SITEEMAIL</a><br><BR></center>";

end_frame();

stdfoot();

exit;

}

/////////////////////////////////////////////////////////////////////////////////////////////////
Unknown User
2008-05-17 16:53:04
Code of torrent trader 1 and working good perfect my tt 2.4
Unknown User
2008-05-17 17:06:26
instead... in torrents-upload, find:

if($CURUSER["can_upload"]=="no")



replace with:



if($CURUSER["can_upload"]=="no" || $CURUSER["uploadbanned"] == "yes")
Unknown User
2008-06-04 20:50:05
thanks
Unknown User
2010-06-18 21:36:29
"TorrentialStorm, post: 42438":
instead... in torrents-upload, find:

if($CURUSER["can_upload"]=="no")
replace with:


if($CURUSER["can_upload"]=="no" || $CURUSER["uploadbanned"] == "yes")



This is not mandatory. According to its code, it has a different message from that which is not allowed to see the page and who is banished to upload.

If you change this function, then it is not necessary to add the $subbanned

Thank you for this very nice little code
2011-03-19 14:36:34
Big thanks!  :lol:
Unknown User
2011-03-24 18:04:46
why not just demote the user to a normal class without upload rights ?? im scracting me head here if they no longer a uploader then demote them i would think would do the job  :lol:  but many thanks for this hack  :D  all helps others if they want to use it
Unknown User
2011-05-19 17:03:21
i think this can easily reverse to individual user bann from download

can any one explain?

Quote:
////////////////////////Torrent Submit Banned?///////////////////////////////////////////////////$subbanned = mysql_query("SELECT id FROM users WHERE id=$CURUSER[id] AND uploadbanned='no' LIMIT 1") or err('Tracker error (1)');

if (mysql_num_rows($subbanned) < 1){

stdhead("Upload Banned");

begin_frame("You are Banned from Torrents Upload");

echo "<center><br><BR><B>You don't respect Torrent submission rules, a Admin had banned you from Torrents Upload.<br><b>";

echo "<br>If you have any complain, contact us :<ahref=mailto:$SITEEMAIL>$SITEEMAIL</a><br><BR></center>";

end_frame();

stdfoot();

exit;

}

/////////////////////////////////////////////////////////////////////////////////////////////////

what would be the code here  "Individual user from download torrent"
Unknown User
2011-11-17 08:58:43
"Dalibor, post: 42434":
Ban user from torrents upload

Go to PhPMyAdmin and run this query:

ALTER TABLE `users` ADD `uploadbanned` char(3) NOT NULL default 'no';


Now Edit account-details.php

Find code

$forumbanned = $user["forumbanned"] == 'yes';


Add After:

$uploadbanned = $user["uploadbanned"] == 'yes';


Find code:

print("<tr><td>Forum Banned: </td><td align=left><input name=forumbanned value=yes type=radio" . ($forumbanned ? " checked" : "") . ">Yes <input name=forumbanned value=no type=radio" . (!$forumbanned ? " checked" : "") . ">No</td></tr>\n");


Add after code:

print("<tr><td>Torrents Submit Banned: </td><td align=left><input name=uploadbanned value=yes type=radio" . ($uploadbanned ? " checked" : "") . ">Yes <input name=uploadbanned value=no type=radio" . (!$uploadbanned ? " checked" : "") . ">No</td></tr>\n");


In admin-modtasks.php:

FInd code

$forumbanned = $_POST["forumbanned"];


Add after code:

$uploadbanned = $_POST["uploadbanned"];


Find code

mysql_query("UPDATE users SET title='$title', downloaded='$downloaded', uploaded='$uploaded', signature='$signature', avatar='$avatar', ip='$ip', donated='$donated', forumbanned='$forumbanned',  warned='$warned',  modcomment='$modcomment', enabled='$enabled', invites='$invites' WHERE id=$userid");  


Add For Exemple after:

forumbanned='$forumbanned',


Add this bit of code :

uploadbanned='$uploadbanned',


In torrents-upload.php

Find code

if($CURUSER["can_upload"]=="no")

show_error_msg("Error","You do not have permission to upload",1);

Add after code

////////////////////////Torrent Submit Banned?///////////////////////////////////////////////////
$subbanned = mysql_query("SELECT id FROM users WHERE id=$CURUSER[id] AND uploadbanned='no' LIMIT 1") or err('Tracker error (1)');

if (mysql_num_rows($subbanned) < 1){

stdhead("Upload Banned");

begin_frame("You are Banned from Torrents Upload");

echo "<center><br><BR><B>You don't respect Torrent submission rules, a Admin had banned you from Torrents Upload.<br><b>";

echo "<br>If you have any complain, contact us :<ahref=mailto:$SITEEMAIL>$SITEEMAIL</a><br><BR></center>";

end_frame();

stdfoot();

exit;

}

/////////////////////////////////////////////////////////////////////////////////////////////////

not work for me.I think some mistake done by me on torrents-upload.php

I got a error

Quote:
Fatal error: Call to undefined function err() in /home/toraa/public_html/torrents-upload.php on line 20
:)

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5356"]torrents_upload.php[/url]
torrents_upload.php
Download
Unknown User
2011-11-17 09:01:42
replace or err('Tracker error (1)'); with or die(mysql_error());
Unknown User
2012-05-24 09:26:54
Quote:
Database Error

Database Error. Please report this to an administrator.

When i want to edit a member to ban him
Unknown User
2012-05-26 07:19:18
check your sql error in admincp
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728