Duskybby Posted February 20, 2012 Share Posted February 20, 2012 I'm trying to integrate my website with my Invision Power Board forum. I'm trying to have the posts from the news & updates section to be placed also on the home page automatically. This is the design for that portion of my homepage (sorry if the text offends you). I was able to make the posts display, but I can't figure out how to make it only display from a specific forum. I only want the first post of each topic from the News and Updates section of my forum to display here, but it's currently displaying them all. This is what I have for the page so far. <?php include ("includes/global.php"); mysql_select_db("kingdom"); $news = mysql_query("SELECT * FROM ipb_topics ORDER BY start_date DESC"); while ($news_row = mysql_fetch_assoc($news)) { //get data $topic_id = $news_row['tid']; $forum_id = $news_row['forum_id']; $starter_id = $news_row['starter_id']; //get topic name $topic_name = mysql_query("SELECT title FROM ipb_topics WHERE tid='$topic_id'"); $topic_name = mysql_fetch_assoc($topic_name); $topic_name = $topic_name['title']; //get user name $username = mysql_query("SELECT name FROM ipb_members WHERE member_id=$starter_id"); $username = mysql_fetch_assoc($username); $username = $username['name']; //get post info $post = mysql_query("SELECT post FROM ipb_posts WHERE topic_id=$topic_id"); $post = mysql_fetch_assoc($post); $post = $post['post']; echo "<h1>$topic_name</h1> $post<br /><br /> posted by $username<br /><br />"; } ?>[code] Any help will do. Please. Quote Link to comment https://forums.phpfreaks.com/topic/257417-integrating-posts-from-ipb-forum-with-website/ Share on other sites More sharing options...
Duskybby Posted February 22, 2012 Author Share Posted February 22, 2012 Bump. Quote Link to comment https://forums.phpfreaks.com/topic/257417-integrating-posts-from-ipb-forum-with-website/#findComment-1319792 Share on other sites More sharing options...
ManiacDan Posted February 22, 2012 Share Posted February 22, 2012 Please don't bump your threads or report a moderate as an abusive member. Your thread is in the correct section and if someone is interested in replying they will. Quote Link to comment https://forums.phpfreaks.com/topic/257417-integrating-posts-from-ipb-forum-with-website/#findComment-1320003 Share on other sites More sharing options...
floridaflatlander Posted February 22, 2012 Share Posted February 22, 2012 With smf you can use the ssi functions, IPB has got to use something like that, have you posted this topic on their forum? Quote Link to comment https://forums.phpfreaks.com/topic/257417-integrating-posts-from-ipb-forum-with-website/#findComment-1320046 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.