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
Custom Title Spoiler Button (Smooth Version) Details »»
Custom Title Spoiler Button (Smooth Version)
Version: 1.0.2, by GamBun GamBun is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.2.x Rating:
Released: 08-06-2010 Last Update: Never Installs: 57
Uses Plugins
Re-useable Code  
No support by the author.

This Mod supports all 3X Versions - 4.2.x Versions!
Due to the demands, I have created a new version of spoilers. The greatest complaint I received HERE, was the framing of the actual spoiler. So gone is the "ugly" box! It is really quite easy to remove, but I understand that coding can be confusing/foreign to some people, this is why, I am releasing a clean, "NO BOX" version. I will still support those who want the box, for the 3X version, until the migration of everyone to the 4.X.x is made completely mandatory.

Spoilers may be used as intended, in all Blog posts, forum posts, & published article content (CMS) to hide hints/cheats. I will not support it anywhere else outside of POSTING AREAS.

It's really easy. Just log into the AdminCP=>Custom BBCodes=>Add New BB Code

Then do this:

Title: Spoiler
BB Code Tag Name: Spoiler

Replacement:
Code:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b>&nbsp;</b></font></right>  
<input type="button" value="Spoiler about {option}" style="font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';   this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '{option}'; }">
</div>
<div>
<div style="display: none;">
{param}
</div>
</div>
</div>
Example: [SPOILER="Custom Button Title"]Hidden Content Here...[/SPOILER]

Description: Creates a button that hides/shows spoiler messages.

use {option}: Click Yes (Note: some have found they need to set this option to "No" due to personal styling, but in most cases it should be "Yes").

add the path to your "spoiler" icon (feel free to use the icon I added at the bottom of this post.. just right click on it to download it to your computer) The image would go in your forums images/editor directory.

Remove tag if empty: Click "Yes"

...leave the rest at "No"

Click "Save" button & that is it!

The code will then be:

[SPOILER="Custom Button Title"]Hidden Content Here...[/SPOILER]

This also works to nested spoilers as well!

Nested Code Example:

[SPOILER="Button Title Here"]Hidden Content Here...[SPOILER="2nd Nested Button Title Here"]2nd Hidden Nested content Here...[/SPOILER][/SPOILER]


>>LIVE EXAMPLE<< (You can test there without signing up, if you want to see how it works).

It also works for the CMS suites! >>LIVE EXAMPLE<< (Please feel free to post comments & give it a try!)

ENJOY!

Please Note: if for any reason this spoiler system breaks when converting from 3X to 4.0 upgrade. Just go to BB Code manager & delete it, go through the process of adding it again, as given above. Doing this will not make you lose any forum content as long as you use the the same code (i.e. if you modified the code I gave you, then you will have to do the same again for it to work as you want). Doing this will force the new version to read the BB code properly.

Screenshots

File Type: jpeg spoiler.jpeg (58.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
englishtalk

Comments
  #22  
Old 08-10-2013, 05:34 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like !

Just noticed the spoiler text shows up in the What's New page though.

And search results alt txt.
Reply With Quote
  #23  
Old 08-10-2013, 08:44 PM
GamBun's Avatar
GamBun GamBun is offline
 
Join Date: Jun 2006
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you meaning not parsing? or... Usually BB code doesn't show in news feeds at all (i.e. Hidden content might show with missing BB Code). Is that what you mean?
I did a test at my site to show you what I get...
Original Posts Followed by News Feeds:
Attached Images
File Type: jpeg original_spoil.jpeg (77.8 KB, 0 views)
File Type: jpeg original_spoil2.jpeg (73.9 KB, 0 views)
File Type: jpg new_feeds.jpg (34.2 KB, 0 views)
Reply With Quote
  #24  
Old 08-10-2013, 11:10 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, bbcode doesnt show in feeds. But the hidden content does.

In whats new
In alt text in search results, if in first post.

I realize this is how it works, and I dont think it is really fixable since it is a bbcode hide feature.
Reply With Quote
  #25  
Old 08-11-2013, 03:40 AM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think a poster using spoiler tag will just need to make sure they type enough txt above the spoiler so the txt fills the alt txt and whats new txt area, with the bbcode well below.

Like I said, I like this. But if you figure out a solution, I will just like it even more.
Reply With Quote
  #26  
Old 08-17-2013, 06:44 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this,... is it supposed to popup a javascript prompt when you click an icon?

How can I make it just drop the code and a user can fill in the text areas?
Reply With Quote
  #27  
Old 08-24-2013, 07:26 PM
GamBun's Avatar
GamBun GamBun is offline
 
Join Date: Jun 2006
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smirkley View Post
I like this,... is it supposed to popup a javascript prompt when you click an icon?

How can I make it just drop the code and a user can fill in the text areas?
You should have a pop up for a title to name your spoiler... i.e. to tell what the spoiler is for (attached screen shot about this). Once that is posted, then you can place inside what you want to hide. Is this what you mean? Also, are you seeing the spoiler button icon? If you click on that, it posts the code for you, you just need to add in the details to make that post personal to the needs of the moment. If you still have problems, send me the details or PM me the details to look at your site to see what is going on.
Attached Images
File Type: gif spoiler_popup.gif (24.0 KB, 0 views)
Reply With Quote
  #28  
Old 02-13-2014, 11:04 PM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i assume this works for vb5? being simple and all...anyone tried it?

im wondering how hard it would be to put usergroup permissions on a tag like this? like for the button to work and show the txt...
Reply With Quote
  #29  
Old 03-10-2014, 05:02 AM
Xen Chaotik Xen Chaotik is offline
 
Join Date: Feb 2012
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not very good with the coding. How could I widen the tag? Any help is appreciated.
Reply With Quote
  #30  
Old 03-27-2014, 04:31 PM
GamBun's Avatar
GamBun GamBun is offline
 
Join Date: Jun 2006
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xen Chaotik View Post
I am not very good with the coding. How could I widen the tag? Any help is appreciated.
I'm not sure what you are talking about changing. Could you give me a screen shot? I'll do my best to help.
Reply With Quote
  #31  
Old 03-27-2014, 04:33 PM
GamBun's Avatar
GamBun GamBun is offline
 
Join Date: Jun 2006
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by IggyP View Post
i assume this works for vb5? being simple and all...anyone tried it?

im wondering how hard it would be to put usergroup permissions on a tag like this? like for the button to work and show the txt...
Yes, I do not personally use Version 5, but it is light code so should work fine for your needs. Just please note again that spoilers are not supported for mobile.
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 07:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05364 seconds
  • Memory Usage 2,344KB
  • Queries Executed 26 (?)
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_code
  • (3)bbcode_quote
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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