Shoutbox 1.0b4 This mod adds a shoutbox to the left of the Info Centre. It is a new rewrite inspired by caliman's Shoutbox mod. This mod is very much a beta and comments are much appreciated. Please post any comments on the Boardmod forums - http://www.boardmod.org/yabb/YaBB.pl?board=new_mods_beta;action=display;num=1066339618. Changes in v1.0b4: - Added SSI and support. More details below. - Fixed the guest access error where the whole page was shown in the shoutbox after logging out. - Removed the hard-coded CSS from the submit, refresh and wipe buttons, so they now take their appearance from the main board stylesheet. - Fixed a little HTML error on the boardindex. SSI and support: To insert the shoutbox in a normal page via SSI, use a tag pointing to the main YaBB.pl script and the shoutboxssi command e.g. This inserts the shoutbox iframe and the post fields, nothing else, so you are free to wrap it into your page however you like. To insert the shoutbox in your template, use: This inserts the shoutbox with a "Shoutbox" title bar. Installation: - Copy Shoutbox.pl to the Sources directory. - Copy shoutbox_template.html, shoutbox_messages.txt and shoutbox_vars.pl to the Variables directory. You may need to CHMOD these 766. - Run the mod. - Upload the files listed below. - Set the options using the "Shoutbox options" page linked to from the main admin centre. The following files are edited and need to be uploaded: - english.lng - YaBB.pl - Sources/Admin.pl - Sources/BoardIndex.pl - Sources/SubList.pl - Sources/Subs.pl Ronnie http://www.badpoo.co.uk/ronnie/pages/yabbmods.shtml english.lng 1; $shout_txt{'1'} = "enter message here"; $shout_txt{'2'} = "Shout"; $shout_txt{'3'} = "Refresh"; $shout_txt{'4'} = "Wipe"; $shout_txt{'5'} = "ShoutBox"; $shout_txt{'6'} = "Anon"; $shout_txt{'7'} = "Shoutbox Options"; $shout_txt{'8'} = "Level of guest interaction"; $shout_txt{'9'} = "Highlight each user's own shouts?"; $shout_txt{'10'} = "Show field to let users change their name?"; $shout_txt{'11'} = "Checked = Add new shouts to top of Shoutbox. Unchecked = Bottom."; $shout_txt{'12'} = "Scroll bar setting for iframe"; $shout_txt{'13'} = "Auto"; $shout_txt{'14'} = "Maximum number of shouts in shoutbox"; $shout_txt{'15'} = "Maximum number of characters in a shout"; $shout_txt{'16'} = "Seconds to auto-refresh Shoutbox after. -1 to disable."; $shout_txt{'17'} = "Width of Shoutbox in pixels"; $shout_txt{'18'} = "Height of Shoutbox in pixels"; $shout_txt{'19'} = "Number of rows in Info Centre (not including main Info Centre title row) while not logged in"; $shout_txt{'20'} = "Edit Shoutbox template"; $shout_txt{'21'} = "Cannot contain non-numeric characters."; $shout_txt{'22'} = "Restore to default"; $shout_txt{'23'} = "You can restore a default template if you make mistakes with a new one. You must leave <!-- MARKER --> in the template - this is where the shouts will be inserted. The stylesheet classes .message1 and .message2 are the alternating background colours for rows in the table. .ownmessage is the colour for each user's own messages, if you are using this option."; $shout_txt{'24'} = "Remember that if you are using, for example, a table row for each shout, you will need to wrap these in an appropriate table tag in the template surrounding the <!-- MARKER --> line.
The following variables can be used. They must remain in uppercase.
TIME: time in 24 hour format.
NAME: their name.
SHOUT: the shout itself.
BGCOLOR: displays the alternating CSS class."; $shout_txt{'25'} = "...[Snipped]"; $shout_txt{'26'} = "Show \"(Guest)\" after guest's manually entered names?"; $shout_txt{'27'} = "Show nothing"; $shout_txt{'28'} = "Show shoutbox but no shouting"; $shout_txt{'29'} = "Full access"; $shout_txt{'30'} = "Individual shout template";
YaBB.pl if(!(($action eq 'login') || ($action eq 'login2') || ($action eq 'register') || ($action eq 'register2') || ($action eq 'reminder') || ($action eq 'reminder2'))) { &KickGuest; } if(!(($action eq 'login') || ($action eq 'login2') || ($action eq 'register') || ($action eq 'register2') || ($action eq 'reminder') || ($action eq 'reminder2') || ($action =~ /^shoutbox/))) { &KickGuest; } Sources/Admin.pl - $txt{'764'}
- $shout_txt{'7'}
Sources/SubList.pl 'setreserve2',"AdminEdit.pl&SetReserve2", 'shoutbox',"Shoutbox.pl&Shoutbox", 'shoutboxadd',"Shoutbox.pl&ShoutboxAdd", 'shoutboxconfig',"Shoutbox.pl&ShoutboxConfig", 'shoutboxconfig2',"Shoutbox.pl&ShoutboxConfig2", 'shoutboxdisplay',"Shoutbox.pl&ShoutboxDisplay", 'shoutboxssi',"Shoutbox.pl&ShoutboxSSI", 'shoutboxtemplate',"Shoutbox.pl&ShoutboxTemplate", 'shoutboxtemplate2',"Shoutbox.pl&ShoutboxTemplate2", 'shoutboxwipe',"Shoutbox.pl&ShoutboxWipe", Sources/Subs.pl $yyimages = $imagesdir; #Shoutbox #code by ms_ukyankee $yyshoutbox = qq~
$shout_txt{'5'}
~; require "$sourcedir/Shoutbox.pl"; &ShoutBox(2); $yyshoutbox .= qq~
~; #Shoutbox End