vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   hiding post counts (https://vborg.vbsupport.ru/showthread.php?t=154013)

slosupra 08-01-2007 03:31 PM

hiding post counts
 
i was wondering if there was anything that i could hide post counts from certain user groups

King Kovifor 08-01-2007 05:04 PM

Use template conditionals:

<if condition="!in_array($post['usergroup'], array(5,6,7,8,9))"> $post[posts] </if>

I'm not sure the $post['usergroup'] is correct, but it is the basic structure that you would need to handle the check.

Opserty 08-01-2007 05:41 PM

If you want to hide it from certain user groups I think you need to use $vbulletin->userinfo[usergroupid] as opposed to the checking the usergroup of whoever wrote the post.

Kirk Y 08-01-2007 06:06 PM

You should use the following:
Code:

<if condition="!is_member_of($bbuserinfo, 1,2,3,4)">$post[posts]</if>

Opserty 08-01-2007 06:09 PM

If he is using it in a template are they allowed? (the apostrophes) or doesn't make much difference, I remember reading somewhere that it should be avoided in templates.

Kirk Y 08-01-2007 06:27 PM

I think in templates it's better to not quote the array key, because they're stripped out when the template is stored, but don't quote me on that.

slosupra 08-01-2007 06:33 PM

which template should i add this too and where abouts

Kirk Y 08-01-2007 06:38 PM

It depends; if you'd like the Post count hidden only from the Postbit, then you'd edit the postbit or postbit_legacy template (depending on which your forum uses). Post counts are also displayed on User Profiles (MEMBERINFO template) and the Member List (memberlist_resultsbit template).

In the postbit templates you're looking for $post[posts] and in the MEMBERINFO and memberlist_resultsbit templates, you're looking for $userinfo[posts].

slosupra 08-01-2007 07:21 PM

thanks


All times are GMT. The time now is 03:06 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01353 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete