shoutbox scroll length

Started by daffy81, October 10, 2011, 11:31:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CodeMonkey

No i just "expect" people to know how to change a number
QuoteDESC LIMIT 30
"LIMIT" kind of gives it away  ;) ;) Enjoy messing around the with shoutbox.php though ;) good luck :P
Do NOT PM me directly post in the forums so other users can benefit also :) If you like my posts 1+rep me :)

DarkSource

I wanted to increase the post limit cause I got tired of leaving the room for a couple of mins and missing half the conversation in the shoutbox.  True I could just pull the history every time I leave an come back but it gets rather ridicules doing this when all I missed was a few shouts.  So there for its better for me to increase the shoutbox limit to 50 instead of 30.  Don't know were the 300 hundred is coming from cause I never said anything that high.  Also don't know what CodeMonkey is on about guess he expects everyone to be experts right off the bat ;)

Mindless

im just saying be aware o the setting change tis all  :P

daffy81


CodeMonkey

Errmm, Would have thought this would be easy if you dont know how to make more shouts appear then you should't really be anywhere near a code editor  ???  ::)
Do NOT PM me directly post in the forums so other users can benefit also :) If you like my posts 1+rep me :)

Mindless

Thats Why theres a link ...shout history - Pulling 300 results per user per refresh, do the math, your getting a code thats optimized to stop silly shit with mysql  :P

daffy81

Thanks to DarkSource for pointing this out, but he noticed, when shoutbox gets to around 30posts, you cant scroll no further down. ( this can be a headache for some)

open
shoutbox.php on or around line 365


$res = sql_query( "SELECT s.id, s.userid, s.date, s.text, s.to_user, u.username, u.pirate, u.king, u.class, u.donor, u.warned, u.leechwarn, u.enabled, u.chatpost, (SELECT count(id) FROM messages WHERE receiver = ".$CURUSER['id']." AND unread = 'yes' AND location = '1') as pms FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC LIMIT 30" ) or sqlerr( __FILE__, __LINE__ );



simply change the 30 to whatever you wish. i set mine to 300 lol