Last 5 on Index 1.0.0
Verfasst: 22.12.2013 19:45
Ich habe den Mod aus dem Topic eingefügt
Wo muss ich jetzt was ändern damit die Box rechts an der seite ist?
index.php
styles/prosilver/template/index_body.html
Wo muss ich jetzt was ändern damit die Box rechts an der seite ist?
index.php
Code: Alles auswählen
$sql = "SELECT p.post_id, p.poster_id, p.post_time, u.username, u.user_colour, t.topic_title
FROM " . POSTS_TABLE . " AS p
LEFT JOIN " . USERS_TABLE . " AS u
ON p.poster_id = u.user_id
LEFT JOIN " . TOPICS_TABLE . " AS t
ON p.topic_id = t.topic_id
WHERE p.post_approved = 1
ORDER BY p.post_time DESC";
$result = $db->sql_query_limit($sql, 5, 0, 60);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('top_posts', array(
'PROFILE' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']),
'DATE' => $user->format_date($row['post_time']),
'TOPIC_TITLE' => $row['topic_title'],
'POST_URL' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p='.$row["post_id"].'#p'.$row["post_id"]),
));
}
$db->sql_freeresult($result);
$template->assign_vars(array(
'L_FROM_TOP' => ucfirst($user->lang['FROM']),
));
$sql = "SELECT username, user_id, user_colour, user_posts
FROM " . USERS_TABLE . "
WHERE user_id <> " . (int) ANONYMOUS . "
AND user_type <> " . (int) USER_IGNORE . "
AND user_posts > 0
ORDER BY user_posts DESC";
$result = $db->sql_query_limit($sql, 5, 0, 3600);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('top_posters', array(
'PROFILE' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'POSTS' => $row['user_posts'],
'SEARCH_LINK' => append_sid("{$phpbb_root_path}search.$phpEx", 'author_id='.$row["user_id"].'&sr=posts'),
));
}
$db->sql_freeresult($result);
$sql = "SELECT username, user_id, user_colour, user_regdate
FROM " . USERS_TABLE . "
WHERE user_id <> " . (int) ANONYMOUS . "
AND user_type <> " . (int) USER_IGNORE . "
ORDER BY user_regdate DESC";
$result = $db->sql_query_limit($sql, 5, 0, 300);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('new_users', array(
'PROFILE' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'REGDATE' => $user->format_date($row['user_regdate']),
));
}
$db->sql_freeresult($result);
Code: Alles auswählen
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<table class="table1" cellspacing="1">
<thead>
<tr>
<th style="width: 31%;">{L_TOP_POSTS}</th>
<th style="width: 31%;">{L_TOP_USERS}</th>
<th style="width: 31%;">{L_TOP_POSTERS}</th>
</tr>
</thead>
<tbody>
<tr class="bg2">
<td valign="top">
<!-- BEGIN top_posts -->
<div><a href="{top_posts.POST_URL}">{top_posts.TOPIC_TITLE}</a><br /> {L_FROM_TOP}: {top_posts.PROFILE} {top_posts.DATE}</div>
<!-- END top_posts -->
</td>
<td valign="top">
<!-- BEGIN top_posters -->
<div>{top_posters.PROFILE}<br /> {L_POSTS}: <a href="{top_posters.SEARCH_LINK}">{top_posters.POSTS}</a></div>
<!-- END top_posters -->
</td>
<td valign="top">
<!-- BEGIN new_users -->
<div>{new_users.PROFILE}<br /> {L_JOINED}: {new_users.REGDATE}</div>
<!-- END new_users -->
</td>
</tr>
</tbody>
</table>
<span class="corners-bottom"><span></span></span></div>
</div>