1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Follow or unfollow, that is the question!

Discussion in 'XenForo Development Discussions' started by ^[GS]^, Sep 20, 2014.

  1. ^[GS]^

    ^[GS]^ Member


    As I can tell if a user can follow or unfollowing, from the template?

    <xen:follow user="$user" class="Tooltip" />
    I try replacing this line to have more control of the operation... but I can not determine if you can follow and unfollow.

    I know who follow with:
                   <xen:if is="{$user.isFollowingVisitor}">
                        {xen:phrase user_is_following_you, 'user={$user.username}'}
                    <xen:else />
                        {xen:phrase user_is_not_following_you, 'user={$user.username}'}
    I've even managed to create links to a token to follow and unfollow.
                   {xen:link 'members/follow', $user, '_xfToken={$visitor.csrf_token_page}'} {xen:phrase follow}
                    {xen:link 'members/unfollow', $user, '_xfToken={$visitor.csrf_token_page}'} {xen:phrase unfollow}
    However, I can not know which of the two to use!
    I'm trying to use the "isFollowing" function but I can not discover how it is used.

  2. ^[GS]^

    ^[GS]^ Member


Share This Page