Pogledaj kako sam si ja slozio, sada jednostavno iscupaj tebi potrebne podatke
Code:
<?PHP
$phpbb_root_path = 'forum/';
define ('IN_PHPBB', true);
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
die ('<tt><b>phpBB</b>
$phpbb_root_path pogresan.</tt>');
}
//
// phpBB datoteke
//
@include_once ($phpbb_root_path . 'extension.inc');
@include_once ($phpbb_root_path . 'common.' . $phpEx);
@include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
//
// Fetchaj sve potrebne datoteke
//
@include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
@include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/stats.' . $phpEx);
@include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/users.' . $phpEx);
@include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/polls.' . $phpEx);
@include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
@include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/forums.' . $phpEx);
//
// start session management
//
//@$userdata = session_pagestart($user_ip, PAGE_INDEX);
@init_userprefs($userdata);
//
// page offset (meni je trebalo, tebi ne znam)
//
if (isset($HTTP_GET_VARS['start']) or isset($HTTP_POST_VARS['start']))
{
$CFG['posts_span_pages_offset'] = isset($HTTP_GET_VARS['start'])
? $HTTP_GET_VARS['start'] : $HTTP_POST_VARS['start'];
if (!intval($CFG['posts_span_pages_offset']))
{
$CFG['posts_span_pages_offset'] = 0;
}
}
// Dohvati postove od zadnjeg posjeta stranici
$new_posts = phpbb_fetch_new_posts();
// Dohvati statistike foruma
$stats = phpbb_fetch_stats();
// Dohvati online korisnike
$online = phpbb_fetch_online_users();
// fDohvati 5 TOP Postera
$top_poster = phpbb_fetch_top_poster();
// Random korisnik
$random_user = phpbb_fetch_random_user();
// fDohvati strukturu foruma
$forums = phpbb_fetch_forums();
// dohvati anketu
$poll = phpbb_fetch_poll();
// Dohvati zadnje postove
$CFG['posts_trim_topic_number'] = 25;
$recent = phpbb_fetch_posts(null, POSTS_FETCH_LAST);
// fetch postings
$CFG['posts_trim_topic_number'] = 0;
$CFG['posts_span_pages'] = true;
$news = phpbb_fetch_posts();
//
// disconnect
phpbb_disconnect();
?>
<!-- TOPIC -->
<?php if (isset($topic) and !empty($topic)) { ?>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><span class="cattitle"><?php echo $topic[0]['topic_title']; ?></span></td>
</tr>
<tr>
<td class="row1" align="left" width="100%">
<span class="gensmall">
<?php echo $topic[0]['post_text']; ?>
</span>
</td>
</tr>
</table>
<br />
<?php } ?>
<!-- TOPIC -->
<!-- RECENT -->
<?php if (isset($recent)) { ?>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="row1" align="left" width="100%">
<span class="gensmall">
<?php for ($i = 0; $i < count($recent); $i++) { ?>
<?php echo create_date($board_config['default_dateformat'], $recent[$i]['post_time'], $board_config['board_timezone']); ?> <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&u=' . $recent[$i]['user_id']); ?>"><?php echo $recent[$i]['username']; ?></a><br /><img src="<?php echo $phpbb_root_path; ?>templates/subSilver/images/icon_latest_reply.gif" border="0" align="absmiddle" /> <a href="<?php echo append_sid($phpbb_root_path . 'viewtopic.php?p=' . $recent[$i]['post_id'] . '#' . $recent[$i]['post_id']); ?>"><b><?php echo $recent[$i]['topic_title']; ?><?php if ($recent[$i]['topic_trimmed']) { echo '...'; } ?></b></a><br />
<?php } ?>
</span>
</td>
</tr>
</table>
<br />
<?php } ?>
<!-- RECENT -->