Jump to content

Spoiler tag


Guest JoeKuboj

Recommended Posts

Posted

Either way, Matt was just trying some quick custom BB codes to have something in the insert special menu. It was more or less testing, not trying to havve it as a feature exactly.

Anyway, I've said all along strange_will's is great. If it ever can nest it will be perfect. ;)

  • Replies 123
  • Created
  • Last Reply
Posted

It would have been better if there were no spoiler tags at all
because this looks like a kids work, as of now.
People expect quality work from IPB. This is what makes it different from other forums.
I have said this earlier also. But I think they have made up their mind to keep this spoiler
tag and not budge. Its not a wise decision.
If so many people want it changed, it should be thought about atleast.

Posted

As IPS has already stated, it's just a custom BB Code, if you don't like it get rid of it or something, why not change it?

...

Posted
I replaced it with primetime's spoiler tag for 2.1.x and it works great. (add some code in class_bbcode and class_bbcode_core)
Just finding the way to make it appear on the side panel (I don't read the documentation yet)
Posted

Man, I don't understand the negativity towards the bbcode IPB has included. I'm sure it will suffice for the vast majority of boards out there (like my own). If you don't like it, and want to create your own, that's what the custom bbcode system is for, have at it. But stop ragging on IPS for making the basic one look 'unprofessional' in your opionion.

Posted

strange_will do you know why this would not parse ina component I have (custom component) but other bbcodes parse in it? Would that mean the component itself is supposed to load some sort of javascript file? I thought all those are loaded in global board header and footer....

Posted

strange_will do you know why this would not parse ina component I have (custom component) but other bbcodes parse in it? Would that mean the component itself is supposed to load some sort of javascript file? I thought all those are loaded in global board header and footer....


Nope, all javascript is self contained, and it is simple html, have you tried other user made bbcodes? Not just what come with IPB?

Can you give me an example too? If you're going to screenshot it, give me a dump of the code too.
Posted

Just for posterity's sake, here's what I currently use for a hide-and-show spoiler:

<div style="border: 1px dashed gray; padding: 3px;"><div><button type="button" class="button" onclick="this.parentNode.parentNode.childNodes[1].style.display = ''; this.parentNode.style.display = 'none';" title="Click to show the spoiler.">Show Spoiler</button></div><div id="spoiler" style="display: none;">{content}</div></div>



It works well. Except, of course, for the nesting issue.

Posted

Here's what I use for spoilers, but it won't let you nest and since the original is PHP which assigns a different ID for each spoiler tag, this one will bug when two spoiler tags with the same title, and will only open the first in the page. I'm sure it can be overwritten with some JavaScript variables and a function for drawing an extremely big random ID so that duplicates are nearly impossible, but I haven't tried doing something like that yet.

<div onClick="toggleview('{option}')" style="font-weight: bold; cursor: pointer; border: 1px dotted black; background: #E4EAF2;"><u>{option}</u></div><div id="{option}" style="display:none; border: 1px dotted black; background: white;">{content}</div>

Posted

Can't you just use javascript to assign an id to each spoiler tag?


IDs are not required, and it would be horribly messy (and require .js file edits) to set id's and onclicks based on generated id numbers.

Mine runs fine, edit it to your own look. No option needed to randomize names, and no nesting errors (except for IPB custom code nesting which should be fixed in 2.2)

Code in action:
http://forums.wolfram-studios.com/index.php?showtopic=1835
Posted
Strange_Will, that looks great. From doing a post preview on the site you link to however, it seems that i can not nest one spoiler within another. I didn't want to post a useless post on your board. But from the post preview it would appear not to work. Unless that is the bug that you speak of which it prolly is. Still a great addition to the tag regardless th0.
Posted
Strange_Will

, that looks great. From doing a post preview on the site you link to however, it seems that i can not nest one spoiler within another. I didn't want to post a useless post on your board. But from the post preview it would appear not to work. Unless that is the bug that you speak of which it prolly is. Still a great addition to the tag regardless th0.



IPB claimed that they fixed that bug in 2.2, though I don't see it fixed on this board, it should work fine in 2.2 Final with nesting as reported by the IPB bug system.

I'll probably be working on upgrading skins for a few weeks after 2.2 Final comes out, so someone keep me updated on if nesting works in 2.2 Final like it SHOULD. :P
  • 2 weeks later...
Posted

Now I wonder how easy/hard it would be putting a spoiler button in the fast reply. I wonder if that is possible. I think it could be, even with it being a custom bbcode. If too many buttons get into fast reply, it will defeat the purpose of full reply though. But spoiler might be a nice button to have.

In a way I wish fast reply didnt even exist because most people use it and then you can never tell when someone is typing, because that is oly told for people using full reply.

Posted

If you want a spoiler button in the fast reply, then put one in yourself and yes - it would defeat the purpose of fast reply. :lol:

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...