vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Show the Usergroup AND Member Groups in postbit (https://vborg.vbsupport.ru/showthread.php?t=61305)

Gary King 02-07-2004 10:00 PM

Show the Usergroup AND Member Groups in postbit
 
This hack will show what usergroups and membergroups a user is a part of, in the postbit.

This is a very simple hack to install, will take only 1 minute or less :)

Screenshot attached below.

NOTE: There are modifications for both postbit and postbit_legacy templates!

Anyways let's get started! :D

Open includes/functions_showthread.php and find
PHP Code:

    $show['messageicon'] = iif($post['iconpath'], truefalse); 

Above, add:
PHP Code:

    $show[usergroup] = 1;
    
$show[member_groups] = 1;
    
$membergroupids explode(',',$post[membergroupids]);
    
$membergroups '';
    
    foreach (
$membergroupids as $group)
    {
        if (
$membergroups == '')
        {
            
$membergroups .= $usergroupcache[$group][title];
        }
        else
        {
            
$membergroups .= ', '.$usergroupcache[$group][title];
        }
    } 

Open postbit template and find:
PHP Code:

                        <if condition="$show['reputation']">$post[reputationdisplay]</if> 

Below, add
PHP Code:

                        <if condition="$show[usergroup]"><br />$vbphrase[usergroup]: $post[displaygrouptitle]</if>
                        <if 
condition="$show[member_groups]"><br />$vbphrase[member_groups]: $membergroups</if> 

And just add one new phrase, member_groups, with the following content:
Code:

Member Groups
NOTE: If you are using postbit_legacy instead of postbit then add the new code for postbit, to wherever you want to show up in postbit_legacy, that's all!

Please click install if you installed this, thanks! :)

AN-net 02-08-2004 04:59 AM

very cool hack ill install later;)

gmarik 02-08-2004 07:07 AM

Not very cool just normal ...

Dean C 02-08-2004 10:33 AM

Nice us of the cache :)

Gary King 02-08-2004 01:04 PM

Quote:

Originally Posted by Mist
Nice us of the cache :)

Thanks I always try to use my resources ;) Saves me one query :D

Gary King 02-08-2004 01:06 PM

Quote:

Originally Posted by gmarik
Not very cool just normal ...

Eh? :p

Hialls 02-08-2004 01:55 PM

Hmm just spent few hours yesterday coding this :D. Nice job all the same

Gary King 02-08-2004 02:06 PM

Quote:

Originally Posted by Hialls
Hmm just spent few hours yesterday coding this :D. Nice job all the same

Thanks :D

seth044_x 02-09-2004 02:09 AM

weee my request!!! thanks man you rock.

Ocean 03-29-2004 12:20 PM

Hi, Gary!

Same question.... <grin>


How's this hack for vB 3.0 Gold?


Also, which part needs to be surrounded by:

Code:

<if condition="is_member_of($bbuserinfo,6)">
 
<!-- code goes here -->
 
</if>


... in order to make this hack viewable by admins only?


Thanks, and again - Great Hack! (Hmm... I seem to keep saying this to you.... :) )


All times are GMT. The time now is 03:14 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.01889 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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