News:

CRITICAL UPGRADE CPG RELEASE 1.6.30
Version 1.6.30 removes a serious security issue that could allow unauthorized access to modify your site. Upgrade as soon as possible.

Main Menu

How add new bbcode rule?

Started by LFox, June 23, 2008, 01:33:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LFox

How add new bbcode rule?
I need [align=left ] [/align] bbcode rule on my gallery... how can I do this?

Thanx)

Nibbler

Edit the bb_decode() function in include/functions.inc.php.

LFox

well... I edited it and now align tags don't show in the text. But they are still don't work(((

LFox

is this code right or not?

--------------
        // [align=left] and [/align] for align text.
        $text = str_replace("[align=left]", '<align=left>', $text);
        $text = str_replace("[/align]", '</align>', $text);
--------------

Nibbler

No. You have to use HTML that actually exists, not something you made up yourself.

Joachim Müller

There's no HTML tag <align>. Use <div align="left"> or <div style="text-align:left">. As Nibbler suggested: you can't make up HTML tags.