Friends 1.x

Legacy documentation for Friends 1.x.

The Friends:Group_Wall tag displays comments that have been submitted to a given Friends group, similar to the way Facebook's Group Comment Wall used to be in the earlier days. Used in conjunction with the Friends:Group_Wall_Form tag.

{exp:friends:group_wall} content {/exp:friends:group_wall}

Parameters

The following parameters are available for use:

friends_group_id=

friends_group_id="{segment_3}"

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

friends_group_name=

friends_group_name="{segment_3}"

This parameter is required (unless using friends_group_id) to let this tag know which group 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 group. The default is 100.

member_id=

member_id="{segment_3}"

This parameter allows you to filter a group's comments down to ones posted by a specific user by specifying their member ID. You can hardcode a member ID, pass it through an embed, grab it from the URI, or specify CURRENT_USER to display the status of the currently logged in user.

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 allows you to filter a group's comments down to ones posted by a specific user by specifying their username. You can hardcode a username, pass it through an embed, grab it from the URI, or specify CURRENT_USER to display the status of the currently logged in user.

Variables

The following variables are available for use:

friends_comment

{friends_comment}

This variable outputs the comment the user submitted to a given group 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 group 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 group.
{/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 Friends group wall:

<h3>Wall Comments:</h3>

{exp:friends:group_wall
    friends_group_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 group.</p>
    {/if}
{/exp:friends:group_wall}