vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   BB Code Enhancements - Button spoiler (https://vborg.vbsupport.ru/showthread.php?t=185380)

godkillah 07-14-2008 10:00 PM

Button spoiler
 
I have written a spoiler bbcode for vBdeals and i decided to also release it for other vB users to use.
it should work on any version.

Name: Spoiler bbcode
Example:to create a spoiler use:
Code:

[spoiler]message[/spoiler]
Description: This adds a spoiler bbtag to your forum familiar to the SMF spoiler tag,
spoiled messages are hidden with buttons, once the button it clicked the message shows/hides
Author: Godkillah
Copyright to: http://www.vbdeals.com
-----------------------------------
How to install?

Step 1.
Go to the 'Custom BB Codes' in the ACP and click 'Add New BB Code'

Step 2.
Set the Title to: Spoiler

Step 3.
Set the BB Code Tag Name to: spoiler

Step 4.
Set the Replacement to:
Code:

<!--Vbdeals.com-->
<div class="spoiler"><script>
function showHide(what){
a=what.getElementsByTagName("div")[0];
if(a.style.display=='none'){
a.style.display='block';
}else{
a.style.display='none';
}}
</script>
<input type="button" onclick="showHide(this.parentNode)" value="Spoiler"><b><small>( Click to show/hide )</small></b><div style="display:none">{param}</div></div>
<!--Vbdeals.com-->

Step 3.
add a example and description if you like

Step 6.
Set all of the radio buttons to 'No'

Step 7.
press the save button


Congratulations, the spoiler bbcode has now been installed

rolfw1 07-15-2008 08:53 AM

Nice one, thanks. :)

projectego 07-16-2008 08:03 AM

[high]* projectego clicks install :)[/high]

theforumist 07-16-2008 02:51 PM

Good code but I went with another spoiler code. I'll use it if someone can tell me how to add a border and a gray shading to the spoiler box/contents.

godkillah 07-16-2008 06:59 PM

that can be done with css i suppose :)
a simple example is
Code:

<style>
.spoiler div{
border:ridge;
border-bottom-color:#999999;
border-top-color:#999999;
border-left-color:#999999;
border-right-color:#999999;
border-bottom-width:thin;
border-top-width:thin;
border-left-width:thin;
border-right-width:thin;
}
</style>

thank you all for comments

Q-v-n-s-Q 07-16-2008 09:52 PM

thank you

Jair 07-23-2008 07:41 PM

[Borat]Very Nice!![/Borat]

Installed...

acegames 07-24-2008 12:11 PM

Works a treat , I used it to replace old bbspoiler hack as that stopped my thread prview working on search

iKuro 07-24-2008 02:18 PM

any screenshot????

sonokai 11-07-2008 06:06 PM

very great
thank you very much


All times are GMT. The time now is 02:07 AM.

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.01014 seconds
  • Memory Usage 1,728KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete