Spoiler Button

Questions, comments, and suggestions about this site should go here.
User avatar
Creature
Member
Member
Posts: 548
Joined: Sat Dec 27, 2008 2:34 pm
Location: Belgium

Spoiler Button

Post by Creature »

Hello,

I don't know if this has been suggested before. If it has, I'm sorry (I did do a forum search before posting though, maybe just not properly enough). For what it's worth: I'd like to suggest some kind of spoiler button (some sort of button that allows you to hide/show a specific block of text). This way the tag can be used to put screenshots or multiple (or big) chunks of code in. When a new post is created, the tag is closed when someone opens the thread and the content of the tag is thus not loaded. Once the user presses 'Show' or 'View', the tag opens with all its contents and is loaded if needed.

I believe this is a pretty common and widely used PHPBB plug-in. Just wanted to suggest it for people who have slow internet connections or who'd want their topics less bloated by screenshots or such.

Creature
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Spoiler Button

Post by Troy Martin »

Yeah, that would be a good idea. That way, people can read the more "offensive" parts of my posts (which, I really think people are overreacting) if they want to or just plain avoid them. Or I can just say something, get reported by someone, and get banned. Yay.

Now see, spoiler tags could've hidden that.

But seriously? I think they're great. The long chunks of quote and rant could easily be hidden in one of these things. I don't think it would be hard to add the spoiler tags, either. Probably a quick minute or five in the admin account.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: Spoiler Button

Post by quok »

Troy Martin wrote:Yeah, that would be a good idea. That way, people can read the more "offensive" parts of my posts (which, I really think people are overreacting) if they want to or just plain avoid them. Or I can just say something, get reported by someone, and get banned. Yay.

Now see, spoiler tags could've hidden that.
Sure, spoiler tags would hide it until someone clicked the nice little button to reveal the offensive part of your post. Then you'll still get reported and warned or banned. Overreacting or not, you could just cut out the offensive parts of your posts entirely.

[OT]
That's not directed just to TroyMartin, either. We're a community here, and we're here to help each other out. That's entirely possible to do without resorting to flaming and offensive posts. Constructive criticism is good. Criticism for the sake of criticism isn't, nor is offensive posts and flaming, and there seems to be too much of that here lately.
[/OT]
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: Spoiler Button

Post by ru2aqare »

Creature wrote:Hello,
I believe this is a pretty common and widely used PHPBB plug-in. Just wanted to suggest it for people who have slow internet connections or who'd want their topics less bloated by screenshots or such.

Creature
If I'm correct, most "spoiler" tag implementations don't delay loading whatever content is between the tags. All those huge images still get downloaded along with other non-spoilered images. Only when the page is loaded completely, is the Javascript parsed and the images hidden. If there was a "spoiler tag" that completely avoided downloading the images, then it would indeed be a nice addition. Not everyone has a 100mbit connection here...
User avatar
xDDunce
Member
Member
Posts: 173
Joined: Tue Aug 12, 2008 4:04 pm
Contact:

Re: Spoiler Button

Post by xDDunce »

i think a spoiler tag would be great to put on any code, so if someone asks something along the lines of "what's wrong with this code?" then any posted code will be hidden so you can do it yourself if you really want to. It's a great way to learn, and i do it all the time. (although if i get stuck, i will just look at the code. i'll still learn from it though!)

maybe if there was a user profile option to enable/disable auto hide? that can't be that hard. just a few lines of code, a variable and an if/else statement i guess (not saying i'm gonna do it, just a suggestion if anyone wants to?). I think it could be a good addition to the forum, if used properly and not used for trolling and/or flame-war inducing comments.

but as with everything in a community, there have to be rules as for when you should and shouldn't use them (or build them into existing BBCode, meaning the rules are fixed and generally unbreakable). either way there are just as many Pro's as there are Con's.

Cheers,
James.
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Spoiler Button

Post by JohnnyTheDon »

ru2aqare wrote:If I'm correct, most "spoiler" tag implementations don't delay loading whatever content is between the tags. All those huge images still get downloaded along with other non-spoilered images. Only when the page is loaded completely, is the Javascript parsed and the images hidden. If there was a "spoiler tag" that completely avoided downloading the images, then it would indeed be a nice addition. Not everyone has a 100mbit connection here...
This might be kind of complicated, but a <frame> that is initially empty and then loads the "spoiler" text after a button is pressed could solve this problem. To be honest I don't have any experience with phpBB so I'm not sure if this could be implemented in a plugin.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Spoiler Button

