vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Don't know if.... (https://vborg.vbsupport.ru/showthread.php?t=48183)

Chris Gwynne 01-27-2003 03:13 AM

Don't know if....
 
... this has been done already or if there is a default variable for it.

But, how would I be able to show what usergroup a member is in, in the postbit.

As I said, I'm not sure whether this would be a hack.. or if this is a default variable.

Thanks. :)

Logician 01-27-2003 09:14 AM

2 ways:
1- Enter a userstatus for that usergroup in Admin CP

2- Requires a hack:

edit function.php find:
PHP Code:

    $post[posttime]=vbdate($timeformat,$post[dateline]); 

after that add:
PHP Code:

if ($post[usergroupid]==6) {$post[usergroupname]='<img src=images/adminav.gif>';}
elseif (
$post[usergroupid]==5) {$post[usergroupname]='<img src=images/modav.gif>';} 

(You have to add all usergroups in this format)

Then add $post[usergroupname] into postbit template

Chris Gwynne 01-27-2003 05:14 PM

Quote:

Originally posted by Logician
edit global.php at the end of file before ?> add:

PHP Code:

if ($bbuserinfo[usergroupid]==6) {$bbuserinfo[usergroupname]='Administrator';}
elseif (
$bbuserinfo[usergroupid]==5) {$bbuserinfo[usergroupname]='Moderator';}
elseif (
$bbuserinfo[usergroupid]==2) {$bbuserinfo[usergroupname]='Registered Member';} 

(You have to add all usergroups in this format)

Then add $bbuserinfo[usergroupname] into postbit template

I'll do the hack, it seems best.

So I just add each usergroup status to the bottom of the global file?

Say if I made up a new usergroup bean man :p, for example.. I'd add

elseif ($bbuserinfo[usergroupid]==10) {$bbuserinfo[usergroupname]='Bean Man';}

then place $bbuserinfo[usergroupname]... in the postbit and it'll show? :) Just to make sure....

Logician 01-27-2003 06:24 PM

yep

Chris Gwynne 01-27-2003 09:50 PM

Thanks a lot :D.

Logik 01-27-2003 09:51 PM

Nice Logician.. ;)

Logician 01-28-2003 10:17 AM

ty ;)

Chris Gwynne 02-01-2003 09:46 PM

if ($bbuserinfo[usergroupid]==6) {$bbuserinfo[usergroupname]='<img src=images/adminav.gif>';}
elseif ($bbuserinfo[usergroupid]==5) {$bbuserinfo[usergroupname]='<img src=images/modav.gif>';}


This is the code I have, and I've inserted the variable into the postbit. But It's showing the admin image for every user... Any help?

Logician 02-01-2003 10:01 PM

my bad.. postbit needs a different approach.. my post updated, try again..

Chris Gwynne 02-01-2003 10:10 PM

edit function.php find:

"function.php" being admin/functions.php ? because I've just tried this and it isn't working.


All times are GMT. The time now is 08:19 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.01595 seconds
  • Memory Usage 1,735KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete