Topic: Switch from bbcode to traditonal html

Hello everyone!

I was wondering if it is possible to use html tags instead of BBcode tags.

so <a href="http://google.com"></a> would create a link instead of

[url = http://google.com]Test[/url]

I'd like it to work this way for all major tags, like img, a, b, i, and u. I'm pretty sure this would take a lot of chopping up the parser.php file.

Thanks in advance! big_smile

I don't HAVE a signature, ok?

Re: Switch from bbcode to traditonal html

Indeed it would. It would also involve a lot of cleaning to prevent people from embedding client side scripting into posts.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Switch from bbcode to traditonal html

Hmm... I can feel the oncoming pain and suffering.

I don't HAVE a signature, ok?

Re: Switch from bbcode to traditonal html

just grep (or search each file, in windows) for parse_message() calls, and remove them. Skip the parsing and you get html... I'm not sure where the stripping of html "<" ">" and "&" and such happends but I think it's inside the parse_message call.

Or, for a safer site, change the parse_message() function into a single preg_replace, to remove anything with onclick/onload, etc... "<script .*>" so on.

echo "deadram"; echo; fortune;

Re: Switch from bbcode to traditonal html

You might try modifying parse_message so that it uses something like this: http://pixel-apes.com/safehtml/

I'm not sure how *safe* it really is, but it might be worth investigating.

Looking for a certain modification for your forum? Please take a look here before posting.

6

Re: Switch from bbcode to traditonal html

theres a mod to allow admins and mods to do this, im sure with a little fiddling you can make it so all members can do so.
although, this could be pritty riskey.

Re: Switch from bbcode to traditonal html

Someone did reply! tongue
I like pogenwurst's idea... it seems pretty good to me. I'll have to take a look at the code when I get home.
I am naturally going to make a copy of parser.php, that way if it gets serverly screwed up I can return it to it's prior working order.
Rickard: do you happen to know if the safehtml parser is safe to use with punbb? Any tips and concerns would be super helpful. smile

Thanks everyone for the help!

I don't HAVE a signature, ok?

Re: Switch from bbcode to traditonal html

umm

I don't HAVE a signature, ok?

9

Re: Switch from bbcode to traditonal html

I used it in some forum used Drupal and i realy hate it, i like BBCode or Wiki format.

If your people come crazy, you will not need to your mind any more.