Friends 1.x

Legacy documentation for Friends 1.x.

The Friends:Profile_Wall tag displays comments that have been submitted to a given user's profile, similar to the way Facebook's Comment Wall used to be in the earlier days. Used in conjunction with the Friends:Profile_Wall_Form tag.

{exp:friends:profile_wall} content {/exp:friends:profile_wall}

Parameters

The following parameters are available for use:

friend_id=

friend_id="{segment_3}"

This parameter is required (unless using username) to let this tag know which profile you want to show results for. You'll typically pass a value to this from a segment value in the URI.

limit=

limit="10"

This parameter allows you to set a limit of the amount of comments you'd like to show up for a given member. The default is 100.

paginate=

paginate="both"

This parameter allows you to control where the pagination will display. Options are top, bottom, or both. Used in conjunction with the friends_paginate variable pair.

username=

username="{segment_3}"

This parameter is required (unless using friend_id) to let this tag know which profile you want to show results for. You'll typically pass a value to this from a segment value in the URI.

Variables

The following variables are available for use:

friends_comment

{friends_comment}

This variable outputs the comment the user submitted to a given profile wall.

friends_entry_date

{friends_entry_date format="%F %j, %Y at %h:%i %a"}

This variable outputs the date of when the comment was submitted to a given profile wall.

friends_member_id

{friends_member_id}

This variable displays the member ID of the user that submitted a given comment.

friends_screen_name

{friends_screen_name}

This variable displays the screen name of the user that submitted a given comment.

friends_username

{friends_username}

This variable displays the username of the user that submitted a given comment.

Variable Pairs

The following variable pairs are available for use:

friends_paginate

{friends_paginate}
    Page {friends_current_page} of {friends_total_pages} pages
    {friends_pagination_links}
{/friends_paginate}

Pagination is available for this tag and works just like regular pagination, but each variable is prepended with friends_. Used in conjunction with the paginate parameter.

Conditionals

The following conditionals are available for use:

if friends_no_results

{if friends_no_results}
    There are currently no comments for this profile.
{/if} `

This conditional evaluates to true and displays it's contents when there are no results found for this tag.

Examples

The following example will display all comments submitted to a given member’s profile wall:

<h3>Wall Comments:</h3>

{exp:friends:profile_wall
    friend_id="{segment_3}"
}

    <p class="wall">
        {friends_comment}<br/>
        By:
        {if logged_in_member_id == friends_member_id}
            <b>You</b>
        {if:else}
            <a href="{path='friends/profile'}/{friends_member_id}/">
                {friends_screen_name}
            </a>
        {/if}
        on {friends_entry_date format="%F %j, %Y at %h:%i %a"}
    </p>
    {if friends_no_results}
        <p>There are currently no comments for this profile.</p>
    {/if}
{/exp:friends:profile_wall}