Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: How add new bbcode rule?  (Read 3251 times)

0 Members and 1 Guest are viewing this topic.

LFox

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
How add new bbcode rule?
« 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)
Logged

Nibbler

  • Guest
Re: How add new bbcode rule?
« Reply #1 on: June 23, 2008, 01:38:10 pm »

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

LFox

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: How add new bbcode rule?
« Reply #2 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(((
Logged

LFox

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: How add new bbcode rule?
« Reply #3 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);
--------------
Logged

Nibbler

  • Guest
Re: How add new bbcode rule?
« Reply #4 on: June 23, 2008, 01:48:57 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How add new bbcode rule?
« Reply #5 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.