Page 1 of 1

BBCode parser

Posted: Fri Nov 11, 2005 7:10 am
by Jenk
Hi,

Just spotted when replying to someone's thread, that if you reply with an uneven number of

Code: Select all

or

Code: Select all

tags, none get parsed.

The exact example I found this with was two opening, one close:

[quote]Hi, please use PHP tags when posting PHP code (i.e. swap the

Code: Select all

tags for

Code: Select all

tags )

To use an objects properties/methods within a function, you must decalre the global object:

[php]<?php

function someFunction() 
{
    global $obj;
    $obj->method();
}

?>[/php]

[/quote]

This isn't really a suggestion, more of a notification but maybe someone would like to look into the bbcode parser phpbb uses and perhaps submit a contribution if you are bored

Posted: Fri Nov 11, 2005 7:17 am
by feyd
that's the way it's engineered last I checked.

Posted: Fri Nov 11, 2005 11:05 am
by Chris Corbyn
I do miss our custom BBCode parsers :( Line wrapping is the thing that bugs me most about these. I imagine that it's just a case of applying CSS "white-space: no-wrap" to the <code> blocks?

Posted: Fri Nov 11, 2005 11:29 am
by Jenk
meh, I'm still just getting to grips with making a bbcode parser that works, let alone a customisable one :P