View Full Version : User Profile Conditionals
David Regimbal
01-01-2011, 12:54 AM
Hey everyone,
I was wondering if it was possible to have it so that if you were the owner of the profile to which you were viewing that you didn't see "Send A Message," and other options such as that?
Lynne
01-01-2011, 04:42 PM
Put a condition around it like <vb:if condtion="$bbuserinfo['userid'] != $userinfo['userid']">show code</vb:if> (I'm not sure if $userinfo is the correct variable, you will need to look in the template in order to see what it is.)
David Regimbal
01-02-2011, 12:26 AM
Hi Lynne,
I have tried that though for some reason that was not working, I most likely had the two mixed up in the tag. However, I came across this variable: "<vb:elseif condition="$prepared['myprofile']" />"
I'm assuming that this would also work "<vb:if condition="$prepared['myprofile']" >"
Wrapped in that would only allow the profile owner to see it. Though I shouldn't get my hopes up since I have not tried it out yet. I will try what you have suggested again, though using your code.
Lynne
01-02-2011, 02:54 AM
Yes, you are probably right. There are a couple of variables that work on that page in different hook locations. I can never remember which.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.