coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: LFox on June 23, 2008, 01:33:54 PM

Title: How add new bbcode rule?
Post by: LFox on June 23, 2008, 01:33:54 PM
How add new bbcode rule?
I need [align=left ] [/align] bbcode rule on my gallery... how can I do this?

Thanx)
Title: Re: How add new bbcode rule?
Post by: Nibbler on June 23, 2008, 01:38:10 PM
Edit the bb_decode() function in include/functions.inc.php.
Title: Re: How add new bbcode rule?
Post by: LFox on June 23, 2008, 01:41:10 PM
well... I edited it and now align tags don't show in the text. But they are still don't work(((
Title: Re: How add new bbcode rule?
Post by: LFox on June 23, 2008, 01:41:48 PM
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);
--------------
Title: Re: How add new bbcode rule?
Post by: Nibbler on June 23, 2008, 01:48:57 PM
No. You have to use HTML that actually exists, not something you made up yourself.
Title: Re: How add new bbcode rule?
Post by: Joachim Müller on June 24, 2008, 02:28:51 PM
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.