BirdOPrey5
06-18-2010, 10:00 PM
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! (http://www.juot.net/forums/showthread.php?p=808792)
I suggest using this in conjunction with this mod (https://vborg.vbsupport.ru/showthread.php?t=163129) 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:
<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('d iv')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide Sig'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[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: Hide this sig!
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.
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! (http://www.juot.net/forums/showthread.php?p=808792)
I suggest using this in conjunction with this mod (https://vborg.vbsupport.ru/showthread.php?t=163129) 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:
<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('d iv')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide Sig'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[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: Hide this sig!
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.