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
Avatar and edit on Shoutbox
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Completed

2019-03-24 04:43:47
Updated for V3 credit to Original Author

In shoutbox.php find

echo date('jS M, g:ia', utc_to_tz_time($row['date']));


add after

$ol3 = @mysqli_fetch_array(SQL_Query_exec("SELECT avatar FROM users WHERE id=".$row["userid"]));
$av=$ol3['avatar'];
if(!empty($av)){
$av="<img src='".$ol3[avatar]."' alt='my_avatar' width='27' height='27'>";
}else{
$av="<img src='images/default_avatar.png' alt='my_avatar' width='27' height='27'>";
}
if($row['userid']==0){
$av="<img src='images/default_avatar.png' alt='default_avatar' width='27' height='27'>";
}
@mysqli_free_result($ol3);


find

    if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){
       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."' style='font-size: 8px'>[D]</a></div>";
   }

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));


replace with


   if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){

       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'>[E]</a>&nbsp;&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'>[D]</a>&nbsp;&nbsp;".$av."<div>";

   }

echo "<div align='right' style='float: right'></div>";

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));



add shoutboxedit.php
shoutedit.zip
Download
2019-04-17 08:17:56
what is needed for only edit in shoutbox?
2019-04-17 13:46:48
you can try just this and add the shoutboxedit.php
find

    if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){
       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."' style='font-size: 8px'>[D]</a></div>";
   }

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));


replace with


   if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){

       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'>[E]</a>&nbsp;&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'>[D]</a><div>";
   }

echo "<div align='right' style='float: right'></div>";

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));

2019-04-18 11:25:26
"m-jay,  post: 66436, member: 20288":

you can try just this and add the shoutboxedit.php
find

    if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){
       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."' style='font-size: 8px'>[D]</a></div>";
   }

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));


replace with


   if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == $row['user']) ){

       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'>[E]</a>&nbsp;&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'>[D]</a><div>";
   }

echo "<div align='right' style='float: right'></div>";

   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.$row['user'].':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));



It worked but class color function broke.
2019-04-18 11:29:48
    if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == class_user($row['user'])) ){

       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'>[E]</a>&nbsp;&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'>[D]</a>&nbsp;&nbsp;".$av."<div>";
   }
echo "<div align='right' style='float: right'></div>";
   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.class_user($row['user']).':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));
2019-04-18 11:33:25
    if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == class_user($row['user'])) ){

       echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'>[E]</a>&nbsp;&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'>[D]</a>&nbsp;&nbsp;".$av."<div>";
   }
echo "<div align='right' style='float: right'></div>";
   echo    '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.class_user($row['user']).':</b></a>&nbsp;&nbsp;'.nl2br(format_comment($row['message']));


Credit: MicroMonkey
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