vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   postbit_legacy - is_member_of (https://vborg.vbsupport.ru/showthread.php?t=246314)

AfterWorldForum 07-11-2010 06:40 AM

postbit_legacy - is_member_of
 
Hi guys,

On my forum we are running the Conquest system from Jaxel. In the postbit_legacy, I would like to have a little addition showing which faction a user is a member of, if they play the game.

I figured the easiest way to check whether a user is a member of one of the usergroups created for the game would be using the is_member_of:

Code:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)"></if>
However, I do think this will not work for what I'm trying, but only verifies the actual user checking the forum. So not the individual people posting, but the viewer, so to speak. Meaning that if that user is a member of one of these groups, the condition will always be true, and it would end up showing the line with the faction for every user.

Clearly that will not cut it. So I tried rewriting the above slightly to not use $vbulletin-> userinfo, but instead use $post[membergroupids]. This did not yield any results whatsoever.

Would anyone be able to point me in the direction of how to verify (from within the postbit_legacy templae) whether the users who posted in the thread are members of a group? Will the is_member_of still somehow work, or should I write something that checks the comma seperated list of membergroupids?

Thanks in advance :)

--------------- Added [DATE]1278911729[/DATE] at [TIME]1278911729[/TIME] ---------------

In the meantime, I also tried using "in_array", but still no luck.

Anyone, please?


All times are GMT. The time now is 02:31 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.00965 seconds
  • Memory Usage 1,708KB
  • 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
  • (1)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