Topic: Request: extention to BBCode

While there's obviously a large ammount of code that would be cool, one thing jumps out at me.

How about the good 'ol list?

  • list item

Just a thought!

Through the awful grace of God

"Dude, CSS and XHTML are like two boys who are deeply in love.  They're perfect for each other, but no one can acccept it."

Re: Request: extention to BBCode

Good idea, and pretty easy to make too I think smile

Re: Request: extention to BBCode

perhaps also [#] for numbered list?
wink

Re: Request: extention to BBCode

Hells yes!

Through the awful grace of God

"Dude, CSS and XHTML are like two boys who are deeply in love.  They're perfect for each other, but no one can acccept it."

5 (edited by elbekko 2006-02-24 22:04)

Re: Request: extention to BBCode

Anyone care to create a mod for it? tongue I'm not so good with RegEx else I'd do it.

EDIT: Pff, I tried, but my RegExp is so bad that I can't do it tongue

Re: Request: extention to BBCode

Okay, so I decided to not use RegExp and got it to work tongue

Add this function to parser.php :

function parse_lists($string) 
    {
    $list = str_replace("[*]","<li style=\"list-style:inside\">",$string);
    $list = str_replace("[#]","<li style=\"list-style:inside; list-style-type:decimal\">",$list);
    $new_str = str_replace('[list]', '<menu>', $list);
    $string = str_replace('[/list]', '</menu>', $new_str);
    
    return $string;
    }

And somewhere in the function parse_message() add a call to this function. Now, if someone with 1337 RegExp skills could make it fully compliant, be my guest smile