Appologies, I've been busy with semester just starting up again.
ge_rpger wrote:So, my question is, how do we fix that first line of coding? Because, if a post comes from forum 23, I'd like it to say, that's where you're going. I mean, everything works just fine, I was just wondering if it's a potential issue.
If I'm understanding you correctly, then you're talking about the post subject link directing you always to the forum specified by
FORUM_ID?
If yes, then look at around line 126
Code: Select all
echo "\n<h4 class=\"postinfo\">".$user->format_date($m['topic_time'])." // <a href=\"".PHPBB_ROOT_PATH."viewtopic.php?f=".FORUM_ID."&t={$m['topic_id']}\">{$m['topic_replies']} {$comment}</a> // {$m['username']}</h4>";
Change that to
Code: Select all
echo "\n<h4 class=\"postinfo\">".$user->format_date($m['topic_time'])." // <a href=\"".PHPBB_ROOT_PATH."viewtopic.php?f={$m['forum_id']}&t={$m['topic_id']}\">{$m['topic_replies']} {$comment}</a> // {$m['username']}</h4>";
slxception wrote:I noticed a serious flaw with this mod, and I'm hoping this can be addressed:
The file says it starts a session as a Guest user. But the forum I have used to pull the topics from requires login to see. (Mind you, I'm just testing right now.) Even when I'm logged out, it will show posts from this forum. If it can pull settings as if a guest, but show protected forums, that's like circumventing security rules, and can be a serious issue. Is this behavior intentional?
That's correct in that it'll display posts from a protected forum even if a login is normally required, but an end user cannot change which forum is being shown - that's totally in your control. If you want it to only display the news if the user is logged in, then that'll require a bit of extra code. Off the top of my head...
Code: Select all
if(!$user->data['is_registered'])
{
// user isn't logged in, do something
exit();
}
wolf2009 wrote:does this work wit ha Wordpress Blog ?
Nope, it's a single script that depends on phpBB.
Valace wrote:ok fixed and yes it does work for that version
Is it possable for it to list only the subject line and not the contents with it or the date and comment part?
This way it can be just a news box

If you find this block of code (near line 124):
Code: Select all
echo "\n\n<h3>{$m['topic_title']}</h3>";
echo "\n<h4 class=\"postinfo\">".$user->format_date($m['topic_time'])." // <a href=\"".PHPBB_ROOT_PATH."viewtopic.php?f=".FORUM_ID."&t={$m['topic_id']}\">{$m['topic_replies']} {$comment}</a> // {$m['username']}</h4>";
echo "\n<p>{$message}</p>";
change it to just
Code: Select all
echo "\n<p>{$m['topic_title']}</p>";