Wow that was a pain...
Thanks Jim. I was able to use portions of your code (very little change) to
get it done...
//Code from Jim Davis' DP_ParseBBML
CodeBlocks = ArrayNew(1);
CurPos=1;
while (FindNoCase("[code]", str, CurPos) GT 0)
{
sCodePos = FindNoCase("[code]", str, CurPos) + 6;
eCodePos = FindNoCase("[/code]", str, sCodePos);
if (eCodePos EQ 0)
{
break;
}
else
{
CurPos = sCodePos;
};
CurCodeBlock = Mid(str, sCodePos, eCodePos - sCodePos);
str = RemoveChars(str, sCodePos, eCodePos - sCodePos);
CurCodeBlock = HTMLCodeFormat(CurCodeBlock);
ArrayAppend(CodeBlocks, CurCodeBlock);
str = Insert("***#ArrayLen(CodeBlocks)#***", str, sCodePos -
1);
};
//End Jim's Code
Here I did all of my old usual tag replaces and emoticon replaces...
//More code from Jim Davis' DP_ParseBBML
if (ArrayLen(CodeBlocks) GT 0) {
for (Cnt = 1; Cnt LTE ArrayLen(CodeBlocks); Cnt = Cnt + 1) {
str = ReplaceNoCase(str, "[code]***#Cnt#***[/code]",
CodeBlocks[Cnt]);
};
};
any objections to me keeping it in there?
btw... I'm pretty sure that is the same colorcode tag I was thinking of.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.12 - Release Date: 1/14/2005
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190604
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54