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
[ADDON] Ban users from shoutbox
Controls ·  Search New posts · Mark unread

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

Unknown User
2008-09-06 02:57:41
Tested and working 100 %

SQL CODE

ALTER TABLE `users` ADD `shoutboxpos` enum('yes','no') NOT NULL default 'yes',
Open account-details.php

Below


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



Add



print("<tr><td class=rowhead>Use Shoutbox</td><td colspan=2 align=left><input type=radio name=shoutboxpos value=yes" .($user["shoutboxpos"]=="yes" ? " checked" : "") . ">Yes <input type=radio name=shoutboxpos value=no" .($user["shoutboxpos"]=="no" ? " checked" : "") . ">No</td></tr>\n");





Open admin-modtasks.php



Below



$warned = $_POST["warned"];





Add



$shoutboxpos = $_POST["shoutboxpos"];







Find





mysql_query("UPDATE users SET title='$title', downloaded='$downloaded', uploaded='$uploaded', signature='$signature', avatar='$avatar',





After



warned='$warned',



Add



 shoutboxpos='$shoutboxpos',







Open Index.php



Find





if ($site_config['SHOUTBOX']){

begin_frame("Shoutbox");

echo '<IFRAME name="shout_frame" src="'.$site_config["SITEURL"].'/shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" width=350 scrolling="no" align="middle"></IFRAME>';

echo "(Shoutbox will auto-refresh every 5 minutes)<BR>";

end_frame();

}





Replace By





if ($CURUSER["shoutboxpos"] == 'yes')

{

if ($site_config['SHOUTBOX']){

begin_frame("Shoutbox");

echo '<IFRAME name="shout_frame" src="'.$site_config["SITEURL"].'/shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" width=350 scrolling="no" align="middle"></IFRAME>';

echo "(Shoutbox will auto-refresh every 5 minutes)<BR>";

end_frame();

}

}

else

{

echo "<h2>&nbsp;</h2><table width='100%' border='1' cellspacing='0' cellpadding='1'><tr><td class=text>";

print("<center><b>You dont have permissions to use the Shoutbox! Contact the staff!</b></center>");

print("</td></tr></table>");

}




Thanks TBDEV for the idea.

And Thanks to all
Unknown User
2008-09-06 12:02:31
work fine thx.
Unknown User
2008-12-21 17:32:31
Works! tnx

wasbe nice, when in admincp is icon, what shows, whos banned on shoutbox.

sorry for very bad english :D
Unknown User
2008-12-21 18:39:23
for people who are not logged in does it show You dont have permissions to use the Shoutbox! Contact the staff!?
Unknown User
2008-12-21 19:45:47
Yes For People That Are Not Logged In They Should Get A Message Like

You Must Be Signed In To Use The Shoutbox!
Unknown User
2008-12-21 20:36:42
no what i am talking about is that because this was used...

}

else

{
i think that when people are not logged in they will get a message saying


You dont have permissions to use the Shoutbox! Contact the staff!



but if you were to just make it something like...



if ($site_config['SHOUTBOX']){

if($CURUSER["shoutboxpos"] == 'no'){

begin_frame("Disabled");

echo "<center><b>You dont have permissions to use the Shoutbox! Contact the staff!</b></center>";

end_frame();

}

if($CURUSER || !$CURUSER){

begin_frame("Shoutbox");

echo '<IFRAME name="shout_frame" src="'.$site_config["SITEURL"].'/shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" width=350 scrolling="no" align="middle"></IFRAME>';

end_frame();

}

}



then it should all show normally. but i could be wrong because i have not tried it because i use the one from the premium section. one more thing there is a part missing in this mod. if you ban me on your site I can still use it because you need to add a part to shoutbox.php or people can pull it up in the browser and use the shoutbox
Unknown User
2009-01-22 15:15:04
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

when im trying to insert the table in sql says that msg.
Unknown User
2009-01-23 06:59:44
ALTER TABLE `users` ADD `shoutboxpos` enum('yes','no') NOT NULL default 'yes';
Unknown User
2009-01-23 07:02:07
thanks torrential  :D  :P  :P  :D  :D     it works!
Unknown User
2009-01-23 14:51:20
it works:) thank you.
Unknown User
2009-01-28 17:52:54
hm,nice mod but is not finish,for me show mesage and i make test,nothing hapen,i can schout again.any idea?
Unknown User
2009-01-28 21:38:32
Good mod...it works nice

Thanks m8
Unknown User
2009-10-13 02:47:24
Thank you work like a charm :lol:
Unknown User
2010-07-20 22:26:25
How can i implement this into ajax shout?
Unknown User
2010-07-21 09:43:50
it may still be possible to shout via shoutbox.php...
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