Log in

View Full Version : What conditional?


Hex_legend
12-30-2007, 01:56 AM
What conditional do I put for a user not being able to see a link if its something to do with their user account?

I mean, I have iTrader installed and a user can not submit feedback for their own account. I have made a link for all users to leave feedback for everyone, but I don't want them to see the link under their own username.

How do I stop them seeing links like this?

Adam21
12-30-2007, 02:06 AM
If you do not want to display to that particular userid,it should be
<if condition="$bbuserinfo['userid'] != XXX"></if>

Where XXX is the userid you wish to hide that particular info from but display to everyone else.:)

Hex_legend
12-30-2007, 02:21 AM
That doesn't really make any sense, because:



<if condition="$bbuserinfo['userid'] != XXX"></if>


The XXX would be a usernumber, e.g. 1 (for the first admin account).

But I would want it to show for all users, so it hides it.


So,

User 31 can't see their own 1 but can see others.
User 32 can't see their own 1 but can see others.

Etc..

Adam21
12-30-2007, 03:28 AM
Have you tried it?

Hex_legend
12-30-2007, 03:36 AM
No, but I'm presuming that XXX would be 1 (for my user)

But I don't see how that would affect other users (that aren't user ID 1)

Opserty
12-30-2007, 10:29 AM
$bbuserinfo['userid'] is the userid of the person current browsing the site. You need to find another variable to compare this this two. (You may find a clue by looking at the template/phrase used to generate the link). Since this is custom script you'll have to find that variable yourself, I'll call it $yourvar for now.

Then in your template you would have:

<if condition="$bbuserinfo['userid'] != $yourvar['userid']">
DISPLAY LINK
</if>

COBRAws
01-03-2008, 04:33 PM
does anyone know the conditional info for timezones?

<if condition="$bbuserinfo['timezone'] != -0700"></if>
or something