vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   without editing or use plugin can phrase or html show usergroup name ? (https://vborg.vbsupport.ru/showthread.php?t=114403)

Connector 04-30-2006 12:41 AM

without editing or use plugin can phrase or html show usergroup name ?
 
Hello

i was wondring we have a few html code where we can display the user info example

$bbuserinfo[username]
$bbuserinfo[rank]
$bbuserinfo[post]
$bbuserinfo[pmunread]
$bbuserinfo[avatar]

is there anything we can show the usergroup .. example i'm admin i need to use something like the above code to show me that i'm in this group .. is there any code to do this that already done with vB without modify or doing any edit ?

example i try to use this $bbuserinfo[usergroup] but it dont work.. i hope someone can help me on this

thankyou

Connector 05-01-2006 01:31 AM

bump.!

Xenium 05-01-2006 02:55 AM

Try $bbuserinfo[usergroupid] :)

Connector 05-01-2006 06:14 AM

Thanks alot.. this show me the UserGroup ID i also was looking for this .. so how can i show the Groupname ?

kall 05-01-2006 06:21 AM

Doubtful..

Where do you want to show it?

Connector 05-01-2006 06:27 AM

i'm think know to Display it in the forum home page the welcome msg

"Welcome Username you are in the usergroup etc".. but i also think to show it in anther custom page i have created with vB maybe with vBa.. :)

Xenium 05-01-2006 08:13 AM

Best way to do this, though it would be specific for your forums, would be to create an array with all your usergroupids and their corresponding user titles, and output the correct string based on their usergroupid.

A generic one would add one extra query on forumhome page.

Connector 05-01-2006 08:21 AM

i was think to do this already but i was think maybe there is such code like usergroupid that going to display the name of the group ..?

Thanks alot for the info :)

Xenium 05-01-2006 02:04 PM

Quote:

Originally Posted by Connector
i was think to do this already but i was think maybe there is such code like usergroupid that going to display the name of the group ..?


Nope, you would need to query title from the usergroup table.

amykhar 05-01-2006 02:09 PM

Not true anymore. It's stored in the cache. Go look at my who's online legend plugin for examples on how to do it.

Xenium 05-01-2006 02:53 PM

Quote:

Originally Posted by amykhar
Not true anymore. It's stored in the cache. Go look at my who's online legend plugin for examples on how to do it.

Took a look at your code.. Nice idea :) Saves a query

Connector 05-02-2006 03:11 AM

Hello Amy thanks for the Tips i try to look in the who online Legend but i still dont understand how can i get the usergroupname showing for each user .. example admin will see his own group name etc.. ?

could you please post some example code here .. it may help me alot

Thanks :)

Adrian Schneider 05-02-2006 03:25 AM

{$vbulletin->usergroupcache[$vbulletin->userinfo['usergroupid']]['title']} will work (note the braces!)

Connector 05-02-2006 07:14 AM

Thanks alot . and what is the html code when i add in the template ?

it should look like this ?

Quote:

$userinfo['usergroupid']]['title']}

Adrian Schneider 05-02-2006 01:40 PM

Quote:

Originally Posted by Connector
Thanks alot . and what is the html code when i add in the template ?

it should look like this ?

Use my above example. $userinfo['usergroupid'] is just an integer - not an array.

Connector 05-03-2006 01:12 AM

Hello

Thanks SirAdrian i try this one before and it only showing the usergroup ID example i'm admin it will show 6 ..

Greatz :)


All times are GMT. The time now is 06:32 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.01360 seconds
  • Memory Usage 1,742KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)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