Log in

View Full Version : Help with variables


kether1
06-03-2008, 03:35 AM
I need some help with a bit of code. I need to know the variables to do the following.

I have member A and B on the forum.

Member A is not currently logged into the forum, but is a member who has posted in the past. ( currently viewing forum as a guest)

Member B is logged into the forum. (member)

PART 1: Member B looks at Member A's Postbit data and sees a link called X-LINK.

PART 2: Member B looks as HIS own postbit data and sees a link called Y-LINK.

PART 3: Member A (who is a guest and not logged into the forum right now but is viewing the same thread as Member B) doesn't see either links because he is a guest/visitor.


Summary: So - all logged in members see in each other's postbit: X-Link
But in his or her own postbit, he or she sees only Y-Link. Guest see no links in the postbit.

What are the variables I need to call do this?


Part 3 variable I know. It is

<if condition="$show['member']">


What are the variables needed in Part 1 and Part 2? Thanks for your help!

Regards,
Kether

Lynne
06-03-2008, 02:30 PM
In the templates, I think you can use the following....
The person who's post it is: $post[userid]
The person who is viewing the posts: $bbuserinfo[userid]

So, if in a postbit you only want to show a link if the post is made by the user viewing the post:
<if condition="$post[userid] == $bbuserinfo[userid]">
Y-Link
</if>

kether1
06-03-2008, 06:06 PM
Thanks so much, Lynn!

Regards,
Kether