vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   BB Code Enhancements - Spoiler BB Code - jQuery Smooth Scrolling (https://vborg.vbsupport.ru/showthread.php?t=213419)

1Unreal 05-10-2009 10:00 PM

Spoiler BB Code - jQuery Smooth Scrolling
 
Ive not seen a very pretty spoiler BB code so I thought I would make one. It uses some really simple jQuery code so its very easy to modify with some other cool effects https://vborg.vbsupport.ru/external/2011/01/23.gif

Heres a demo

How to install
  • Open up the admin CP and go to the BB Code manager.
  • Add a new BB code and add all the settings you think are appropriate.
  • For the HTML replacement use the following code:
    HTML Code:

    <p><span class="spoiler">{param}</span></p>
  • Then open up your style manager and go to headinclude and add the following code:
    HTML Code:

    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {

            $("span.spoiler").hide();

            $('<a class="reveal">Reveal Spoiler &gt;&gt;</a> ').insertBefore('.spoiler');

            $("a.reveal").click(function(){
                    $(this).parents("p").children("span.spoiler").fadeIn(2500);
                    $(this).parents("p").children("a.reveal").fadeOut(600);
            });

    });
    </script>

  • Then youre done!

intensecool 05-11-2009 06:09 PM

<i>Demo not working</i>. Can you provide screenshots which will be helpful

1Unreal 05-11-2009 06:33 PM

Theres nothing much to see in a screenshot.

The demo will be working shortly.

EDIT: its working now

TWTCommish 05-11-2009 08:52 PM

I'm glad you chose to incoporate my suggestion, but why was my post about it deleted?

1Unreal 05-11-2009 09:10 PM

Quote:

Originally Posted by TWTCommish (Post 1808936)
I'm glad you chose to incoporate my suggestion, but why was my post about it deleted?

Did you say the bit about the display CSS attribute?

If so the last thread was deleted because there were no files. This is a re-post

Oyabun 05-13-2009 06:10 PM

There was a spoiler before, looking just like yours. I had it on my forums.
This doesn't work without reloading, right? That is why i deleted it on my
site.

1Unreal 05-13-2009 07:25 PM

Quote:

Originally Posted by Oyabun (Post 1810197)
There was a spoiler before, looking just like yours. I had it on my forums.
This doesn't work without reloading, right? That is why i deleted it on my
site.

Nope...explain what you mean

Sin City 05-22-2009 03:05 AM

he means that when you make the post and use the spoiler mod here, you have to refresh the page in order for it to work... if you don't refresh, nothing happens when you click on it... got a fix for this, cuz if you can work out that issue, then this hack is great

Jasem 05-27-2009 01:34 PM

thank you!


All times are GMT. The time now is 02:28 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01028 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete