|
Hidden Signatures (Hidesig) BB Code
This is an edit of this re-usable code: Spoiler BB Code with Show/Hide Button
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: Hidden Signatures - Hide sigs like a spoiler for certain usergroups As this is standard bbcode it will work in posts as well but only makes sense to use it in a sig. http://www.juot.net/forums/showthread.php?p=808792 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. Download No files for download. |
|||||||||
Similar Mods
| Show Thread Enhancements Hidden Signatures - Hide sigs like a spoiler for certain usergroups | vBulletin 3.8 Template Modifications |