Page Index Toggle Pages: 1 [2] 3 4  Send TopicPrint
Very Hot Topic (More than 25 Replies) Spoiler Tag V1.5 for YaBB 2.4 (Read 29654 times)
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #15 - May 7th, 2010 at 6:37pm
Print Post  
Valtiel wrote on May 7th, 2010 at 3:53pm:
Thanks, used parts of your mod for my old YaBB - our spoiler mod was a little buggy, yours is very nice Wink . Oh, Chrome doesn't seem to care about the CSS style, Firefox, IE and Opera work well.

Okay, thanks!

I'll have to check it out in Chrome and try to get it fixed in the future.

It's not actually XHTML valid either - I keep meaning to come back to this one and giving it a rewrite - I'll try to get it done in the next update...
  
Back to top
 
IP Logged
 
Valtiel
God Member
*****
Offline


Copy & paste coder

Posts: 873
Joined: Sep 5th, 2003
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #16 - May 10th, 2010 at 3:27pm
Print Post  
Hm, we have a problem with the tag. Some spoilers can't be opened. It seems to be totally randomly. For example on one page all spoiler buttons work, on the next only the first one. Or the first three work and the others don't. Any idea?

[Edit]:
Problem seems to appear only with Firefox.
« Last Edit: May 10th, 2010 at 5:22pm by Valtiel »  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #17 - May 10th, 2010 at 7:02pm
Print Post  
Err, I'm not too sure why that is happening, sorry. I've just been testing and can't get it to act like you describe.

Are there any errors on the page? Can you give me a link to a thread where it is happening - you can PM it to me if you don't want to post links up...
  
Back to top
 
IP Logged
 
Valtiel
God Member
*****
Offline


Copy & paste coder

Posts: 873
Joined: Sep 5th, 2003
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #18 - May 10th, 2010 at 7:20pm
Print Post  
I can.

Here it doesn't work

On the next page they work

But you have to test with Firefox, don't forget Wink

WTF... now the one in the first link works. As I said... purely random.

And now it doesn't work again.
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #19 - May 10th, 2010 at 8:12pm
Print Post  
Strange... I've just clicked on those links quite a few times in FireFox 3.6.3 on both my PC and Mac, and the spoiler worked every time. I really don't know what to suggest at the minute... sorry!

Have any of your members been noticing it too, or is it just you?

I want to get another Mod finished over the next few days, but if you can give me a little time I'll try to get this working in a better way and hopefully that will fix things.

Sorry again if that's not much help right now, but I will come back to it...
  
Back to top
 
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #20 - May 10th, 2010 at 8:52pm
Print Post  
Works for me too in Firefox 3.6.3. Does they clear the cache or hold STRG (CTRL) + F5 Button to refresh the site? Wink
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
Valtiel
God Member
*****
Offline


Copy & paste coder

Posts: 873
Joined: Sep 5th, 2003
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #21 - May 11th, 2010 at 3:37pm
Print Post  
@ Derek:
My whole team has the errors, too - but just like me only with Firefox.

@ Jeff:
Yes, that's not the reason Smiley
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #22 - May 11th, 2010 at 4:04pm
Print Post  
Okay, yeah... It's just happened to me once too.

I haven't got a simple fix right now I'm afraid, but I'll try to sort it out once I've finished something else I'm working on...
  
Back to top
 
IP Logged
 
Valtiel
God Member
*****
Offline


Copy & paste coder

Posts: 873
Joined: Sep 5th, 2003
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #23 - May 11th, 2010 at 4:10pm
Print Post  
It can only be a problem with the JavaScript code in YaBBC.pl. Unfortunately I don't really understand JavaScript. Did you write that code by yourself, or did you take it from some website oder something?
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #24 - May 11th, 2010 at 9:05pm
Print Post  
I'm afraid I didn't write the JS from scratch, no (that's one reason why I wanted to change it). I looked up the best way of doing a spoiler a couple of years ago, and this seemed the most common and reliable way - this method actually seems to be quite widely used.

I still have no idea why it is happening though and I can't get it to happen on my test board. I can only think that it's playing up with another division or a bit of javascript on your page.

Can you try this (without modifying it) - Just replace yours with this from the first to last division:

Code
Select All
<div class="message"><div><b>$spoiler_txt{'01'}:</b><input type="button" class="button" value="$spoiler_txt{'02'}" 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.value = '$spoiler_txt{'03'}'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = '$spoiler_txt{'02'}'; }" /></div><div class="spoiler"><div style="display: none;">$1</div></div></div> 


I'm not really hopeful that it will work though, all I've really done is make it xhtml valid.
  
Back to top
 
IP Logged
 
Valtiel
God Member
*****
Offline


Copy & paste coder

Posts: 873
Joined: Sep 5th, 2003
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #25 - May 12th, 2010 at 3:46pm
Print Post  
Sorry, doesn't change anything. It really may be that the JavaScript interferes with some other JavaScript on my forum, but why randomly? The used JavaScripts are all loaded permanently.

I deactivated all other JavaScripts on my forum, but the error remains. Seems it has nothing to do with other JavaScripts.
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #26 - May 12th, 2010 at 5:50pm
Print Post  
Sorry, I have no idea. This is the error in FireFox:

Quote:
Error: this.parentNode.parentNode.getElementsByTagName("div")[1] is undefined
Source File: http://www.diplompsychopath.de/cgi-bin/yabb3/YaBB.pl?board=finalfantasy;action=d...
Line: 1

So I'm thinking it has to do with the doctype declaration on your page (though I can't recreate it).

Undecided
  
Back to top
 
IP Logged
 
Valtiel
God Member
*****
Offline


Copy & paste coder

Posts: 873
Joined: Sep 5th, 2003
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #27 - May 12th, 2010 at 6:13pm
Print Post  
Where do you get this error? My firefox doesn't show any error.
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #28 - May 12th, 2010 at 6:19pm
Print Post  
Tools => Error Console
  
Back to top
 
IP Logged
 
Valtiel
God Member
*****
Offline


Copy & paste coder

Posts: 873
Joined: Sep 5th, 2003
Gender: Male
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #29 - May 12th, 2010 at 6:22pm
Print Post  
Yes, I see... hm. My doctype is

Code
Select All
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 



other's don't seem to work with YaBB 1.
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 4 
Send TopicPrint