Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 08-21-2008, 06:41 AM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<?php
chdir 
('./forums'); 
require_once(
'./global.php'); 
require_once(
DIR '/includes/functions_user.php');  
?>
I'm using that now, and still no luck.
Reply With Quote
  #22  
Old 08-21-2008, 09:40 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post the complete file you are using now.
Reply With Quote
  #23  
Old 08-21-2008, 08:10 PM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the entire content of the page I'm testing:

PHP Code:
<?php
    
echo '<' '?xml version="1.0" encoding="utf-8"?' '>';
    
chdir ('./forums'); 
    require_once(
'./global.php'); 
      require_once(
'./includes/functions_user.php');  
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">


// AVATAR
<?php

if ($avatarurl == '' OR !$vbulletin->options['avatarenabled'] OR ($avatarurl['hascustom'] AND !($userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canuseavatar']) AND !$userinfo['adminavatar']))
{
    
$show['avatar'] = false;
}
else
{
    
$show['avatar'] = true;
    
$userinfo['avatarsize'] = $avatarurl[1];
    
$userinfo['avatarurl'] = $avatarurl[0];

?>
Reply With Quote
  #24  
Old 08-22-2008, 10:25 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You aren't actually using the fetch_avatar_url() function...
Reply With Quote
  #25  
Old 08-22-2008, 02:57 PM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, how did I miss that one line? I know I was using it originally because I was getting an error from it at one time. I must have taken it out to get rid of the error.

I put it back in on the new test file I showed you and now I get a database error:

PHP Code:
Database error in vBulletin 3.7.1:
MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
Error Number  
1064 
My avatars are using my files, not my database. I double checked.
Reply With Quote
  #26  
Old 08-23-2008, 05:33 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post the file you are using. Just saying "I put it in" doesn't really explain where.
Reply With Quote
  #27  
Old 08-23-2008, 09:41 AM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There.

The url of the file is mydomainname.com/avitest.php, and the url of my forums is mydomainname.com/forums/, it that helps.
Attached Files
File Type: php avitest.php (854 Bytes, 5 views)
Reply With Quote
  #28  
Old 08-23-2008, 11:02 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$vbulletin->userinfo is the array for the logged in user's info, not $userinfo.
Reply With Quote
  #29  
Old 08-23-2008, 09:20 PM
Chris11987 Chris11987 is offline
 
Join Date: Jun 2008
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I replaced the $userinfo's with $vbulletin->userinfo's and still get a blank page.
Reply With Quote
  #30  
Old 08-23-2008, 09:32 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I took your php page, replaced the $userinfo with $vbulletin->userinfo and I get a page that simply says:

// AVATAR

But, since you aren't using a template to spit anything out and you aren't echoing anything in your php, I would not expect any other result.

edit: I meant to add, if I add this, I get something to spit out. I'm not sure it's the best way to do this though (someone else may comment on that).
PHP Code:
 echo "<img src='/forums/" .$vbulletin->userinfo['avatarurl']. "'>"
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 02:10 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.04666 seconds
  • Memory Usage 2,282KB
  • Queries Executed 12 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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_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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete