- b2evolution CMS Support Forums
- b2evolution Support
- General Support
- Recent posts from phpbb3 to sidebar of B2E - I did it!!!
1 onmillertime Feb 10, 2010 20:46
My b2evolution Version: Not Entered
I think after 6 months of trying I have figured out how to do this. I am REALLY hoping someone will help me the last few steps. I have it working but it isn't pulling the most recent and I can't figure out why. It is pulling some but not the most recent posts.
This is a modified version of some code I found and it seems to work, just needs to be tweaked!
Also I have no idea how to make this pretty, it is all italicized? Any clue how to change that?
Sorry not a php coder...surprised I got this to work!
Here's the code
<?php
require_once("connect.php");
$number=0;
$forumQ=mysql_query("SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_time, t.topic_first_poster_name, f.forum_name
FROM (phpbb_topics t)
LEFT JOIN phpbb_forums f ON (t.forum_id = f.forum_id)
WHERE t.topic_approved=1
ORDER BY topic_last_post_time
LIMIT 5");
while($forumRow = mysql_fetch_row($forumQ)){
$number++;
$forumRow[3]=date('D M d, Y g:i a', $forumRow[3]);
echo $number."<a href=forum/viewtopic.php?f=".$forumRow[1]."&t=".$forumRow[0].">".$forumRow[2]."</a> posted in ".$forumRow[5]." by ".$forumRow[4]." on ".$forumRow[3]."<br>";
}
?>
Any help would be greatly appreciated!
this script worked for me :
¥