vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Moderator Icon on postbit (https://vborg.vbsupport.ru/showthread.php?t=38120)

ExcErr 05-02-2002 10:40 AM

it will be better, if admin can set in admin cp icons for each usergroup!

Scott MacVicar 05-02-2002 01:52 PM

the whole point of the hack was to give this feature without adding on all the extra queries, the only solution is to add the extra query for each usergroup, so if you have 9 usergroups thats 9 queries.

ExcErr 05-02-2002 01:55 PM

ok, i know it! it's easy!

Scott MacVicar 05-02-2002 02:04 PM

Add a column called usergroupicon to your usergroup table.

in your showthread.php add

PHP Code:

$icon $DB_site->query("SELECT usergroupid,usergroupicon FROM usergroup ORDER by usergroupid");
while(
$icons $DB_site->fetch_array($icon)) {
   
$icon_cache["$icons[usergroupid]"] = $icons[usergroupicon];
}
unset(
$icons);
$DB_site->free_result($icon); 

You then add global $icon_cache; in the getpostbit function in /admin/functions.php and then just add $icon_cache["$post[usergroupid]"] in the postbit template. I think, not tested this is all off the top of my head.

Chris M 05-02-2002 05:30 PM

I attached an .txt file containing the info...

Thats for those who prefer to do this offline...

Satan

Dark Odin 05-02-2002 07:42 PM

Is there anyway to modify this to make it do something like this:

Username
User Title
Rank (User Group)

But I only want the user title bold and the rank displayed if they are Mod, Super Mod, or Admin. Can this be converted to do this cleanly, and if so how?

Scott MacVicar 05-02-2002 07:45 PM

em yeah just change the postbit_moderator_icon template to

Code:

<b>$rank</b><br>

Neo 05-02-2002 08:14 PM

Wow... Dynamic :p

Dark Odin 05-02-2002 11:29 PM

That's not exactly what I want. I want the user title to be bold, not the rank.

Neo 05-03-2002 05:25 AM

in post bit find

$post[username]

and replace with

<b>$post[username]</b>


All times are GMT. The time now is 06:17 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.00937 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_php_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