[Forum] Spoiler Tag (found one)

Forum for reporting bugs and errors.

Moderators: Runic Games, Perfect World

[Forum] Spoiler Tag (found one)

Postby coffinsnail » Mon Nov 16, 2009 8:59 pm

The spoiler tag does not always work, sometimes you can post very long things, sometimes you cant.. its annoying when your tring to show something without having it so you scroll 5 pages...
Last edited by coffinsnail on Wed Nov 18, 2009 8:08 pm, edited 1 time in total.
User avatar
coffinsnail
 
Posts: 340
Joined: Sun Nov 01, 2009 11:38 am

Re: [Forum] Spoiler Tag

Postby JediFreeman » Tue Nov 17, 2009 4:32 pm

hey there, do you have an example post where this is happening? send me a link and I will take a look.
JediFreeman
Runic Staff
 
Posts: 204
Joined: Wed May 27, 2009 2:22 pm
Location: Seattle, WA

Re: [Forum] Spoiler Tag

Postby coffinsnail » Tue Nov 17, 2009 5:09 pm

i modified the spoilers i was tring to make and it seems very sporadic for some reason. i tried to past the same text here in a spoiler to see if it did the same thing and it didnt it actualy worked.

im running firefox as my browser is there a cache file that might be causing the issues in firefox?
User avatar
coffinsnail
 
Posts: 340
Joined: Sun Nov 01, 2009 11:38 am

Re: [Forum] Spoiler Tag (found one)

Postby coffinsnail » Wed Nov 18, 2009 8:08 pm

Jedi got one not working now....

check this thread viewtopic.php?f=28&t=6347&p=64449#p64449 its the first spoiler tag its not showing for me for some reason.
User avatar
coffinsnail
 
Posts: 340
Joined: Sun Nov 01, 2009 11:38 am

Re: [Forum] Spoiler Tag (found one)

Postby TheAlien » Thu Nov 19, 2009 2:29 am

Yeah, the spoiler tags here bug me as well; many other members report the same. They only malfunction in IE. A fix would be much welcome.
I tried looking for the problem myself, but I can't make anything out of it.
The annoying thing is that the code is written in JQuery, which is really obscure. Never worked with it. Give me any other JS code and (with time) I'll be able to track down the problem. This code is just...not readable :? x(
TheAlien
 
Posts: 77
Joined: Fri Nov 06, 2009 1:05 pm

Re: [Forum] Spoiler Tag (found one)

Postby JediFreeman » Thu Nov 19, 2009 12:29 pm

fixed. they were actually breaking with the [url] bbcode tags in them. I just looked at them in IE 6, 7, 8, Opera, Chrome and Firefox. If you are still seeing a problem, let me know.

TheAlien wrote:The annoying thing is that the code is written in JQuery, which is really obscure. Never worked with it. Give me any other JS code and (with time) I'll be able to track down the problem. This code is just...not readable :? x(


It actually is not written in jquery. here is the spoiler tag bbcode, its pretty straight forward.

Code: Select all
<div style="color:#d0d0d0; padding: 3px; background-color: #484848; border: 1px solid #757575; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #757575; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') {  this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>hide</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler: </b><a href=\'#\' onClick=\'return false;\'>show</a>'; }" /><b>Spoiler: </b><a href="#" onClick="return false;">show</a></span></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>


The old one is here:
Code: Select all
<div style="color:#d0d0d0; padding: 3px; background-color: #484848; border: 1px solid #757575; font-size: 1em;"><div style="text-transform: uppercase; border-bottom: 1px solid #757575; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerHTML = '&lt;b>Spoiler: &lt;/b>&lt;a href=\'#\' onclick=\'return false;\'>hide&lt;/a>'; }else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '&lt;b>Spoiler: &lt;/b>&lt;a href=\'#\' onclick=\'return false;\'>show&lt;/a>'; }" /><b>Spoiler: </b><a href="#" onclick="return false;">show</a></div><div class="quotecontent"><div style="display: none;"><script type="text/javascript">var text = '{TEXT}'; text = text.replace("[spoiler]", ''); text = text.replace("[/spoiler]", ''); document.write(text);</script></div></div></div>


See if you can spot the problem with the old one :-P
JediFreeman
Runic Staff
 
Posts: 204
Joined: Wed May 27, 2009 2:22 pm
Location: Seattle, WA

Re: [Forum] Spoiler Tag (found one)

Postby TheAlien » Thu Nov 19, 2009 1:48 pm

Wow, thanks! It works 8-)
I checked the codes btw. Seems to me IE didn't like it that there was no closing </span> tag, despite there being <span />.

I was looking in the wrong direction before, because IE reported an error in the jquery.js :D
TheAlien
 
Posts: 77
Joined: Fri Nov 06, 2009 1:05 pm

Re: [Forum] Spoiler Tag (found one)

Postby JediFreeman » Thu Nov 19, 2009 1:54 pm

that wasn't the only problem, sadly. the other issue was the [url] tag generates an a href tag with quote marks, which closed the string quotes in the javascript and broke it. whee!
JediFreeman
Runic Staff
 
Posts: 204
Joined: Wed May 27, 2009 2:22 pm
Location: Seattle, WA


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest