I'm trying to create the equivalent of [noparse][/noparse] for my site.
But everything I try, only works a little bit, or not at all.
here's what I got now:
PHP Code:
<?php
//do function
function doNoParse($tstring){
  
$newtext preg_replace("|\[(.*?)\]|i","[*$1]",$tstring);
  return 
$newtext;
}

//test string
$text "this is a test thread!
[noparse]
this shouldn't parse.. at all
[color=green]this would be green![/color]
this should be seen
[color=yellow]this would be yellow![/color]
[whatever]
[/noparse]
[color=blue]this should be blue![/color]"
;

//strip out noparse tags and process tags within
$text preg_replace("(\[noparse\](.*?)\[\/noparse\])i",doNoParse("$1"),$text);

//echo the finished product
echo $text;
?>
but it just parses the color tags within the noparse tags...