vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Adding User Avatars On Custom Modifications (https://vborg.vbsupport.ru/showthread.php?t=136757)

Allan 01-16-2007 10:00 PM

Adding User Avatars On Custom Modifications
 
1 Attachment(s)
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.

Mr_Snob 01-17-2007 05:04 PM

cool hack thank you for your usefully tutorial Allan :)

bigmonay2k 01-19-2007 01:44 AM

how do I download the product

Allan 01-19-2007 06:13 AM

Quote:

Originally Posted by bigmonay2k (Post 1162607)
how do I download the product

Product add ^^

bigmonay2k 01-19-2007 01:50 PM

^ THANKS, how does this thing work, I upload the image, I don't see anything

Terminatoronly 01-21-2007 06:58 AM

cool i like it ;)

bigmonay2k 01-21-2007 11:44 PM

Quote:

Originally Posted by Terminatoronly (Post 1164091)
cool i like it ;)

did it work for you??

Mr Pink 02-27-2007 03:04 PM

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 (Post 1191955)
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. :rolleyes:
Zorry. :(


All times are GMT. The time now is 08:36 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.01147 seconds
  • Memory Usage 1,729KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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