ok... sorted this...
into inc_func_common, add these two functions:-
Function Cloak(fstring)
set re = new RegExp
re.pattern = "\[code\]([\s\S]+?)\[/code\]"
re.ignorecase = true
re.global = true
set matches = re.execute(fstring) ' find matches
if matches.count <> 0 then
for each match in matches
cloakstring = cloakstring & "!£$%^&*()_+" & match.value ' full match including tags
fstring = replace(fstring,match.value,"xxxCODEBOXxxx",1,1)
next
end if
Cloak = fstring
set re = nothing
set matches = nothing
end function
Function DeCloak(Fstring)
cloakarray = split(cloakstring,"!£$%^&*()_+")
for cntr = 1 to ubound(cloakarray)
fstring = replace(fstring,"xxxCODEBOXxxx", cloakarray(cntr),1,1)
next
decloak = fstring
end function
At the very top of the file, just after the copyright comment block, we need to define a global variable..., so add this line:Dim CloakString
find the function called formatstr and then, find this line:-fString = ChkAHREFs(fString)
insert this directly before that line fstring = Cloak(fstring) 'Remove code tag content to prevent forum code formatting
next, find this line:-fString = ReplaceCodeTags(fString)
and REMOVE IT.
Lastly, find this line:-FormatStr = fString
just BEFORE that line, add these two lines of code:fstring = decloak(fstring) ' put back the code tags and content
fString = ReplaceCodeTags(fString)
Voila!!!
Enjoy!