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
Most elegant Spoiler-Tag [BB-Code] Details »»
Most elegant Spoiler-Tag [BB-Code]
Version: 1.00, by Grazu Grazu is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.x.x Rating:
Released: 02-22-2012 Last Update: Never Installs: 58
Re-useable Code Translations  
No support by the author.

This mod is automatically compatible with vB3.6.x, vB3.7.x, vB3.8.x and vB4.x.x



Demo: http://Uniquecrew.net/Spoiler.php
Demo-Mirror: http://hrkleZ.bplaced.net/Files/Spoiler.html (as you can see in the source, images are base64 encoded in the Demo-Mirror)


Installation Instructions:
  1. Open your AdminCP Custom BB Codes => Add New BB Code
  2. Title: Spoiler
  3. BB Code Tag Name: Spoiler
  4. Replacement:
    HTML Code:
    <div style="padding: 0px 5px 0px 5px;  border: 1px solid #DF7401; margin-left: 20px; width: 40%"><div align="center" style="text-transform: none; border-bottom: none; display: block; padding: 3px 0px 3px 0px;">
    <span onClick="var spoiler = this.parentNode.parentNode.getElementsByTagName('div')[2];
      if (spoiler.style.display != ''){
        this.parentNode.parentNode.style.width = '80%'
        this.parentNode.style.borderBottom = '1px solid #CCCCCC';
        spoiler.style.display = '';
        this.getElementsByTagName('a')[0].innerHTML = '->Close Spoiler<-';
      }else{
        this.parentNode.parentNode.style.width = '40%'
        this.parentNode.style.borderBottom = 'none';
        spoiler.style.display = 'none';
        this.getElementsByTagName('a')[0].innerHTML = '->Open Spoiler<-';
      }" />
    <a rel="nofollow" href="#" onClick="return false;" style="text-decoration: none;"><b style="font-size: 0.8em;">->Spoiler ?ffnen<-</b></a>
    </span>
    </div>
    <div class="quotecontent">
    <div align="center" style="display: none; padding: 5px 0px 5px 0px;"><br> {param}</div>
    </div>
    </div><br />
  5. Example: [SPOILER]Hidden Text Here[/SPOILER]
  6. Description: The [SPOILER]-Tag allows you to hidden or hide your text.
  7. Use {option}: No
  8. Button Image (Optional) => Upload this Picture on you Server and enter the exact Address of it (/images/ is recommended).
  9. Remove Tag If Empty: Yes
  10. Disable BB Code Within This BB Code: No
  11. Disable Smilies Within This BB Code: No
  12. Disable Word Wrapping Within This BB Code: No
  13. Disable Automatic Link Parsing Within This BB Code: No
After you finished, you can compare your Settings with this Screenshot.


