Acest snippet permite MODificarii Top Five sa arate avatarul celui care a scris in subiect.
Deschideti includes/top_five.php
Cauta :
Adauga dupa :
Cauta :
Inlocuieste cu :
Cauta :
Adauga dupa :
Cauta :
Inlocuieste cu :
STERGE :
Cauta :
Inlocuieste cu :
Cauta :
Adauga dupa :
Cauta :
Adauga inainte :
Cauta :
Inlocuieste cu :
Cauta :
Adauga dupa :
Cauta :
Adauga inainte :
Deschideti top_five_body.html
Cauta :
Inlocuieste cu :
Deschideti includes/top_five.php
Cauta :
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;
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' => '<span style="float: left; margin-right: 8px;">' . $user_avatar . '</span>' . ' ' . $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']) : '<img src="http://i.epvpimg.com/Qg3Pd.gif" width="25px;" height="25px;" alt="" />',
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']) : '<img src="http://i.epvpimg.com/Qg3Pd.gif" width="25px;" height="25px;" alt="" />',
Deschideti top_five_body.html
Cauta :
Code:
<td valign="top"><!-- BEGIN top_five_topic --><!-- IF top_five_topic.NO_TOPIC_TITLE-->{top_five_topic.NO_TOPIC_TITLE}<!-- ELSE --><a href="{top_five_topic.U_TOPIC}">{top_five_topic.TOPIC_TITLE}</a><br /> {top_five_topic.USERNAME_FULL} {top_five_topic.LAST_TOPIC_TIME}<br /><!-- ENDIF --><!-- END top_five_topic --></td>
<td valign="top"><!-- BEGIN top_five_active -->{top_five_active.USERNAME_FULL}<br /> {L_POSTS}: <a href="{top_five_active.S_SEARCH_ACTION}">{top_five_active.POSTS}</a><br /><!-- END top_five_active --></td>
<td valign="top"><!-- BEGIN top_five_newest -->{top_five_newest.USERNAME_FULL}<br /> {L_JOINED}: {top_five_newest.REG_DATE}<br /><!-- END top_five_newest --></td>
Inlocuieste cu :
Code:
<td valign="top"><!-- BEGIN top_five_topic --><div style="margin-top: 3px"><!-- IF top_five_topic.NO_TOPIC_TITLE-->{top_five_topic.NO_TOPIC_TITLE}<!-- ELSE --><a href="{top_five_topic.U_TOPIC}">{top_five_topic.TOPIC_TITLE}</a><br />{top_five_topic.USERNAME_FULL} {top_five_topic.LAST_TOPIC_TIME}<br /></div><!-- ENDIF --><!-- END top_five_topic --></td>
<td valign="top"><!-- BEGIN top_five_active --><div style="margin-top: 3px"><span style="float: left; margin-right: 8px;">{top_five_active.USER_AVATAR} {top_five_active.USER_AVATAR_THUMB}</span>{top_five_active.USERNAME_FULL}<br />{L_POSTS}: <a href="{top_five_active.S_SEARCH_ACTION}">{top_five_active.POSTS}</a><br /></div><!-- END top_five_active --></td>
<td valign="top"><!-- BEGIN top_five_newest --><div style="margin-top: 3px"><span style="float: left; margin-right: 8px;">{top_five_newest.USER_AVATAR} {top_five_newest.USER_AVATAR_THUMB}</span>{top_five_newest.USERNAME_FULL}<br />{L_JOINED}: {top_five_newest.REG_DATE}<br /></div><!-- END top_five_newest --></td>
![[Image: C1HFd.png]](http://i.epvpimg.com/C1HFd.png)
Fondator cs.jucausii.net
Id mess - andrei_darius97
Id mess - andrei_darius97