vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Extra Team Avatar (https://vborg.vbsupport.ru/showthread.php?t=43337)

waddy 09-08-2002 10:48 PM

Extra Team Avatar
 
I am after a special extra team avatar for moderators, supermoderators and administrators, I think I have some rightish looking code but I am not sure where to put it:

Code:

unset($teamlogo);
      if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
              $teamlogo = "<img src=\"team.gif\">";
      } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
              $teamlogo = "<img src=\"team.gif\">";

I am hoping someone can help as I have tried to find a similar hack and think it would be agreat addition to my forum.

g-force2k2 09-08-2002 11:28 PM

waddy are you looking for it on the postbit or where exactly do you want it to appear? regards...

g-force2k2

waddy 09-08-2002 11:42 PM

Sorry, I want an extra avatar to appear under the current avatar, but only for moderators, supermoderators and administrators.

I had a look thru postbits, but was unsure as to whether I could put php in there, pretty sure I can't so have come to the un-experienced conclusion I need to write a function.

waddy 09-08-2002 11:44 PM

Might add this avatar won't be customizable, but a single image for all or even a sperate one for mods, supermods and admins etc.

Thanks!

g-force2k2 09-09-2002 01:43 AM

just add this coding to the admin/functions.php

find:

PHP Code:

// do ip addresses 

under it add:

PHP Code:

if($bbuserinfo[usergroupid] == XX) { // admin usergroupid
  
$extraimg "<img src='{img src here}' border=0>"// img for administrators
} elseif($bbuserinfo[usergroupid] == XX) { // supermod usergroupid
  
$extraimg "<img src='{img src here}' border=0>"// img for smods
} elseif($bbuserinfo[usergroupid] == XX) { // moderator usergroupid
  
$extraimg "<img src='{img src here}' border=0>"// img for moderators
} else {
  
$extraimg "";


then open the postbit template find:

PHP Code:

$post[avatar

under it add:

PHP Code:

$extraimg 

regards... hope that helps...

g-force2k2

waddy 09-09-2002 10:55 AM

I think that might be it, will check it out shortly!

waddy 09-09-2002 03:09 PM

ok I added that code and it works, but it shows for all users irrespective of whether they are in those particular groups!

g-force2k2 09-09-2002 03:16 PM

oh waddy my bad ;) just change all of the instances of $bbuserinfo to $post... that should solve the problem ;) regards...

g-force2k2

waddy 09-09-2002 03:31 PM

Thanks...
*rushes off to try it*

waddy 09-09-2002 03:36 PM

Awesome, thanks alot :)
Once the server is working again you can see it in action, having some teething problems with our new server atm :)


All times are GMT. The time now is 03:46 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.01001 seconds
  • Memory Usage 1,733KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete