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
New member in Shoutbox
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2025-03-01 08:24:17
Hello and can you tell me how to add the function to see the recording of a new member in the shoutbox

thanks in advance


french:
Bonjour et pouvez vous me dire comment ajouter la fonction pour voir l'enregistrement d'un nouveau membre dans la shoutbox

merci d'avance
2025-03-01 16:42:27
Teste-moi ça niki dans ton fichier shoutbox.php

begin_block(T_("NEWEST_MEMBERS"));
$expire = 100; // time in seconds
if (($rows = $TTCache->Get("newestmember_block", $expire)) === false) {
$res = SQL_Query_exec("SELECT id, username FROM users WHERE enabled = 'yes' AND status='confirmed' AND privacy != 'strong' ORDER BY id DESC LIMIT 20");
$rows = array();

while ($row = mysqli_fetch_assoc($res))
$rows[] = $row;

$TTCache->Set("newestmember_block", $rows, $expire);
}
end_block();
///

// Bienvenue
if (!$rows) {
echo T_("NOTHING_FOUND");
} else {
echo "<center>La Bienvenue A Tous Nos Nouveaux Membres<hr/></center> ";
echo "<center><div id='nMember' class='bMenu'><ul>\n";
foreach ($rows as $row) {
echo "<li><a href='account-details.php?id=$row[id]'>" .class_user($row["username"]). "".$country."</a><font color='#fff'>,</font></li>\n";
}
echo "</ul></div></center>\n";
 }
///
}
//End News User

Last edited by spiritblue on 2025-03-01 16:43:07
2025-03-01 17:40:19
merci spiriteblue et je dois mettre le code après quel ligne de code ???

J'ai fais un test en ajoutant le code en dessous du fichier shoutbox.php et ça ne fonctionne pas quand je met ton code il n'y à plus rien qui apparaît dans la shoutbox



voici mon code du fichier non modifier shoutbox.php ci-dessous


Thank you Spiriteblue and I have to put the code after which line of code ???

I did a test by adding the code below the shoutbox.php file and it does not work when I put your code there is nothing that appears in the shoutbox



Here is my file of the file not modifying shoutbox.php below



<?php
//
//  TorrentTrader v2.x
//      $LastChangedDate: 2012-06-14 17:31:26 +0100 (Thu, 14 Jun 2012) $
//      $LastChangedBy: torrenttrader $
//
//      http://www.torrenttrader.org
//
//
require_once("backend/functions.php");

dbconn();
?>

<script type="text/javascript">
<!--
function bbshout(repdeb, repfin) {
 var input = document.forms['shoutboxform'].elements['message'];
 input.focus();
 if(typeof document.selection != 'undefined') {
   var range = document.selection.createRange();
   var insText = range.text;
   range.text = repdeb + insText + repfin;
   range = document.selection.createRange();
   if (insText.length == 0) {
     range.move('character', -repfin.length);
   } else {
     range.moveStart('character', repdeb.length + insText.length + repfin.length);
   }
   range.select();
 }
 else if(typeof input.selectionStart != 'undefined')
 {
   var start = input.selectionStart;
   var end = input.selectionEnd;
   var insText = input.value.substring(start, end);
   input.value = input.value.substr(0, start) + repdeb + insText + repfin + input.value.substr(end);
   var pos;
   if (insText.length == 0) {
     pos = start + repdeb.length;
   } else {
     pos = start + repdeb.length + insText.length + repfin.length;
   }
   input.selectionStart = pos;
   input.selectionEnd = pos;
 }
 else
 {
   var pos;
   var re = new RegExp('^[0-9]{0,3}$');
   while(!re.test(pos)) {
     pos = prompt("Insertion à la position (0.." + input.value.length + "):", "0");
   }
   if(pos > input.value.length) {
     pos = input.value.length;
   }
   var insText = prompt("Veuillez entrer le texte à formater:");
   input.value = input.value.substr(0, pos) + repdeb + insText + repfin + input.value.substr(pos);
 }
}

function bbcolor() {
   var colorvalue = document.forms['shoutboxform'].elements['color'].value;
   bbshout("[color="+colorvalue+"]", "[/color]");
}

function bbfont() {
   var fontvalue = document.forms['shoutboxform'].elements['font'].value;
   bbshout("[font="+fontvalue+"]", "[/font]");
}

function bbsize() {
   var sizevalue = document.forms['shoutboxform'].elements['size'].value;
   bbshout("[size="+sizevalue+"]", "[/size]");
}

function bbimg() {
   var imgvalue = document.forms['shoutboxform'].elements['img'].value;
   bbshout("[img="+sizevalue+"]", "[/img]");
}

function bbblink() {
   var blink = document.forms['shoutboxform'].elements['blink'].value;
   bbshout("[blink="+blinkvalue+"]", "[/blink");
}

function bbdf() {
   var df = document.forms['shoutboxform'].elements['df'].value;
   bbshout("[df="+dfvalue+"]", "[/df");    
}
          //-->
</script>

<script type="text/javascript">
 function blink() {
   var blinks = document.getElementsByTagName('blink');
   for (var i = blinks.length - 1; i >= 0; i--) {
     var s = blinks;
     s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible';
   }
   window.setTimeout(blink, 1000);
 }
 if (document.addEventListener) document.addEventListener("DOMContentLoaded", blink, false);
 else if (window.addEventListener) window.addEventListener("load", blink, false);
 else if (window.attachEvent) window.attachEvent("onload", blink);
 else window.onload = blink;
</script>

<script language='javascript'>
function SmileIT(smile,form,text){
  document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
  document.forms[form].elements[text].focus();
}
</script>

<script language='javascript'><!--
function mySubmit() {
  setTimeout('document.shbox.reset()',150);
}
function Smilies(Smilie)
{
document.shoutboxform.message.value+=Smilie+" ";
document.shoutboxform.message.focus();
}
//--></SCRIPT>
<?php

function quickbbshout()
{
   echo "<table align='left' width='75%' border=0 cellpadding=2 cellspacing=2><tr>";
   
   echo "<td width='75%' align='center'>";
   
   echo "<a href=\"javascript:bbshout('', '')\"> <img src=images/shoutbox/bbcode_bold.gif alt='Bold' title='Bold' height='18px' style='vertical-align: -30%' /></a>";
   
   echo "<a href=\"javascript:bbshout('[i]', '
')\"> <img src=images/shoutbox/bbcode_italic.gif border=0 alt='Italic' title='Italic' height='18px' style='vertical-align: -30%' /></a>";
   
   echo "<a href=\"javascript:bbshout('', '')\"> <img src=images/shoutbox/bbcode_underline.gif border=0 alt='Underline' title='Underline' height='18px' style='vertical-align: -30%' /></a>";
   
  // echo "<a href=\"javascript:bbshout('[blink]', '[/blink]')\"> <img src=images/shoutbox/blink.png border=0 alt='blink' title='Clignotant' height='18px' style='vertical-align: -30%' /></a>";
   
 //  echo "<a href=\"javascript:bbshout('
', '
')\"> <img src=images/shoutbox/df.png border=0 alt='df' title='Défilant' height='18px' style='vertical-align: -30%' /></a>";
   
   echo "<a href=\"javascript:bbshout('[url]', '[/url]')\"> <img src=images/shoutbox/bbcode_url.gif border=0 alt='Url' title='URL link' height='18px' style='vertical-align: -30%' /></a>";
   
   
   echo "
<select name='color' class='bb_icon' onChange=\"javascript:bbcolor()\">
<option selected='selected'>Color</option>
<option value='#FF0000' style='color:#FF0000'>Rouge</option>
<option value='#00FFFF' style='color:#00FFFF'>Turquoise</option>
<option value='#0000FF' style='color:#0000FF'>Bleu clair</option>
<option value='#0000A0' style='color:#0000A0'>Bleu foncé</option>
<option value='#FF0080' style='color:#FF0080'>Pourpre clair</option>
<option value='#800080' style='color:#800080'>Pourpre foncé</option>
<option value='#FFFF00' style='color:#FFFF00'>Jaune</option>
<option value='#FF8040' style='color:#FF8040'>Orange</option>
<option value='#00FF00' style='color:#00FF00'>Vert pastel</option>
<option value='#C0C0C0' style='color:#C0C0C0'>Vert clair</option>
<option value='#808000' style='color:#808000'>Vert foncé</option>
</select>";
   echo "
<select name='font' class='bb_icon' onChange=\"javascript:bbfont()\">
<option selected='selected'>Font</option>
<option value='Arial'>Arial</option>
<option value='Arial Black'>Arial Black</option>
<option value='Comic Sans MS'>Comic Sans MS</option>
<option value='Courier New'>Courier New</option>
<option value='Franklin Gothic Medium'>Franklin Gothic Medium</option>
<option value='Georgia'>Georgia</option>
<option value='Helvetica'>Helvetica</option>
<option value='Impact'>Impact</option>
<option value='Lucida Console'>Lucida Console</option>
<option value='Lucida Sans Unicode'>Lucida Sans Unicode</option>
<option value='Microsoft Sans Serif'>Microsoft Sans Serif</option>
<option value='Palatino Linotype'>Palatino Linotype</option>
<option value='Tahoma' style='font-family: Tahoma;'>Tahoma</option>
<option value='Times New Roman'>Times New Roman</option>
<option value='Trebuchet MS'>Trebuchet MS</option>
<option value='Verdana'>Verdana</option>
<option value='Symbol'>Symbol</option>
</select>";
   echo "
<select name='size' class='bb_icon' onChange=\"javascript:bbsize()\">
<option selected='selected'>Size</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
</select>";
   echo "</td></tr><tr><td width='75%' align='center'>";
   echo "
<a href=\"javascript: SmileIT(':)','shoutboxform','message')\"><img border=0 src=images/smilies/smile.png></a>
<a href=\"javascript: SmileIT(':(','shoutboxform','message')\"><img border=0 src=images/smilies/sad.png></a>
<a href=\"javascript: SmileIT(';)','shoutboxform','message')\"><img border=0 src=images/smilies/wink.png></a>
<a href=\"javascript: SmileIT(':P','shoutboxform','message')\"><img border=0 src=images/smilies/razz.png></a>
<a href=\"javascript: SmileIT(':D','shoutboxform','message')\"><img border=0 src=images/smilies/grin.png></a>
<a href=\"javascript: SmileIT('-|)','shoutboxform','message')\"><img border=0 src=images/smilies/plain.png></a>
<a href=\"javascript: SmileIT(':O','shoutboxform','message')\"><img border=0 src=images/smilies/suprise.png></a>
<a href=\"javascript: SmileIT(':?','shoutboxform','message')\"><img border=0 src=images/smilies/confused.png></a>
<a href=\"javascript: SmileIT('8)','shoutboxform','message')\"><img border=0 src=images/smilies/glasses.png></a>
<a href=\"javascript: SmileIT('8o','shoutboxform','message')\"><img border=0 src=images/smilies/eek.png></a>
<a href=\"javascript: SmileIT('B)','shoutboxform','message')\"><img border=0 src=images/smilies/cool.png></a>
<a href=\"javascript: SmileIT(':-)','shoutboxform','message')\"><img border=0 src=images/smilies/smile-big.png></a>
<a href=\"javascript: SmileIT(':-(','shoutboxform','message')\"><img border=0 src=images/smilies/crying.png></a>
<a href=\"javascript: SmileIT(':-*','shoutboxform','message')\"><img border=0 src=images/smilies/kiss.png></a>
<a href=\"javascript: SmileIT('O:-D','shoutboxform','message')\"><img border=0 src=images/smilies/angel.png></a>
<a href=\"javascript: SmileIT(':-@','shoutboxform','message')\"><img border=0 src=images/smilies/devilish.png></a>
<a href=\"javascript: SmileIT(':love','shoutboxform','message')\"><img border=0 src=images/smilies/love.png></a>";
   echo "</td></tr></table>

<TR>

<div>
.....
</div>";
}












//ROOMS
$room = ($_REQUEST['room']) ? (int) $_REQUEST['room'] : 0;
   if ( get_user_class() < "3" && $room > "0" )
   $room = 0;
if  ( get_user_class() < "5"  && $room > "1" )
$room = 0;
       
function therooms()
{
   $data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
       <option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>Public</option>
       <option value="shoutbox.php?room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>VIP</option>
       if ( get_user_class() >= 7 )
           <option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>

       </select>';
   return $data;
}

function theroomsh()
{
   $data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
       <option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>Public</option>
       <option value="shoutbox.php?history=0&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>VIP</option>


       if ( get_user_class() >= 7 )
           <option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>


       </select>';
   return $data;
}

if ($site_config['SHOUTBOX'] && $CURUSER) {
   //EDIT MESSAGE
   function linkit($al_url, $al_msg) // create autolink
   {
       echo "\n<meta http-equiv=\"refresh\" content=\"12; url=$al_url\">\n";
       echo "<center>\n";
       echo "<b>$al_msg</b>\n";
       echo "\n<b>Redirection ...</b>\n";
       echo "\n[ <a href='$al_url'>lien</a> ]\n";
       echo "</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n</body>\n</html>\n";
       echo "</center>\n";
       exit;
   }
   
//DELETE MESSAGES
//if (isset($_GET['del'])){
//
// if (is_numeric($_GET['del'])){
// $query = "SELECT * FROM shoutbox WHERE msgid=".$_GET['del'] ;
// $result = SQL_Query_exec($query);
// }else{
// echo "invalid msg id STOP TRYING TO INJECT SQL";
// exit;
// }
//
// $row = mysqli_fetch_row($result);
//
// if ($row && ($CURUSER["edit_users"]=="yes" || $CURUSER['username'] == $row[1])) {
// $query = "DELETE FROM shoutbox WHERE msgid=".$_GET['del'] ;
// write_log("<b><font color='orange'>Shout Deleted: </font> Deleted by   ".$CURUSER['username']."</b>");
// SQL_Query_exec($query);
// }
//}

   
   //INSERT MESSAGE
   if (!empty($_POST['message']) && $CURUSER) {
       $_POST['message'] = sqlesc($_POST['message']);
       $query = "SELECT COUNT(*) FROM shoutbox WHERE message=" . $_POST['message'] . " AND user='" . class_user($CURUSER["username"]) . "' AND UNIX_TIMESTAMP('" . get_date_time() . "')-UNIX_TIMESTAMP(date) < 30";
       $result = SQL_Query_exec($query);
       $row = mysqli_fetch_row($result);
       
       if ($row[0] == '0') {
           $query = "INSERT INTO shoutbox (msgid, user, message, date, userid, room) VALUES (NULL, '" . $CURUSER['username'] . "', " . $_POST['message'] . ", '" . get_date_time() . "', '" . $CURUSER['id'] . "', '" . (int) $_POST['room'] . "')";
           SQL_Query_exec($query);
       }
   }
   
   //GET CURRENT USERS THEME AND LANGUAGE
   if ($CURUSER) {
       $ss_a = @mysqli_fetch_assoc(@SQL_Query_exec("select uri from stylesheets where id=" . $CURUSER["stylesheet"]));
       if ($ss_a)
           $THEME = $ss_a["uri"];
   } else { //not logged in so get default theme/language
       $ss_a = mysqli_fetch_assoc(SQL_Query_exec("select uri from stylesheets where id='" . $site_config['default_theme'] . "'"));
       if ($ss_a)
           $THEME = $ss_a["uri"];
   }
   
   if (!isset($_GET['history'])) {
?>
<html>
<head>
<title><?php
       echo $site_config['SITENAME'] . T_("SHOUTBOX");
?></title>
<?php
       /* If you do change the refresh interval, you should also change index.php printf(T_("SHOUTBOX_REFRESH"), 10) the 5 is in minutes */
?>
<meta http-equiv="refresh" content="120" />
<link rel="stylesheet" type="text/css" href="<?php echo $site_config['SITEURL'];?>/themes/<?php echo $THEME;?>/theme.css" /><script type="text/javascript" src="<?php echo $site_config['SITEURL'];?>/backend/java_klappe.js"></script>
</head>
<body class="shoutbox_body">
<?php
       echo '<div class="shoutbox_contain"><table border="0" style="width: 99%; table-layout:fixed">';
       //rooms
       if (get_user_class() >= 3) {
           echo '<div align="right">Chat Room: ';
           echo therooms();
           echo '</div>';
       }
       //rooms
   } else {
       if ($site_config["MEMBERSONLY"]) {
           loggedinonly();
       }
       
       stdhead();
       begin_frame(T_("SHOUTBOX_HISTORY"));
       
       //rooms
       if (get_user_class() >= 3) {
           echo '<div align="right">Chat Room: ';
           echo theroomsh();
           echo '</div>';
       }
       //rooms
       
       echo '<div class="shoutbox_history">';
       
       $query = 'SELECT COUNT(*) FROM shoutbox WHERE room = ".$room."';
       $result = SQL_Query_exec($query);
       $row = mysqli_fetch_row($result);
       $pages = round($row[0] / 100) + 1;
       $i = 1;
       echo '<div align="center">';
       
       while ($pages > 0 && $row["room"] == $room) {
           echo "<a href='" . $site_config['SITEURL'] . "/shoutbox.php?history=1&room=" . $room . "&page=" . $i . "'>[" . $i . "]</a> ";
           $i++;
           $pages--;
       }
       
       echo '</div><br /><table border="0" style="width: 99%; table-layout:fixed">';
   }
   
   if (isset($_GET['history'])) {
       if (isset($_GET['page'])) {
           if ($_GET['page'] > '1') {
               $lowerlimit = $_GET['page'] * 100 - 100;
               $upperlimit = $_GET['page'] * 100;
           } else {
               $lowerlimit = 0;
               $upperlimit = 100;
           }
       } else {
           $lowerlimit = 0;
           $upperlimit = 100;
       }
       $query = 'SELECT s.* FROM shoutbox s INNER JOIN users u ON u.id = s.userid AND s.room = ' . $room . ' ORDER BY s.msgid DESC LIMIT ' . $lowerlimit . ',' . $upperlimit;
   } else {
       $query = 'SELECT s.* FROM shoutbox s INNER JOIN users u ON u.id = s.userid AND s.room = ' . $room . ' ORDER BY s.msgid DESC LIMIT 20';
   }
   



$donated = ($CURUSER["donated"]);
$userdownloaded = mksize($CURUSER["downloaded"]);

$useruploaded = mksize($CURUSER["uploaded"]);

$privacylevel = $CURUSER["privacy"];

if ($CURUSER["downloaded"] > 0) {

$userratio = number_format($CURUSER["uploaded"] / $CURUSER["downloaded"], 2);

}else{

$userratio = "---";

}

print ("<br>

<div align='center'>
<img src='images/leech.png' title='Downloaded'> :


<font size=4 color=#f55c65>
$userdownloaded
</font>

<font size=4 color=#3790ba>
<-Vos statistiques->
</font>


<img src='images/seed.png' title='Uploaded'> :


<font size=4 color=#4fdf19>
$useruploaded
</font>



 
 




<font size=4 color=#3790ba> [


". Ratio .":


$userratio  ]
</font>

<br><br>


");




   
   $result = SQL_Query_exec($query);
   $alt = false;
   
   while ($row = mysqli_fetch_assoc($result)) {
       if ($alt) {
           echo '<tr class="shoutbox_noalt">';
           $alt = false;
       } else {
           echo '<tr class="shoutbox_alt">';
           $alt = true;
       }
       
       echo '<td style="font-size: 9px; width: 95px;">';
       echo "<div align='left' style='float: left'>";
       echo date('d/m H:i', utc_to_tz_time($row['date']));
       echo "</div>";
       
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'><img src='images/shoutbox/shout_edit.png'></a>  <a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'><img src='images/shoutbox/shout_delete.png'></a>  ".$av."<div>";
//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 "<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>  '.nl2br(format_comment($row['message']));
echo '</td></tr>';
   }
?>

</table>
</div>


<br />


<?php
   
   //if the user is logged in, show the shoutbox, if not, dont.
   if (!isset($_GET['history'])) {
       if (isset($_COOKIE["pass"])) {
           echo "<form name='shoutboxform' action='shoutbox.php' method='post'>";
           echo "<center><table width='100%' border='0' cellpadding='1' cellspacing='1'>";
           echo "<tr class='shoutbox_messageboxback'>";
           echo "<td width='75%' align='center'>";
           echo "<input type='hidden' name='room' value=$room />";
           echo "<input type='text' name='message' class='shoutbox_msgbox' />";
           echo "</td>";
           echo "<td>";
           echo " <input type='submit' name='submit' value='" . T_("SHOUT") . "' class='shoutbox_shoutbtn' />";
           echo "</td>";
           echo "<td>";
           echo "<a href='shoutbox.php?room=$room'><small>".T_("REFRESH")."</small></a>";
           echo " <small>-</small> <a href='" . $site_config['SITEURL'] . "/shoutbox.php?history=1&room=$room' target='_blank'><small>".T_("HISTORY")."</small></a>";
           echo "</td>";
           echo "</tr>";
           
           echo "</table>";
           echo quickbbshout();
           echo "</center></form>";
       } else {
           echo "<br /><div class='shoutbox_error'>" . T_("SHOUTBOX_MUST_LOGIN") . "</div>";
       }
   }
   
   if (!isset($_GET['history'])) {
       echo "</body></html>";
   } else {
       end_frame();
       stdfoot();
   }
   
   
} //END IF $SHOUTBOX
else {
   echo T_("SHOUTBOX_DISABLED");
}

?>

Last edited by niki on 2025-03-02 10:17:22
2025-03-02 12:45:04
@niki
on you account-singup.php after
$thisdomain = preg_replace('/^www\./is', "", $thishost);


add that part of code


//New user shoutbox
$query = "INSERT INTO `shoutbox` (`msgid`, `user`, `message`, `date`, `userid`) VALUES (null, 'RegOp' ,'" .T_("WELCOME_TO_OUR_NEWEST_USER").": ".$wantusername." ', '".get_date_time()."', '0')";
   SQL_Query_exec($query);
//End new user shoutbox


on you language.php add that

$LANG["WELCOME_TO_OUR_NEWEST_USER"] = "Welcome to our newest memmber";



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2025-03-02 15:24:08
hello and thank you for your help Botanicar I just made the change and it does not work for me the new member recording is not visible on the shoutbox

I my file Modify account-signup.php in attached file

account-signup.zip
Download
Last edited by niki on 2025-03-02 15:25:35
2025-03-02 15:44:47
Is it visible in database?


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2025-03-02 15:52:38
yes botanicar it is visible 😕

I use normal shoutbox and not ajaxchoutbox
2025-03-02 18:06:38
Thank you Botanicar it works well now with your code I put the original Shoutbox-PHP file because mine had a problem  😊
2025-03-03 09:11:55
I'm glad I could help you with that niki...


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2025-03-03 10:08:03
hello botanicar and another request i've been trying for hours to modify the shoutbox.php file to display the bbcode and smiley below the shoutbox like the shoutbox with the rom and bbcode but i can't get it ??

below my shoutbox.php file


<?php
require_once("backend/functions.php");
dbconn();

if ($site_config['SHOUTBOX']){

//DELETE MESSAGES
if (isset($_GET['del'])){

if (is_numeric($_GET['del'])){
$query = "SELECT * FROM shoutbox WHERE msgid=".$_GET['del'] ;
$result = SQL_Query_exec($query);
}else{
echo "invalid msg id STOP TRYING TO INJECT SQL";
exit;
}

$row = mysqli_fetch_row($result);

if ($row && ($CURUSER["edit_users"]=="yes" || $CURUSER['username'] == $row[1])) {
$query = "DELETE FROM shoutbox WHERE msgid=".$_GET['del'] ;
write_log("<b><font color='orange'>Shout Deleted: </font> Deleted by   ".$CURUSER['username']."</b>");
SQL_Query_exec($query);
}
}





   //INSERT MESSAGE
   if (!empty($_POST['message']) && $CURUSER) {
       $_POST['message'] = sqlesc($_POST['message']);
       $query = "SELECT COUNT(*) FROM shoutbox WHERE message=" . $_POST['message'] . " AND user='" . class_user($CURUSER["username"]) . "' AND UNIX_TIMESTAMP('" . get_date_time() . "')-UNIX_TIMESTAMP(date) < 30";
       $result = SQL_Query_exec($query);
       $row = mysqli_fetch_row($result);

if ($row[0] == '0') {
$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, '".$CURUSER['username']."', ".$_POST['message'].", '".get_date_time()."', '".$CURUSER['id']."')";
SQL_Query_exec($query);
}
}

//GET CURRENT USERS THEME AND LANGUAGE
if ($CURUSER){
$ss_a = @mysqli_fetch_assoc(@SQL_Query_exec("select uri from stylesheets where id=" . $CURUSER["stylesheet"]));
if ($ss_a)
$THEME = $ss_a["uri"];
}else{//not logged in so get default theme/language
$ss_a = mysqli_fetch_assoc(SQL_Query_exec("select uri from stylesheets where id='" . $site_config['default_theme'] . "'"));
if ($ss_a)
$THEME = $ss_a["uri"];
}

if(!isset($_GET['history'])){
?>
<html>
<head>
<title><?php echo $site_config['SITENAME'] . T_("SHOUTBOX"); ?></title>
<?php /* If you do change the refresh interval, you should also change index.php printf(T_("SHOUTBOX_REFRESH"), 5) the 5 is in minutes */ ?>
<meta http-equiv="refresh" content="300" />
<link rel="stylesheet" type="text/css" href="<?php echo $site_config['SITEURL']?>/themes/<?php echo $THEME; ?>/theme.css" />
<script type="text/javascript" src="<?php echo $site_config['SITEURL']; ?>/backend/java_klappe.js"></script>
</head>
<body class="shoutbox_body">
<?php
echo '<div class="shoutbox_contain"><table border="0" style="width: 99%; table-layout:fixed">';
}else{
   
   if ($site_config["MEMBERSONLY"]) {
       loggedinonly();
   }
   
stdhead();
begin_frame(T_("SHOUTBOX_HISTORY"));
echo '<div class="shoutbox_history">';

$query = 'SELECT COUNT(*) FROM shoutbox';
$result = SQL_Query_exec($query);
$row = mysqli_fetch_row($result);
echo '<div align="center">Pages: ';
$pages = round($row[0] / 100) + 1;
$i = 1;
while ($pages > 0){
echo "<a href='".$site_config['SITEURL']."/shoutbox.php?history=1&page=".$i."'>[".$i."]</a>&nbsp;";
$i++;
$pages--;
}

echo '</div><br /><table border="0" style="width: 99%; table-layout:fixed">';
}

