Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hidden Signatures - Hide sigs like a spoiler for certain usergroups Details »»
Hidden Signatures - Hide sigs like a spoiler for certain usergroups
Version: 1.00, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 05-21-2010 Last Update: Never Installs: 7
Supported Template Edits
Re-useable 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:
https://vborg.vbsupport.ru/showthread.php?t=184855

Live Demo Here. (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.

Screenshots

File Type: jpg hidden_sig_before.jpg (131.2 KB, 0 views)
File Type: jpg hidden_sig_after.jpg (184.8 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-22-2010, 01:24 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<i>Reserved for future use.</i>
Reply With Quote
  #3  
Old 08-23-2010, 07:25 AM
Zylantex Zylantex is offline
 
Join Date: Sep 2009
Location: France
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could that be modified to hide signatures for posters with less than "x" posts? That would make it very useful for anti-spam.
Reply With Quote
  #4  
Old 08-23-2010, 11:52 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I believe so...

Change the first line "if" statement to:

<if condition="$post[posts] < 5">

Change 5 to however many posts you want before the sig shows...
great idea!
Reply With Quote
  #5  
Old 04-05-2014, 08:42 PM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't work in Firefox, Works fine in IE but not working in Firefox. Any solution please?
Reply With Quote
  #6  
Old 04-06-2014, 10:25 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you sure you have javascript enabled on firefox because it works for me... what version of FF and OS are you using? Link to a thread where it isn't working?
Reply With Quote
  #7  
Old 04-08-2014, 06:51 AM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have to rechecked with my friend as as soon as I put this code in postbit, all usergroup signatures disappears atleast in my computer. I have to check with others and will let you know thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03808 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete