Back to vBulletin 4.x Template Modifications

Hidden Signatures - Hide Sigs (spoiler) based on Post Count (anti-spam) or Usergroup
Mod Version: 1.00, by BirdOPrey5

vB Version: 4.0.x Rating: (2 votes - 5.00 average) Installs: 15
Released: 23 Aug 2010 Last Update: 23 Aug 2010 Downloads: 54
Not Supported Template Edits Re-usable Code Translations  

This mod allows you to hide a user's signature by default. There will be a "Show Signature" button displayed instead of a sig... if you click on the button the real signature will show- you can then click the button again if you want to re-hide the signature.

This has been tested on VB 4.0.6 in IE / Firefox / Chrome / Safari and Opera.

You can hide everyone's signature if you want but more then likely you'd want to hide signatures based on a user's post count- this could help foil would be signature-spammers by not showing their content or hiding sigs of new users you just don't trust yet. Alternatively you can hide signatures by usergroup, such as for registered users but allow sigs to show for VIP members only. Of course you can also use a combination of the above to- hide sigs for all users with less than 30 posts unless they are VIP members...

This is a Template Edit.

Edit your postbit or postbit_legacy template, whichever you use.

Find the following code:
Code:
{vb:raw post.signature}
Note this is in the middle of a line, you may want to edit the line so that it's on its own line- extra lines don't matter in templates.

Replace the code with:
Code:
<!-- Begin Hidden sig -->
<vb:if condition="$post[posts] < 10">
                           <div style="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;">
                           <div style="display: none;">
                            {vb:raw post.signature}
                            </div></div></div>
<vb:else />
  {vb:raw post.signature}
</vb:if>
<!-- End Hidden sig -->
That exact code will auto hide signatures of anyone with less then 10 posts.

To change this behavior edit the "if" statement at the top of the code:
<vb:if condition="$post[posts] < 10">

Change the number 10 to whatever minimum post count you want.

If you want to hide sigs per usergroup change the line to:
<vb:if condition="is_member_of($post, 2, 5, 7 )">

That code will hide sigs of registered users, mods, and super-mods... maybe not what you want to do but a good way to show you how to use it. If you only want one usergroup removes the commas, such as:
<vb:if condition="is_member_of($post, 2)">

This will block it for only registered users.

You can combine both with an "AND" or "OR" statement:
<vb:if condition="is_member_of($post, 2) OR $post[posts] < 10">

This will hide sigs for all registered users or anyone with a post count less than 10 no matter what usergroup they are in.

Please click Mark As Installed if you use this.

Some code for this is based on this "spoiler" tag:
Spoiler BB Code with Show/Hide Button

Download the .txt file for a copy of the Install Instructions...

Download

File Type: %1$s Hidden_sigs_VB4.txt (3.7 KB, 58 downloads)

Screenshots

Click image for larger version
Name:	ss_hiddensigvb4.jpg
Views:	548
Size:	102.3 KB
ID:	121211   Click image for larger version
Name:	ss_hiddensigvb4_2.jpg
Views:	549
Size:	104.2 KB
ID:	121212  

Similar Mods

Show Thread Enhancements Hidden Signatures - Hide sigs like a spoiler for certain usergroups vBulletin 3.8 Template Modifications
Anti-spam post decrementer vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024