vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   What is the variable for secondary usergroups? (https://vborg.vbsupport.ru/showthread.php?t=58378)

djnoz 11-04-2003 02:26 PM

What is the variable for secondary usergroups?
 
I'm trying to write a template hack that shows icons in the postbit depending on a user's additional usergroups.
Using echo $bbuserinfo[usergroupid]; it's obvious that this only refers to primary usergroups.

Does anyone know how to refer to secondary usergroups?

I'm using vb3

Zachery 11-04-2003 04:52 PM

i think it counts the extra user groups so if you were to put if condition="$bbuserinfo[usergroupid] = X" if there in it they should still be in that usergroup so it should still work

djnoz 11-05-2003 02:23 PM

I'm afraid it still doesn't work. I'm testing it by placing echo text at the end of global.php, as part of the hack involves modifications to the php code.

PHP Code:

echo $bbuserinfo[usergroupid];

if(
$bbuserinfo[usergroupid] == 15)
{
    echo 
"This user also belongs to usergroup 15";


For a standard user who's been added to additional usergroup 15, this code just returns "2" at the top of each page (the id for registered members)

Please help! Thanks :)

assassingod 11-05-2003 02:27 PM

Quote:

Originally Posted by djnoz
I'm afraid it still doesn't work. I'm testing it by placing echo text at the end of global.php, as part of the hack involves modifications to the php code.

PHP Code:

echo $bbuserinfo[usergroupid];
 
if(
$bbuserinfo[usergroupid] == 15)
{
    echo 
"This user also belongs to usergroup 15";


For a standard user who's been added to additional usergroup 15, this code just returns "2" at the top of each page (the id for registered members)

Please help! Thanks :)

First, vB3 hacking isn't allowed. Second, you should place it in the phpinclude_start template if you want to globalized.

Now, use:
PHP Code:

if($bbuserinfo[usergroupid] == 15)
{
      echo(
"You are part of this usergroup, 15");




All times are GMT. The time now is 07:26 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.01761 seconds
  • Memory Usage 1,721KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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