Welcome, Guest. Please login or register.

ShoutBox!

 

Skhilled

2024-08-09, 18:19:29
Awww! Poor thing! LOL
 

Ken

2024-08-09, 09:20:52
 

Skhilled

2024-07-06, 10:33:18
 :D
 

Ken

2024-07-06, 06:40:47
Happy Saturday after the 4th of July!
 :fireworks:
 

Skhilled

2024-07-04, 20:27:02
Happy Day Off From Work!  :D
 

Ken

2024-06-25, 06:23:12
84... who knew?  laughing7
...2013 was my *magic* year
 

Skhilled

2024-06-14, 22:09:12
I hope so! LOL
 

Ken

2024-06-14, 21:41:30
My B-Day is forthcoming and maybe it will be far enough along so that I can be a regular Dancing Fool for that day!!! :banana: :2funny:
 

Ken

2024-06-14, 21:38:38
Happy Friday everyone! I'm  SOOO glad to see Friday and not just because it's the weekend, but because it marks one more day in the recovery of my foot!  laughing7

Scrubmeister

2024-04-19, 10:32:40
Good to see the site back faster than ever. :)

Recent Topics

TP Articles


Search in titles
Search in article texts

Author Topic: Spoiler Tag Test  (Read 3100 times)

0 Members and 1 Guest are viewing this topic.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11937
  • Gender: Male
  • View Gallery
Spoiler Tag Test
« on: September 11, 2010, 02:41:00 PM »
Spoiler Tag Test:

[spoiler]Spoiler Tag Test[/spoiler]
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11937
  • Gender: Male
  • View Gallery
Re: Spoiler Tag Test
« Reply #1 on: September 11, 2010, 02:42:12 PM »
[spoiler]Looks to be working correctly.  :bigthumb:[/spoiler]
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Skhilled

  • Administrator
  • *
  • Posts: 9424
  • Gender: Male
  • All of my passwords are protected by amnesia...
  • View Gallery
    • Buildz Hosting
Re: Spoiler Tag Test
« Reply #2 on: September 18, 2010, 06:13:37 AM »
Not for me. I do not see the hidden portion of your posts. There is supposed to be a link similar to the "[copy]" tag when people add code a post...don't see it. I only see this:
EDIT: Steve, I fixed your post with code tags so that it would show what you were seeing.

Spoiler Tag Test:

Code: [Select]
[spoiler]Spoiler Tag Test[/spoiler]
[/quote]

Code: [Select]
[spoiler]Looks to be working correctly.  :bigthumb:[/spoiler]
« Last Edit: September 18, 2010, 08:17:48 AM by Ken »

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11937
  • Gender: Male
  • View Gallery
Re: Spoiler Tag Test
« Reply #3 on: September 18, 2010, 07:38:13 AM »
Thanks for catching that Steve.

In the package manager it appears as being installed, but it's not working of course... later today I'll go through all of the file edits to see if I can find and fix the missing or corrupted code.
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11937
  • Gender: Male
  • View Gallery
Re: Spoiler Tag Test
« Reply #4 on: September 18, 2010, 08:10:25 AM »
Fixed it.  :bigthumb:

The edits for the Sources/Subs.php file were missing.

