vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to pull avatar with URL? (https://vborg.vbsupport.ru/showthread.php?t=228713)

ConfusedCartman 11-23-2009 08:25 PM

How to pull avatar with URL?
 
Using 3.8x:

I'm trying to pull avatars from the server in a script by using this PHP code:

PHP Code:

function getAvatar($image) {
    return 
$_SESSION['FORUM_URL']."image.php?u=".$image;


Where $_SESSION['FORUM_URL'] is equal to our forum directory and $image is equal to the userid of the user in question. However, when I do that I get a 1x1px transparent GIF image instead of their avatar, and I can't figure out how to get it to work. I know it works on another forum I manage, which is 3.7x, which leads me to believe that this might be something vBulletin changed between 3.7x and 3.8x. Any ideas?

kh99 11-23-2009 10:12 PM

It works OK for me on 3.8.X, but if a user doesn't have a custom avatar you get what you describe.


All times are GMT. The time now is 02:39 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.01092 seconds
  • Memory Usage 1,706KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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