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 29673 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 #30 - May 12th, 2010 at 6:27pm
Print Post  
Valtiel wrote on May 12th, 2010 at 6:22pm:
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.

I'm stuck what to suggest then. I have tried changing the doctype myself, but as I say, I can't recreate it.

I'm not 100% sure that is the problem, but have got a feeling that it must be.

Sorry again that I've not been able to help...
  
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 #31 - May 12th, 2010 at 6:31pm
Print Post  
But if it is the problem, why not always? Most spoiler buttons work... that's the really weird thing.
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
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 #32 - May 12th, 2010 at 6:48pm
Print Post  
I tested some more. It has something to do with the content of the spoiler.

For example a post with 4 spoilers. None of them works. If I remove one special spoiler, the other 3 work.

Please try the following on your board, if possible:

Code
Select All
[spoiler]wirklich [url=http://www.youtube.com/watch?v=Yn4r_XJw-Eg&feature=related]ALLES[/url] verstecken kann.[/spoiler] 



It's just how one of my mods posted the spoiler. It doesn't work and it makes all other spoilers in the same post not work, too.
  

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 #33 - May 12th, 2010 at 7:01pm
Print Post  
From a quick test I haven't noticed a problem. I have tested the spoiler with all YaBB tags and haven't ever had any issues - it should work with all content.

Can you post up the whole line that you are using from YaBBC.pl...
  
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 #34 - May 12th, 2010 at 7:04pm
Print Post  
Hm, if I edit the post and click on "Preview", the spoiler works. After posting, it doesn't.

The line is like your original, I just hardcoded the button text and added a line break:

Code
Select All
    $message =~ s~\[spoiler\](.+?)\[/spoiler\]~<div class="message"><div><input type="button" class="button" value="Spoiler zeigen" 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 schließen'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Spoiler öffnen'; }" /></div><br><div class="spoiler"><div style="display: none;">$1</div></div></div></div>~isg; 



  

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 #35 - May 12th, 2010 at 7:10pm
Print Post  
You do have an ending division tag that shouldn't be there, and also a break tag from somewhere. I don't think it will help, but it's worth a shot anyway... try this:

Code
Select All
$message =~ s~\[spoiler\](.+?)\[/spoiler\]~<div class="message"><div><input type="button" class="button" value="Spoiler zeigen" 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 schließen'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Spoiler öffnen'; }" /></div><div class="spoiler"><div style="display: none;">$1</div></div></div>~isg; 



  
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 #36 - May 12th, 2010 at 7:21pm
Print Post  
The break tag isn't from somewhere Wink

Valtiel wrote on May 12th, 2010 at 7:04pm:
The line is like your original, I just hardcoded the button text and added a line break:


Anyway, it doesn't change anything.
  

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 #37 - May 12th, 2010 at 7:28pm
Print Post  
Valtiel wrote on May 12th, 2010 at 7:21pm:
The break tag isn't from somewhere Wink

Valtiel wrote on May 12th, 2010 at 7:04pm:
The line is like your original, I just hardcoded the button text and added a line break:

Oops! I didn't see that.

I really don't know then. I've been testing and testing and can't get it to behave like that on my 2.4 board...

Huh

  
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 #38 - May 12th, 2010 at 7:31pm
Print Post  
I think I will figure it out. It has something to do with the <div> tags, it seems, just testing around a little bit.
  

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 #39 - May 12th, 2010 at 7:34pm
Print Post  
Okay. If you do figure it out, I'll be interested to know what it is...
  
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 #40 - May 12th, 2010 at 8:06pm
Print Post  
Hm, it's really difficult...

Here is what we have by now:

  • The error only appears with Firefox
  • When clicking "Preview", the spoiler works. After posting, it doesn't
  • It could have something to do with the spoiler's content


I need a coffee now  Roll Eyes  Grin

If I remove the url=... stuff, the spoiler works. But that doesn't really help me.
  

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 #41 - May 13th, 2010 at 12:01am
Print Post  
It could have something to do with YaBB 1 (which I haven't tested it on). Have you tried it on a 2.4 board?
  
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 #42 - May 13th, 2010 at 6:57am
Print Post  
No, I have no YaBB 2 to test. But I don't think it has something to do with it as the JavaScript should work in every environment - it's not even made especially for YaBB Wink .
  

Proud copy & paste coder Grin
Admin @ Silent Hill Forum
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 #43 - May 13th, 2010 at 8:30am
Print Post  
I found a workaround now. If i use <span> instead of <div>, it seems to work.
  

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


Gruellered!!!

Posts: 60
Location: Midlands, UK
Joined: Dec 24th, 2007
Re: Spoiler Tag V1.5 for YaBB 2.4
Reply #44 - Mar 15th, 2013 at 6:25pm
Print Post  
installed no probs thank you  Smiley
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 4 
Send TopicPrint