if (isset($_GET['history'])) {
if (isset($_GET['page'])) {
if($_GET['page'] > '1') {
$lowerlimit = $_GET['page'] * 100 - 100;
$upperlimit = $_GET['page'] * 100;
}else{
$lowerlimit = 0;
$upperlimit = 100;
}
}else{
$lowerlimit = 0;
$upperlimit = 100;
}
$query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT '.$lowerlimit.','.$upperlimit;
}else{
$query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT 20';
}










$donated = ($CURUSER["donated"]);
$userdownloaded = mksize($CURUSER["downloaded"]);

$useruploaded = mksize($CURUSER["uploaded"]);

$privacylevel = $CURUSER["privacy"];

if ($CURUSER["downloaded"] > 0) {

$userratio = number_format($CURUSER["uploaded"] / $CURUSER["downloaded"], 2);

}else{

$userratio = "---";

}

print ("<br>

<div align='center'>
<img src='images/leech.png' title='Downloaded'> :


<font size=4 color=#f55c65>
$userdownloaded
</font>

<font size=4 color=#3790ba>
<-Vos statistiques->
</font>


<img src='images/seed.png' title='Uploaded'> :


<font size=4 color=#4fdf19>
$useruploaded
</font>



&nbsp;
&nbsp;




<font size=4 color=#3790ba> [


". Ratio .":


$userratio  ]
</font>

<br><br>


");









$result = SQL_Query_exec($query);
$alt = false;

while ($row = mysqli_fetch_assoc($result)) {
if ($alt){
echo '<tr class="shoutbox_noalt">';
$alt = false;
}else{
echo '<tr class="shoutbox_alt">';
$alt = true;
}

echo '<td style="font-size: 9px; width: 118px;">';
echo "<div align='left' style='float: left'>";

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


echo "</div>";










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'><img src='images/shoutbox/shout_edit.png'></a>&nbsp;&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'><img src='images/shoutbox/shout_delete.png'></a>&nbsp;&nbsp;".$av."<div>";
//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 "<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']));
echo '</td></tr>';
   }
?>

</table>
</div>
<br />








<?php

//if the user is logged in, show the shoutbox, if not, dont.
if(!isset($_GET['history'])) {
if (isset($_COOKIE["pass"])){
echo "<form name='shoutboxform' action='shoutbox.php' method='post'>";
echo "<center><table width='100%' border='0' cellpadding='1' cellspacing='1'>";
echo "<tr class='shoutbox_messageboxback'>";
echo "<td width='75%' align='center'>";
echo "<input type='text' name='message' class='shoutbox_msgbox' />";
echo "</td>";
echo "<td>";
echo "<input type='submit' name='submit' value='".T_("SHOUT")."' class='shoutbox_shoutbtn' />";
echo "</td>";
echo "<td>";
       echo '<a href="javascript:PopMoreSmiles(\'shoutboxform\', \'message\');"><small>'.T_("MORE_SMILIES").'</small></a>';
       echo ' <small>-</small> <a href="javascript:PopMoreTags();"><small>'.T_("TAGS").'</small></a>';
echo "<br />";
echo "<a href='shoutbox.php'><small>".T_("REFRESH")."</small></a>";              
echo " <small>-</small> <a href='".$site_config['SITEURL']."/shoutbox.php?history=1' target='_blank'><small>".T_("HISTORY")."</small></a>";
echo "</td>";
echo "</tr>";
echo "</table></center>";
echo "</form>";
}else{
echo "<br /><div class='shoutbox_error'>".T_("SHOUTBOX_MUST_LOGIN")."</div>";
}
}

if(!isset($_GET['history'])){
echo "</body></html>";
}else{
end_frame();
stdfoot();
}


}//END IF $SHOUTBOX
else{
echo T_("SHOUTBOX_DISABLED");
}
?>
2025-03-03 18:02:11
Désolé Niki,  je n'ai pas bien compris ta demande, mais notre ami Botanicar au grand cœur t'a bien aidée ! ♫
Last edited by spiritblue on 2025-03-03 18:03:12
2025-03-03 18:38:47
bonsoir spiritblue je cherche pour afficher les bbcode et les smileys en dessous de la shoutbox ou on écrit un message pour ne pas chaque fois cliquer sur Plus de Smiles ou  sur Tags,...

Good evening SpiritBlue I am looking to display the BBCODES and the Smileys below the Shoutbox or we write a message so as not to click on more smiles or on tags, ...

Plus de Smiles - Tags
Rafraîchir - Historique
2025-03-03 19:47:39
@niki
you have missed an small part of code in shotbox.php called quickbbshout()...
I have fixed it for you (if is it you will/need)


<?php
#================================#
#       TorrentTrader 2.08       #
#  http://torrenttrader.uk       #
#---------------------------     #
#   Uppdated by M-Jay            #
#================================#

require_once("backend/functions.php");
dbconn();
?>

<script type="text/javascript">
<!--
function bbshout(repdeb, repfin) {
 var input = document.forms['shoutboxform'].elements['message'];
 input.focus();
 if(typeof document.selection != 'undefined') {
   var range = document.selection.createRange();
   var insText = range.text;
   range.text = repdeb + insText + repfin;
   range = document.selection.createRange();
   if (insText.length == 0) {
     range.move('character', -repfin.length);
   } else {
     range.moveStart('character', repdeb.length + insText.length + repfin.length);
   }
   range.select();
 }
 else if(typeof input.selectionStart != 'undefined')
 {
   var start = input.selectionStart;
   var end = input.selectionEnd;
   var insText = input.value.substring(start, end);
   input.value = input.value.substr(0, start) + repdeb + insText + repfin + input.value.substr(end);
   var pos;
   if (insText.length == 0) {
     pos = start + repdeb.length;
   } else {
     pos = start + repdeb.length + insText.length + repfin.length;
   }
   input.selectionStart = pos;
   input.selectionEnd = pos;
 }
 else
 {
   var pos;
   var re = new RegExp('^[0-9]{0,3}$');
   while(!re.test(pos)) {
     pos = prompt("Insertion à la position (0.." + input.value.length + "):", "0");
   }
   if(pos > input.value.length) {
     pos = input.value.length;
   }
   var insText = prompt("Veuillez entrer le texte à formater:");
   input.value = input.value.substr(0, pos) + repdeb + insText + repfin + input.value.substr(pos);
 }
}

function bbcolor() {
   var colorvalue = document.forms['shoutboxform'].elements['color'].value;
   bbshout("[color="+colorvalue+"]", "[/color]");
}

function bbfont() {
   var fontvalue = document.forms['shoutboxform'].elements['font'].value;
   bbshout("[font="+fontvalue+"]", "[/font]");
}

