[NO LONGER WORKING] Writing Spoiler Tags for Giant Bomb

Avatar image for mordecaix7
mordecaix7

727

Forum Posts

1184

Wiki Points

0

Followers

Reviews: 2

User Lists: 12

Edited By mordecaix7

Please Disregard

The following no longer works due to some issues with Giant Bomb's CSS overriding (or stripping out, haven't looked into it deeper) the background-color style.  The article is still informative for general CSS and HTML knowledge but will not work on Giant Bomb anymore.


Introduction

A few times while posting in the forum, I've really wanted to post some sensitive information that might really make some people mad if they accidentally read it and haven't gotten that far in that particular game, or whatever the topic is about.  Lots of sites have BB Code for spoilers that you can use to hide sensitive information.  Some make you press a button to show the spoiler, and some simply black out the text and force you to highlight it if you wish to see it.

Giant Bomb does not, on the surface, appear to have any of this type of functionality.  Browsing the forums, you'll see many titles with "Spoilers Within" or just simply "Spoilers".  When the main topic is about a potential spoiler, this works effectively well, but sometimes, during conversation, an example may arise where you may be inclined to use a spoiler to show your point.  This is when simple "SPOILER NOW"   "END SPOILER" but still allows the wandering eye to glimpse a few words they may not have wanted to see.

For those that have ever had this problem, I present a solution to you.  The HTML code button.

As I said above, on the surface, Giant Bomb does not have a spoiler tag.  With a little bit of basic knowledge of HTML, you can roll your own spoiler tag.  Here's how to do it:

*EDIT*:  Once you get to the "Adding CSS Section" the code does not apply as Giant Bomb has updated their stylesheets.  Please see the *EDIT* section below for correct code.  Thank You.

Edit HTML Button

Edit HTML Button
Edit HTML Button
The Edit HTML Button is your friend.  This button, as many of you already have used, allows you to add html coded objects into the page such as embedding Gamercards or other data.  This is also the button we're going to use to make our spoiler tags.  You can of course, put any html you wish into this box but be forewarned, Giant Bomb has stated in their FAQs page that any code that breaks the layout of the page will be rejected and/or most likely deleted.  So please be mindful of what html your placing in the box.

Span Tag

The span tag will be our spoiler tag.  The reason I chose a span tag is because it is one of the few html elements that does not have any "styling" associated to it.  If not given any CSS styles (cascading style sheets), the tag will not do anything.  This is good for our purposes because it gives us a blank slate for our spoiler tag. 

Span tags look like this:

<span>CONTENT GOES HERE</span>

The greater than and less than characters denote the start and end of a particular html tag.  When a forward slash "/" is introduced, that denotes the ending set of a span tag.  By design, html tags have a start and end tag to denote what content the tag will be affixed to.  Since there isn't any styling associated with the span tag, we'll use CSS to add some.

Adding CSS To Span Tags

To hide the text between the <span> tags, we need to add a background color and a text color of the same color.  In this case, I'm going to use blue.  In html tags, the style="" attribute is used to denote CSS styles that are attached to that particular tag.  A CSS style consists of an attribute, followed by a colon, the attribute value and then a semicolon to denote the end of the particular style.

To add the background color, type into the Edit HTML Box (lets say your spoiler is "Mario and Luigi actually aren't brothers!"):

<span style="background-color: blue;">Mario and Luigi actually aren't brothers!</span>

This will give you:

Mario and Luigi actually aren't brothers!

To edit the color of text, you would use this code:

<span style="color: blue;">Mario and Luigi actually aren't brothers!</span>

Which gives you:

Mario and Luigi actually aren't brothers!

Putting It All Together

If we combine both of the styles, like so:

<span style="background-color: blue; color: blue;">CONTENT GOES HERE</span>

We get a spoiler tag!

Mario and Luigi actually aren't brothers!

Effectively keeping away wandering eyes and does not break any page layouts!   Remember that this code must be placed in the Edit HTML Box or nothing will happen.  It will just render as text instead of valid HTML and your spoiler tag won't work.

I hope this write-up saves you from any flame wars or nasty private messages caused by bad spoiler warnings!  Thanks for reading!

*EDIT*

It would seem that Giant Bomb updated their style sheets and the background-color style doesn't work anymore.  Try using this method:

**SPOILER** <span style="color: #292929">SPOILER GOES HERE</span> **END SPOILER**

The color in the span tag is the exact color of Giant Bomb current background (as of 2/16/2009) so text gets lost which is why i put the words **SPOILER** and **END SPOILER** to denote where the user wanting to read the spoiler should highlight.  Here's a working example:

**SPOILER** Mario and Luigi aren't actually brothers! **END SPOILER**

I hope this helps!
Avatar image for mordecaix7
mordecaix7

727

Forum Posts

1184

Wiki Points

0

Followers

Reviews: 2

User Lists: 12

#1  Edited By mordecaix7

Please Disregard

The following no longer works due to some issues with Giant Bomb's CSS overriding (or stripping out, haven't looked into it deeper) the background-color style.  The article is still informative for general CSS and HTML knowledge but will not work on Giant Bomb anymore.


Introduction

A few times while posting in the forum, I've really wanted to post some sensitive information that might really make some people mad if they accidentally read it and haven't gotten that far in that particular game, or whatever the topic is about.  Lots of sites have BB Code for spoilers that you can use to hide sensitive information.  Some make you press a button to show the spoiler, and some simply black out the text and force you to highlight it if you wish to see it.

Giant Bomb does not, on the surface, appear to have any of this type of functionality.  Browsing the forums, you'll see many titles with "Spoilers Within" or just simply "Spoilers".  When the main topic is about a potential spoiler, this works effectively well, but sometimes, during conversation, an example may arise where you may be inclined to use a spoiler to show your point.  This is when simple "SPOILER NOW"   "END SPOILER" but still allows the wandering eye to glimpse a few words they may not have wanted to see.

For those that have ever had this problem, I present a solution to you.  The HTML code button.

As I said above, on the surface, Giant Bomb does not have a spoiler tag.  With a little bit of basic knowledge of HTML, you can roll your own spoiler tag.  Here's how to do it:

*EDIT*:  Once you get to the "Adding CSS Section" the code does not apply as Giant Bomb has updated their stylesheets.  Please see the *EDIT* section below for correct code.  Thank You.

Edit HTML Button

Edit HTML Button
Edit HTML Button
The Edit HTML Button is your friend.  This button, as many of you already have used, allows you to add html coded objects into the page such as embedding Gamercards or other data.  This is also the button we're going to use to make our spoiler tags.  You can of course, put any html you wish into this box but be forewarned, Giant Bomb has stated in their FAQs page that any code that breaks the layout of the page will be rejected and/or most likely deleted.  So please be mindful of what html your placing in the box.

Span Tag

The span tag will be our spoiler tag.  The reason I chose a span tag is because it is one of the few html elements that does not have any "styling" associated to it.  If not given any CSS styles (cascading style sheets), the tag will not do anything.  This is good for our purposes because it gives us a blank slate for our spoiler tag. 

Span tags look like this:

<span>CONTENT GOES HERE</span>

The greater than and less than characters denote the start and end of a particular html tag.  When a forward slash "/" is introduced, that denotes the ending set of a span tag.  By design, html tags have a start and end tag to denote what content the tag will be affixed to.  Since there isn't any styling associated with the span tag, we'll use CSS to add some.

Adding CSS To Span Tags

To hide the text between the <span> tags, we need to add a background color and a text color of the same color.  In this case, I'm going to use blue.  In html tags, the style="" attribute is used to denote CSS styles that are attached to that particular tag.  A CSS style consists of an attribute, followed by a colon, the attribute value and then a semicolon to denote the end of the particular style.

To add the background color, type into the Edit HTML Box (lets say your spoiler is "Mario and Luigi actually aren't brothers!"):

<span style="background-color: blue;">Mario and Luigi actually aren't brothers!</span>

This will give you:

Mario and Luigi actually aren't brothers!

To edit the color of text, you would use this code:

<span style="color: blue;">Mario and Luigi actually aren't brothers!</span>

Which gives you:

Mario and Luigi actually aren't brothers!

Putting It All Together

If we combine both of the styles, like so:

<span style="background-color: blue; color: blue;">CONTENT GOES HERE</span>

We get a spoiler tag!

Mario and Luigi actually aren't brothers!

Effectively keeping away wandering eyes and does not break any page layouts!   Remember that this code must be placed in the Edit HTML Box or nothing will happen.  It will just render as text instead of valid HTML and your spoiler tag won't work.

I hope this write-up saves you from any flame wars or nasty private messages caused by bad spoiler warnings!  Thanks for reading!

