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 03-29-2004 07:11 PM

Quote:

Originally Posted by Ocean
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.... :) )

Hack works perfectly for Gold, and put the conditionals around the code that you are required to add.

Ocean 03-29-2004 07:34 PM

Quote:

Originally Posted by Gary W
Hack works perfectly for Gold, and put the conditionals around the code that you are required to add.

In the postbit template, or the functions_showthread.php file?

Gary King 03-29-2004 07:45 PM

Quote:

Originally Posted by Ocean
In the postbit template, or the functions_showthread.php file?

<if condition=""></if> only goes in templates :)

Ocean 03-29-2004 07:51 PM

Quote:

Originally Posted by Gary W
<if condition=""></if> only goes in templates :)

Well that just shows what I know, doesn't it? But I learned something new, so for that - thank you. :)

Stray 03-31-2004 12:38 AM

Could this be changed to show usergroup ranks or rank images?
I'd like to show multiple rank images in the postbit.

Ocean 04-14-2004 12:05 AM

Gary, I just noticed something odd...

I have a bunch of users whom I Mass Moved into another UserGroup. However, although in the "User" Table, the "usergroupid" field shows the correct New Group - the "displaygroupid" field still has their old UserGroup.

Now, I don't know if this is what is supposed to happen or not - however, this hack seems to pull from the "displaygroupid" field, instead of the "usergroupid" field.

As such, a large number of users now show up with the wrong Group info in the Postbit!


Assuming that this is not a problem with vB (in other words, assuming that the "displaygroupid" field is *supposed* to show the old Group) - than what needs to be changed in this hack to reflect the correct field being used?

Gary King 04-14-2004 12:56 PM

Replace
HTML Code:

$post[displaygrouptitle]
with
HTML Code:

$usergroupcache[$post[usergroupid]][title]

Ocean 04-14-2004 01:18 PM

Gary, I tried the replacement you suggested, and I got a Parse Error.



Parse error: parse error, unexpected '[', expecting ']' in C:\WebSite\forums\includes\adminfunctions_template .php(3037) : eval()'d code on line 74

Gary King 04-14-2004 11:42 PM

In the includes/functions_showthread.php find
PHP Code:

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

Above, add $usergroupname = $usergroupcache[$post[usergroupid]][title];

Then put $usergroupname in the postbit template wherever you want the usergroup to showu p.

Ocean 04-15-2004 12:47 AM

Thanks, Gary! That did the trick perfectly!


All times are GMT. The time now is 08:41 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.01245 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (4)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