PDA

View Full Version : Make an edit icon only viewable to profile owner


TNCclubman
02-27-2009, 04:17 AM
Im putting this next to my CUSTOM USER TITLE

<a class="smallfont" href="profile.php?$session[sessionurl]do=editprofile"> <img class="inlineimg" border="0" src="/boards/images/misc/userfield_edit.gif"/></a>

so that people can find the link to where to change their custom user title... problem is, the edit icon is showing up on everyone's custom user title area, not just your own profile...

how do I make that icon disappear when you visit someone elses page??

Lynne
02-27-2009, 03:16 PM
Put a condition around it?
<if condition="$bbuserinfo['userid'] == $userinfo['userid']">
edit icon
</if>

Something like that, I think. That checks if the person viewing the page ($bbuserinfo) has the same userid as the person who's page you are viewing ($userinfo). You didn't say what page you are doing this on, so you may have to change the last variable depending.

TNCclubman
02-27-2009, 05:03 PM
worked! thanks!!!

<if condition="$bbuserinfo['userid'] == $userinfo['userid']">
<a class="smallfont" href="profile.php?$session[sessionurl]do=editprofile"> <img class="inlineimg" border="0" src="/images/misc/userfield_edit.gif"/></a>
</if>