Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Hide Signature and Avatar in specific forum Details »»
Hide Signature and Avatar in specific forum
Version: 2.00, by ArbStar ArbStar is offline
Developer Last Online: Jul 2013 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 02-14-2009 Last Update: Never Installs: 35
Template Edits
Re-useable Code Translations  
No support by the author.

Hello everybody,

This is my first modification I post in vBulletin.org, and I hope it will be a good start for me and I keep posting new modifications for you.

Today's post is about hiding signature or/and avatars in threads in specific forum, its very easy and simple.
  • Hiding signatures
First, open your postbit, or postbit_legacy template.


Find:

Code:
<if condition="$post['signature']">

Replace it with:

Code:
<if condition="$post['signature'] AND !in_array($thread['forumid'],array(2,47))">
IMPORTANT NOTICE: Replace 2 & 47 with the forum id you want to hide signatures from it, if you want to add more forum numbers add comma between them.

You're done !

  • Hiding Avatars
Now we will do the same thing with avatars, its also easy like the signature hiding.
Open your postbit, or postbit_legacy template.


Find:

Code:
<if condition="$show['avatar']">

Replace it with:

Code:
<if condition="$show['avatar'] AND !in_array($thread['forumid'],array(2,47))">

IMPORTANT NOTICE: Replace 2 & 47 with the forum id you want to hide avatars from it, if you want to add more forum numbers add comma between them.



I hope this modification would be useful for everyone.


Regards,
Ibrahim Mohammed

Show Your Support

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

Comments
  #22  
Old 08-03-2009, 02:01 AM
trotskid trotskid is offline
 
Join Date: Feb 2009
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ArbStar
Code:
<if condition="$post['signature'] AND !in_array($thread['forumid'],array(2,47))">
Now works PERFECT on multiple forums! :up:

Many thanks
Reply With Quote
  #23  
Old 08-05-2009, 06:57 AM
Feanor_87's Avatar
Feanor_87 Feanor_87 is offline
 
Join Date: Mar 2009
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very useful, thanks!!
Reply With Quote
  #24  
Old 08-07-2009, 02:29 AM
Bolthaven Bolthaven is offline
 
Join Date: Jun 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would I hide this for unregistered users? What I want to do is hide avatar, signature, and membernames from unregistered users while still letting them view some thread content.

My guess is that I would replace the condition !in_array($thread['forumid'],array(2,47)) with in_array(*whatever variable for group membership*)
Reply With Quote
  #25  
Old 08-08-2009, 02:18 PM
love. love. is offline
 
Join Date: Jan 2009
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank u
Reply With Quote
  #26  
Old 08-09-2009, 09:26 PM
Phaedrus Phaedrus is offline
 
Join Date: Jul 2006
Location: Colorado
Posts: 617
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by alloutvb View Post
is there a way to have this for a user to turn on and off for the hole board like is a user is on a iphone or on 56k so the site loads faster ? please let me know thanks for this mod
User CP, three checkmark boxes in the User Options allow a user to choose to do this for the whole board.
Reply With Quote
  #27  
Old 08-11-2009, 02:36 AM
alloutvb alloutvb is offline
 
Join Date: May 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

k thanks for the help just must have over looked it
Reply With Quote
  #28  
Old 09-03-2009, 10:08 AM
ArbStar's Avatar
ArbStar ArbStar is offline
 
Join Date: Jan 2007
Location: Toronto, ON
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bolthaven View Post
How would I hide this for unregistered users? What I want to do is hide avatar, signature, and membernames from unregistered users while still letting them view some thread content.

My guess is that I would replace the condition !in_array($thread['forumid'],array(2,47)) with in_array(*whatever variable for group membership*)
If you want to show something only to members, use this code:

Code:
<if condition="$show['member']">
Some thing you want to hide from guests
</if>


and if you have many user groups that you want to hide from them, use this one:

Code:
<if condition="!is_member_of($vbulletin->userinfo, array('1','2','3'))">
Some thing you want to hide from some groups
</if>
Note: Replace 1,2,3 with the groups you want to hide a content from them
Reply With Quote
  #29  
Old 09-03-2009, 10:12 AM
ArbStar's Avatar
ArbStar ArbStar is offline
 
Join Date: Jan 2007
Location: Toronto, ON
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by creative-friend View Post
how can i hide signature in more than 1 forum....i have tried but giving me error..
Please use the new code in the thread, I've updated it

Quote:
Originally Posted by alloutvb View Post
is there a way to have this for a user to turn on and off for the hole board like is a user is on a iphone or on 56k so the site loads faster ? please let me know thanks for this mod
You can make additional user profile fields from the ACP,
and then use this code:

Code:
<if condition="$member['field6']=='show'">
$post['signature'];
</if>
Note: Replace field6 with the field name/number that will appear in the ACP after adding it.
Reply With Quote
  #30  
Old 10-25-2009, 02:26 AM
Alucard^'s Avatar
Alucard^ Alucard^ is offline
 
Join Date: Feb 2008
Location: Argentina
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good, i like this... installed.

Also, I added an "else":

PHP Code:
<if condition="$post['signature'] AND !in_array($thread['forumid'],array(97))">
        <!-- 
sig -->
            <
div>
                
__________________<br />
                
$post[signature]
            </
div>
        <!-- / 
sig -->

<else />

        <!-- 
sig -->
            <
div>
                
__________________<br />
                
In this subforum the signatures are disabled.
            </
div>
        <!-- / 
sig -->

        </if> 
Work perfect but I am noob in PHP, so I don't know... maybe the code can be more optimized?
Reply With Quote
  #31  
Old 11-19-2009, 03:24 PM
gbechtel gbechtel is offline
 
Join Date: Aug 2005
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just an FYI

I did not want to display signatures or avatars to unregistered users, but there are also three forums that I did not want them to display to members. so I used the following...

In case anyone was looking to do the same...

PHP Code:
<if condition="$post['signature'] AND $show['member'] AND !in_array($thread['forumid'],array(36,107,108))">
 
HIDE THIS
 
</if> 
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 06:42 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.07686 seconds
  • Memory Usage 2,336KB
  • Queries Executed 26 (?)
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
  • (8)bbcode_code
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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