Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
You should add more BBCodes like [s]/[strike] to strike text, maybe a [size=1-6] to change text size, possibly a
Strikethrough text doesn't have much use on these forums, size could be annoying, and as far as the "mod" messages go, if they're leaving a warning within a post then they should leave an edited by instead of a silent edit.
You were saying about color tags?
Thank you for your generous offer to provide the code, but I'd much rather add my own code in.
I play Code Golf with friends sometimes, here is a bbcode parser I did (341 bytes including shorttags):
<?foreach(array('b\*b'=>'b>$1</b','u\*u'=>'u>$1</u','i\*i'=>'i>$1</i','s\*s'=>'s>$1</s','url\*url'=>'a href="$1">$1</a','img\*img'=>'img src="$1"','url=%*url'=>'a href="$1">$2</a','color=%*color'=>'span style="color:$1;">$2</span')as$a=>$b){$i=preg_replace('/\['.str_replace('%','(.+?)\\',str_replace('*',']%[\/',$a)).'\]/i','<'.$b.'>',$i);}die($i);
This parser handles:
[b][u][i][s][img][url][color=][url=]
Oh and, here is the official information about this round of golf:
http://forumify.com/golf/bbcode/
The sourcecode for the parser is by no means supposed to be human readable. If you try to expand it out, you'll see a foreach statement with and array of patterns and replacements for the preg_replace, and a few str_replaces used for the most commonly occurring patterns in the code.
Pages: 1
[ Started around 1732414385.4753 - Generated in 0.035 seconds, 10 queries executed - Memory usage: 1.39 MiB (Peak: 1.49 MiB) ]