Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adding User Avatars On Custom Modifications
Allan's Avatar
Allan
Join Date: Jun 2003
Posts: 1,513

 

France
Show Printable Version Email this Page Subscription
Allan Allan is offline 01-16-2007, 10:00 PM

Compatible with vBulletin 3.6.x
  • Upload the attached image to your misc. folder.
  • Import this product
Code:
 
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="NoAvatar" active="1"> <title>No Avatar</title> <description>Add avatar in your mods</description> <url>http://www.blabla.com</url>
<version>1.0.0</version> <plugins> <plugin active="1"> <title>NoAvatar</title> <hookname>forumhome_start</hookname> <phpcode><![CDATA[if ($vbulletin->userinfo['userid']){ require_once('./includes/functions_user.php'); $noavatar = fetch_avatar_url($vbulletin->userinfo['userid']); if (!is_array($noavatar)){ $noavatar[0] = $vbulletin->options['bburl'] . "/images/misc/no_avatar.gif"; } }]]></phpcode> </plugin> </plugins> </product>
And add this variable in your mods: $noavatar[0]

If user doesn't have a avatar, the "no_avatar.gif" image will display.
(REMINDER: Upload the no_avatar.gif to your misc. folder.)

I don't want to display the no_avatar.gif image.

Add this code in your mod:
PHP Code:
<img src="image.php?$session[sessionurl]u=$bbuserinfo[userid]alt="" border="0" /> 
If user doesn't have an avatar, the clear.gif (from your forum root) will display.
Attached Files
File Type: xml product-NoAvatar.xml (650 Bytes, 47 views)
Reply With Quote
  #2  
Old 01-17-2007, 05:04 PM
Mr_Snob Mr_Snob is offline
 
Join Date: Jan 2004
Location: T?RKIYE/BOLU
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool hack thank you for your usefully tutorial Allan
Reply With Quote
  #3  
Old 01-19-2007, 01:44 AM
bigmonay2k bigmonay2k is offline
 
Join Date: May 2004
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do I download the product
Reply With Quote
  #4  
Old 01-19-2007, 06:13 AM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bigmonay2k View Post
how do I download the product
Product add ^^
Reply With Quote
  #5  
Old 01-19-2007, 01:50 PM
bigmonay2k bigmonay2k is offline
 
Join Date: May 2004
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ THANKS, how does this thing work, I upload the image, I don't see anything
Reply With Quote
  #6  
Old 01-21-2007, 06:58 AM
Terminatoronly's Avatar
Terminatoronly Terminatoronly is offline
 
Join Date: Mar 2006
Posts: 313
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool i like it
Reply With Quote
  #7  
Old 01-21-2007, 11:44 PM
bigmonay2k bigmonay2k is offline
 
Join Date: May 2004
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Terminatoronly View Post
cool i like it
did it work for you??
Reply With Quote
  #8  
Old 02-27-2007, 03:04 PM
Mr Pink's Avatar
Mr Pink Mr Pink is offline
 
Join Date: Oct 2006
Location: [Italy]
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After a little (yes, a llittle big) search, I've found also this code:

Code:
  <img src="image.php?u=$userid" />
Using this one, you will call the current user avatar (logged user).
Maybe it isn't the best, but it's what I was searching for (a simple code without plug-ins, file edits).
Now only what I need to do, is search a conditional for users that have not an avatar.

Quote:
Originally Posted by Mr Pink View Post
After a little (yes, a llittle big) search, I've found also this code:

Code:
  <img src="image.php?u=$userid" />
Using this one, you will call the current user avatar (logged user).
Maybe it isn't the best, but it's what I was searching for (a simple code without plug-ins, file edits).
Now only what I need to do, is search a conditional for users that have not an avatar.
Oh, great. It does't work.
Zorry.
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:14 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.04029 seconds
  • Memory Usage 2,288KB
  • Queries Executed 22 (?)
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
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete