BBCode parser

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

Post Reply
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

BBCode parser

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's the way it's engineered last I checked.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

meh, I'm still just getting to grips with making a bbcode parser that works, let alone a customisable one :P
Post Reply