vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Show Only To Specified Group (https://vborg.vbsupport.ru/showthread.php?t=99868)

MajorFm.com 11-01-2005 09:25 PM

Show Only To Specified Group
 
What is the <if> statments if i want to edit content in a template that shows conent 1 to group 1 and content 2 to group 2...

So basically depending on their usergroup, they see diffrent content...

Please advise...

peterska2 11-01-2005 09:37 PM

Code:

<if condition="$bbuserinfo[usergroupid]==x">Stuff to show to this group</if>
Replace x with the usergroup id number of the usergroup that you want to show the content to.

Repeat as many times as desired using different group numbers.

MajorFm.com 11-01-2005 09:47 PM

Your a diamond, thank you.

peterska2 11-01-2005 09:49 PM

You're welcome :)

Always happy to help.

MajorFm.com 08-15-2006 02:41 PM

How do i use more then one usergroup? ...as in:

Code:

<if condition="$bbuserinfo[usergroupid]==1,2,3,4">Stuff to show to this group</if>
...or even the opposite will be nice, if your usergroup x, you wont see the item, as appose to show item to usergroup x, i wanted do not show item to usergroup x, how do i do that?

peterska2 08-15-2006 04:37 PM

ok,

show to multiple groups - X,Y,Z are the groups it is being shown to.

Code:

<if condition="in_array($bbuserinfo[usergroupid], array(X,Y,Z))">Stuff</if>
Do not show to single group - A is the group it is hidden from.

Code:

<if condition="$bbuserinfo[usergroupid]!=A">Stuff</if>
Do not show to multiple groups - J,K,L are the groups it is hidden from.

Code:

<if condition="!in_array($bbuserinfo[usergroupid], array(J,K,L))">Stuff</if>

MajorFm.com 08-15-2006 06:30 PM

Thank you so much... i have now been able to take off all adverts for vip members :)


All times are GMT. The time now is 03:32 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
  • Page Generation 0.01035 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
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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