flyalaska Posted April 12, 2011 Report Share Posted April 12, 2011 Is anyone else using IPBoard, like the one here. I am having trouble with the latest post on my main site. Their SSI is really bad. The other option is to use their IP Content module. I don't want to spend another $50, for IP COntent. Doeas someone have a script to show the latest post from my board to display on my main page? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 13, 2011 Administrators Report Share Posted April 13, 2011 What I do is this, read the RSS feed of the forum: http://forum.phpvms....ype=forums&id=1 Replace that with your URL, and the id=1 is the id of the forum. Then the code (you can see in the dashboard), I use in phpVMS is: $file = new CodonWebService(); $contents = $file->get("YOUR URL HERE"); $feed = simplexml_load_string($contents); $contents = ''; $i = 1; $count = 5; // Show the last 5 foreach ($feed->channel->item as $news) { $news_content = (string )$news->description; $date_posted = str_replace('-0400', '', (string )$news->pubDate); // YOU CAN CUSTOMIZE THIS $contents .= "<div class=\"newsitem\"> <b>{$news->title}</b> <br />{$news_content} <br /><br /> Posted: {$date_posted} </div>"; if ($i++ == $count) break; } } // ECHO THE HTML echo $contents; I elected to go that route because the databases are different, I don't want to open another connection. You can also cache this, which I'm going to add the code to do right now in the next beta Quote Link to comment Share on other sites More sharing options...
flyalaska Posted April 13, 2011 Author Report Share Posted April 13, 2011 Thank you! Quote Link to comment Share on other sites More sharing options...
Pipat4 Posted August 3, 2011 Report Share Posted August 3, 2011 The knowledge to do it. Quote Link to comment Share on other sites More sharing options...
flyalaska Posted August 11, 2011 Author Report Share Posted August 11, 2011 Got it working, with the IP Content Module. Quote Link to comment 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.