vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hide for usergroup, not userid? (https://vborg.vbsupport.ru/showthread.php?t=128922)

Luggruff 10-12-2006 03:15 PM

Hide for usergroup, not userid?
 
See, I totally forgot what the usergroup bit for the same purpose as this code is:

Code:

<if condition="in_array($bbuserinfo['userid'], array(5,6,7,50))">
</if>


anyone that could remind me?

Zachery 10-12-2006 03:27 PM

is_member_of($moo, foo)

ericgtr 10-12-2006 03:31 PM

Try this

Code:

<if condition="in_array($bbuserinfo['usergroupid'], array(5,6,7,50))">
</if>


Luggruff 10-12-2006 03:34 PM

Quote:

Originally Posted by Zachery
is_member_of($moo, foo)

would help alot if you wrote it all out. =\

Zachery 10-12-2006 03:44 PM

Well I gave you what you asked for.

<if condition="is_member_of($post/$bbuserinfo/$userinfo, X,Y,Z,A,B,C,D,E)"></if>

Luggruff 10-12-2006 04:00 PM

Quote:

Originally Posted by Zachery
Well I gave you what you asked for.

<if condition="is_member_of($post/$bbuserinfo/$userinfo, X,Y,Z,A,B,C,D,E)"></if>

So you did, only I had no clue when you wrote "is_member_of" as the code i used to use.. said "in array".

Anyways, ericgtr was just confirming what I suspected.. and it worked.
Thanks!

Zachery 10-12-2006 07:47 PM

His method will only check users in a pimary usergroup, mine works for primary and secondary and doesnt require additional array/inarray to work.

Luggruff 10-13-2006 02:54 AM

Quote:

Originally Posted by Zachery
His method will only check users in a pimary usergroup, mine works for primary and secondary and doesnt require additional array/inarray to work.

Hmm ok. It's pretty much what I'm going for anyways though.

But I guess I could just learn to understand your method too.

So I am supposed to choose from $post, $bbuserinfo and $userinfo or should they all be listed like that?

<if condition="is_member_of($post/$bbuserinfo/$userinfo, X,Y,Z,A,B,C,D,E)"></if>

Zachery 10-13-2006 04:20 AM

depends

$bbuserinfo to check the user viewing that page

$post for the postbit template for that user that posted
$useirnfo for the profile of that person.


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.00978 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_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