OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:47 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Spoiler Button
PostPosted: Mon Jun 29, 2009 9:51 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2008 2:34 pm
Posts: 548
Location: Belgium
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.


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 9:54 am 
Offline
Member
Member
User avatar

Joined: Fri Apr 18, 2008 4:40 pm
Posts: 1686
Location: Langley, Vancouver, BC, Canada
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


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 10:10 am 
Offline
Member
Member

Joined: Wed Oct 18, 2006 10:43 pm
Posts: 490
Location: Kansas City, KS, USA
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]


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 12:28 pm 
Offline
Member
Member

Joined: Fri Jul 11, 2008 5:15 am
Posts: 342
Location: Hungary
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...


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 1:55 pm 
Offline
Member
Member
User avatar

Joined: Tue Aug 12, 2008 4:04 pm
Posts: 173
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.

_________________
Website


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 2:14 pm 
Offline
Member
Member

Joined: Sun Nov 09, 2008 2:55 am
Posts: 524
Location: Pennsylvania, USA
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.


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 4:12 pm 
Offline
Member
Member
User avatar

Joined: Fri Apr 18, 2008 4:40 pm
Posts: 1686
Location: Langley, Vancouver, BC, Canada
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


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 4:33 pm 
Offline
Member
Member

Joined: Sun Nov 09, 2008 2:55 am
Posts: 524
Location: Pennsylvania, USA
*facepalm*

Yeah, an iframe. The funny thing is that I was just doing something similar for a website using an iframe...


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 4:59 pm 
Offline
Member
Member

Joined: Sat Dec 30, 2006 2:31 pm
Posts: 729
Location: East Coast, USA
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?

_________________
My OS: Fuzzy Logic


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 5:47 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 29, 2008 1:07 pm
Posts: 550
Location: Throw a dart at central Texas
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?


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 7:30 pm 
Offline
Member
Member

Joined: Thu Jul 07, 2005 11:00 pm
Posts: 1546
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

_________________
My new NEW blag


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 8:30 pm 
Offline
Member
Member
User avatar

Joined: Fri Apr 18, 2008 4:40 pm
Posts: 1686
Location: Langley, Vancouver, BC, Canada
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


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 8:40 pm 
Offline
Member
Member

Joined: Sun Jan 14, 2007 9:15 pm
Posts: 2566
Location: Sydney, Australia (I come from a land down under!)
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.

_________________
Pedigree | GitHub | Twitter | LinkedIn


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 8:51 pm 
Offline
Member
Member

Joined: Sat Dec 30, 2006 2:31 pm
Posts: 729
Location: East Coast, USA
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?

_________________
My OS: Fuzzy Logic


Top
 Profile  
 
 Post subject: Re: Spoiler Button
PostPosted: Mon Jun 29, 2009 10:38 pm 
Offline
Member
Member

Joined: Sun Nov 09, 2008 2:55 am
Posts: 524
Location: Pennsylvania, USA
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group