Thanks firefly! Here is probably a quick question for you then.
So I think I am supposed to add another function see code below (copy of parseurl just changed to reflect different bbcode)....
Quote:
// ###################### Start parseSHARE #######################
unset($shareSearchArray);
unset($shareReplaceArray);
function parseshare($messagetext)
{ // the auto parser - adds [share] tags around neccessary things
global $shareSearchArray, $shareReplaceArray;
if (!isset($shareSearchArray)) {
$shareSearchArray = array(
"/([^]_a-z0-9-=\"'\/])((https?|ftp|gopher|news|telnet):\/\/|www\.)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si",
"/^((https?|ftp|gopher|news|telnet):\/\/|\\)([^ \r\n\(\)\^\$!`\"'\|\[\]\{\}<>]*)/si"
);
$shareReplaceArray = array(
"\\1[share]\\2\\4[/share]",
"[share]\\1\\3[/share]"
);
$text = preg_replace($shareSearchArray, $shareReplaceArray, $messagetext);
}
return $text;
}
|
If I want to add my share tags around any string starting with "\\", how would I do it? It looks like the lines with www\. in them is where I need to make this modification, but there's a bunch of \/\ stuff that seems like it would get all hosed up if I throw a \\ in the mix...This is all pretty foreign to me, but at least I am trying.
Any help is appreciated!