The current shoutbox format is
Jan_AQ
Dec17, 2007 11:52 pm [Edit]
I like ice cream.
If you would like to to be
Jan_AQ: I like ice cream.
Dec 17, 2007 11:52 pm [Edit]
Here's how to do it.
Open the file
/blocks/shoutbox/shoutbox.php
Find lines 39-48
if(dbnumrows($shouts) != 0) {
while($shout = dbassoc($shouts)) {
if(isNumber($shout['shout_name']) && isset($shout['penname'])) $shoutname = "<a href="'viewuser.php?uid=".$shout['shout_name'"]."'>".$shout['penname']."</a>";
else if(isset($shout['shout_name'])) $shoutname = $shout['shout_name'];
else $shout = _GUEST; // Just in case.
$content .= "<span class='sbname'>$shoutname</span><br /><span class='sbdatetime'>".date("$shoutdate", $shout['shout_datestamp']);
if($adminloggedin) $content .= " [<a href="'admin.php?action=blocks&admin=shoutbox&shout_id=".$shout['shout_id'"]."' class='sbadmin'>"._EDIT."</a>]";
$content .= "</span><br />n<span class='sbshout'>".$shout['shout_message']."</span><br />";
}
}
Replace with:
if(dbnumrows($shouts) != 0) {
while($shout = dbassoc($shouts)) {
if(isNumber($shout['shout_name']) && isset($shout['penname'])) $shoutname = "<a href="'viewuser.php?uid=".$shout['shout_name'"]."'>".$shout['penname']."</a>";
else if(isset($shout['shout_name'])) $shoutname = $shout['shout_name'];
else $shout = _GUEST; // Just in case.
$content .= "<span class='sbname'>$shoutname:</span>n<span class='sbshout'>".$shout['shout_message']."</span><br /><span class='sbdatetime'>".date("$shoutdate", $shout['shout_datestamp']);
if($adminloggedin) $content .= " [<a href="'admin.php?action=blocks&admin=shoutbox&shout_id=".$shout['shout_id'"]."' class='sbadmin'>"._EDIT."</a>]</span><br />";
}
}
(Only lines 44-46 have been changed but copying and pasting more visable sections might be easier for some people)
Upload and enjoy.
This has been tested. Live demo: http://www.potionsandsnitches.net/fanfiction/
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
how would I go about moving the input (white) box in the shoutbox to the bottom so that it is like this:
shout 1
shout 2
shout 3
shout 4 etc
-------------------------
| |
| |
| |
-------------------------
|Shout | | 200|
Members are finding it intrusive being at the top, like its in the way, and would prefer it at the bottom, after the actual shouts.
i think that you take this (lines 40-44)
if(!isMEMBER) $content .= "<div><label for='shoutname'>"._NAME.":</label> <input type='text' name='shoutname' value='' style='display: block; width: 90%; margin: 0 auto;' maxlength='30'></div>";
else $content .= "<div><span class='label'>"._NAME.":</span> ".USERPENNAME."</div>";
if(!isMEMBER && $captcha) $content .= "<div><label for='userdigit'>"._CAPTCHANOTE."</label><input MAXLENGTH=5 SIZE=5 name="userdigit" type="text" value=""><div style='text-align: center;'><img width=120 height=40 src="""._BASEDIR."includes/button.php"" style="border: 1px solid #111;"></div></div>";
$content .= "<div><label for='shout_MESSAGE'>"._SHOUT.":</label> <textarea name='shout_message' class='mceNoEditor' id='shout_message' rows='4' cols='15' maxlength='200' style='display: block; width: 90%; margin: 0 auto;' onkeyDown='return ismaxlength(this)'></textarea></div> <input type='submit' name='shout' id='shout' value='"._SHOUT."'> <input size='1' class='small' type='text' id='counter' value='200'></form></div>";
}
and move it to before the last line
?>
I'm not sure though, and didn't test it. Use at your own risk.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
thanks Jan but it didnt quite work. It moved the box but messed up the rest of the page. I put it back to normal again.