vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - Hidden Signatures (Hidesig) BB Code (https://vborg.vbsupport.ru/showthread.php?t=244918)

BirdOPrey5 06-18-2010 10:00 PM

Hidden Signatures (Hidesig) BB Code
 
1 Attachment(s)
This is an edit of this re-usable code: https://vborg.vbsupport.ru/showthread.php?t=184855

This was made for vB 3.8.x but should work on any supported vB version from 3.5 to 4.x.

It is based off of the popular 'spoiler' bbcode but edited for my liking. In this case I wanted a way for people who want large and/or risqu? signatures to be able to hide them by default- this keeps my forums work safe and keeps people who want those types of sigs happy too.

If you want to hide an entire usergroups signature to be hidden by default (or everyones) use this mod: https://vborg.vbsupport.ru/showthread.php?t=243082

As this is standard bbcode it will work in posts as well but only makes sense to use it in a sig.
Click for Demo!

I suggest using this in conjunction with this mod so you can give the user instructions on how to use it directly on the modify signature page.

Instructions:

Go to Admin CP -> Custom BB Codes -> Add New BB Code

Title: Hidden Sig
BB Code Tag Name: hidesig
Replacement:
Code:

<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px"> <input type="button" value="Show Sig" style="width:65px;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 Sig'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show Sig'; }"> </div> <div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;">{param}</div> </div> </div>
Example: [hidesig]Hide this sig![/hidesig]
Description: Creates a spoiler-like bbcode for users to hide their signatures with.
Use {option}: No
Remove Tag If Empty: Yes
Everything Else: No, No, No...

Hit Save & you're set.

This has been tested with the latest release of all major browsers- IE/FF/Chrome/Safari and works. In Chrome and Safari the "Show" button does not change to "Hide" when the sig is showing but clicking it again still re-hide's the content.

If you use this please remember to mark as installed.


All times are GMT. The time now is 09:13 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.01796 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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