SMF SSI.php Functions

Current Version: 2.0

This file is used to demonstrate the capabilities of SSI.php using PHP include functions. The examples show the include tag, then the results of it.

Include Code

To use SSI.php in your page add at the very top of your page before the <html> tag on line 1 of your php file:

Code: [Select]
<?php require("SSI.php"); ?>

Some notes on usage

All the functions have an output method parameter. This can either be "echo" (the default) or "array"

If it is "echo", the function will act normally - otherwise, it will return an array containing information about the requested task. For example, it might return a list of topics for ssi_recentTopics.

This functionality can be used to allow you to present the information in any way you wish.

Additional Guides & FAQ

Need more information on using SSI.php? Check out Using SSI.php article or the SSI FAQ.

Recent Topics Function

Code (simple mode)

Code: [Select]
<?php ssi_recentTopics(); ?>

Code (advanced mode)

Code: [Select]
<?php ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo'); ?>

Result

Recent Posts Function

Code

Code: [Select]
<?php ssi_recentPosts(); ?>

Result

[Introductions] seo by seooo June 11, 2026, 08:13:39 pm
[Introductions] Kissimmee Bed Bug Treatment Solutions: Restoring Comfort and Peace of Mind by vadixos596 June 11, 2026, 11:47:22 am
[Introductions] Girls In Your Town - Anonymous Casual Dating - No Selfie by johnmullerab June 11, 2026, 07:32:49 am
[Impression] fast indexing of linksoul by ThomasWhaps June 10, 2026, 03:41:57 pm
[Introductions] seo by seooo June 10, 2026, 02:50:14 pm
[Introductions] seo by seooo June 10, 2026, 02:42:21 pm
[Introductions] SpeedyIndex google by ThomasWhaps June 10, 2026, 05:19:20 am
[Introductions] seo by seooo June 05, 2026, 03:24:35 pm

Recent Poll Function

Code

Code: [Select]
<?php ssi_recentPoll(); ?>

Result

Top Boards Function

Shows top boards by the number of posts.

Code

Code: [Select]
<?php ssi_topBoards(); ?>

Result

Board Topics Posts
Chit-Chat New 279 159843
Forum Games New 40 74961
Sciences New 302 15414
Sciences New 735 13298
Funnies New 126 10704
Queries New 799 8708
Debates New 243 8453
Reference Material New 509 6782
Math New 434 6746
Queries New 403 6195

Top Topics

Shows top topics by the number of replies or views.

Code (show by number of views)

Code: [Select]
<?php ssi_topTopicsViews(); ?>

Result

Views Replies
Studentforums Family! 1999999 26146
Pakistanis Hea!! 1595751 27855
what is ur mood right now?? 1450871 12726
You're Banned (Game) 1006025 10415
Weekly POLL..XD! 954666 5562
Randomness xD 947322 7232
The Ultimate Tug of War 899604 13784
JOKES AND Riddles!! 877349 5485
Describe the person above you in ONE word/sentence. 852782 7039
Have You Ever...? 648435 7372

Code (show by number of replies)

Code: [Select]
<?php ssi_topTopicsReplies(); ?>

Result

Views Replies
Pakistanis Hea!! 1595751 27855
Studentforums Family! 1999999 26146
The Ultimate Tug of War 899604 13784
what is ur mood right now?? 1450871 12726
You're Banned (Game) 1006025 10415
Have You Ever...? 648435 7372
Randomness xD 947322 7232
Describe the person above you in ONE word/sentence. 852782 7039
Weekly POLL..XD! 954666 5562
JOKES AND Riddles!! 877349 5485

Top Poll Function

Shows the most-voted-in poll.

Code

Code: [Select]
<?php ssi_topPoll(); ?>

Result

Top Poster Function

Shows the top poster's name and profile link.

Code

Code: [Select]
<?php ssi_topPoster(); ?>

Result

Latest Member Function

Shows the latest member's name and profile link.

Code

Code: [Select]
<?php ssi_latestMember(); ?>

Result

Please welcome vadixos596, our newest member.

Member of the Day

Shows one random member of the day. This changes once a day.

Code

Code: [Select]
<?php ssi_randomMember('day'); ?>

Result

Who's Online Function

This function shows who are online inside the forum.

Code

Code: [Select]
<?php ssi_whosOnline(); ?>

Result

75 Guests, 0 Users

Log Online Presence

This function logs the SSI page's visitor, then shows the Who's Online list. In other words, this function shows who are online inside and outside the forum.

Code

Code: [Select]
<?php ssi_logOnline(); ?>

Result

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.