Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

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
  #12  
Old 11-20-2007, 04:28 PM
Mum Mum is offline
 
Join Date: Jun 2006
Location: New Zealand
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MoB Dudditz MD View Post
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']"
I tried this but doesn't work for 3.6.8 are you able to help me? All i want to do is hide the signatures unless you are logged in.
Reply With Quote
  #13  
Old 11-20-2007, 05:40 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't see it using an admin account. Uninstalled the mods.
Reply With Quote
  #14  
Old 11-24-2007, 04:38 PM
Mum Mum is offline
 
Join Date: Jun 2006
Location: New Zealand
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you mean you can't see it? Once you've made the changes, only members will see it. So you need to log out, having an admin account won't help.
Reply With Quote
  #15  
Old 03-10-2008, 02:14 AM
Kimmi Kimmi is offline
 
Join Date: Jan 2006
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this also stop certain usergroups from seeing the sigs.. or does some k now what code i could change to do so.?

thanks
Reply With Quote
  #16  
Old 03-13-2008, 01:54 PM
deezelpope deezelpope is offline
 
Join Date: Feb 2007
Posts: 1,272
Благодарил(а): 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']"
Beautiful! Thank you, this is exactly what I've been looking for!:up:
Reply With Quote
  #17  
Old 05-26-2008, 09:23 AM
urdu urdu is offline
 
Join Date: Apr 2007
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

if i want add more then 1 group

like Users Awaiting Email Confirmation and (COPPA) Users Awaiting Moderation

so what i do ?
Reply With Quote
  #18  
Old 05-27-2008, 08:41 AM
urdu urdu is offline
 
Join Date: Apr 2007
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by urdu View Post
Hello,

if i want add more then 1 group

like Users Awaiting Email Confirmation and (COPPA) Users Awaiting Moderation

so what i do ?
no body here in vb.org can help me ???
Reply With Quote
  #19  
Old 06-03-2008, 04:51 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by urdu View Post
no body here in vb.org can help me ???
I'm not sure but I think if you go to where the group IDs are you can add them separated by commas.
Reply With Quote
  #20  
Old 06-03-2008, 09:29 PM
urdu urdu is offline
 
Join Date: Apr 2007
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
you mean like this ?

Code:
<if condition="$bbuserinfo['usergroupid'] != 1,2">
or
Code:
<if condition="$bbuserinfo['usergroupid'] != 1, 2">
or
Code:
<if condition="$bbuserinfo['usergroupid'] != 1 , 2">
========
i tryed all these one by one but not working even i got error
Reply With Quote
  #21  
Old 06-03-2008, 09:38 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by urdu View Post
you mean like this ?

Code:
<if condition="$bbuserinfo['usergroupid'] != 1,2">
or
Code:
<if condition="$bbuserinfo['usergroupid'] != 1, 2">
or
Code:
<if condition="$bbuserinfo['usergroupid'] != 1 , 2">
========
i tryed all these one by one but not working even i got error
Don't know. Sorry.
Reply With Quote
Reply

Thread Tools

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 01:50 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.04626 seconds
  • Memory Usage 2,337KB
  • 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
  • (6)bbcode_code
  • (16)bbcode_php
  • (6)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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