Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
[ Request ] Spoiler Tags?
blizeH
✭✭
Just wondering if someone could possibly create an extension that does the 'proper' spoiler tags? i.e. you hover over a question mark and it brings up the text. I've seen this used very effectively on another forum (a phpBB one I think?) and it was great ;o
0
This discussion has been closed.
Comments
so I hacked my own.
Apparently it stuffs up in Exploder 5 or 6 or both.
Posted: Wednesday, 14 March 2007 at 2:03PM (AEDT)
Wanderer why don't you add it to the add-ons site? And I have a few questions: how does yours work? Mine inserts a div with an id added to each post, so you can have 1 hidden message per post. Can yours? I see you have more than one in that discussion can you have more than just that, like in extra comments made?
I'm curious, did you just take some of the JS examples in my add-ons thread and put them to work?
Maybe after seeing yours I can improve mine. Mine works like BBCode for the user, yours?
function show_hidden(obj, txt) { obj.className = 'debhide'; obj.innerHTML = txt; }
This is the CSS...
.debhide { color: #e70031; }
I don't think I'll release it as an extension, the JavaScript bits in the comment fields are way too fiddly to expect the layperson to deal with. If you can make it useable, go for it.
Posted: Wednesday, 14 March 2007 at 3:40PM (AEDT)
Posted: Wednesday, 14 March 2007 at 4:23PM (AEDT)
I guess i'm asking cause i will make one if I know what u guys really want. so u need to click the spoiler to view it, or hover over it.. on clicking on it makes the spoiler magically appear under it. what EXACTLY do u want.
how about this
<p class="spoiler">Enter spoiler details here</p>
that paragraph won't show in the comments. It will be replaced by "Show Spolier" link. when u click on it the spoiler appears right below it.
That is, "Show Spoiler" should disappear and be replaced with the paragraph.
Not expecting pages of text to be the actual spoiler paragraph, it's usually only a short sentence.
Posted: Wednesday, 14 March 2007 at 5:41PM (AEDT)
Other option is to save the spoiler in javascript and write it in when the spoiler is clicked (I like this idea better, it's more accessible, as screen readers may still read the spoiler if its pushed to the left.)
That AJAXy way you've suggested sounds sodding complicated :P Agreed that it's probably best, but would this require putting things into databases and the like?
<a href="#" onclick="document.write(' Ha ha ha, you thought this would be a spoiler--and it's not! Sucker!')">Click for spoiler</a>
Of course, I'm no javascript guru, so it might need a appendChild, addElement, or something along those lines.
<x style="color:red;background: #eee;" onclick="show_hidden(this, 'The cameo was by Peter Fonda!');"> <em style="cursor:pointer"> Spoiler </em></x>
This is what it looks like...
Spoiler
Of course it won't work here without the external js.
You can see it working here.
Posted: Thursday, 15 March 2007 at 7:27AM (AEDT)
I hate BBCode, no idea what Markdown is, I'd be using plain Html (Quicktags).
Posted: Thursday, 15 March 2007 at 9:37AM (AEDT)
I like keeping things standard, I hate proprietary one-use-only stuff, not just on forums but in everyday life.
Can't afford wasting brain energy on learning something so specific.
Posted: Thursday, 15 March 2007 at 10:11AM (AEDT)
Almost like using a PC (type type) vs a Mac (click, move click, drag, command-click, hehe).
I thought you of all people would appreciate that... (kidding!, don't get started, it's the
other way around, at least Markdown is...)
In other words, they have a life!
Don't get me started ;-)
Posted: Thursday, 15 March 2007 at 11:12AM (AEDT)
Sounds like we should mix the two extensions together, best of both worlds. Only issue is, I am not that good with JS.