I hope you like it! (:

This mod is automatically compatible with vB3.6.x, vB3.7.x, vB3.8.x and vB4.x.x

Screenshots

File Type: jpg Settings.jpg (67.4 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 02-26-2012, 06:58 AM
clutchthese clutchthese is offline
 
Join Date: Apr 2011
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When viewing on mobile device, it crashes app and when in mobile browser, redirects to homepage.... Anything to fix this?
Reply With Quote
  #3  
Old 02-27-2012, 03:10 PM
Grazu Grazu is offline
 
Join Date: Nov 2005
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your mobile have to support JavaScript, all iPhones & Android-Devices are compatible with this.
Reply With Quote
  #4  
Old 02-28-2012, 06:06 PM
ceho ceho is offline
 
Join Date: Mar 2008
Location: Germany
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, a very nice addon, thanks a lot . There is just one thing that I don't get managed: I would like to have the font inside of the spoiler box that's saying Open/Close Spoiler in the same font style like the one that's displayed before opening the box for the first time. So I would like to add
Code:
style="text-decoration: none;"><b style="font-size: 0.8em;"
into the span tag that contains the onClick stuff etc. But I don't get it. Would you mind helping me that the fonts are displayed all the same? Thanks a lot .
Reply With Quote
  #5  
Old 02-28-2012, 08:27 PM
clutchthese clutchthese is offline
 
Join Date: Apr 2011
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Grazu View Post
Your mobile have to support JavaScript, all iPhones & Android-Devices are compatible with this.
I'm talking the iphone app... via mobile suite.

It is on an iphone. you can open the spoiler, but to select the pic for a bigger view results in a crash.
Reply With Quote
  #6  
Old 02-29-2012, 02:03 PM
Grazu Grazu is offline
 
Join Date: Nov 2005
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ceho:
Maybe this could help you
HTML Code:
<div style="padding: 0px 5px 0px 5px;  border: 1px solid #DF7401; margin-left: 20px; width: 40%">
<div align="center" style="text-transform: none; border-bottom: none; display: block; padding: 3px 0px 3px 0px;">
<span onClick="var spoiler = this.parentNode.parentNode.getElementsByTagName('div')[2];
  if (spoiler.style.display != ''){
    this.parentNode.parentNode.style.width = '80%'
    this.parentNode.style.borderBottom = '1px solid #CCCCCC';
    spoiler.style.display = '';
    this.getElementsByTagName('a')[0].innerHTML = '->Spoiler schlie?en<-';
  }else{
    this.parentNode.parentNode.style.width = '40%'
    this.parentNode.style.borderBottom = 'none';
    spoiler.style.display = 'none';
    this.getElementsByTagName('a')[0].innerHTML = '->Spoiler ?ffnen<-';
  }" />
<a rel="nofollow" href="#" onClick="return false;" style="text-decoration: none;"><b style="font-size: 0.8em;">->Spoiler ?ffnen<-</b></a>
</span>
</div>
<div class="quotecontent">
<div align="center" style="display: none; padding: 5px 0px 5px 0px;"><br> <b style="font-size: 0.8em;">{param}</b></div>
</div>
</div><br />
Quote:
Originally Posted by clutchthese View Post
I'm talking the iphone app... via mobile suite.

It is on an iphone. you can open the spoiler, but to select the pic for a bigger view results in a crash.
I'm using Safari, without problems. (:
Reply With Quote
  #7  
Old 02-29-2012, 05:16 PM
ceho ceho is offline
 
Join Date: Mar 2008
Location: Germany
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Grazu, thanks very much. That's part of it . Actually I want to change the font inside of this bit:

Code:
<span onClick="var spoiler = this.parentNode.parentNode.getElementsByTagName('div')[2];
  if (spoiler.style.display != ''){
    this.parentNode.parentNode.style.width = '98%'
    this.parentNode.style.borderBottom = '1px dotted #000000';
    spoiler.style.display = '';
    this.getElementsByTagName('a')[0].innerHTML = '>> Close Download Links <<';
  }else{
    this.parentNode.parentNode.style.width = '98%'
    this.parentNode.style.borderBottom = 'none';
    spoiler.style.display = 'none';
    this.getElementsByTagName('a')[0].innerHTML = '>> Open Download Links <<';
  }" />
Any idea how to do this?

And would you have an idea if it's possible to always have the spoiler at the bottom of each post, automatically? Thanks and keep up the great work mate.
Reply With Quote
  #8  
Old 04-07-2012, 11:04 AM
clutchthese clutchthese is offline
 
Join Date: Apr 2011
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone else tried this on a mobile? On two of my forums it redirects to homepage (my site.com/#)
Reply With Quote
  #9  
Old 04-09-2012, 02:31 PM
benjaminlwells's Avatar
benjaminlwells benjaminlwells is offline
 
Join Date: Jan 2010
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any way to make the spoiler keep hidden text from showing on widgets and blocks?
Reply With Quote
  #10  
Old 05-06-2012, 09:43 PM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you.

Also, before opening it when first visiting said thread, it says "->Spoiler öffnen<-." However, once you open it, it changes to Close / Open Spoiler. What's offnen?

Is there a way to get it to say Open Spoiler when you first go to said thread?

Edit: Never mind, trying another one.
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:16 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.09170 seconds
  • Memory Usage 2,337KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_html
  • (2)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
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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