I'm just starting, but it seems way to slow to run.
Here is the function that replaces [ code ] This code will be colored blue[ /code ] into blue text without the [ code ] tags.
Code: Select all
function parseCode($input){
if (eregi("(.*)(\Code: Select all
)(.*)(\[/code\])(.*)",$input, $regs)) {
//$regs[3] = nl2br($regs[3]);
$input = $this->parseCode("$regs[1] <div style=\"color: blue\"> $regs[3] </div> </b> $regs[5]");
} else {
return $input;
}
return $input;
}Thank you,
apg88
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]