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

Reply
 
Thread Tools Display Modes
  #11  
Old 10-10-2006, 05:08 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this.

PHP Code:
<?php
require_once('./global.php');
include(
DIR '/includes/functions_user.php');

$avatar fetch_avatar_url($vbulletin->userinfo['userid'])

echo 
"<img src=$avatar alt='' border='0' />";

?>
Reply With Quote
  #12  
Old 10-10-2006, 06:10 AM
andewy3k andewy3k is offline
 
Join Date: Oct 2006
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no, this time no image shows at all.. not even a red x..

could it be because we are using php tags within html?
Reply With Quote
  #13  
Old 10-10-2006, 06:57 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It returns an array.... you'll need to use $avatar[0] to get the img src, and $avatar[1] (contains HTML) to get the width/height.

Code:
<img src="$avatar[0]"$avatar[1] alt="" />
Reply With Quote
  #14  
Old 10-10-2006, 07:18 AM
andewy3k andewy3k is offline
 
Join Date: Oct 2006
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

still not working.. get red x

i tried

HTML Code:

<?php
require_once('./global.php');
include(DIR . '/includes/functions_user.php');

$avatar = fetch_avatar_url($vbulletin->userinfo['userid'])

echo "<a href="usercp.php"><img src="$avatar[0]"$avatar[1] alt="Your Avatar" /></a>";

?> 

then i tried


HTML Code:

<?php
require_once('./global.php');
include(DIR . '/includes/functions_user.php');

$avatar = fetch_avatar_url($vbulletin->userinfo['userid'])

?> 

<a href="usercp.php"><img src="$avatar[0]"$avatar[1] alt="Your Avatar" /></a>
any more ideas?
Reply With Quote
  #15  
Old 10-10-2006, 07:20 AM
andewy3k andewy3k is offline
 
Join Date: Oct 2006
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

see, look at the attached image..
Attached Images
File Type: bmp untitled.bmp (105.1 KB, 21 views)
Reply With Quote
  #16  
Old 10-10-2006, 07:43 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you say "front page" do you mean your forums' index?
Reply With Quote
  #17  
Old 10-10-2006, 08:32 AM
andewy3k andewy3k is offline
 
Join Date: Oct 2006
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yup, also known in the styles manager as "FORUMSHOME"

btw. im not using VBadvance or w/e that mod is called..
Reply With Quote
  #18  
Old 10-10-2006, 08:52 AM
harmor19 harmor19 is offline
 
Join Date: Apr 2005
Posts: 1,324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Download the attachment and import it to your plugins.
Open up your "FORUMHOME" template and add $avatar anywhere you want.
Attached Files
File Type: xml vbulletin-avatar_on_forumhome.xml (417 Bytes, 29 views)
Reply With Quote
  #19  
Old 10-10-2006, 08:03 PM
andewy3k andewy3k is offline
 
Join Date: Oct 2006
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WORKS GREAT!

but, I still need some kind of IF statement within the plugin or within the forumshome template

to check if the user has an avatar, if not .. to show a special image

if so

show their avatar..

any help is appreciated..
Reply With Quote
  #20  
Old 10-11-2006, 08:32 PM
andewy3k andewy3k is offline
 
Join Date: Oct 2006
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

_______________________________________________

anyone? I need an if statement

Just like basically saying

If "user has avatar" then

code to pickup avatar and place within var $avatar

else

blank.gif (to show they dont have one)
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 07:41 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.04311 seconds
  • Memory Usage 2,273KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_html
  • (1)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
  • (2)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