Page 1 of 2
Spoiler Button
Posted: Mon Jun 29, 2009 9:51 am
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
Re: Spoiler Button
Posted: Mon Jun 29, 2009 9:54 am
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.
Re: Spoiler Button
Posted: Mon Jun 29, 2009 10:10 am
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]
Re: Spoiler Button
Posted: Mon Jun 29, 2009 12:28 pm
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...
Re: Spoiler Button
Posted: Mon Jun 29, 2009 1:55 pm
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.
Re: Spoiler Button
Posted: Mon Jun 29, 2009 2:14 pm
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.
Re: Spoiler Button
Posted: Mon Jun 29, 2009 4:12 pm
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".
Re: Spoiler Button
Posted: Mon Jun 29, 2009 4:33 pm
by JohnnyTheDon
*facepalm*
Yeah, an iframe. The funny thing is that I was just doing something similar for a website using an iframe...
Re: Spoiler Button
Posted: Mon Jun 29, 2009 4:59 pm
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?
Re: Spoiler Button
Posted: Mon Jun 29, 2009 5:47 pm
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.
Re: Spoiler Button
Posted: Mon Jun 29, 2009 7:30 pm
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
Re: Spoiler Button
Posted: Mon Jun 29, 2009 8:30 pm
by Troy Martin
Request the Lynx developers to support iframes.
Re: Spoiler Button
Posted: Mon Jun 29, 2009 8:40 pm
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.
Re: Spoiler Button
Posted: Mon Jun 29, 2009 8:51 pm
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?
Re: Spoiler Button
Posted: Mon Jun 29, 2009 10:38 pm
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?