[spoiler]
Code: [Select]
    <file name="$sourcedir/Subs.php">
        <operation>
            <search position="after"><![CDATA[

// The current time with offset.
function forum_time($use_user_offset = true, $timestamp = null)
{
]]></search>
            <add><![CDATA[
// Spoiler choosing function
function build_spoiler($position, $topic = '')
{
    global $txt, $settings, $context, $modSettings;

    // Optional topic if given
    if($topic != '')
        $topic = ': '.$topic;
   
    //Use global style if the theme-specific isn't set or is set to "follow global" (aka 0)
    $spoilerTagStyle = isset($settings['spoiler_style']) ? $settings['spoiler_style'] : 0;
    if($spoilerTagStyle == 0)
    {
        //Use "hover" if the global style isn't explicitly set
        $spoilerTagStyle = isset($modSettings['defaultSpoilerStyle']) ? $modSettings['defaultSpoilerStyle'] : 1;
    }

    /*
    Styles:
    3: button
    2: link
    1: hover (default)
    */
    $retval = '';

    switch($position)
    {
        case 'before':
            switch($spoilerTagStyle)
            {
                case 3:
                    $retval = (
                        '<div class="spoiler"><div class="spoilerheader">'.
                        '<input type="button" class="spoilerbutton" value="'.$txt['spoiler_tag_text'].$topic.'" '.
                        'onclick="n = this.parentNode.parentNode.lastChild;if(n.style.display == \'none\') {n.style.display = \'block\';} else {n.style.display = \'none\';} return false;"/> '.
                        $txt['spoiler_tag_click_info'].'</div><div class="spoilerbody" style="display: none">'
                    );
                break;

                case 2:
                    $retval = (
                        '<div class="spoiler"><div class="spoilerheader">'.
                        '<a href="javascript:void(0)" '.
                        'onclick="n = this.parentNode.parentNode.lastChild; if(n.style.display == \'none\') { n.style.display = \'block\'; } else {    n.style.display = \'none\';    } return false;">'.$txt['spoiler_tag_text'].$topic.'</a> '.
                        $txt['spoiler_tag_click_info'].'</div><div class="spoilerbody" style="display: none">'
                    );
                break;

                case 1:
                default:
                    $retval = (
                        '<fieldset class="spoiler" '.
                        'onmouseover="this.lastChild.style.display = \'block\';" onmouseout="this.lastChild.style.display=\'none\'">'.
                        '<legend><b>'.$txt['spoiler_tag_text'].$topic.'</b> <small>'.$txt['spoiler_tag_hover_info'].'</small>'.
                        '</legend><div class="spoilerbody" style="display: none">'
                    );
            }
        break;

        case 'after':
            switch($spoilerTagStyle)
            {
                case 3:
                case 2:
                    $retval = (
                        '</div></div>'
                    );
                break;

                case 1:
                default:
                    $retval = (
                        '</div></fieldset>'
                    );
                   
            }
            break;
    }
    return $retval;
}
]]></add>
        </operation>
        <operation>
            <search position="before"><![CDATA[
            array(
                'tag' => 'sup',
                'before' => '<sup>',
                'after' => '</sup>',
            ),
]]></search>
        <add><![CDATA[
            array(
                'tag' => 'spoiler',
                'block_level' => true,
                'before' => build_spoiler('before'),
                'after' => build_spoiler('after'),
                'disabled_before' => '<div style="display: none;">',
                'disabled_after' => '</div>',
                ),
            array(
                'tag' => 'spoiler',
                'type' => 'unparsed_equals',
                'block_level' => true,
                'before' => build_spoiler('before', "$1"),
                'after' => build_spoiler('after'),
                'disabled_before' => '<div style="display: none;">',
                'disabled_after' => '</div>',
                ),
]]></add>
        </operation>
    </file>
[/spoiler]
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.

Offline Ken (OP)

  • Vietnam Era Veteran
  • Administrator
  • *
  • Posts: 11937
  • Gender: Male
  • View Gallery
Re: Spoiler Tag Test
« Reply #5 on: September 18, 2010, 08:31:37 AM »
Ps: For anyone reading here... if you've not used the Spoiler tag before, it's this button in your posting editor...

When you click on the Spoiler Tag icon it will give you this BBC tag in your editor's text window:
Code: [Select]
[spoiler][/spoiler]
Code: [Select]
[spoiler]... then, whatever you enter between the tags will only show when someone hovers over the Spoiler, as seen below.  :innocent:[/spoiler]
[spoiler]... then, whatever you enter between the tags will only show when someone hovers over the Spoiler, as seen below.  :innocent:[/spoiler]



This works great for hiding the punch line for your jokes. Remember that you can place anything there between the Spoiler tags, just like you would in a regular post, like pictures for an example.

[spoiler]Enjoy!  :08:
[/spoiler]
"Not all who wander are lost."-Tolkien
Yesterday When I was Young.