UBB.Dev
Posted By: DougMM Shout Box Help. - 07/15/2009 2:32 AM
OK, I have asked this question in the past and got nothing back from anyone. I would like to include UBB code into the Shout Box. My forum members are posting links to things that are about 5 or 6 lines long and are unclick able. Is there any way we can add the ubb code to the shout box so HTML links will work and what not.

Yes I understand the problem this could cause and I’m not concerned with that at this point in time. I would just like to know how to add the code to the shout box so html links, Img code and what not works.
Posted By: DougMMcts Re: Shout Box Help. - 01/10/2010 3:21 AM
Anyone?
Posted By: sirdude Re: Shout Box Help. - 01/11/2010 8:51 PM
sure.. you can..

you'd need to edit libs/html.inc.php

and add after the signature restriction
PHP Code
	 if ($type == "signature") {
$this->bbcode_parser->disallow_tag("custom");
}

if (
$type == "shoutbox") {
$this->bbcode_parser->disallow_tag("custom");
$this->bbcode_parser->disallow_tag("code");
$this->bbcode_parser->disallow_tag("php");
$this->bbcode_parser->disallow_tag("noparse");
$this->bbcode_parser->disallow_tag("quote");
$this->bbcode_parser->disallow_tag("post");
$this->bbcode_parser->disallow_tag("spoiler");
}


you'd put in whatever tags you would NOT like to be allowed in the shoutbox..

then go to libs/bbcode.inc.php and not return right away if 'shoutbox' but fall thru and parse the stuff..

one additional thing is for parsing 'magic urls', to not include the long string of the url, but to make it a clickable short link, like '[ Click Me ]'

then it works.. i've done this for my Shoutbox on a couple of sites..

one further thing i did, since i allow img's in the shoutbox, i added some css, to shrink down the images to a max-width kinda dealio so as to not 'break' the shoutbox..
© UBB.Developers