Author Topic: Using SMF's SSI, Part 1  (Read 1529 times)

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Using SMF's SSI, Part 1
« on: August 31, 2006, 06:39:10 AM »
My favourite forum software is... SMF! Why? Because it's free and I just have a better experience using it rather than PHPBB.

The other reason? Because it has a special feature: SSI! (Server-Side Include)


What does SMF's SSI do?

You can Include it on your main site, and get all kinds of information from your forum to have it displayed right from your site! No need for portal software, no need for custom database connection and coding! But I'll talk more about its functions later.


How can I get SMF's SSI?

SSI.PHP is already included in your default SMF forum software package! When you have installed your forum correctly, and got a few posts and members, you can use yoursite.com/forum_directory/SSI.php. There is your SSI.php page! That page includes many functions with which you can do all kinds of crazy stuff on your site! You could just about integrate SMF into your site!


Enough about it, how do I use it?

It's very simple... Here are two links for you to explore:
yoursite.com/forum_directory/ssi_examples.php
yoursite.com/forum_directory/news_readme.html

The first link will show you all the various functions you can use simply by using the require function in PHP, and calling up some simple functions.

The second link shows how you can include news from your forum straight into your site, and you can even change the options of which board to get the news from, how many characters to limit it, how many articles to show, and to start from which article!


If everything's in those pages, why is this article only part 1?

Well, not everything is in those pages! There is a lot more to SSI.php! The code you get from ssi_examples.php is only the default examples... What if you wanted to change the details, to change the links, to change the text? What if you wanted to change the amount of posts retrieved, or the amount of information posted? And that's exactly why I am writing this! Using PHP and a good knowledge of SMF's SSI.php system, you can change just about everything! You could get the latest topics and show a preview, you could show news articles from last week, you could manipulate the information retrieved and use it to snazz up your site!


Wait for the second part of my articles, where I'll show you exactly how to use some of the functions and the basics of manipulating the information! In the meantime, you could take a look at the source of SSI.php and try to understand it a bit ;)


If you don't have your own SMF forum installed and can't access the above URLs, you can use mine:
http://forum.zegghq.com/ssi_examples.php
http://forum.zegghq.com/news_readme.html

Here's some examples of how I used it for some simple addons on my site:
http://www.zegghq.com/ (Look on the lower right-hand side where it shows the latest topics)
http://www.zegghq.com/index.php?cmd=news (An extract of the latest news and announcements from the forums)

Offline Sava

  • Level 13
  • *
  • Posts: 101
  • Reputation: +3/-15
  • It's just me
    • View Profile
Re: Using SMF's SSI, Part 1
« Reply #1 on: September 28, 2006, 04:09:14 PM »
I also love SmF forums because they are really easy to use and also easy to modify or create templates.
Good choice and thank you for this article. Didn't know the SSI stuff :D

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal