How to add a sound on a new PM in shoutbox?
When new message arrives...
THANKS
When new message arrives...
THANKS
$shoutbox_query = SQL_Query_exec("INSERT INTO shoutbox (msgid, user, message, date, userid, room) VALUES (NULL, 'System', " . sqlesc($sbmessage) . ", '" . get_date_time() . "', '0', '0')");
$sbmessage = "New Torrent: [url=".%24site_config%5B"]."/torrents-details.php?id=".$id."]".$torrent."[/url] just been uploaded!";
SQL_Query_exec("INSERT INTO shoutbox (msgid, user, message, date, userid, room) VALUES (NULL, 'System', ".sqlesc($sbmessage).", '".get_date_time()."', '100', '0')");
[/code]
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() >= 5 )
<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() >= 5 )
<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>
</select>';
return $data;
}
change for
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() >= "5" )
$data .='<option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>';
$data .='</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=1&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>Public</option>
<option value="shoutbox.php?history=1&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>VIP</option>';
if ( get_user_class() >= "5" )
$data .='<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>';
$data .='</select>';
return $data;
}
find
<a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/shout_delete.png' width='8px' alt='Supprimer' title='Supprimer' /></a>
change for
<a href='".$site_config['SITEURL']."/shoutbox.php?room=".$row['room']."&del=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/shout_delete.png' width='8px' alt='Supprimer' title='Supprimer' /></a>
also when edit a msg in room > 0 it return to room = 0,
so change in shoutedit.php
find
$res = SQL_Query_exec("SELECT * FROM shoutbox WHERE msgid=" . $_GET['msgid']);
if (mysql_num_rows($res) != 1)
linkit("$site_config[sITEURL]/$referer", "Aucun message avec l'ID $msgid.");
$arr = mysql_fetch_assoc($res);
if ($CURUSER["id"] != $arr["userid"] && $CURUSER["class"] < $edit_class)
linkit("$site_config[sITEURL]/$referer", T_("DENIED"));
change for
$res = SQL_Query_exec("SELECT * FROM shoutbox WHERE msgid=" . $_GET['msgid']);
$arr = mysql_fetch_assoc($res);
$room = ( $arr["room"] ) ? (int) $arr["room"] : 0;
if (mysql_num_rows($res) != 1)
linkit("$site_config[sITEURL]/$referer?room=$room", "Aucun message avec l'ID $msgid.");
if ($CURUSER["id"] != $arr["userid"] && $CURUSER["class"] < $edit_class)
linkit("$site_config[sITEURL]/$referer?room=$room", T_("DENIED"));
find
linkit("$site_config[sITEURL]/$referer", T_("MESSAGE_CANNOT_BE_EMPTY"), 1);
change for
linkit("$site_config[sITEURL]/$referer?room=$room", T_("MESSAGE_CANNOT_BE_EMPTY"), 1);
find
linkit("$site_config[sITEURL]/$referer", "Edition validée....");
change for
linkit("$site_config[sITEURL]/$referer?room=$room", "Edition validée....");
Warning: Cannot modify header information - headers already sent by (output started at /home/divxhunt/public_html/shoutedit.php:1) in /home/divxhunt/public_html/backend/functions.php on line 101
<?php
error_reporting(E_ALL ^ E_NOTICE);toerror_reporting(E_ERROR | E_PARSE);error_reporting(E_ALL ^ E_NOTICE);in the top of pages i am working on and just rem it out if done working on the page, and its fine.. If you did not change anything lol then should not error out..No users online
Torrents
Members
Online