fm:FriendStatus


This component allows you to check the friendstatus in between two friends. This component works like an fm:switch component.

Example

<fm:FriendStatus uid1="{$loggedinuser.id}" uid2="12345"> <fm:Case value="notfriends">You guys are not friends</fm:Case> <fm:Case value="waiting">You're waiting on a reply regarding this friendship status</fm:Case> <fm:Case value="notconfirmed">This user requested friendship status, do you accept this proposal?</fm:Case> <fm:Case value="confirmed">You guys are friends!</fm:Case> </fm:FriendStatus>

The order of uid1 and uid2 is important. uid1 will be used as the perspective for the friend relationship. This is the workflow:

  • Users are not friends (status = notfriends).
  • User1 requests friendship (status from user1 perspective is waiting, status from user2 perspective is notconfirmed).
  • User2 confirms (status = confirmed).

Supported attributes

NameRequiredDefaultDescription
uid1RequiredN/AThe first user id to check.
uid2RequiredN/AThe second user id to check.

See also

More examples

The FriendStatus component can also be used to display a more following-like behaviour as such:

<fm:FriendStatus uid1="{$loggedinuser.id}" uid2="12345"> <fm:Case value="notfriends">You're not interested in this guy.</fm:Case> <fm:Case value="waiting">You are following this user.</fm:Case> <fm:Case value="notconfirmed">This guy is following you (he could be a stalker!).</fm:Case> <fm:Case value="confirmed">You are following each other.</fm:Case> </fm:FriendStatus>