Ran into a snag with the replacements that allows for the admins and mods to mouseover the code. Now, if you put [you] between another vbcode (like in the spoiler vbcode hack, it parses the code but makes it go outside the button. Like this code:
[DISABLE][SPOILER=Change this to whatever you like]And it still works. What do you think, [you]? Do you like it?[/SPOILER][/DISABLE]
This part:
Boofo? Do you like it?')">
is outside the spoiler tag now. It parsed the [you] ok (the Boofo part) but throws that and everything after it outside the spoiler tag button. Here is the code I am using in the functions.php:
PHP Code:
if (in_array($bbuserinfo[usergroupid], array(5, 6, 7))) {
$bbcode = preg_replace("/(\[)(you)(])/siU", "<b><i><a title=\"[you] vbcode\">".$bbuserinfo[username]."</a></i></b>", $bbcode);
} else if ($bbuserinfo[userid]>0) {
$bbcode = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $bbcode);
} else {
$bbcode = preg_replace("/(\[)(you)(])/siU", "you", $bbcode);
}
Any ideas how to fix that? I like the mouseover and would like to keep it.