Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: 2pac on September 05, 2007, 09:35:48 PM

Title: displaying most recent topics from 1 forum on your frontpage?
Post by: 2pac on September 05, 2007, 09:35:48 PM
hi! im currently designing a website and i have a frontpage and a message board and so on

anyway i was wondering if anyone knows what i can do to display the latest topics on a html table in my front page

my website is

http://www.ninerskickass.com (http://www.ninerskickass.com)

if yo wanna take a look

anyway, i want to display the three latest topics posted in, in the little table on the top right corner of my front page

i am very illiterate when it comes to coding, so if any one could please help me i would be very appreciative

thank you!
Title: Re: displaying most recent topics from 1 forum on your frontpage?
Post by: JayBachatero on September 05, 2007, 10:35:37 PM
http://docs.simplemachines.org/index.php?topic=400.msg529#msg529
Title: Re: displaying most recent topics from 1 forum on your frontpage?
Post by: 2pac on September 05, 2007, 11:58:00 PM
cool thanks, but i got 1 problem, my webpage file is index.html

i guess it has to be .php or .shtml


how would i go about changing that? and would i just be able to copy  and paste the rest of the code? or would i have to start all over?
Title: Re: displaying most recent topics from 1 forum on your frontpage?
Post by: JayBachatero on September 06, 2007, 12:11:41 AM
You can just rename the .html to .php and it will work like normal.  Just that you have to call SSI.php inside php tags.

<?php
require_once('/path/to/SSI.php');
?>

<html>
    <head>
        <title>Title</title>
    </head>
    <body>
        <?php ssi_recentTopics(); ?>
    </body>
</html>
Title: Re: displaying most recent topics from 1 forum on your frontpage?
Post by: 2pac on September 06, 2007, 01:04:57 AM
cool i got it to work!!!

*sigh*

i still have one more question though...

how can i display stuff from just one forum? instead of all forums