#21 17-04-2012 
well, that would be very helpful BO - I have a php file, and I can let you have that - you will see by looking at the page source in any page with a spoiler tag in it that the " is being turned into a different encoding.

<div align="center">
<div style="margin: 5px 20px 20px; width: 90%;">
<div style="text-align: left; padding: 4px; background: #72B73A; repeat-x scroll 0% 0% transparent; border: 1px solid #2C6302; -moz-border-radius:5px; color:#ffffff; text-shadow:0 -1px #4B7926; font-weight:bold; ">
Spoiler <input type="button" onclick="if (this.parentNode.parentNode.getElementsB​​yTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsB​y​TagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsB​yTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="width: 45px; font-size: 10px; margin: 0px; padding: 0px;font-family: Tahoma" value="Show"></div><div><div style="border-right: 1px solid #000000; border-width: 0px 1px 1px; border-style: none solid solid; border-color: #000000; padding: 4px; -moz-border-radius:5px; display: none; text-align: left">
gah gah gah<br />

and so of course it is breaking the javascript.... I think it is another file which is affecting it. I am just not sure which one.

PHP Code:
// Assign pattern and replace values.
$pattern = array("#\[spoiler=(?:&quot;|\"|')?(.*?)[\"']?(?:&quot;|\"|')?\](.*?)\[\/spoiler\](\r\n?|\n?)#si""#\[spoiler\](.*?)\[\/spoiler\](\r\n?|\n?)#si");

$replace = array("<div><div class=\"spoiler_header\">$1 <a href=\"javascript:void(0);\" onclick=\"javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}\">(Click to View)</a></div><div class=\"spoiler_body\" style=\"display: none;\">$2</div></div>""<div><div class=\"spoiler_header\">Spoiler <a href=\"javascript:void(0);\" onclick=\"javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='(Click to View)';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='(Click to Hide)';}\">(Click to View)</a></div><div class=\"spoiler_body\" style=\"display: none;\">$1</div></div>");

preg_match($pattern[0], $message) or preg_match($pattern[1], $message))
$message preg_replace($pattern$replace$message);
$find = array(
"#<div class=\"spoiler_body\">(\r\n?|\n?)#",

$replace = array(
"<div class=\"spoiler_body\">",
$message preg_replace($find$replace$message);

The site don't jive? PRESS F5 Flower

#22 17-04-2012 
Ok, this looks a bit more complex than anything I've ever dealt with, regex-wise, but that may be due to the fact that this stuff is trying to alter code in a specific 'language format' such as .php, .js or .html.

It'll take me a little while to get into it, but I'll do what I can Wink

#23 18-04-2012 
Yes, it has to go through the parser to be converted to bb code - so the regular expression is making sure we only put approved characters in.

This is why we don't have many fancy bb codes Big Grin
The site don't jive? PRESS F5 Flower

#24 09-05-2012 

I fixed the spoiler code Big Grin

oh happy day.....

The site don't jive? PRESS F5 Flower

#25 09-05-2012 
GREAT! I need to go fix one of my uploads right away now Big Grin

ETA: Yup, 'Infoplus' now works again, too Big Grin Thank you, Lee Heart

#26 09-05-2012 
I am so happy BO, you cannot imagine. I really felt I was letting you all down by NOT providing this basic function on Leefish, so I am totally OVER THE MOON and jumping about with joy

Big Grin Big Grin
The site don't jive? PRESS F5 Flower

#27 09-05-2012 
Yes, I *can* imagine... I feel the same way about accepting your regexp thingy, and then NOT coming up with a viable solution...

But anyway, in my opinion YOU didn't let anyone down. I feel that the people who broke functionality in the update of the underlying forum software, are the ones to blame. THEY let us down!

#28 09-05-2012 
awww, you offered to help - that means a lot.

I have hurried over to the software developers site and posted my solution. We were not alone.....
The site don't jive? PRESS F5 Flower

#29 09-05-2012 
Yay! I could almost hear you singing with delight! And in tune too! Just been to check the spoiler on the Brixham and it's back!
Karen Lorraine, proud to be a member of LeeFish since Jan 2012.


Sorry, that is a members only option