Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Spoiler BBCode (auto-created and configurable) Details »»
Spoiler BBCode (auto-created and configurable)
Version: 1.5, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.x.x Rating:
Released: 10-18-2015 Last Update: 02-19-2017 Installs: 39
DB Changes Uses Plugins
Additional Files Translations  
No support by the author.

Overview:

This add-on, upon installation, auto-creates a new custom spoiler BBCode defining the tags (where the text to be hidden is placed between the tags).

You may set the color of the button, the color of the text on the button, and the border radii of both the button and the element containing the hidden text below the button. The button is animated, in that when it is clicked, it moves down and to the right to give the illusion of being depressed when clicked.

When the text is hidden, the button says "Show" and a tooltip advises the user that clicking it will "Reveal Contents" and when the text is shown, then button then says "Hide" and the tooltip advises the user that clicking it will "Conceal Contents."

If the product is uninstalled, then the BBCode is removed from the database.

Updates:

Version 1.1:
  • Changed BBCode options to allow smilies in the spoiler.
  • Added needed scripts where CSS is loaded.

Version 1.2:

Version 1.3:
  • Template now cached.

Version 1.4:

Version 1.5:
  • Added option to mask spoiler content in threadbit previews (forumdisplay and search).

Compatibility:

Tested and working on VB 4.2.x and should work on all 4.x versions of vBulletin.

Backup/Warning:

This product alters your database, however it is always good practice to keep regular backups and you should backup before installing ANY new mod.

As always products are USE AT YOUR OWN RISK. I will try to help if I can but no guarantee is offered or implied.

To Install:
  1. Download and extract the attached .zip file.
  2. Upload the contents of the "upload" folder to your forum's root directory.
  3. In AdminCP go to Plugins & Products -> Manage Products -> Add/Import Product.
  4. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  5. Click "Import"
  6. You MUST set your settings to enable the mod. Each setting has an explanation of its use.

Support for this product can be found here:

Download Now

File Type: zip MarkFL - Spoiler BBCode v1.5.zip (5.6 KB, 80 views)

Screenshots

File Type: jpg markfl_spoiler01.jpg (36.2 KB, 0 views)
File Type: jpg markfl_spoiler02.jpg (35.7 KB, 0 views)
File Type: jpg markfl_spoiler03.jpg (16.2 KB, 0 views)
File Type: jpg markfl_spoiler04.jpg (19.1 KB, 0 views)
File Type: png markfl_spoiler_acp.png (57.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
astra121, rakhwanna

Comments
  #12  
Old 08-21-2016, 12:22 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this code support a title option? When I had a MyBB forum before I transferred, there was a great spoiler code that allowed [spoiler=Spoilers about Half-Life 3]It will never happen[/spoiler] for example. Then the title option text would appear next to the reveal button and be easy to see.

It made it really handy for seeing what the spoiler is, but with the current spoiler code I'm using (not yours, though yours looks better already) you have no clue about that unless the person types that outside of the code. Which is only a small inconvenience but the option was great on MyBB. Plus, a lot of the old posts before the transfer have broken spoiler code because my current spoiler code doesn't have the option.
Reply With Quote
  #13  
Old 08-21-2016, 12:40 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you can do is once you install this product, you can edit the BB Code whereby the "Replacement" is:

HTML Code:
<div class="spoiler_wrapper"><div class="spoiler_button_wrapper"><input type="button" value="Show" class="spoiler_button" title="Reveal Contents" onclick="var el = this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0];if(el.style.visibility == 'hidden') 
{el.style.visibility = 'visible'; el.style.maxHeight = 'none'; this.value = 'Hide'; this.title='Conceal Contents';} else {el.style.visibility = 'hidden'; el.style.maxHeight = '0'; this.value='Show'; this.title='Reveal Contents'}"><span style="margin-left: 1em">{option}</span></div><div class="spoiler_text"><div name="spoiler" style="visibility: hidden; overflow: hidden; max-height: 0">{param}</div></div></div>
And set "Use {option}" to "Yes" and save the BB Code.
Reply With Quote
  #14  
Old 08-21-2016, 01:48 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, but it isn't working. It just displays [spoiler]what is in-between[/spoiler]. And yes, I replaced the replacement, enabled {option} and updated it all to use "spoiler" instead of "sp". I changed the old code to "spoiler2" beforehand. See the screenshot. Where have I gone wrong?



Thanks.
Reply With Quote
  #15  
Old 08-21-2016, 01:58 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once you enable the option, then you need to enter in your post something like:

[spoiler=Title]Hidden text.[/spoiler]
Reply With Quote
  #16  
Old 08-21-2016, 02:11 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it not possible to have it work with both [spoiler] and [spoiler=text]? If I defined both codes—your suggested update and the original—but both using the "spoiler" as the code name, would this break it? There are hundreds of posts on the board where people have just written [spoiler] alone.
Reply With Quote
  #17  
Old 08-21-2016, 02:46 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, you can define one to use the option and one not to use the option, with both having the same tag name.
Reply With Quote
  #18  
Old 01-06-2017, 02:07 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update - Version 1.4:
Reply With Quote
  #19  
Old 02-20-2017, 04:33 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update - Version 1.5:
  • Added option to mask spoiler content in threadbit previews (forumdisplay and search).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:24 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.08512 seconds
  • Memory Usage 2,325KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (6)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete