Back to vBulletin 3.8 Template Modifications

Hidden Signatures - Hide sigs like a spoiler for certain usergroups
Mod Version: 1.00, by BirdOPrey5

vB Version: 3.8.x Rating: (1 vote - 5.00 average) Installs: 7
Released: 22 May 2010 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code Translations  

This is a template modification to enable hidden signatures for certain usergroups. I had several users who would always 'push the line' with what I consider acceptable signatures. While many users enjoyed their sigs, others surfing from work or in some cases home, did not. Rather then disable sigs for these users altogether I embarked on a means to hide their sigs by default. The inspiration, and some code came from this "Spoiler" BB Code:
Spoiler BB Code with Show/Hide Button

Live Demo http://www.juot.net/forums/showthread.php?p=794082 (No registration necessary.)

You must know the Usergroup ID numbers for the usergroups you want to hide. The sample code hides the sigs of registered users, mods, admins, and super-mods, probably NOT what you want to do.

Users with hidden sigs can have the usergroup as their primary or additional usergroup. I strongly suggest you make a new usergroup based off of registered users called "Hide Sigs" then simply check the box for this usergroup in the user profile for every user you want to activate this for.

In your postbit and/or postbit_legacy template make the following change:
Find (about halfway down the window in 3.8.x)

Code:
$post[signature]
Replace with:
Code:
<!-- Begin Hidden sig -->
<if condition="is_member_of($post, 2, 5, 6, 7 )">
                          <div style="margin:20px; margin-top:5px"> 
                           <div class="smallfont" style="margin-bottom:2px"> 
                           <input type="button" value="Show Signature" 
                           style="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 Signature'; } else 
                           { this.parentNode.parentNode.getElementsByTagName('div')
                           [1].getElementsByTagName('div')[0].style.display = 'none'; 
                           this.innerText = ''; this.value = 'Show Signature'; }"> 
                           </div> <div style="margin: 0px; padding: 6px; border: 
                           1px inset;"> <div style="display: none;">
                            $post[signature]
                            </div></div></div>
<else />
  $post[signature]
</if>
<!-- End Hidden sig -->

Note: You MUST Change the line : <if condition="is_member_of($post, 2, 5, 6, 7 )">
2,5,6,7 is the usergroups registered users, mods, admins, and super mods.
I suggest making a new usergroup just for hidden sigs, for me my line is:
<if condition="is_member_of($post, 23 )">
It is very unlikely your "Hide Sigs" usergroup number will be 23.

If you want to hide sigs for all users by default then change the line to:
<if condition="1">

And that's it. If you use more then 1 style then be sure to make the change to postbit or postbit_legacy in each. Another option is to make a copy of your default style and use the code above to hide all sigs by default and let your users know the hidden sigs style is available for those who may prefer it.

This has been tested on the latest versions of IE, Firefox, Chrome, and Safari.
On Chrome and Safari the box "Show Signature" does not change to "Hide Signature" when pressed, but it works perfectly fine to show and re-hide the sig.

See screenshots in attachments.

Please click install if you use this.

Download

No files for download.

Screenshots

Click image for larger version
Name:	hidden_sig_before.jpg
Views:	190
Size:	131.2 KB
ID:	117424   Click image for larger version
Name:	hidden_sig_after.jpg
Views:	201
Size:	184.8 KB
ID:	117425  

Similar Mods

Allow usergroups ( Admins ) to use HTML for posts , sigs vBulletin 3.0 Full Releases
Hidden old threads for certain usergroups vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024