Jump to content

Spoiler tag

Featured Replies

It's a modification from invisionize, so not exactly a custom bbcode. It involved a few file edits.

  • Replies 123
  • Views 48.4k
  • Created
  • Last Reply

Ah so thats why you can nest, so it is a bug for user bbcode.

Can these spoilers be made to reveal data only after member inputs text and posts?

Then it can work great for my MCQ's forum.

I mean, members answer, enter their answer and then CAN click on spoiler n see the result.

Well Matt supposedly fixed the nexting issue. Hopefully it is really fixed where the spoiler coding strange_will gave will work nested. Pretty much his is as good as or better than the modification I use, which requires quite a bit of editing, except on that one it puts buttons into the editors, which would be more ideal than where it would be located now. But I guess it's ok this way too. Plus I like the hand onmouseover and that it does the clicking sound in IE when clicking it, wheras on the one I use it isn't that way.

Thanks for the compliment, it's like the first piece of code I've thrown out for other people to use. ^_^

I'm very happy to see this tag included but it is only half useful if it only hides text. It would be really great to see it improved to hide 'all' spoilers including pics etc. I'm sure there will be an 'improved spoiler' mod but like i say, this feature is incomplete if it only hides text. Oh well maybe it will improve with time ;)

I'm very happy to see this tag included but it is only half useful if it only hides text. It would be really great to see it improved to hide 'all' spoilers including pics etc. I'm sure there will be an 'improved spoiler' mod but like i say, this feature is incomplete if it only hides text. Oh well maybe it will improve with time ;)


My code can easily replace the spoiler code in 2.2.

Nice! :D

What would be cool is if you know how to make it a Otherwise, I could put several spoiler codes, by just changing the word "spoiler" in your coding on some of them to make them different bb codes, but do the same things, having different titales.

type of bbcode and then have the box there for "x" where you tell what type of spoiler it is, then that is printed in the header of the spoiler. This would be useful for one of my sites because people may want to read a certain "type" of spoiler and not another.



What would be cool is if you know how to make it a [spoiler=x] type of bbcode and then have the box there for "x" where you tell what type of spoiler it is, then that is printed in the header of the spoiler. This would be useful for one of my sites because people may want to read a certain "type" of spoiler and not another.



Otherwise, I could put several spoiler codes, by just changing the word "spoiler" in your coding on some of them to make them different bb codes, but do the same things, having different titales.


I thought about that, and it's actually easy:

<div>
<div style="background: #B7E5CE;border: 1px dotted #000; border-bottom: 0; border-left: 4px solid #429E6F; color: #000; font-weight: bold; font-size: 10px; margin: 8px auto 0 auto; padding: 3px;">
Spoiler! <a href="java script:void(0);" onclick="java script:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='--Click here to view--';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='--Click here to hide--';}">--Click here to view--</a> <span style="font-size:9px;">({option})</span>
</div>
<div style="color: #000000; background: #FAFCFE; border: 1px dotted #000; border-left: 4px solid #429E6F; border-top: 0; padding: 4px; margin: 0 auto 8px auto;display:none;">{content}</div>
</div>

That will do it, but read this before trying: It seems that they aren't compatable with eachother unless you use different names, such as <spoiler> or <spoilerdesc=Description here> the software seems to get confused if you mix them or have more than one in a page, example: Works:

[spoiler]test[/spoiler]

Doesn't work:

[spoiler]test[/spoiler]
[spoiler]test[/spoiler]

Works:

[spoiler=test]test[/spoiler]

Doesn't work:

[spoiler=test]test[/spoiler]
[spoiler=test]test[/spoiler]

Doesn't work:

[spoiler=test]test[/spoiler]
[spoiler]test[/spoiler]



I should be able to say the option is... uh optional? :P

That would be a big problem though if you can't use it more than once per page.

That would be a big problem though if you can't use it more than once per page.


Well if you have two different tags, one for the option and one without the option. Or just use one or the other only.

Really I don't have a need for the option one.

You really just confused me is all. Because some of the things you say don't work.... do indeed work. So i think I misunderstood something.

Because I installed it just as you have it (obviously taking the space out of javascript) then I set use option in tag to yes. I can do the same spoiler=option code twice in a row with them both working. SO I guess I misunderstood something.

Long story short, it SEEMS as if the coding you gave is working perfectly.

You really just confused me is all. Because some of the things you say don't work.... do indeed work. So i think I misunderstood something.



Because I installed it just as you have it (obviously taking the space out of javascript) then I set use option in tag to yes. I can do the same spoiler=option code twice in a row with them both working. SO I guess I misunderstood something.



Long story short, it SEEMS as if the coding you gave is working perfectly.



I mean if you add a spoiler tag without option code, and one with it wont work.

So far if you turn the option code on, you can't do a non option spoiler that I can find out anyway.

Oh, ok. I see. Yeah i did only the option version.

What would be perfect is if there were a dropdown of options (preset) instead of them picking their own. But that would be a lot more work than a code. That would be a whole setup of a new button and prompts popping up and stuff. lol

Now on RC1, this custom bb code would AUTOMATICALLY be in the insert special list, you think... or did Matt do more than simply set it to automatically put ALL custom ones into it?

So is this a bug? Should we be able to create a spoiler tag that has an option but not use the option? Should I report it, or would this be a feature?

I'm not sure. If it is set to yes for option, I THINK it is not supposed to let you do it without an option.

Hmm I think the only other thing I would personally like is if instead of the text saying to click, maybe if I could make it have a little image there which people click (not sure if before or after the other text) but anyway I am sure I could figure that out. I really love the whole setup of yours though. More than others I have used.


testing if Matt

fixed bbcode nesting still




ahhhhh nesting still doesnt seem to work.

I successfully changed the default spoiler to yours in 2.2 RC1, so it is quite cool. Especially since Matt set it up where you can even put descriptions of what needs to go in each box. (options box and content boc).

Hmm, I wish the option content could be optional though. I like being able to, I don't like being forced to :P

true. Or if it could have a default option put in if you enter nothing for the option. Or I could just use it without the option tag I guess. I think nesting still doesn't work though. I am not sure what would have to be done to let that happen. It happened with the other spoiler code I used.

I'm still annoyed with the fact that we can't use the spoiler tag for images. How is this possible ... >_<

The spoiler tag really sucks, There is a way to mess with it but to get a really good one you have to apply some sort of javascript with it. I do hope the one I use on my board works as I'm going to remove this spoiler tag if it reaches this form to the final release.

I have to say I'm very much disappointed in IPS with the spoiler tag. With all the new stuff you have added, ajax and other big changes that have been made, the best spoiler tag you came up with was blacking it out?

The spoiler tag really sucks, There is a way to mess with it but to get a really good one you have to apply some sort of javascript with it. I do hope the one I use on my board works as I'm going to remove this spoiler tag if it reaches this form to the final release.



I have to say I'm very much disappointed in IPS with the spoiler tag. With all the new stuff you have added, ajax and other big changes that have been made, the best spoiler tag you came up with was blacking it out?


Yeah. Why not make it display content when click the spoiler tag?

Yeah. Why not make it display content when click the spoiler tag?



I think the snap back type of spoiler, which some one had posted a link to and asked some credit for
was cool. I will find and post it.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.