View Full Version : phpbb fetch all help

07-31-2007, 01:57 AM
Anyone using this mod?


I am trying to get this to work but I am stuck. What I wan't to do is just have some new topics show up on my web site, now when I run the examples they do work BUT I cannot get it to work from my web sites index page.

So how do I call that test.php scrip from my actual web site? here is the exaple below, now if I open this up as a test.php it works but now I am guessing I need to do somthing else not sure how...

$phpbb_root_path = '../../../';
define ('IN_PHPBB', true);
include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.' . $phpEx);
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
$news = phpbb_fetch_posts();
<?php for ($i = 0; $i < count($news); $i++) { ?>
<li><?php echo $news[$i]['topic_title']; ?></li>
<?php } ?>

Thanks for any help!