function bbsize() {
   var sizevalue = document.forms['shoutboxform'].elements['size'].value;
   bbshout("[size="+sizevalue+"]", "[/size]");
}

function bbimg() {
   var imgvalue = document.forms['shoutboxform'].elements['img'].value;
   bbshout("[img="+sizevalue+"]", "[/img]");
}

function bbblink() {
   var blink = document.forms['shoutboxform'].elements['blink'].value;
   bbshout("[blink="+blinkvalue+"]", "[/blink");
}

function bbdf() {
   var df = document.forms['shoutboxform'].elements['df'].value;
   bbshout("[df="+dfvalue+"]", "[/df");    
}
          //-->
</script>

<script type="text/javascript">
 function blink() {
   var blinks = document.getElementsByTagName('blink');
   for (var i = blinks.length - 1; i >= 0; i--) {
     var s = blinks;
     s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible';
   }
   window.setTimeout(blink, 1000);
 }
 if (document.addEventListener) document.addEventListener("DOMContentLoaded", blink, false);
 else if (window.addEventListener) window.addEventListener("load", blink, false);
 else if (window.attachEvent) window.attachEvent("onload", blink);
 else window.onload = blink;
</script>

<script language='javascript'>
function SmileIT(smile,form,text){
  document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
  document.forms[form].elements[text].focus();
}
</script>

<script language='javascript'><!--
function mySubmit() {
  setTimeout('document.shbox.reset()',350);
}
function Smilies(Smilie)
{
document.shoutboxform.message.value+=Smilie+" ";
document.shoutboxform.message.focus();
}
//--></script>
<script src="https://kit.fontawesome.com/8514806850.js" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script type="text/javascript" src="scripts/ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 350;
NcodeImageResizer.MAXHEIGHT = 0;

NcodeImageResizer.Msg1 = 'Click for full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click for small image.';
//-->
</script>

<script language="Javascript" type="text/javascript">
<!--
function Reply_code(smile,form,text){
document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
document.forms[form].elements[text].focus();
}
//-->
</script>
<?php

if ($site_config['SHOUTBOX'])
{
function quickbbshout()
{
echo "<table align='center' border=0 cellpadding=2 cellspacing=2><tr>";
echo "<td style='padding-top:5px' align='center'>";

echo "
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-bold'></i> </a>
<a href=\"javascript:bbshout('[i]', '
')\" class='btn btn-dark'> <i class='fa-solid fa-italic'></i></a>
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-underline'></i></a>
<a href=\"javascript:bbshout('
', '
')\" class='btn btn-dark'> <i class='fa-solid fa-align-center'></i></a>
<a href=\"javascript:bbshout('[url]', '[/url]')\" class='btn btn-dark'> <i class='fa-solid fa-code'></i></a>
<a href=\"javascript:bbshout('[img]', '[/img]')\" class='btn btn-dark'> <i class='fa-solid fa-image'></i></a>
<a href=\"javascript:bbshout('[videow=', '')\" class='btn btn-dark'> <i class='fa-solid fa-video'></i></a>&nbsp;";

echo "
<select name='color' class='bb_icon' onChange=\"javascript:bbcolor()\">
<option selected='selected'>".T_("COLOR")."</option>
<option value=mediumturquoise style=color:mediumturquoise>Medium-Turquoise</option>
<option value=dodgerblue style=color:dodgerblue>Dodger-Blue</option>
<option value=slateblue style=color:slateblue>Slate-Blue</option>
<option value=royalblue style=color:royalblue>Royal-Blue</option>
<option value=orange style=color:orange>Orange</option>
<option value=orangered style=color:orangered>Orange-Red</option>
<option value=crimson style=color:crimson>Crimson</option>
<option value=red style=color:red>Red</option>
<option value=indianred style=color:indianred>Indian-Red</option>
<option value=firebrick style=color:firebrick>Fire-Brick</option>
<option value=green style=color:green>Green</option>
<option value=limegreen style=color:limegreen>Lime-Green</option>
<option value=seagreen style=color:seagreen>Sea-Green</option>
<option value=hotpink style=color:hotpink>Hotpink</option>
<option value=tomato style=color:tomato>Tomato</option>
<option value=coral style=color:coral>Coral</option>
<option value=mediumorchid style=color:mediumorchid>Medium-Orchid</option>
<option value=magenta style=color:magenta>Magenta</option>
<option value=burlywood style=color:burlywood>Burlywood</option>
<option value=sandybrown style=color:sandybrown>Sandy-Brown</option>
<option value=sienna style=color:sienna>Sienna</option>
<option value=goldenrod style=color:goldenrod>Golden-Rod</option>
<option value=teal style=color:teal>Teal</option>
<option value=silver style=color:silver>Silver</option>
</select>";

echo "
<select name='font' class='bb_icon' onChange=\"javascript:bbfont()\">
<option selected='selected'>Font</option>
<option value='Arial'>Arial</option>
<option value='Arial Black'>Arial Black</option>
<option value='Comic Sans MS'>Comic Sans MS</option>
<option value='Courier New'>Courier New</option>
<option value='Franklin Gothic Medium'>Franklin Gothic Medium</option>
<option value='Georgia'>Georgia</option>
<option value='Helvetica'>Helvetica</option>
<option value='Impact'>Impact</option>
<option value='Lucida Console'>Lucida Console</option>
<option value='Lucida Sans Unicode'>Lucida Sans Unicode</option>
<option value='Microsoft Sans Serif'>Microsoft Sans Serif</option>
<option value='Palatino Linotype'>Palatino Linotype</option>
<option value='Tahoma' style='font-family: Tahoma;'>Tahoma</option>
<option value='Times New Roman'>Times New Roman</option>
<option value='Trebuchet MS'>Trebuchet MS</option>
<option value='Verdana'>Verdana</option>
<option value='Symbol'>Symbol</option>
</select>";

echo "
<select name='size' class='bb_icon' onChange=\"javascript:bbsize()\">
<option selected='selected'>".T_("SIZE")."</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
</select>";

echo "</td></tr><tr><td align='center'>";

echo "
<a href=\"javascript: SmileIT(':-)','shoutboxform','message')\"><img border=0 src=images/smilies/smile.gif></a>
<a href=\"javascript: SmileIT(':-D','shoutboxform','message')\"><img border=0 src=images/smilies/grin.gif></a>
<a href=\"javascript: SmileIT(':lol:','shoutboxform','message')\"><img border=0 src=images/smilies/lol.gif></a>
<a href=\"javascript: SmileIT(':rofl:','shoutboxform','message')\"><img border=0 src=images/smilies/rofl.gif></a>
<a href=\"javascript: SmileIT(':-S','shoutboxform','message')\"><img border=0 src=images/smilies/sarcastic.gif></a>
<a href=\"javascript: SmileIT(':w00t:','shoutboxform','message')\"><img border=0 src=images/smilies/w00t.gif></a>
<a href=\"javascript: SmileIT(':-/','shoutboxform','message')\"><img border=0 src=images/smilies/confused.gif></a>
<a href=\"javascript: SmileIT(':-|','shoutboxform','message')\"><img border=0 src=images/smilies/noexpression.gif></a>
<a href=\"javascript: SmileIT(':-(','shoutboxform','message')\"><img border=0 src=images/smilies/sad.gif></a>
<a href=\"javascript: SmileIT(':cry:','shoutboxform','message')\"><img border=0 src=images/smilies/cry.gif></a>
<a href=\"javascript: SmileIT(':-P','shoutboxform','message')\"><img border=0 src=images/smilies/ras.gif></a>
<a href=\"javascript: SmileIT(':pardon:','shoutboxform','message')\"><img border=0 src=images/smilies/pardon.gif></a>
<a href=\"javascript: SmileIT(':-8)','shoutboxform','message')\"><img border=0 src=images/smilies/cool.gif></a>
<a href=\"javascript: SmileIT(':wave:','shoutboxform','message')\"><img border=0 src=images/smilies/wave.gif></a>
<a href=\"javascript: SmileIT(':ok:','shoutboxform','message')\"><img border=0 src=images/smilies/ok.gif></a>
<a href=\"javascript: SmileIT(':hmm:','shoutboxform','message')\"><img border=0 src=images/smilies/hmm.gif></a>";
echo "</td></tr></table>";
}

//ROOMS
$room = ($_REQUEST['room']) ? (int) $_REQUEST['room'] : 0;

function therooms()
{
if ( get_user_class() == 4 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
</select>';
}
elseif ( get_user_class() == 5 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
elseif ( get_user_class() >= 6 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
<option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
else
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
</select>';
}
return $data;
}

function theroomsh()
{
if ( get_user_class() == 4 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?history=0&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
</select>';
}
elseif ( get_user_class() == 5 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
elseif ( get_user_class() >= 6 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?history=0&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
else
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
</select>';
}
return $data;
}

   //EDIT MESSAGE
   function linkit($al_url, $al_msg) // create autolink
   {
       echo "\n<meta http-equiv=\"refresh\" content=\"3; url=$al_url\">\n";
       echo "<center>\n";
       echo "<b>$al_msg</b>\n";
       echo "\n<b>Redirection ...</b>\n";
       echo "\n[ <a href='$al_url'>lien</a> ]\n";
       echo "</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n</body>\n</html>\n";
       echo "</center>\n";
       exit;
   }
   
   //DELETE MESSAGES
   if (isset($_GET['del']))
{
       if (is_numeric($_GET['del']))
{
           $query = "SELECT * FROM shoutbox WHERE msgid=" . $_GET['del'];
           $result = SQL_Query_exec($query);
       } else {
           echo "invalid msg id STOP TRYING TO INJECT SQL";
           exit;
       }
       
       $row = mysqli_fetch_row($result);
       
       if ($row && ($CURUSER["edit_users"] == "yes" || $CURUSER['username'] == $row[1])) {
           $query = "DELETE FROM shoutbox WHERE msgid=" . $_GET['del'];
           SQL_Query_exec($query);
       }
   }
   
   //INSERT MESSAGE
   if (!empty($_POST['message']) && $CURUSER) {
       $_POST['message'] = sqlesc($_POST['message']);
       $query = "SELECT COUNT(*) FROM shoutbox WHERE message=" . $_POST['message'] . " AND user='" . $CURUSER['username'] . "' AND UNIX_TIMESTAMP('" . get_date_time() . "')-UNIX_TIMESTAMP(date) < 30";
       $result = SQL_Query_exec($query);
       $row = mysqli_fetch_row($result);
       
       if ($row[0] == '0') {
           $query = "INSERT INTO shoutbox (msgid, user, message, date, userid, room) VALUES (NULL, '" . $CURUSER['username'] . "', " . $_POST['message'] . ", '" . get_date_time() . "', '" . $CURUSER['id'] . "', '" . (int) $_POST['room'] . "')";
           SQL_Query_exec($query);

//member of the month
if ($site_config['MOTM'])
{
$motm_value = 1;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);
}
       }
   }
   
   //GET CURRENT USERS THEME AND LANGUAGE
   if ($CURUSER) {
       $ss_a = @mysqli_fetch_assoc(@SQL_Query_exec("select uri from stylesheets where id=" . $CURUSER["stylesheet"]));
       if ($ss_a)
           $THEME = $ss_a["uri"];
   } else { //not logged in so get default theme/language
       $ss_a = mysqli_fetch_assoc(SQL_Query_exec("select uri from stylesheets where id='" . $site_config['default_theme'] . "'"));
       if ($ss_a)
           $THEME = $ss_a["uri"];
   }
//===| Alert if exists messages in others rooms
$viproom = 'SELECT message FROM shoutbox WHERE room = "1"';
$vipresult = SQL_Query_exec($viproom);
$row = mysqli_fetch_row($vipresult);
if ($row[0] != "") {
$vipmessages = "<font style='background-color:#A70000; color:#E7E7E7'>&nbsp;".T_("MESSAGES_IN_VIP_SECTION")."&nbsp;</font> &nbsp;";
} else { $vipmessages = ""; }

$uproom = 'SELECT message FROM shoutbox WHERE room = "2"';
$upresult = SQL_Query_exec($uproom);
$row = mysqli_fetch_row($upresult);
if ($row[0] != "") {
$upmessages = "<font style='background-color:#A70000; color:#E7E7E7'>&nbsp;".T_("MESSAGES_IN_UPLOADER_SECTION")."&nbsp;</font> &nbsp;";
} else { $upmessages = ""; }

if (get_user_class() >= 6) { $messages = "".$vipmessages."".$upmessages.""; }
elseif (get_user_class() == 4) { $messages = "".$vipmessages.""; }
elseif (get_user_class() == 5) { $messages = "".$upmessages.""; }
else $messages = "";
//===| End

if (!isset($_GET['history']))
{
?>
<html>
<head>
<title><?php
echo $site_config['SITENAME'] . T_("SHOUTBOX");
?></title>

<?php
/* If you do change the refresh interval, you should also change index.php printf(T_("SHOUTBOX_REFRESH"), 5) the 5 is in minutes */
?>
<meta http-equiv="refresh" content="300" />
<link rel="stylesheet" type="text/css" href="<?php echo $site_config['SITEURL'];?>/themes/<?php echo $THEME;?>/theme.css" /><script type="text/javascript" src="<?php echo $site_config['SITEURL'];?>/backend/java_klappe.js"></script>
</head>
<body class="shoutbox_body">
<?php

       echo '<div class="shoutbox_contain"><table border="0" style="width: 100%; table-layout:fixed">';
       //rooms
       if (get_user_class() >= 4) {
echo '<tr><td><table width="100%"><tr>';
echo '<td align="left">'.$messages.'</td>';
echo '<td align="right"><b>'.T_("SHOUTBOX_FOR").'</b>: ';
echo therooms();
echo '</td>';
echo '</tr></table></td></tr>';
       }
       //rooms
   }
else
{
       if ($site_config["MEMBERSONLY"]) {
           loggedinonly();
       }
       
       stdhead();
       begin_frame(T_("SHOUTBOX_HISTORY"));
       
       //rooms
       if (get_user_class() >= 4) {
            echo '<table width="100%"><tr>';
echo '<td align="left">'.$messages.'</td>';
echo '<td align="right"><b>'.T_("SHOUTBOX_FOR").'</b>:';
echo theroomsh();
echo '</td>';
echo '</tr></table><br />';
       }
       //rooms
       
       echo '<div class="shoutbox_history">';
       
       $query = 'SELECT COUNT(*) FROM shoutbox WHERE room = ".$room."';
       $result = SQL_Query_exec($query);
       $row = mysqli_fetch_row($result);
       $pages = round($row[0] / 100) + 1;
       $i = 1;
       echo '<div align="center">';
       
       while ($pages > 0 && $row["room"] == $room) {
           echo "<a href='" . $site_config['SITEURL'] . "/shoutbox.php?history=1&room=" . $room . "&page=" . $i . "'>[" . $i . "]</a>&nbsp;";
           $i++;
           $pages--;
       }
       
       echo '</div><br /><table border="0" style="width: 99%; table-layout:fixed">';
   }
   
   if (isset($_GET['history'])) {
       if (isset($_GET['page'])) {
           if ($_GET['page'] > '1') {
               $lowerlimit = $_GET['page'] * 100 - 100;
               $upperlimit = $_GET['page'] * 100;
           } else {
               $lowerlimit = 0;
               $upperlimit = 100;
           }
       } else {
           $lowerlimit = 0;
           $upperlimit = 100;
       }
       $query = 'SELECT s.* FROM shoutbox s INNER JOIN users u ON u.id = s.userid AND s.room = ' . $room . ' ORDER BY s.msgid DESC LIMIT ' . $lowerlimit . ',' . $upperlimit;
   } else {
       $query = 'SELECT s.* FROM shoutbox s INNER JOIN users u ON u.id = s.userid AND s.room = ' . $room . ' ORDER BY s.msgid DESC LIMIT 50';
   }

   $result = SQL_Query_exec($query);
$alt = false;
while ($row = mysqli_fetch_assoc($result))
{
if ($alt) {
echo '<tr class="shoutbox_noalt">';
$alt = false;
}
else
{
echo '<tr class="shoutbox_alt">';
$alt = true;
}


       $date = "<font style='font: 12px Tahoma' color='4dff55'>".date('<\\b>d M</\\b>. H:i', utc_to_tz_time($row['date']))."</font> &bull;";

$reply = "<a href=javascript:Reply_code('&bull;&nbsp;".$row['user'].",','shoutboxform','message')><img src ='".$site_config['SITEURL']."/images/blue reply.png' height='12' border='0' title='".T_("REPLY")."'></a>";

if ($CURUSER["edit_users"] == "yes")
{
$edit = "&nbsp;<a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/edit.png' height='12' border='0' title='".T_("EDIT")."'></a>";
}
else
{
$edit = "";
}

if ($CURUSER["edit_users"] == "yes")
{
$delete = "&nbsp;<a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/delete.png' height='12' border='0' title='".T_("DELETE")."'></a>&nbsp;";
}
else
{
$delete = "";
}

if ($row['user'] == "System")
{
$name = '<font color='.$site_config['system_color'].'><b>System</b></font>&nbsp;';
}
else
{
$name = '<a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.class_user($row['user']).'</b></a>&nbsp;';
}

       echo '<tr><td style="font-size:12px">'.$date.' '.$name.' '.$edit.' '.$delete.''.$reply.' &nbsp;'.nl2br(format_comment($row['message']));
       echo '</td></tr>';
   }
?>

</table>
</div>

<?php
   
   //if the user is logged in, show the shoutbox, if not, dont.
   if (!isset($_GET['history'])) {
       if (isset($_COOKIE["pass"])) {
           echo "<form name='shoutboxform' action='shoutbox.php' method='post'>";
           echo "<center><table width='100%' border='0' cellpadding='1' cellspacing='1'>";
echo "<tr class='shoutbox_messageboxback'>";
echo "<td width='75%' align='center'>";
echo "<input type='text' name='message' class='shoutbox_msgbox' />";
echo "</td>";
echo "<td>";
echo "<input type='submit' name='submit' value='".T_("SHOUT")."' class='shoutbox_shoutbtn' />";
echo "</td>";
echo "<td>";
echo '<a href="javascript:PopMoreSmiles(\'shoutboxform\', \'message\');" class="btn btn-dark"> <i class="fa-solid fa-face-smile-wink" style="color:white"></i> </a>';
echo ' <small>-</small> <a href="javascript:PopMoreTags();" class="btn btn-dark"><i class="fa-solid fa-hashtag" style="color:white"></i></a>';
echo "<br />";
echo "<a href='shoutbox.php' class='btn btn-dark'><i class='fa-solid fa-rotate' style='color:white'></i></a>";
echo " <small>-</small> <a href='".$site_config['SITEURL']."/shoutbox.php?history=1' target='_blank' class='btn btn-dark'><i class='fa-solid fa-clock-rotate-left' style='color:white'></i></a>";
echo "</td>";
echo "</tr>";
echo "</table></center>";
           echo quickbbshout();
           echo "</form>";
       } else {
           echo "<br /><div class='shoutbox_error'>" . T_("SHOUTBOX_MUST_LOGIN") . "</div>";
       }
   }
   
   if (!isset($_GET['history'])) {
       echo "</body></html>";
   } else {
       end_frame();
       stdfoot();
   }
} //END IF $SHOUTBOX
else {
echo T_("SHOUTBOX_DISABLED");
}
?>


https://prnt.sc/jO7I1xBlguMJ


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2025-03-03 19:52:22
I may have missed some of the smiles, you will probably fix them on your own, without my help because I use PNG instead of gif images...


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2025-03-03 20:14:36
Good evening and thank you Botanicar it works well the smiley and bbcode are clearly visible but I no longer see the message of the last members scored on the shoutbox ???

The registration of the members are no longer visible on the shoutbox ?

I think that the CSS code is also missing which must work with this new code because my CSS of the Shoutbox is no longer compatible with this code ?
Last edited by niki on 2025-03-03 20:27:03
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