![]() |
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> 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|