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
Shoutbox with privates rooms, bbcodes, s
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2013-02-12 21:35:35
How to add a sound on a new PM in shoutbox?

When new message arrives...

THANKS
Unknown User
2013-02-13 08:53:55
deleted
Unknown User
2013-02-13 16:57:05
thank you for the room but it is unfortunate this shoutbox

imagine 100 people who speak
Unknown User
2013-02-13 18:58:16
I managed to do this shoutbox to work properly but another problem has arisen. I fail to make announcement for new torrents uploaded.

The old code from torrents-upload.php not wants to write anything into shoutbox table, I have changed it in many ways but no result...

Maybe someone has a solution?
Unknown User
2013-02-13 19:21:29
something like this might work.. I never tested it with the 1000 torrents an day on my site imagine the spam...

$shoutbox_query = SQL_Query_exec("INSERT INTO shoutbox (msgid, user, message, date, userid, room) VALUES (NULL, 'System', " . sqlesc($sbmessage) . ", '" . get_date_time() . "', '0', '0')");

ofcource you would have to set $sbmessage to something LOL but you should be able figure that message out...
Unknown User
2013-02-14 11:37:29
Thanks ArcticWolf, It works now in this form:



$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]

I had to create a user called System with ID: 100 because if the user ID is not a valid one isn't showing nothing on shoutbox, even if the message is recorded into database.
Unknown User
2013-02-27 15:37:38
ok don't know why i didn't upload the good files, so

shoutbox.php

find



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....");




so now it return to the good room  :)

1st post edited
Unknown User
2013-03-04 10:52:01
Hi!

when I try to edit the shout I get this:

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
Unknown User
2013-03-08 13:07:33
the first line in your shoutedit.php must be :



<?php

Unknown User
2013-03-08 14:34:05
NO didn't helped... and the first line was <?php the one after the  script end wasn't - but still I get the same error even I corrected the one... ?
Unknown User
2013-03-08 15:52:52
thats normal, its the header redirect... On my site i turned off displaying errors globally and just turn them on in phps i am working on
Unknown User
2013-03-08 20:18:31
Ok is this allright:

in backend/functions

error_reporting(E_ALL ^ E_NOTICE);
to


error_reporting(E_ERROR | E_PARSE);



I mean it solved my problem - bu would like to know - now I'll get only errors if I have syntax mistakes in my code?
Unknown User
2013-03-08 20:47:47
i put

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..

the error_reporting at the top of phps over-rides the 1 in functions

if using the SQL_Query_exec for sql stuff it logs the errors in it anyway to your_siteurl/admincp.php?action=sqlerr no matter what the display is set to.  Just hiding the silly errors makes your site look less like newbies heheh and more secure.
Unknown User
2013-03-08 21:23:08
cool THANKS for info - I'll rather see the errors only in my SQL Error report in adminCP then with all users on site  :)

THANKS!
Unknown User
2013-04-01 10:53:03
Very nice job, works perfectly...thanks :)
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728