Acest snippet permite MODificarii Top Five sa arate avatarul celui care a scris in subiect.
Deschideti
includes/top_five.phpCauta :Code:global $auth, $cache, $user, $db, $phpbb_root_path, $phpEx, $template;
Adauga dupa :Code:if (!function_exists('get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
Cauta :Code:'SELECT' => 'u.user_id, u.username, u.user_colour, t.topic_title, t.forum_id, t.topic_last_post_id, t.topic_last_post_time, t.topic_last_poster_name',
Inlocuieste cu :Code:'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, t.topic_title, t.forum_id, t.topic_last_post_id, t.topic_last_post_time, t.topic_last_poster_name',
Cauta :Code:$is_guest = $row['user_id'] != ANONYMOUS ? false : true;
Adauga dupa :Code:$user_avatar = ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '';
Cauta :Code:'TOPIC_TITLE' => $user->lang['IN'] . ' ' . $topic_title));
Inlocuieste cu :Code:'TOPIC_TITLE' => '
' . $user_avatar . '' . ' ' . $user->lang['IN'] . ' ' . $topic_title));
STERGE :Code: // cache this data for ever, cache is purged when adding or deleting users
$cache->put('_top_five_newest_users', $newest_users);
Cauta :Code:SELECT user_id, username, user_colour, user_regdate
Inlocuieste cu :Code:SELECT user_id, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height, username, user_colour, user_regdate
Cauta :Code: $newest_users[$row['user_id']] = array(
'user_id' => $row['user_id'],
'username' => $row['username'],
'user_colour' => $row['user_colour'],
'user_regdate' => $row['user_regdate'],
Adauga dupa :Code: 'user_avatar' => $row['user_avatar'],
'user_avatar_type' => $row['user_avatar_type'],
'user_avatar_width' => $row['user_avatar_width'],
'user_avatar_height' => $row['user_avatar_height'],
Cauta :Code: 'REG_DATE' => $user->format_date($row['user_regdate']),
'USERNAME_FULL' => $username_string)
Adauga inainte :Code: 'USER_AVATAR' => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']),
'USER_AVATAR_THUMB' => ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '
',
Cauta :Code:SELECT user_id, username, user_colour, user_posts
Inlocuieste cu :Code:SELECT user_id, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height, username, user_colour, user_posts
Cauta :Code: $user_posts[$row['user_id']] = array(
'user_id' => $row['user_id'],
'username' => $row['username'],
'user_colour' => $row['user_colour'],
'user_posts' => $row['user_posts'],
Adauga dupa :Code: 'user_avatar' => $row['user_avatar'],
'user_avatar_type' => $row['user_avatar_type'],
'user_avatar_width' => $row['user_avatar_width'],
'user_avatar_height' => $row['user_avatar_height'],
Cauta :Code: 'S_SEARCH_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $row['user_id'] . '&sr=posts'),
'POSTS' => $row['user_posts'],
'USERNAME_FULL' => $username_string)
Adauga inainte :Code: 'USER_AVATAR' => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']),
'USER_AVATAR_THUMB' => ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '
',
Deschideti
top_five_body.htmlCauta :Code: {top_five_topic.NO_TOPIC_TITLE}{top_five_topic.TOPIC_TITLE} {top_five_topic.USERNAME_FULL} {top_five_topic.LAST_TOPIC_TIME}
| {top_five_active.USERNAME_FULL} {L_POSTS}: {top_five_active.POSTS}
| {top_five_newest.USERNAME_FULL} {L_JOINED}: {top_five_newest.REG_DATE}
| Inlocuieste cu :Code: | {top_five_active.USER_AVATAR} {top_five_active.USER_AVATAR_THUMB}{top_five_active.USERNAME_FULL} {L_POSTS}: {top_five_active.POSTS} | {top_five_newest.USER_AVATAR} {top_five_newest.USER_AVATAR_THUMB}{top_five_newest.USERNAME_FULL} {L_JOINED}: {top_five_newest.REG_DATE}
|