This site is supported by the advertisements on it, please disable your AdBlocker so we can continue to provide you with the quality content you expect.

[GUIDE] Creating spoilers

Discussion in 'Website & Forum Help' started by DjTonTon, Jul 20, 2015.

  1. DjTonTon
    Offline

    DjTonTon
    Expand Collapse
    Saltwater Addict
    C-SEA Member

    Joined:
    Oct 13, 2009
    Messages:
    1,102
    Likes Received:
    57
    Location:
    Ohio
    A lot of people have been asking about spoilers, how to do them and how to fix them when they break... so I thought I'd make a guide especially for spoilers, since a few people have been having problems with them.

    What is a spoiler?
    Simply put, a spoiler is something that hides information and prompts the user to click to show it. Here's an example:



    Section 1: New Spoiler Wizard
    How to make a spoiler

    The latest XenForo update brings us a new Spoiler Wizard! This makes creating spoilers easier than ever! Here's how to use it:

    Click on the "+" in the media section of the insert-into-post bar:
    [​IMG]

    Click on the "Spoiler" button from the drop down menu:
    [​IMG]

    Next, insert a spoiler name, if you wish to:
    [​IMG]

    Insert the content of your spoiler between the two SPOILER tags:
    [​IMG]

    You're done! Enter the rest of your post (or even more spoilers if you want!) and hit that Post button.
     
    TESTACCOUNT likes this.
  2. DjTonTon
    Offline

    DjTonTon
    Expand Collapse
    Saltwater Addict
    C-SEA Member

    Joined:
    Oct 13, 2009
    Messages:
    1,102
    Likes Received:
    57
    Location:
    Ohio
    Section 2: Plain BB Code
    How to make a spoiler

    Firstly, when making a spoiler, you need to use the BB Code editor. Using the Rich Text Editor often breaks the spoilers, leaving you with many problems.
    [​IMG]
    Spoilers are very simple to code. In fact, all you need to do is use spoiler tags within the BB Code editor. The code below is the code for the spoiler above:

    Code:
    [spoiler]This is a spoiler[/spoiler]
    Custom named spoilers
    Again, very simple. All you have to do is use spoiler=Name and it'll be named Name (open) and Name (close). You can see this below:

    Code:
    [spoiler=Name]This is a named spoiler[/spoiler]
    This is a named spoiler

    Even more custom named spoilers
    This is a variation of the named spoiler above, but you can add two names; one for open and one for closed. For example, you use spoiler=Open me, Close me an it will display as Open me when closed and Close me when open. You can see this below:

    Code:
    [spoiler=Open me, Close me]This is a named spoiler[/spoiler]
    This is a named spoiler

    Formatting spoilers
    When formatting a spoiler, make sure that your BB tags are relative. E.g. If you make a bold tag inside the spoiler at the start, make sure that your /bold tag is also inside the spoiler tag. If you move your tags around, your spoiler will either break or duplicate

    Code:
    [spoiler][b]This is a bold spoiler[/b][/spoiler]
    This is a bold spoiler
     
  3. DjTonTon
    Offline

    DjTonTon
    Expand Collapse
    Saltwater Addict
    C-SEA Member

    Joined:
    Oct 13, 2009
    Messages:
    1,102
    Likes Received:
    57
    Location:
    Ohio
Loading...
Similar Threads Forum Date
Seeking help creating ATS setup General Reef Discussions Mar 10, 2010

Share This Page