Show recent topics on external PHP page

Started by Dewed, August 30, 2009, 04:41:44 PM

Previous topic - Next topic

Dewed

Hopefully this is the best place to post, and someone has a hint I can work with..

using SMF 1.1.10, installed in /forum directory..  I'd like to add a block to the site's homepage showing the 5 most recently posted to topics.. or event just latest posts, regardless of topic.

If code to do this exists, kindly point me to it, but even the MySQL query to get the info would help, I can code the rest myself.

Orstio

<?php

include ('/path/to/SSI.php');

ssi_recentTopics(5);

?>

Dewed

LOL.. I had no idea what that file was for.. SSI, server side include.. but of course.  Is there any more documention for it other than the included examples?  I'm trying to get the output to fit into a side nav bar on the main page and its just responding with way too much info.

I suppose I can just hack a copy of it to get what I want..

Orstio

You can also do this:

<?php

include ('/path/to/SSI.php');

$topics = ssi_recentTopics(5,null,'array');

?>

$topics will be an array of all the relevant data, so you can format it however you want in your own file.

JimM

Jim "JimM" Moore
Former Support Specialist

Advertisement: