Kod:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup('');
$sql = 'SELECT p.poster_id, p.post_text, p.post_time, p.bbcode_uid, p.bbcode_bitfield, u.user_id, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE u.user_id = p.poster_id
ORDER BY p.post_time DESC
LIMIT 10";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$data = date('d-m-Y', $row['post_time']);
$text = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], 7);
$autor = get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']);
echo "$autor | $data | $text | <br />";
}
$db->sql_freeresult($result);
?>
Kod pobierający 10 ostatnich postów z forum, teraz trzeba tylko określić z jakich for (id) ma pobierać dane.
Mam nadzieję że to ci się przyda.
Reszta to html.
http://www.bmw-diesel.pl