*EDIT*

It would seem that Giant Bomb updated their style sheets and the background-color style doesn't work anymore.  Try using this method:

**SPOILER** <span style="color: #292929">SPOILER GOES HERE</span> **END SPOILER**

The color in the span tag is the exact color of Giant Bomb current background (as of 2/16/2009) so text gets lost which is why i put the words **SPOILER** and **END SPOILER** to denote where the user wanting to read the spoiler should highlight.  Here's a working example:

**SPOILER** Mario and Luigi aren't actually brothers! **END SPOILER**

I hope this helps!
Avatar image for mattyftm
MattyFTM

14914

Forum Posts

67415

Wiki Points

0

Followers

Reviews: 4

User Lists: 11

#2  Edited By MattyFTM  Moderator
AkumaX said:
"Good idea, but it's a bit long winded."
Not really, he just went a long winded way of explaining it. All you really have to do is paste <span style="background-color: blue; color: blue;">CONTENT GOES HERE</span> into the HTML box and replace it with your own content.
Avatar image for mordecaix7
mordecaix7

727

Forum Posts

1184

Wiki Points

0

Followers

Reviews: 2

User Lists: 12

#3  Edited By mordecaix7

Long winded yes, but I tried to help people understand exactly what to do.  I don't know about you guys but I hate getting pieces of code without any comments or explanation on it. 

Since giantbomb would burninate any posts that break page format, I felt it necessary to explain why you use a span tag and why the style thing works.  The more you know right?

Avatar image for akumax
AkumaX

273

Forum Posts

4670

Wiki Points

0

Followers

Reviews: 3

User Lists: 1

#4  Edited By AkumaX

Yeah, as I said it's a good idea.

I'll just copy and paste that when I need it, thanks.

Avatar image for serbsta
serbsta

1952

Forum Posts

-1

Wiki Points

0

Followers

Reviews: 1

User Lists: 4

#5  Edited By serbsta

Its a good idea, nice improvisation. But im sure the staff and dev's will put up a much easier solution very soon.

Avatar image for mordecaix7
mordecaix7

727

Forum Posts

1184

Wiki Points

0

Followers

Reviews: 2

User Lists: 12

#6  Edited By mordecaix7

Sweet, this post got anchored :)

Avatar image for deadly_polo
deadly_polo

503

Forum Posts

790

Wiki Points

0

Followers

Reviews: 2

User Lists: 6

#7  Edited By deadly_polo

Thanks for taking the time to explain it  - everyone hates spoilers - like how (jks) Everyone dies in flower

I can confirm it works btw.
Avatar image for mordecaix7
mordecaix7

727

Forum Posts

1184

Wiki Points

0

Followers

Reviews: 2

User Lists: 12

#8  Edited By mordecaix7

It would seem, the background color style is getting overwritten now...  not applying anymore...  i'll see if i can find a way to fix it.

Avatar image for chronix
chronix

194

Forum Posts

2312

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#9  Edited By chronix

They need a version where you have to click to expand it.  So in the main articles for games you can put the entire storyline in case someone wants to know without playing the game. 

Something like
[spoiler title="The storyline"]
blah blah blah
[/spoiler]

Becomes (of course I can't do the expansion code here):
[SPOILER] The storyline

The highlight spoilers seem cheap and they only lend themselves to short one line spoilers before they get annoying.

Avatar image for gike987
gike987

1748

Forum Posts

85

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#10  Edited By gike987

Can't you use <span title="spoiler text here">trigger text here</span>? It works in guides.

Avatar image for mattyftm
MattyFTM

14914

Forum Posts

67415

Wiki Points

0

Followers

Reviews: 4

User Lists: 11

#11  Edited By MattyFTM  Moderator
gike987 said:
"Can't you use <span title="spoiler text here">trigger text here</span>? It works in guides.
"
will it work?

Edit: that was my test, and it didn't work.
Avatar image for willy105
Willy105

4959

Forum Posts

14729

Wiki Points

0

Followers

Reviews: 5

User Lists: 1

#12  Edited By Willy105

This is very intimidating.

Avatar image for mordecaix7
mordecaix7

727

Forum Posts

1184

Wiki Points

0

Followers

Reviews: 2

User Lists: 12

#13  Edited By mordecaix7

@chronix:  That's a great idea.  Really it's the best idea.  I've seen it on other websites and it works very well.