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 05-24-2013, 01:35 AM
darnoldy darnoldy is offline
 
Join Date: Dec 2004
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xexiu View Post
If the actual user is browsing his/her profile, show her/his avatar. If he browses a different profile, show the avatar of that profile/user.
Okay, so you say this a different way...you want people's avatar to be displayed on their profile page?

You shouldn't need a plugin for that--just a template edit. In the postbit, the avatar is displayed by the following code:
HTML Code:
<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
I would start by changing $post to $userinfo...
HTML Code:
<img src="$userinfo[avatarurl]" $userinfo[avwidth] $userinfo[avheight]  alt="<phrase  1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0"  />
and placing that code in the memberinfo template, to see if that works.

--don
Reply With Quote
  #12  
Old 05-24-2013, 07:44 PM
Xexiu Xexiu is offline
 
Join Date: May 2008
Location: Barcelona
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks don,

Tested it and doesnt work!

I have thge following code:

Code:
<if condition="$prepared['profilepicurl']">
<img src="$user_ava[0]" /> // Shows the currently user avatar (the one that's browsing his/her profile)
<else />
<img src="$userinfo[avatarurl]" /> // Doesnt show the avatar (no image) on other profiles, neither on his/her own if I change $user_ava[0]!
</if>
Quote:
Originally Posted by darnoldy View Post
Okay, so you say this a different way...you want people's avatar to be displayed on their profile page?

You shouldn't need a plugin for that--just a template edit. In the postbit, the avatar is displayed by the following code:
HTML Code:
<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
I would start by changing $post to $userinfo...
HTML Code:
<img src="$userinfo[avatarurl]" $userinfo[avwidth] $userinfo[avheight]  alt="<phrase  1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0"  />
and placing that code in the memberinfo template, to see if that works.

--don
Reply With Quote
  #13  
Old 05-24-2013, 08:49 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's only going to work if you write a plugin that gets the avatarurl for you. There would be no reason for the query regarding the profile user to include avatar information if it wasn't needed on the page. What I don't get though is that the avatar is already shown on the member.php page, so shouldn't the actually template code already be in the template?
Reply With Quote
  #14  
Old 05-24-2013, 08:53 PM
darnoldy darnoldy is offline
 
Join Date: Dec 2004
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xexiu View Post
Tested it and doesnt work!
If
Code:
<img src="$userinfo[avatarurl]" />
doesn't work, Then I would try:
Code:
<img src="$prepared[avatarurl]" />
if that doesn't work, we can hope that somebody with better resources will chime in.

--don
Reply With Quote
  #15  
Old 05-25-2013, 01:40 AM
Xexiu Xexiu is offline
 
Join Date: May 2008
Location: Barcelona
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by darnoldy View Post
If
Code:
<img src="$userinfo[avatarurl]" />
doesn't work, Then I would try:
Code:
<img src="$prepared[avatarurl]" />
if that doesn't work, we can hope that somebody with better resources will chime in.

--don
Hi don,

Yeah tried it before "$prepared[avatarurl]" and it has the same result (doesn't show nothing). I'm getting a bit desesperate!!

Any news Lynne?
Reply With Quote
  #16  
Old 05-25-2013, 02:21 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xexiu View Post
Any news Lynne?
I already commented and you didn't reply back to my comments, so I'm not sure what else you want from me.
Reply With Quote
  #17  
Old 05-25-2013, 03:52 PM
Xexiu Xexiu is offline
 
Join Date: May 2008
Location: Barcelona
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You need to use php, a plugin, to get the avatar based on who is viewing.

But I don't understand.... if you are the profile owner and viewing the page, you want to show the profile owners avatar, otherwise you want to show the no_avatar.gif - is that correct? If not, please write out your condition in a sentence like I just did.

Quote:
if you are the profile owner and viewing the page, you want to show the profile owners avatar, otherwise you want to show the no_avatar.gif
If I am the profile owner and visit my profile, show my avatar. Else, if visit others profile, show others avatar on their profile.
Reply With Quote
  #18  
Old 05-25-2013, 04:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But.... really what you are saying is showing the profile users avatar on the profile users profile - no? And, isn't the profile user's avatar already shown on their profile?
Reply With Quote
  #19  
Old 05-25-2013, 05:13 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xexiu View Post
If I am the profile owner and visit my profile, show my avatar. Else, if visit others profile, show others avatar on their profile.
This is how vbulletin works as standard???????
Reply With Quote
  #20  
Old 05-26-2013, 11:44 PM
Xexiu Xexiu is offline
 
Join Date: May 2008
Location: Barcelona
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think that I didn't explained myself.

I see my avatar "$prepared[avatarurl]" on my profile (avatar image). But when I visit others profile its "hidden" not showd.
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 10:05 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.02254 seconds
  • Memory Usage 2,266KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_code
  • (4)bbcode_html
  • (8)bbcode_quote
  • (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
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete