BoltZ Posted November 22, 2008 Share Posted November 22, 2008 hey I am not usually in this php forum, I am usually around html/css but a task arose and I figure since this forum uses smf it would be a perfect place to ask. Not saying you are all smf experts though. My question is how do I display the latest posts for smf in a page thats not a forum page. Like On my index page I want to display the latest posts on the forum. Help anyone? Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/ Share on other sites More sharing options...
genericnumber1 Posted November 22, 2008 Share Posted November 22, 2008 I'm sure scripts out there exist that do just what you describe, but it would also be fairly trivial to write if you do not want a lot of fancy features. It's just an issue of selecting from the posts ordered descending and limit however many you want. (I don't know anything about SMF so I'm just speculating, but I couldn't see it being any more difficult than this.) Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-695932 Share on other sites More sharing options...
BoltZ Posted November 22, 2008 Author Share Posted November 22, 2008 The problem is those scripts write it directly into the page of the forum. I want it to display on a non forum section of the site. I don't know the mysql code for displaying the last 5 posts of table posts or whatever in chronological order. :/ Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-695936 Share on other sites More sharing options...
achaikos Posted November 22, 2008 Share Posted November 22, 2008 For recent posts, do something along the lines of: <?php require("yourdomain/yourforum/ssi.php") ssi_recentposts; ?> Go into your SMF folder and look for a file called ssi_examples.shtml to see some examples of what SSI can do. Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-695942 Share on other sites More sharing options...
BoltZ Posted November 22, 2008 Author Share Posted November 22, 2008 Ah thank you sir. A promising young lad I can tell you will be. Thanks alot. I'll post back if I get stuck ^^ Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-695948 Share on other sites More sharing options...
achaikos Posted November 22, 2008 Share Posted November 22, 2008 For recent posts, do something along the lines of: <?php require("yourdomain/yourforum/ssi.php") ssi_recentposts(); ?> Go into your SMF folder and look for a file called ssi_examples.shtml to see some examples of what SSI can do. I missed the brackets off the end of ssi_recentposts(); Hope it works for you. Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-695950 Share on other sites More sharing options...
BoltZ Posted November 22, 2008 Author Share Posted November 22, 2008 What bracket. you forgot a ; but anyway after some error debugging I got it to work. Thanks man Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-695956 Share on other sites More sharing options...
dmsameeram Posted November 5, 2011 Share Posted November 5, 2011 What bracket. you forgot a ; but anyway after some error debugging I got it to work. Thanks man hay How did u got it done. can you post the correct code for this, Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-1285194 Share on other sites More sharing options...
Pikachu2000 Posted November 5, 2011 Share Posted November 5, 2011 What bracket. you forgot a ; but anyway after some error debugging I got it to work. Thanks man hay How did u got it done. can you post the correct code for this, Perhaps you didn't notice, but this thread is 3 years old. You should probably start a new thread with your question. Link to comment https://forums.phpfreaks.com/topic/133729-display-smf-latest-posts/#findComment-1285239 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.