vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Show the Posters Primary and Secondary usergroups in Post Bit Legacy (https://vborg.vbsupport.ru/showthread.php?t=295021)

cardealercheck 02-12-2013 12:26 AM

Show the Posters Primary and Secondary usergroups in Post Bit Legacy
 
I'm looking for how you can show the posters (NOT post reader's) primary and secondary usergroups in Post Bit Legacy

I see that I can show the primary usergroup like
Code:

<vb:if condition="$post['usergroupid'] == 7">Show something based on posters primary user group</vb:if>

What would I use in place of usergroupid if I wanted the condition to be based on checking both the primary and secondary user groups of the poster

LifesGreatestGift 02-12-2013 12:46 AM

does that conditional not work?

cardealercheck 02-12-2013 12:49 AM

In my testing it seems to only work for the posters Primary only.

I'm trying to get a display based off of the posters Primary and Secondary usergroups.

LifesGreatestGift 02-12-2013 12:53 AM

Code:

<vb:if condition="is_member_of($post, 2, 5, 7 )">Do this if in group 2, 5 or 7</vb:if>

cardealercheck 02-12-2013 05:16 AM

Works perfectly, thank you so much!

Since I wanted to show something different on each line by usergroup I set mine up like this using your code where 7 was the primary user group and 26 was the secondary.

Code:

<vb:if condition="is_member_of($post, 7 )">
                                Special text for usergroup7
                        </vb:if>
                <vb:if condition="is_member_of($post, 26 )">
                                Special text for usergroup26
                        </vb:if>

The if's go on through about 15 different usergroups but it does the job perfectly.


All times are GMT. The time now is 11:19 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.01628 seconds
  • Memory Usage 1,715KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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