![]() |
Hide Avatars & Signatures from Guests
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:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
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. |
Can you do this with adult smilies?
|
nice thank you love template edits much better than plug ins
|
Just another addition, another way you could do this is by using
HTML Code:
<if condition="$show['member']"> HTML Code:
<if condition="$bbuserinfo['usergroupid'] != 1"> |
And that checks to see if they are a registered member? Good to know. I was having issues with a lot of misleading / outdated information elsewhere. I'll test that on my site and update the edits. Thanks.
|
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:
PHP Code:
PHP Code:
PHP Code:
|
Quote:
|
Is there a way to show a phrase that says "to see signatures and avatars you must register" in the sig area?
|
Quote:
|
You could add an <else />
Code:
<if condition="$show['avatar'] AND $show['member']"> |
All times are GMT. The time now is 09:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|