flyalaska Posted October 23, 2013 Report Posted October 23, 2013 Does anyone use SMF 2 and is the SSI to show latest post on your frontpage_,main.php? I had a code that worked years ago, that doesn't work anymore. I am downgrading from IPB. Now I remember why I left SMF...lol I can't seem to get it too work. As shown in the SSI example I have this code on the top of the <html> <?php require("/home/flyakaco/public_html/forums/SSI.php"); ?> and have this to display the latest post, on my frontpage_main.php <?php ssi_recentPosts(); ?> I get an error and my site is all whacked. Fatal error: Call to undefined function ssi_recentPosts() in /home/flyakaco/public_html/lib/skins/flyalaska_1.0/frontpage_main.php on line 263 10 Quote
Moderators joeri Posted October 23, 2013 Moderators Report Posted October 23, 2013 will olook at it when bck home from work 1 Quote
Sava Posted October 23, 2013 Report Posted October 23, 2013 You are calling a function that does not exist anymore. Maybe they changed the name in the mean time? Quote
Moderators joeri Posted October 24, 2013 Moderators Report Posted October 24, 2013 i call them like this in the layout tpl <!-- forum area --> <?php require_once('smforum/SSI.php'); // only if not already loaded $data = ssi_recentTopics($num_recent = 3, $exclude_boards = null, $include_boards = null, $output_method = 'array'); echo '<table border="0px" bordercolor="#FF960E">'; echo '<tr><td colspan="3"><center><h4>Recent Forum Posts</h4><hr height="0.001em" color="#d4d4d4"></center></td></tr>'; foreach($data as $post) {echo '<tr><td>'.$post['link'] . ' </td><td> ' . $post['preview'] . ' </td><td> ' . $post['poster']['link'] . '</td></tr>';} echo '</table>'; ?> <!-- end forum area --> 1 Quote
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.