You can either list the contributors by using a resource list or template tags and block. A resource list is just a list of contributors based on a resource, separated by a separator configured in the administration panel.
All of these examples can be used in comments.tpl and forums.posts.tpl.
Example 1: Display users using avatars only ( requires userimages plugin )
<!-- IF {PHP.contributors_count} > 0 --> <!-- BEGIN: CONTRIBUTOR_ROW --> <a title="{CONTRIBUTOR_NAME}" href="{CONTRIBUTOR_URL}"> <!-- IF {CONTRIBUTOR_AVATAR_SRC} --> <img src="{CONTRIBUTOR_AVATAR_SRC}" style="width: 20px; vertical-align: middle; height: 20px;" /> <!-- ELSE --> <img src="datas/defaultav/blank.png" style="width: 20px; vertical-align: middle; height: 20px;" /> <!-- ENDIF --> </a> <!-- END: CONTRIBUTOR_ROW --> <!-- ELSE --> There are currently no contributors. <!-- ENDIF -->
Example 2: Display users using a link
<!-- IF {PHP.contributors_count} > 0 --> <strong>Contributors:</strong> <!-- BEGIN: CONTRIBUTOR_ROW --> <span style="padding: 4px 8px; border-radius: 4px; background-color: #ddd;">{CONTRIBUTOR_LINK}</span> <!-- END: CONTRIBUTOR_ROW --> <!-- IF {PHP.contributors_count_diff} > 0 --> and {PHP.contributors_count_diff} others. <!-- ENDIF --> <!-- ELSE --> There are currently no contributors. <!-- ENDIF -->
To override {PHP.contributor_list}, define $R['contributors_forums_list'] for forums posts and $R['contributors_comments_list'] for comments contributors in your theme's file.
Available parameters: {$id}, {$name}, {$link}, {$gender}, {$country}, {$countryflag}, {$url}, {$avatar}, {$avatar_src}
Example 1: Resource list display
<!-- IF {PHP.contributors_count} > 0 --> Contributors: {PHP.contributors_list}<!-- IF {PHP.contributors_count_diff} > 0 --> and {PHP.contributors_count_diff} others.<!-- ENDIF --> <!-- ELSE --> There are currently no contributors. <!-- ENDIF -->
comments.tpl, forums.posts.tpl
comments.tpl, forums.posts.tpl
In comments.tpl, the following must be inside COMMENTS block.
For forums.posts.tpl, the following must be inside MAIN block.
In block: CONTRIBUTOR_ROW
Thanked: 7 mal
I'll try this, thanks!