Customizing SMF > SMF Coding Discussion
SSI help
caal0403:
Hi there i am trying to show my latest posts on my website.
I tried putting
--- Code: ---<?php require("/home/mysite/public_html/core/modules/forum/SSI.php"); ?>
--- End code ---
at the top of my page but when i goto my website now it redirects to my forum
Ricky.:
Hope you are calling it with right path, addition to call / include SSI.php , you also need to add following:
--- Code: ---<?php ssi_recentTopics(); ?>
--- End code ---
It will show your recent topics.
More example you can see here :
http://www.simplemachines.org/community/ssi_examples.php
caal0403:
sorry for posting in wrong place :-[
Thanks for the reply. I am sorry I only have basic knowledge of this
so i need to put at the top of my page before the HTML tag
--- Code: ---<?php require("/home/mysite/public_html/core/modules/forum/SSI.php"); ?>
--- End code ---
--- Code: ---<?php ssi_recentTopics(); ?>
--- End code ---
I tried this and it still went to my forum
Kays:
Hi, and welcome to SMF. :)
What sort of a page is your site? .php or .html? Gotta link to you site. (post it inside code tags since you've got less than 10 post)
Normally, if you just include SSI.php, nothing should happen. If it's added to an empty page that's all you'll see, nothing. So what else is on that page which could cause this?
--- Quote ---so i need to put at the top of my page before the HTML tag
--- End quote ---
The code to include SSI.php should be at the beginning of the page. The code for ssi_recentTopics() should go after the <body> tag.
caal0403:
hi my site is
--- Code: ---www.caalair.com
--- End code ---
Thanks for the reply
Navigation
[0] Message Index
[#] Next page
Go to full version