Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-20-2001 Last Update: Never Installs: 63
 
No support by the author.

This is what we use on the main page of this forum.
So many people liked it and asked for it, I posted it on at least 5 threads already, but someone wanted a proper release so here it is.

Anyway, in index.php add this:
Code:
if ($bbuserinfo[userid]!=0) {
  $avatarurl=getavatarurl($bbuserinfo[userid]);
  if ($avatarurl=='') {
    $avatarurl='{imagesfolder}/noavatar.gif';
  }
  $avatarimage='<img src="'.$avatarurl.'">';
} else {
  $avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="{imagesfolder}/guestavatar.gif"></a>';
}
right after this:
Code:
$permissions=getpermissions();
if (!$permissions['canview']) {
	show_nopermission();
}
Now in any of your forumhome_xxx templates, you can use this:
Code:
$avatarimage
to display the user's avatar.

It will display the user's avatar if he has selected one, if he hasn't selected one it will show noavatar.gif (you'll need to upload that to your images folder), and if it's a guest, it will show guestavatar.gif, and link the image to register.php.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 12-02-2001, 08:24 PM
Airwaves's Avatar
Airwaves Airwaves is offline
 
Join Date: Nov 2001
Location: Chesterfield, Derbyshire, UK
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where do I put

PHP Code:
$avatarimage 
to place it in the same place as on vb.org main forum page?
Reply With Quote
  #33  
Old 12-03-2001, 07:27 PM
Airwaves's Avatar
Airwaves Airwaves is offline
 
Join Date: Nov 2001
Location: Chesterfield, Derbyshire, UK
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump

cant anyone help a n00b ?
Reply With Quote
  #34  
Old 12-03-2001, 09:10 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in the forumhome template, right above $postbits
Reply With Quote
  #35  
Old 12-04-2001, 06:48 AM
Airwaves's Avatar
Airwaves Airwaves is offline
 
Join Date: Nov 2001
Location: Chesterfield, Derbyshire, UK
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cannot find $postbits in the forumdisplay template ??
Reply With Quote
  #36  
Old 12-04-2001, 07:16 AM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Put it in the forumhome template like Firefly said in his first post!
Reply With Quote
  #37  
Old 12-04-2001, 10:04 AM
Bedhead Bedhead is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have done everything step by step, but where exactly does $avatarimage go in the forumhome template.
Reply With Quote
  #38  
Old 12-04-2001, 10:05 AM
Bedhead Bedhead is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If it is installed here, how come i don't have it as noavater here as i have not selected one here?
Confused.
Reply With Quote
  #39  
Old 12-04-2001, 10:31 AM
Bedhead Bedhead is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it.
I thought this hack would add it to each member in the posts.
It is only on the main page.
Okay.
Reply With Quote
  #40  
Old 12-04-2001, 10:55 AM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Bedhead
I got it.
I thought this hack would add it to each member in the posts.
It is only on the main page.
Okay.

Each member already has his avatar in his post...?
Reply With Quote
  #41  
Old 12-04-2001, 08:00 PM
Airwaves's Avatar
Airwaves Airwaves is offline
 
Join Date: Nov 2001
Location: Chesterfield, Derbyshire, UK
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Having a bit of trouble with this...

I have the two image required in the /forums/images/avatars folder on my server, BUT, i still get a little red X in a box for someone who doesnt have an avatar set

here is the code in my index.php

PHP Code:
//avatar images
if ($bbuserinfo[userid]!=0) {
  
$avatarurl=getavatarurl($bbuserinfo[userid]);
  if (
$avatarurl=='') {
    
$avatarimage='<a href="usercp.php?s='.$session[sessionhash].'"><img border="0" src="images/avatars/noavatar.gif"></a>';
  }
  
$avatarimage='<img border="0" src="'.$avatarurl.'">';
} else {
  
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img border="0" src="images/avatars/guestavatar.gif"></a>';
}
//end avatar images 
I used a few fixes from the rest of this thread like removing the borders and making it linkk to the usercp to set an avatar.

please help?
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 03:03 PM.


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.05033 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete