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

Reply
 
Thread Tools
Hide Avatars & Signatures from Guests Details »»
Hide Avatars & Signatures from Guests
Version: 1.00, by Zieen Zieen is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 3.6.5 Rating:
Released: 04-11-2007 Last Update: Never Installs: 38
 
No support by the author.

I searched the forum for this template modification and failed to find a satisfactory result. The following template modifications will prevent guests (unregistered / not logged in) from seeing avatars and signatures.

Why? Some communities have avatars with NSFW (not safe for work) avatars and signatures. This adult content should not be viewed in most workplaces or by new guests not wanting such exposure. This insures that they won't run into problems until they register -- after which they were hopefully instructed to disable them in their User CP if desired.


Before starting you'll want to verify the usergroup id of Unregistered / Not Logged In. It should be one, but check in your Usergroup Manager to make sure.
Anyways...

Go to your Admin CP and open your Style Manager. Find your default style and select edit templates from the drop down menu. Expand Postbit Templates and select postbit.

Find...
PHP Code:
<if condition="$show['avatar']" 
Add before...
PHP Code:
<if condition="$bbuserinfo['usergroupid'] != 1"
Find...
PHP Code:
$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> 
Add after...
PHP Code:
</if> 
Find...
PHP Code:
<if condition="$post['signature']"
Add before...
PHP Code:
<if condition="$bbuserinfo['usergroupid'] != 1"
Find...
PHP Code:
        <!-- / sig -->
        </if> 
Add after...
PHP Code:
</if> 
The same edits must be made in postbit_legacy.

Avatars and signatures should no longer be visible to guests. Be sure to verify that registered users can still view avatars and signatures.

I'm no expert coder and I'm a relative newbie to vBulletin, but I hope this helps someone. It helped me.

Show Your Support

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

Comments
  #22  
Old 06-07-2008, 04:19 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since the template has got hooks for the signature, it seems better to use a separate plugin if you only want to hide signature from guests. Hiding signatures from guests can do a lot of good for your SEO.

Why not use the hooks: postbit_signature_start and postbit_signature_end to add the code that Zieen describes above?

Quote:
Originally Posted by Fungsten View Post
I'm not sure but I think if you go to where the group IDs are you can add them separated by commas.
<if condition="!in_array($bbuserinfo['usergroupid'], array(1, 2, 3))">
Reply With Quote
  #23  
Old 06-18-2008, 04:26 PM
saviola8x's Avatar
saviola8x saviola8x is offline
 
Join Date: May 2006
Location: Paris
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i like it.
Reply With Quote
  #24  
Old 06-18-2008, 06:34 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
Since the template has got hooks for the signature, it seems better to use a separate plugin if you only want to hide signature from guests. Hiding signatures from guests can do a lot of good for your SEO.

Why not use the hooks: postbit_signature_start and postbit_signature_end to add the code that Zieen describes above?


<if condition="!in_array($bbuserinfo['usergroupid'], array(1, 2, 3))">
How did that work. If it didn't try "|" without the ".
Reply With Quote
  #25  
Old 09-12-2008, 09:29 AM
baktabul baktabul is offline
 
Join Date: Oct 2006
Location: Misafir
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want to hide ads from all members, is there any basic way ?
Reply With Quote
  #26  
Old 10-25-2008, 08:34 AM
siliconfinance siliconfinance is offline
 
Join Date: Mar 2007
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

search template conditionals and locate the if statement that looks like this:

<If guest>
Ad
</if>
Reply With Quote
  #27  
Old 03-04-2009, 04:59 AM
Spada_FMC Spada_FMC is offline
 
Join Date: Nov 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really love this easy looking mod! However, I was hoping I could just have the ability to hide images in the signature for multiple groups.

What's the best way to accomplish that?
Reply With Quote
  #28  
Old 03-04-2009, 11:33 AM
thompson thompson is offline
 
Join Date: Jul 2007
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for that
Reply With Quote
  #29  
Old 05-27-2010, 06:45 AM
busybeeburns busybeeburns is offline
 
Join Date: Feb 2006
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MoB Dudditz MD View Post
Very nice - something so simple that I have overlooked but needed.
Cuts loading time and saves bandwidth of visitors.TY

I believe you can go one step further by combining both conditionals.

<if condition="$show['avatar'] AND $show['member']">

<if condition="$post['signature'] AND $show['member']">

SEE BELOW
This way, you avoid the extra </if> since its not needed
and saves a few characters of code in the process.

In your postbit and postbit_legacy
FIND:
PHP Code:
<if condition="$show['avatar']"
REPLACE WITH:
PHP Code:
<if condition="$show['avatar'] AND $show['member']"
FIND:
PHP Code:
<if condition="$post['signature']"
REPLACE WITH:
PHP Code:
<if condition="$post['signature'] AND $show['member']"
this worked 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:07 PM.


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.14039 seconds
  • Memory Usage 2,318KB
  • Queries Executed 25 (?)
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
  • (12)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete