The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have a section in memberinfo that I want only the member of that profile to see. aka if I am viewing my profile, I want a section only I can see. What is that conditional? thanks!
|
#2
|
||||
|
||||
![]()
It would help to know what template you are adding this code to.
|
#3
|
|||
|
|||
![]()
memberinfo
will this do? <if condition="$bbuserinfo['userid'] == $userinfo['userid']"> |
#4
|
||||
|
||||
![]()
It should.
|
#6
|
|||
|
|||
![]()
Hello Lynne.
That code worked for me. I added: Code:
<if condition="$userinfo['userid'] == $bbuserinfo['userid']"></if> How do I do this? http://www.vbulletin.com/forum/forum...ms#post3971219 |
#7
|
||||
|
||||
![]()
You said you wanted to only show some code to the viewer if they are viewing their own profile, so doesn't that condition do that?
As for the code you linked to, you are getting the avatar for the viewer of the page, not the profile owner. |
#8
|
|||
|
|||
![]()
And whats the code to show the avatar for the profile owner?
I need something like this: <if condition="$show['profile_owner']"> <img scr="url_to_avatar_of_profile_owner" /> // similar as the one I made $user_ava[0] <else /> <img src="no_avatar.gif" /> </if> I had tried "prepared[avatarurl] in <img src="prepared[avatarurl]" />, (other than $user_ava[0]") but doesn't work! See example: http://www.1st-hacks.com/members/prue.html The avatar is shown correctly on ministats_block but not on profile (below the profile picture)! |
#9
|
||||
|
||||
![]()
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. |
#10
|
|||
|
|||
![]()
Ok, let me explain myself. I have a plugin that shows avatar on all pages. The plugin is:
Code:
require_once('./includes/functions_user.php'); $user_ava = fetch_avatar_url($vbulletin->userinfo['userid']); if ($user_ava[0] == "") $user_ava[0] = "http://www.1st-hacks.com/images/as4/avatars/user.gif"; Ok, now here it the problem/question/issue! I had modified the memberinfo template to show an avatar 160x160 dimensions using $user_ava[0]. The good news: It shows up. - Now here comes the bad news. The avatar is showing under the profile picture and shows the avatar of the current userid (user whom is browsing right now the forum - his/her avatar). Thats ok, if he browses his/her profile (his/her avatar will show up - ok). - But when he goes to another profile (different than her/his profile), the avatar should be of that user/profile, not her/his (the one that browsing). By default it shows the avatar of the user bowsing on all pages. Don't know if you get me. I need a conditional to say, something like: 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. P.D. Does nothing to do with this thread, but whats the conditional "php" to show to userid? I know that the template conditional is: <if condition="$bbuserinfo['userid'] == 1"></if> // shows to ID 1 // But how do you do the same in php plugin? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|