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
shoutbox banned
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-11-13 14:18:21
I have transformed the 'Hide Shoutbox' mod because nobody wants to use it in 'Shoutbox Banned' that's is very useful.

Additionally I created a new function in 'Staff CP' called 'Punished Users' where you can see all members banned on the Shoutbox and/or Forum.

In account.php search the line that contain the following code:



<input type='checkbox' name='hideshoutbox' value='yes' ".($CURUSER['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')."

Delete entire line.



In account-details.php search the line that contain the following code:




<input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td>




Add after this, a new line:





print("<tr><td>Shoutbox Banned:</td><td align='left'><input type='checkbox' name='hideshoutbox' value='yes' ".($user['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')." /></td></tr>\n");






In admin-modtasks.php search:





$forumbanned = sqlesc($_POST["forumbanned"]);




Add after:





$hideshoutbox = sqlesc($_POST["hideshoutbox"]);






In the most long line that begin with:





SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', ...




Add:





hideshoutbox=$hideshoutbox






In index.php search:





   printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";

   end_frame();

}




Replace with:





   printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";

   end_frame();

   } else {

   begin_frame(T_("SHOUTBOX"));

       print("<div class='f-border comment' align='center'>

       <div style='margin-top:10px; margin-bottom:10px'><b><font size='2'><font color='red'>Access Denied.</font> You are banned on ShoutBox!</font><b></div>

       </div>");

   end_frame();

   }






In admincp.php, for Staff CP, add the following command line:





<td align="center"><a href="admincp.php?action=punished"><img src="images/admin/punished.png" border="0" width="32" height="32"><BR>Punished Users</a><BR></td>






On the most bottom place, before ?> copy the following code:





#======================================================================#

#  Punished members - Added by BigMax (12-11-2012)

#======================================================================#

if ($action == "punished")

{

stdhead("Punished members");

navmenu();



$punished = number_format(get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'"));

$shoutbox_banned = number_format(get_row_count("users", "WHERE hideshoutbox='yes'"));

$forum_banned = number_format(get_row_count("users", "WHERE forumbanned='yes'"));



begin_frame("Punished members: $punished", true);



print("<div style='margin-top:15px' align=center><font size=2>List of members that are banned on <b>ShoutBox</b> and/or <b>Forum</b>, order by join date.</font></div>");

print("<div style='margin-top:10px; margin-bottom:10px' align=center>Bans on ShoutBox: <b>$shoutbox_banned</b> &nbsp; &nbsp; Bans on Forum: <b>$forum_banned</b></div>");



   $count = get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'");

   if ($count == 0)

   print("<div style='margin-bottom:15px' align=center><font size=2><b>No punished members!</b></font></div>");

   else { list($pagertop, $pagerbottom, $limit) = pager(25, $count, "admincp.php?action=punished&amp;"); }



   $res = SQL_Query_exec("SELECT * FROM users WHERE hideshoutbox='yes' || forumbanned='yes' AND status='confirmed' ORDER BY users.added $limit");

   $num = mysql_num_rows($res);

 

   print("<div align=center>$pagertop</div>");



print("<table class=table_table border=1 cellspacing=0 cellpadding=4 align=center>\n");

   print("<tr>

       <td class=table_head><b>User&nbsp;name</b></td>

       <td class=table_head><b>User&nbsp;class</b></td>

       <td class=table_head align=center><b>Registered</b></td>

       <td class=table_head align=center><b>Last&nbsp;access</b></td>

       <td class=table_head align=center><b>Downloaded</b></td>

       <td class=table_head align=center><b>Uploaded<b></td>

       <td class=table_head align=center><b>Ratio</b></td>

       <td class=table_head align=center><b>ShoutBox<br /><small>Banned</small></b></td>

       <td class=table_head align=center><b>Forum<br /><small>Banned</small></b></td>

   </tr>\n");



   for ($i = 1; $i <= $num; $i++){

 

       $arr = mysql_fetch_assoc($res);

       if ($arr['added'] == '0000-00-00 00:00:00')

       $arr['added'] = '---';

     

       if ($arr['last_access'] == '0000-00-00 00:00:00')

       $arr['last_access'] = '---';



       if ($arr['hideshoutbox'] == 'yes'){

       $arr['hideshoutbox'] = '<font color=red><b>Yes</b></font>';

       } else {

       $arr['hideshoutbox'] = '<font color=limegreen><b>No</b></font>';

       }

     

       if ($arr['forumbanned'] == 'yes'){

       $arr['forumbanned'] = '<font color=red><b>Yes</b></font>';

       } else {

       $arr['forumbanned'] = '<font color=limegreen><b>No</b></font>';

       }

     

       if($arr["downloaded"] != 0){

       $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);

       } else {

       $ratio="---";

       }

       $ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";



       $class=get_user_class_name($arr["class"]);

       $added = substr($arr['added'],0,10);

       $last_access = substr($arr['last_access'],0,10);

       $downloaded = mksize($arr["downloaded"]);

       $uploaded = mksize($arr["uploaded"]);



   print("<tr>

       <td class=table_col1 align=left><a href=account-details.php?id=$arr[id]><b>$arr[username]</b></a></td>

       <td class=table_col2 align=left>$class</td>

       <td class=table_col1 align=center>$added</td>

       <td class=table_col2 class=table_col1 align=center>$last_access</td>

       <td class=table_col1 align=center><font color=orangered>$downloaded</font></td>

       <td class=table_col2 align=center><font color=limegreen>$uploaded</font></td>

       <td class=table_col1 align=center>$ratio</td>

       <td class=table_col2 align=center>$arr[hideshoutbox]</td>

       <td class=table_col1 align=center>$arr[forumbanned]</td>

   </tr>\n");

   }

print("</table>\n");



   print("<div align=center>$pagerbottom</div>");



end_frame();

stdfoot();

}

#======================================================================#

#  End Punished members

#======================================================================#




Upload the attached image in: images/admin folder, in your root.

punished.png
punished.png
Unknown User
2012-11-14 02:30:53
h
Unknown User
2012-11-14 02:33:27
OK lets get to the mod that works to stop any user from using shoutbox mod by my self
2012-11-14 03:10:05
BigMax1 Thanks you!!    :D  B)



#1 v2.08
Unknown User
2013-01-06 18:26:07
Thanks a lot :

one closed tag missing



<td align="center"><a href="admincp.php?action=punished"><img src="images/admin/punished.png" border="0" width="32" height="32" alt=""/><br />Punished Users</a><br /></td>

Unknown User
2013-02-21 21:54:11
I got DB error I need to run SQL I need to commend to run the SQL on the DB thanks
Unknown User
2013-09-16 23:59:07
I just edit cause i have install bannedcomment, bannedshoutbox, uploadbanned, forumbanned


#======================================================================#
#  Punished members - Added by BigMax (12-11-2012), Edit by JEsaie (9-16-2013)
#======================================================================#
if ($action == "punished")
{
stdhead("Punished members");
navmenu();

$punished = number_format(get_row_count("users", "WHERE shoutboxbanned='yes' || forumbanned='yes' || commentbanned='yes' || uploadbanned='yes'"));
$shoutbox_banned = number_format(get_row_count("users", "WHERE shoutboxbanned='yes'"));
$forum_banned = number_format(get_row_count("users", "WHERE forumbanned='yes'"));
$comment_banned = number_format(get_row_count("users", "WHERE commentbanned='yes'"));
$upload_banned = number_format(get_row_count("users", "WHERE uploadbanned='yes'"));

begin_frame("Punished members: $punished", true);

print("<div style='margin-top:15px' align=center><font size=2>List of members that are banned on <b>ShoutBox</b>, <b>Comment</b>, <b>Upload</b> and/or <b>Forum</b>, order by join date.</font></div>");
print("<div style='margin-top:10px; margin-bottom:10px' align=center>Bans on ShoutBox: <b>$shoutbox_banned</b> &nbsp; &nbsp; Bans on Forum: <b>$forum_banned</b> &nbsp; &nbsp; Bans on Comment: <b>$comment_banned</b> &nbsp; &nbsp; Bans on Upload: <b>$upload_banned</b></div>");

   $count = get_row_count("users", "WHERE shoutboxbanned='yes' || forumbanned='yes' || commentbanned='yes' || uploadbanned='yes'");
   if ($count == 0)
   print("<div style='margin-bottom:15px' align=center><font size=2><b>No punished members!</b></font></div>");
   else { list($pagertop, $pagerbottom, $limit) = pager(25, $count, "admincp.php?action=punished&amp;"); }

   $res = SQL_Query_exec("SELECT * FROM users WHERE shoutboxbanned='yes' || forumbanned='yes' || commentbanned='yes' || uploadbanned='yes' AND status='confirmed' ORDER BY users.added $limit");
   $num = mysql_num_rows($res);
 
   print("<div align=center>$pagertop</div>");

print("<table class=table_table border=1 cellspacing=0 cellpadding=4 align=center>n");
   print("<tr>
       <td class=table_head><b>User&nbsp;name</b></td>
       <td class=table_head><b>User&nbsp;class</b></td>
       <td class=table_head align=center><b>Registered</b></td>
       <td class=table_head align=center><b>Last&nbsp;access</b></td>
       <td class=table_head align=center><b>Downloaded</b></td>
       <td class=table_head align=center><b>Uploaded<b></td>
       <td class=table_head align=center><b>Ratio</b></td>
       <td class=table_head align=center><b>ShoutBox<br /><small>Banned</small></b></td>
       <td class=table_head align=center><b>Forum<br /><small>Banned</small></b></td>
       <td class=table_head align=center><b>Comment<br /><small>Banned</small></b></td>
       <td class=table_head align=center><b>Upload<br /><small>Banned</small></b></td>
   </tr>n");

   for ($i = 1; $i <= $num; $i++){
 
       $arr = mysql_fetch_assoc($res);
       if ($arr['added'] == '0000-00-00 00:00:00')
       $arr['added'] = '---';
     
       if ($arr['last_access'] == '0000-00-00 00:00:00')
       $arr['last_access'] = '---';

       if ($arr['shoutboxbanned'] == 'yes'){
       $arr['shoutboxbanned'] = '<font color=red><b>Yes</b></font>';
       } else {
       $arr['shoutboxbanned'] = '<font color=limegreen><b>No</b></font>';
       }
     
       if ($arr['forumbanned'] == 'yes'){
       $arr['forumbanned'] = '<font color=red><b>Yes</b></font>';
       } else {
       $arr['forumbanned'] = '<font color=limegreen><b>No</b></font>';
       }

       if ($arr['commentbanned'] == 'yes'){
       $arr['commentbanned'] = '<font color=red><b>Yes</b></font>';
       } else {
       $arr['commentbanned'] = '<font color=limegreen><b>No</b></font>';
       }

       if ($arr['uploadbanned'] == 'yes'){
       $arr['uploadbanned'] = '<font color=red><b>Yes</b></font>';
       } else {
       $arr['uploadbanned'] = '<font color=limegreen><b>No</b></font>';
       }
     
       if($arr["downloaded"] != 0){
       $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
       } else {
       $ratio="---";
       }
       $ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";

       $class=get_user_class_name($arr["class"]);
       $added = substr($arr['added'],0,10);
       $last_access = substr($arr['last_access'],0,10);
       $downloaded = mksize($arr["downloaded"]);
       $uploaded = mksize($arr["uploaded"]);

   print("<tr>
       <td class=table_col1 align=left><a href=account-details.php?id=$arr[id]><b>$arr[username]</b></a></td>
       <td class=table_col2 align=left>$class</td>
       <td class=table_col1 align=center>$added</td>
       <td class=table_col2 class=table_col1 align=center>$last_access</td>
       <td class=table_col1 align=center><font color=orangered>$downloaded</font></td>
       <td class=table_col2 align=center><font color=limegreen>$uploaded</font></td>
       <td class=table_col1 align=center>$ratio</td>
       <td class=table_col2 align=center>$arr[shoutboxbanned]</td>
       <td class=table_col1 align=center>$arr[forumbanned]</td>
       <td class=table_col2 align=center>$arr[commentbanned]</td>
       <td class=table_col1 align=center>$arr[uploadbanned]</td>
   </tr>n");
   }
print("</table>n");

   print("<div align=center>$pagerbottom</div>");

end_frame();
stdfoot();
}
#======================================================================#
#  End Punished members
#======================================================================#
Unknown User
2014-09-15 19:45:43
account-details


print("<tr><td>".T_("SHOUTBOX_BANNED").": </td><td align='left'><input name='hideshoutbox' value='yes' type='radio' ".($user['hideshoutbox'] == 'yes' ? 'checked="checked"' : ""). " />Oui <input name='hideshoutbox' value='no' type='radio' " . (!$hideshoutbox ? " checked='checked'" : "") . " />Non</td></tr>n");

Unknown User
2020-09-22 21:14:32
I have transformed the 'Hide Shoutbox' mod because nobody wants to use it in 'Shoutbox Banned' that's is very useful.
Additionally I created a new function in 'Staff CP' called 'Punished Users' where you can see all members banned on the Shoutbox and/or Forum.


In account.php search the line that contain the following code:

[php]
<input type='checkbox' name='hideshoutbox' value='yes' ".($CURUSER['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')."
[/php]

Delete entire line.


In account-details.php search the line that contain the following code:

[php]
<input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td>
[/php]

Add after this, a new line:

[php]
print("<tr><td>Shoutbox Banned:</td><td align='left'><input type='checkbox' name='hideshoutbox' value='yes' ".($user['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')." /></td></tr>\n");
[/php]

In admin-modtasks.php search:

[php]
$forumbanned = sqlesc($_POST["forumbanned"]);
[/php]

Add after:

[php]
$hideshoutbox = sqlesc($_POST["hideshoutbox"]);
[/php]

In the most long line that begin with:

[php]
SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', ...
[/php]

Add:

[php]
hideshoutbox=$hideshoutbox
[/php]


In index.php search:

[php]
printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";
end_frame();
}
[/php]

Replace with:

[php]
printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";
end_frame();
} else {

begin_frame(T_("SHOUTBOX"));

print("<div class='f-border comment' align='center'>
<div style='margin-top:10px; margin-bottom:10px'><b><font size='2'><font color='red'>Access Denied.</font> You are banned on ShoutBox!</font><b></div>
</div>");
end_frame();
}
[/php]


In admincp.php, for Staff CP, add the following command line:

[php]
<td align="center"><a href="admincp.php?action=punished"><img src="images/admin/punished.png" border="0" width="32" height="32"><br />Punished Users</a><br /></td>
[/php]


On the most bottom place, before ?> copy the following code:

[php]
#======================================================================#
# Punished members - Added by BigMax (12-11-2012)
#======================================================================#

if ($action == "punished") {

stdhead("Punished members");
navmenu();

   $punished = number_format(get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'"));
   $shoutbox_banned = number_format(get_row_count("users", "WHERE hideshoutbox='yes'"));
   $forum_banned = number_format(get_row_count("users", "WHERE forumbanned='yes'"));

begin_frame("Punished members: $punished", true);

   print("<div style='margin-top:15px' align='center'><font size='2'>List of members that are banned on <b>ShoutBox</b> and/or <b>Forum</b>, order by join date.</font></div>");
   print("<div style='margin-top:10px; margin-bottom:10px' align='center'>Bans on ShoutBox: <b>$shoutbox_banned</b> &nbsp; &nbsp; Bans on Forum: <b>$forum_banned</b></div>");

   $count = get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'");

if ($count == 0)
   print("<div style='margin-bottom:15px' align='center'><font size='2'><b>No punished members!</b></font></div>");
else {
   list($pagertop, $pagerbottom, $limit) = pager(25, $count, "admincp.php?action=punished&amp;");
}

   $res = SQL_Query_exec("SELECT * FROM users WHERE hideshoutbox='yes' || forumbanned='yes' AND status='confirmed' ORDER BY users.added $limit");
   $num = mysql_num_rows($res);

   print("<div align=center>$pagertop</div>");
   print("<table class=table_table border=1 cellspacing=0 cellpadding=4 align=center>\n");
   print("<tr>
<td class=table_head><b>User&nbsp;name</b></td>
<td class=table_head><b>User&nbsp;class</b></td>
<td class=table_head align=center><b>Registered</b></td>
<td class=table_head align=center><b>Last&nbsp;access</b></td>
<td class=table_head align=center><b>Downloaded</b></td>
<td class=table_head align=center><b>Uploaded<b></td>
<td class=table_head align=center><b>Ratio</b></td>
<td class=table_head align=center><b>ShoutBox<br /><small>Banned</small></b></td>
<td class=table_head align=center><b>Forum<br /><small>Banned</small></b></td>
</tr>\n");

for ($i = 1; $i <= $num; $i++) {

   $arr = mysql_fetch_assoc($res);

if ($arr['added'] == '0000-00-00 00:00:00')
   $arr['added'] = '---';

if ($arr['last_access'] == '0000-00-00 00:00:00')
   $arr['last_access'] = '---';

if ($arr['hideshoutbox'] == 'yes') {
   $arr['hideshoutbox'] = '<font color=red><b>Yes</b></font>';
} else {
   $arr['hideshoutbox'] = '<font color=limegreen><b>No</b></font>';
}

if ($arr['forumbanned'] == 'yes') {
   $arr['forumbanned'] = '<font color=red><b>Yes</b></font>';
} else {
   $arr['forumbanned'] = '<font color=limegreen><b>No</b></font>';
}

if($arr["downloaded"] != 0) {
   $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
} else {
   $ratio="---";
}

   $ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
   $class=get_user_class_name($arr["class"]);
   $added = substr($arr['added'],0,10);
   $last_access = substr($arr['last_access'],0,10);
   $downloaded = mksize($arr["downloaded"]);
   $uploaded = mksize($arr["uploaded"]);

print("<tr>
<td class=table_col1 align=left><a href=account-details.php?id=$arr[id]><b>".class_user($arr['username'])."</b></a></td>
<td class=table_col2 align=left>$class</td>
<td class=table_col1 align=center>$added</td>
<td class=table_col2 class=table_col1 align=center>$last_access</td>
<td class=table_col1 align=center><font color=orangered>$downloaded</font></td>
<td class=table_col2 align=center><font color=limegreen>$uploaded</font></td>
<td class=table_col1 align=center>$ratio</td>
<td class=table_col2 align=center>$arr[hideshoutbox]</td>
<td class=table_col1 align=center>$arr[forumbanned]</td>
</tr>\n");
}

   print("</table>\n");
   print("<div align=center>$pagerbottom</div>");

end_frame();
stdfoot();
}
#======================================================================#
# End Punished members
#======================================================================#
[/php]
2024-05-15 06:43:05
Thanks
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728