Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-08-2002, 10:48 PM
waddy's Avatar
waddy waddy is offline
 
Join Date: Nov 2001
Location: UK
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 09-08-2002, 11:28 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

g-force2k2
Reply With Quote
  #3  
Old 09-08-2002, 11:42 PM
waddy's Avatar
waddy waddy is offline
 
Join Date: Nov 2001
Location: UK
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-08-2002, 11:44 PM
waddy's Avatar
waddy waddy is offline
 
Join Date: Nov 2001
Location: UK
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #5  
Old 09-09-2002, 01:43 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 09-09-2002, 10:55 AM
waddy's Avatar
waddy waddy is offline
 
Join Date: Nov 2001
Location: UK
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think that might be it, will check it out shortly!
Reply With Quote
  #7  
Old 09-09-2002, 03:09 PM
waddy's Avatar
waddy waddy is offline
 
Join Date: Nov 2001
Location: UK
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok I added that code and it works, but it shows for all users irrespective of whether they are in those particular groups!
Reply With Quote
  #8  
Old 09-09-2002, 03:16 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

g-force2k2
Reply With Quote
  #9  
Old 09-09-2002, 03:31 PM
waddy's Avatar
waddy waddy is offline
 
Join Date: Nov 2001
Location: UK
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks...
*rushes off to try it*
Reply With Quote
  #10  
Old 09-09-2002, 03:36 PM
waddy's Avatar
waddy waddy is offline
 
Join Date: Nov 2001
Location: UK
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:58 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04651 seconds
  • Memory Usage 2,260KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete