Longer Shoutbox

Forum
Last Post
Threads / Messages

ipengu

Member
Premium Member
Joined
Aug 8, 2011
Messages
50
Points
0
Age
34
Location
Central NY
Mysidian Dollar
5,061
Well by longer, I mean more shouts before it starts over-writing them on the page.
(Strong suggestion to developers working on the official releases, make the shoutbox store the shouts and let people browse the old shouts)

Open: shoutbox.php
Find: (Around line 14) NOTE: You will not find this exact line as I replaced the number of shouts to show with the # sign
PHP:
$query = "SELECT * FROM ".$prefix."shoutbox ORDER BY id DESC LIMIT 0, #";

Replace with: (I put 20 as an example, as that's what I use on my website)
PHP:
$query = "SELECT * FROM ".$prefix."shoutbox ORDER BY id DESC LIMIT 0, 20";

Now say you put 50, that's going to make one longggggg page considering this script does not use much control of the shoutbox shout div, so add the following to any/every theme's css on your website
Code:
.enclosecomments
{
height:400px; 
overflow: auto;
}

I feel 400px is adequate room to show shouts at a basic level, and the overflow tag is set for once, and only once the shouts break past 400px long it will then add a scroll bar.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,274
Messages
33,115
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top