Post by Troy Martin »

JohnnyTheDon wrote:
ru2aqare wrote:If I'm correct, most "spoiler" tag implementations don't delay loading whatever content is between the tags. All those huge images still get downloaded along with other non-spoilered images. Only when the page is loaded completely, is the Javascript parsed and the images hidden. If there was a "spoiler tag" that completely avoided downloading the images, then it would indeed be a nice addition. Not everyone has a 100mbit connection here...
This might be kind of complicated, but a <frame> that is initially empty and then loads the "spoiler" text after a button is pressed could solve this problem. To be honest I don't have any experience with phpBB so I'm not sure if this could be implemented in a plugin.
Correction: not <frame> but <iframe>. <frame> defines full-sized frames, and <iframe> defines "internal frames" or "inside frames" that are like "HTML boxes".
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Spoiler Button

Post by JohnnyTheDon »

*facepalm*

Yeah, an iframe. The funny thing is that I was just doing something similar for a website using an iframe...
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Re: Spoiler Button

Post by frank »

About the only way to avoid downloading the content at first would be to use something like AJAX. I don't think phpBB has any built in support for it. It would be pretty easy to make a spoiler tag but like someone else said the contents of the block would still be downloaded and just default to hidden.

I had pretty slow dial up awhile ago and this site was never all that slow for me. The whole page would load before the images would start to be displayed so I could be reading the posts while waiting for the images to load.

I think that maybe we should find a plugin that gives the code boxes a max size and then adds scroll bars as needed, or do we already have that?
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: Spoiler Button

Post by Firestryke31 »

IIRC some themes have it, but others don't. It's very easy using CSS, just set max-height to the height and overflow to either auto or scroll. IIRC scroll always has the bars but auto only has them if needed.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Spoiler Button

Post by earlz »

JohnnyTheDon wrote:
ru2aqare wrote:If I'm correct, most "spoiler" tag implementations don't delay loading whatever content is between the tags. All those huge images still get downloaded along with other non-spoilered images. Only when the page is loaded completely, is the Javascript parsed and the images hidden. If there was a "spoiler tag" that completely avoided downloading the images, then it would indeed be a nice addition. Not everyone has a 100mbit connection here...
This might be kind of complicated, but a <frame> that is initially empty and then loads the "spoiler" text after a button is pressed could solve this problem. To be honest I don't have any experience with phpBB so I'm not sure if this could be implemented in a plugin.
But what about us using lynx? lol
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Spoiler Button

Post by Troy Martin »

Request the Lynx developers to support iframes. :mrgreen:
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Spoiler Button

Post by pcmattman »

The problem with Lynx isn't so much the lack of IFRAMEs as the lack of JavaScript to make those IFRAMEs visible ;)

EDIT: In a text-based browser you'd most likely have to have a special stylesheet anyway for the spoilers, so they'd always be shown. For graphical browsers that support JS, it's as simple as a DIV element with CSS "display: none;" which is toggled when the "Show Spoiler" button is pressed (through JavaScript). There's no need for AJAX or IFRAMEs, because the content exists in the BBCode.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Re: Spoiler Button

Post by frank »

Not to mention all the people who use the noscript addon for firefox. I don't think it is a feature that should be added to all themes but maybe a separate them could be created with some of the functionality?
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Spoiler Button

Post by JohnnyTheDon »

pcmattman wrote:The problem with Lynx isn't so much the lack of IFRAMEs as the lack of JavaScript to make those IFRAMEs visible ;)

EDIT: In a text-based browser you'd most likely have to have a special stylesheet anyway for the spoilers, so they'd always be shown. For graphical browsers that support JS, it's as simple as a DIV element with CSS "display: none;" which is toggled when the "Show Spoiler" button is pressed (through JavaScript). There's no need for AJAX or IFRAMEs, because the content exists in the BBCode.
But wouldn't it still download the content in the spoiler even when it isn't needed? This isn't a big issue for text (if your internet is THAT slow, the HTTP headers are going to take just as long) but it is a big issue for pictures (as was previously mentioned). Maybe pictures could be banned from spoilers?
Post Reply