Forum Developments

View the Forum Registry

XML Get RSS Feed for this thread


Self-edit this thread


0 Subject: Spoiler Alert Buttons

Posted by: Wilmer McLean
- [1006312] Thu, Jan 31, 2008, 03:11

Just wondering about Spoil Alert Buttons.

Spoiler Alert Buttons are something one clicks on to find out extra information they would not rather read unless they click on that icon.

E.G. for movie revies (plot construciton)

E.G. trivia answers

Are spoler buttons usefule here?
1Guru
      ID: 330592710
      Thu, Jan 31, 2008, 09:40
Interesting concept. Have you seen these used successfully elsewhere?
2Farn
      Leader
      ID: 451044109
      Thu, Jan 31, 2008, 09:50
I love them. They are very popular on vbulltein boards.

They can come in handy with drafting for invisible queues. And for those of us in the RWF with tv tapings.
3Guru
      ID: 330592710
      Thu, Jan 31, 2008, 10:10
Let me see what I can develop. Shouldn't be too difficult.
4RecycledSpinalFluid
      Dude
      ID: 204401122
      Thu, Jan 31, 2008, 11:17
Souldnt be too hard. Not much more than the link, uh, link you already have.

Just have a Font color and a 'SPAN style="background-color:black"' to the same thing, kinda like this:

Test Text

(SPAN style="background-color:black")(font color=black)Test Text(/font)(/span)
Of course, thats not really a button, just something to highlight.
5RecycledSpinalFluid
      Dude
      ID: 204401122
      Thu, Jan 31, 2008, 11:28
Here, now just click the text to magic-chango
Test Text
(SPAN style="background-color:black" onclick="this.style.backgroundColor='lightgrey';")(font color=black)Test Text(/font)(/span)
6Guru
      ID: 330592710
      Thu, Jan 31, 2008, 12:18
How about this:



Spoiler alert: (click to toggle on or off)
This is the item that is to be hidden until it is revealed.
Once revealed, it can be hidden again by reclicking.
7Guru
      ID: 330592710
      Thu, Jan 31, 2008, 12:24
I tested post 6 with both IE7 and Firefox, and it seems to work. Any help in testing with alternate browsers would be appreciated (particularly any browser on a Mac).

I'd envision setting this up by adding another option under the "Click here to insert a link". The new option would say something like "Click here to add hidden (spoiler) text". When invoked, you would type the hidden text in the popup text box, and all of the code would then be setup, just as it is for an auto-link.

Sound like a plan?
8GoatLocker
      Leader
      ID: 060151121
      Thu, Jan 31, 2008, 13:22
Dave,
Sounds like a great plan and I really like it.
Really nice addition and improvement to the board.
Wow, out of working for a living, and still doing continued process improvement.

Cliff
9Species
      Dude
      ID: 07724916
      Thu, Jan 31, 2008, 13:25
Guru - yeah! Looks great! With baseball drafts coming soon, this would be a nice little tool. Judging by how quickly you whipped it out, hopefully it's not an onerous addition to the site.
10Ref
      Donor
      ID: 539581218
      Thu, Jan 31, 2008, 14:33
Looks great.
11Guru
      ID: 330592710
      Thu, Jan 31, 2008, 15:05
OK, let's do some live testing. The new spoiler link now appears below the input text area.

Here is some hidden text:

This text should appear in blue.

Here is another item: This is the next section. If you click on it repeatedly, it should toggle from visible to hidden and back.

Are any tweaks needed?
12RecycledSpinalFluid
      Dude
      ID: 204401122
      Thu, Jan 31, 2008, 15:12
Test IE 6 on Win XP Pro
13youngroman
      ID: 3751268
      Thu, Jan 31, 2008, 15:26
at least Opera has a problem with it (because of the font-name 'black' vs. '#000000'). this should be a browser independent solution:
[script language="javascript"]
function toggleBackgroundColor(element) {
var style = element.style;
if(style.backgroundColor == style.color) {
style.backgroundColor = 'lightgrey';
} else {
style.backgroundColor = 'black';
}
}
[/script]

[span style="background-color:blue; color:blue" onclick="toggleBackgroundColor(this);"]bla bla[/span]
14Kyle
      Donor
      ID: 052753312
      Thu, Jan 31, 2008, 15:46
Test on Windows Vista, the newest version of Firefox (2.0? I think)

Let's see how this goes
15Guru
      ID: 330592710
      Thu, Jan 31, 2008, 16:09
OK, let's try the YR code:


This is hidden using a minor variant of youngroman's code
16Guru
      ID: 330592710
      Thu, Jan 31, 2008, 16:10
YR, does that latest item work OK in Opera?
17Guru
      ID: 330592710
      Thu, Jan 31, 2008, 16:12
Wait, I didn't make all the necessary changes....
18Guru
      ID: 330592710
      Thu, Jan 31, 2008, 16:15
try this
19Guru
      ID: 330592710
      Thu, Jan 31, 2008, 16:16
Hmmm, that latest change seems to have a problem.
20Guru
      ID: 330592710
      Thu, Jan 31, 2008, 16:18
Actually, I think it is working fine now. Previous items in posts 11-15 will no longer work, however as the underlying code for those is now obsolete.
21Guru
      ID: 330592710
      Thu, Jan 31, 2008, 16:19
Even if the automated unhide doesn't work, I think you can still highlight the area with your mouse to see the text (in posts 11-15, for example).
22youngroman
      ID: 3751268
      Thu, Jan 31, 2008, 16:24
#18 + #19 are fine now
23Species
      Dude
      ID: 07724916
      Thu, Jan 31, 2008, 17:53
#6 works as an on/off toggle

I have to highlight everything else.
24Guru
      ID: 330592710
      Thu, Jan 31, 2008, 18:07
Really? 18 and 19 don't toggle?

What OS/browser are you using?
25Species
      Dude
      ID: 07724916
      Sat, Feb 02, 2008, 12:13
Guru - that was at work, so it wouldn't surprise me if it was IE 6. OS? Well it's not Vista.....I presume it's a business XP version of some kind.

If mine is the only negative don't sweat looking for a solution. It works fine at home and worst comes to worse I just highlight from work. No biggie.
26RecycledSpinalFluid
      Dude
      ID: 204401122
      Sat, Feb 02, 2008, 12:17
I'm running XP-Pro SP2 and IE 6 SP2 and its working for me.
27Guru
      ID: 330592710
      Fri, Feb 08, 2008, 10:34
I've activated this feature in all forums now.
28Farn
      Leader
      ID: 451044109
      Fri, Feb 08, 2008, 11:00
Thanks Guru.

Any chance you could insert it into this thread for future RWF spoilers?

link

29Guru
      ID: 330592710
      Fri, Feb 08, 2008, 11:31
It will automatically get inserted into all threads as they are updated.

In fact, if you start a reply in an existing thread, it will appear on the first preview screen.
Forum Developments

View the Forum Registry

XML Get RSS Feed for this thread


Self-edit this thread




Post a reply to this message: (But first, how about checking out this sponsor?)

Name:
Email:
Message:
Click here to create and insert a link
Click here to insert a block of hidden (spoiler) text
Ignore line feeds? no (typical)   yes (for HTML table input)


Viewing statistics for this thread
Period# Views# Users
Last hour11
Last 24 hours22
Last 7 days54
Last 30 days1210
Since Mar 1, 200733591167