Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 30-04-17, 14:43
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 269
Post [MOD] Shoutbox Posts Edit
Hello again guys! I don't know if this mod it's already posted here but maybe this will be useful to somebody. Just a short description: this will let you edit every user post in shoutbox or you can let every user edit their own post.

IN SHOUTBOX.PHP /// AFTER THIS:

PHP Code:
if (($showshoutbox == 'no' OR $showshoutbox == 'staffonly') AND (get_user_class() < UC_MODERATOR))
stderr("Error","Permission denied.");
unset(
$insert);
$insert=false
ADD THIS:

PHP Code:
// EDIT SHOUT ?
if (isset($_GET['edit']) && get_user_class() >= UC_MODERATOR && is_valid_id($_GET['edit']))
{
$sql=mysql_query("SELECT id,text FROM shoutbox WHERE id=".sqlesc($_GET['edit']));
$res=mysql_fetch_array($sql); 
THEN AFTER THIS:

PHP Code:
if ($rowowner["class"] == "10")
$usercolor"<font color=#8b0000>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "9")
$usercolor"<font color=#FF0000>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "8")
//if ($rowowner["class"] == "8")
$usercolor"<font color=#3300FF>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "7")
$usercolor"<font color=#ce00cc>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "6")
$usercolor"<font color=#03baef>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "5")
$usercolor"<font color=#93e7ff>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "4")
$usercolor"<font color=#08cf32>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "3")
$usercolor"<font color=#560aa4>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "2")
$usercolor"<font color=#ceff0a>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "1")
$usercolor"<font color=#ff780a>" .htmlspecialchars($rowowner["username"]). "</font>";
elseif (
$rowowner["class"] == "0")
$usercolor"<font color=#999999>" .htmlspecialchars($rowowner["username"]). "</font>";
if (
$arr["userid"] == '0'
ADD THIS IF YOU WANT TO LET EVERY USER TO EDIT HIS OWN POST:

PHP Code:
$edit="<span class='date'><a href=shoutbox.php?edit=".$arr[id]."><img src=pic/pencil.png height='14' widht='14' border=0></a></span>\n"
OR THIS TO ALLOW ONLY MODS OR HIGHER CLASS

PHP Code:
if (get_user_class() >= UC_MODERATOR) {
$edit="<span class='date'><a href=shoutbox.php?edit=".$arr[id]."><img src=pic/pencil.png height='14' widht='14' border=0></a></span>\n";



NOW LOOK FOR THIS:

PHP Code:
if($i%== 0)
$bg 'bgcolor=#ffffff';
else
$bg 'bgcolor=#f1f1f';
print(
"<tr><td><font color=gray><span class='date'>".strftime("%d.%m | %H:%M",$arr["date"]).":.</font>
$del$pm$reply 

AND AFTER $del$pm$reply ADD $edit

That's all!
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 06:10. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2018, vBulletin Solutions Inc.