SMF SSI.php Functions

Current Version: 2.1.4

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.

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

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
SMF Online Manual 0 5,632,805
Bosanski (Bosnian) 0 2,919,138
Hrvatski (Croatian) 0 2,895,478
Srpski (Serbian) 0 2,866,977
Bugtracker (Github) 0 2,823,184
SMF 1.1.x Support New 82,881 520,734
SMF 2.0.x Support New 49,898 374,788
Modifications and Packages New 2,766 346,425
Arşiv New 31,575 228,763
Español (Spanish) New 29,745 177,583

Top Topics

Shows top topics by the number of replies or views.

Code (show by number of views)

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

Result

Code (show by number of replies)

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

Result

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 AutonomousERP, 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

2,113 Guests, 4 Users (2 Hidden)
{••тєηηιѕєя••}, AmaSha
[]

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

2,113 Guests, 4 Users (2 Hidden)
{••тєηηιѕєя••}, AmaSha
[]

Login Function

Shows a login box only when user is not logged in.

Code

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

Result

 
 

Logout Function

Shows a logout link only when user is logged in.

Code

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

Result

Welcome Function

Greets users or guests, also shows user's messages if logged in.

Code

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

Result

Welcome to Simple Machines Community Forum. Please log in or sign up.

Today's Calendar Function

Code

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

Result

Today's Birthdays Function

Code

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

Result

Today's Holidays Function

Code

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

Result

Today's Events Function

Code

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

Result

Recent Calendar Events Function

Code

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

Result

Forum Stats

Shows some basic forum stats: total members, posts, topics, boards, etc.

Code

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

Result

Total Members: 453,898
Total Posts: 3,926,738
Total Topics: 465,540
Total Categories: 13
Total Boards: 222

News Function

Shows random forum news.

Code

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

Result

Wondering if this will always be free?  See why free is better.

Board News Function

Shows the latest posts from read only boards, or a specific board.

Code

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

Result

xx SMF 2.1.4 Released

June 10, 2023, 01:18:17 PM by shawnb61
Dear Members,

Simple Machines is pleased to announce a new patch for the 2.1.x line of SMF, which pushes the version number to 2.1.4.

Notable changes in SMF 2.1.4

  • Attachments Upload UI enhancements - The UI used for uploading attachments is now easier to use, and a tad more aesthetic also.
  • Cron enhancements - When running cron as a crontab in unix, it will now check for scheduled tasks and possibly flush the mail queue, in addition to acting on background tasks.
  • jQuery upgrade - jQuery upgraded to 3.6.3.
  • Notifications bug - Fixed a bug where certain notifications were not getting delivered if a user subscribed to both a board and a topic within the board.
  • Editor bug - Fixed a bug where the cursor position may behave erratically when mentions exist in WYSIWYG mode.
  • Search bug - Fixed a bug caused by some non-backwards compatible behavior in PHP 8.0+ that might result in incomplete results.
  • Subscriptions bug - Fixed a bug where subscriptions with multi-byte utf8 characters in the description might cause errors.
  • Subscriptions bug - Fixed an undefined constant CURLOPT_POSTFIELDSIZE bug.
  • Package Manager bug - Fixed a bug where invalid default value errors were generated.
  • Custom Fields Search bug - Fixed a bug which prevented custom field searches from working on the member list under some circumstances.
  • Autolinker bug - Fixed a bug where the autolinker might get a match on partial names.
  • Upgrader bug - Fixed a bug where certain notification settings were not brought forward properly from 2.0.
  • Hooks bugs - Fixed bugs where hooks might not be removed properly when mods were deleted, and also where duplicate hooks might be created upon mod reinstall.  Also, enabling & disabling of hooks in the admin console works cleanly now.
  • Fixed a bug where admin-only boards might be visible on the board index.
  • Fixed a bug where users might get kicked out with erroneous verification question errors.
  • Fixed a bug where membergroup adds may not get logged properly.
  • Fixed a bug where you may get cache errors in the logs.
  • Fixed a bug where long user agents might cause various errors in the SMF error log.
  • Fixed a bug where MariaDB users might see a "Subject isn't in GROUP BY" error when removing a topic.
  • Fixed a bug where the SSI Recent Topics call did not show the original topic title.
  • Numerous minor bug fixes, e.g., to address undefined vars.
  • Numerous tweaks to enhance the UI.

Please see the change list on GitHub for more information.

How to update to 2.1.4

If you are currently using version 2.1.3, you can perform the update using the Package Manager (Administration Center > Package Manager). There you should see a notification about 2.1.4, including a "update your forum" link. If you do not see this notification in the Package Manager, please run "Fetch Simple Machines files" from the Scheduled Tasks page (Administration Center > Maintenance > Scheduled Tasks), and then try again.

If you are currently using any version from 2.1.0 to 2.1.3, you can use the process described above to apply previous update patches successively until you reach version 2.1.4.

If you are currently using any older version of SMF (including SMF 1.x, SMF 2.0.x, or one of the SMF 2.1 Betas or RCs), you can upgrade directly to 2.1.4 from whichever version you are currently using by using the "Large Upgrade" package from the Download page. Be aware that using this upgrade method will require you to reinstall any customizations that you have added to your forum, so if you are running SMF 2.1.0 or higher, it is recommended that you apply the successive patches instead of using the Large Upgrade.

If you are having problems downloading the patch from the admin panel, you can download the patch package from the Package Manager Updates page and install it via the Package Manager, as you would any other mod package.

Please refer to the Online Manual for more details about patching and upgrading.


Finally, as always, please do not use this topic for support requests. You will receive a much quicker and better response by posting in the 2.1.x Support Board.

Thank you for using SMF!

Regards,
Simple Machines
39 comments | Write Comment

xx SMF 2.1.3 Released

November 21, 2022, 02:06:14 PM by shawnb61
Dear Members,

Simple Machines is pleased to announce a new patch for the 2.1.x line of SMF, which pushes the version number to 2.1.3.

Notable changes in SMF 2.1.3

  • Unicode support enhancements - SMF unicode support now matches the latest published standard, Unicode 15, published in Sept 2022 (https://unicode.org/versions/Unicode15.0.0/).  Staying current is important for proper capitalization across alphabets, and also with non-printable character detection.
  • Attachments enhancement - Honor SMF-specified attachment limitations.  SMF was restricting attachment uploads based on the underlying php configuration; however, given the .js approach used, this limitation did not apply.
  • Attachments enhancement - Automatically delete inserted img tags when the corresponding attachments are deleted.
  • Notification enhancement - Cleanup unread notifications after post approvals, after closing moderation reports, and after unlikes.
  • Notification enhancement - Cleanup unread orphan alerts, created by message or topic deletions or permission changes.
  • Notification enhancement - Cleanup unread quote and mention alerts if they were removed during a post edit.
  • Upgrader enhancements - Issue warnings if attachment or avatar directories are not found. Also, a new option was added to allow the user to rerun the attachment conversion.
  • Enhanced timezone support - SMF now supports all current timezones (https://www.iana.org/time-zones).
  • Attachments bug - Fixed a bug where attachments might disappear with a "Not a Valid Attachment ID" message.
  • Notification bug - Fixed a bug where the alert count displayed was incorrect.
  • Email bug - Fixed a bug where emails with a mail type of PHP did not work properly in PHP 8.x in linux environments. (SMTP was OK.)
  • Postgresql support - Fixed numerous issues causing mod installs to behave differently across Postgresql and MySQL.  It is much easier now to develop a mod that supports both.
  • Fixed a bug where PHP 8.1 was being persnickety and did not like implicit float to int conversions.
  • Fixed a bug where the sql_mode was not being properly set in MySQL 8.x.  This would result in slightly different DB query behavior across MySQL 5.x and MySQL 8.x.
  • Fixed a bug where explicitly "Not Following" a topic resulted in it showing up in your unread list, and not going away...
  • Improved support for spaces in URLs...  Not per any RFC or spec, but SMF supported them in 2.0, so that support should have been carried forward to 2.1...
  • Fixed a bug where errors appeared in the SMF error log when crawlers attempted to access now-moved avatars.  During the 2.1 migration, avatars and attachments may be relocated; external crawlers referencing defunct links should not generate SMF errors.
  • Fixed a bug in Postgresql syntax when deleting fulltext indexes.
  • Fixed a bug where "Trying to access array offset on value of type null" showed up in the log.
  • Fixed a bug where the editor would drop links if copied and pasted.
  • Fixed a bug where right-to-left languages could not be specified and displayed properly.
  • Fixed a bug where sorting PMs did not work properly.
  • Fixed a bug where the BBC url setting erroneously affected signature and topic behavior.
  • Fixed a bug where hidden members were hidden from admins, too...
  • Fixed a bug where the wrong icon was used for profile links in PMs.
  • Fixed a bug where robot_no_index might be set incorrectly, potentially affecting SEO.
  • Fixed a bug with CORS headers were not being built properly.
  • Fixed a bug where custom themes might load empty styles.
  • Fixed a bug where permissions were not properly retained when boards were moved.  Moved boards might disappear...
  • Fixed a bug with using wildcards in IP tracking.
  • Fixed multiple errors with caching - better reporting of the cache engine not loading, and better handling when not getting a hit on cached info.
  • Improved edits on profile info, e.g., website urls too long.
  • Fixed a bug where page numbers in lengthy lists might show decimals...
  • Improved the message when verification questions were missing.
  • Enhanced support for passwords for myBB converted users.
  • Fixed an upgrader bug where 1.1 migrations might fail with Too few arguments to function smf_mysql_insert_id().
  • Numerous minor enhancements and tweaks to layout.


Please see the change list on GitHub for more information.

How to update to 2.1.3

If you are currently using version 2.1.2 you can perform the update using the Package Manager (Administration Center > Package Manager). There you should see a notification about 2.1.3, including a "update your forum" link. If you do not see this notification in the Package Manager, please run "Fetch Simple Machines files" from the Scheduled Tasks page (Administration Center > Maintenance > Scheduled Tasks), and then try again.

If you are currently using version 2.1.0 - 2.1.1, you can use the process described above to apply previous update patches successively until you reach version 2.1.3.

If you are currently using any older version of SMF (including SMF 1.x, SMF 2.0.x, or one of the SMF 2.1 Betas or RCs), you can upgrade directly to 2.1.3 from whichever version you are currently using by using the "Large Upgrade" package from the Download page. Be aware that using this upgrade method will require you to reinstall any customizations that you have added to your forum, so if you are running SMF 2.1.0 or higher, it is recommended that you apply the successive patches instead of using the Large Upgrade.

If you are having problems downloading the patch from the admin panel, you can download the patch package from the Package Manager Updates page and install it via the Package Manager, as you would any other mod package.

Please refer to the Online Manual for more details about patching and upgrading.


Finally, as always, please do not use this topic for support requests. You will receive a much quicker and better response by posting in the 2.1.x Support Board.

Thank you for using SMF!

Regards,
Simple Machines
45 comments

xx SMF 2.1.2 Released

May 09, 2022, 12:33:55 PM by Sesquipedalian
Dear Members,

Simple Machines is pleased to announce a new patch for the 2.1.x line of SMF, which pushes the version number to 2.1.2.

We consider this patch to be of crucial importance, as it includes security updates.

Notable changes in SMF 2.1.2

  • Fixes errors when attempting to view the profile of a non-existent user.
  • Fixes minor issues with the editor toolbar when certain BBCodes are disabled.
  • Fixes a bug where the admin panel incorrectly showed the image proxy settings as editable when Settings.php was read-only.
  • Correctly formats the gender string in profile exports.
  • Correctly formats the custom profile field names and values in the Buddies list.
  • Fixes a minor bug when displaying size limits in the attachments restrictions information.
  • Large image thumbnails now display with the the correct aspect ratio when viewed on small devices.
  • Video attachments no longer overflow the window on small devices.
  • Fixes errors about undefined variables when switching between different cache accelerator options.
  • Fixes an error about invalid dates when a comma was used under certain circumstances while creating a calendar event.
  • Correctly handles uppercase non-ASCII characters in the answers to verification questions.
  • Fixes a bug that could allow a topic to be moved into a redirection board under certain circumstances.
  • Fixes a error that could be generated when sending notifications about guest posts.
  • Fixes a bug where certain pages could fail to load if the set_time_limit() function was disabled on PHP 8+.
  • Fixes a bug where attachments might not download correctly if the "Enable compressed output" setting was enabled on PHP 8.0.17+ and 8.1.4+.
  • Fixes some rare Unicode character handling issues.
  • Security improvements.


Please see the change list on GitHub for more information.

How to update to 2.1.2

If you are currently using version 2.1.1 you can perform the update using the Package Manager (Administration Center > Package Manager). There you should see a notification about 2.1.2, including a "update your forum" link. If you do not see this notification in the Package Manager, please run "Fetch Simple Machines files" from the Scheduled Tasks page (Administration Center > Maintenance > Scheduled Tasks), and then try again.

If you are currently using version 2.1.0, you can use the process described above to apply previous update patches successively until you reach version 2.1.2.

If you are currently using any older version of SMF (including SMF 1.x, SMF 2.0.x, or one of the SMF 2.1 Betas or RCs), you can upgrade directly to 2.1.2 from whichever version you are currently using by using the "Large Upgrade" package from the Download page. Be aware that using this upgrade method will require you to reinstall any customizations that you have added to your forum, so if you are running SMF 2.1.0 or higher, it is recommended that you apply the successive patches instead of using the Large Upgrade.

If you are having problems downloading the patch from the admin panel, you can download the patch package from the Package Manager Updates page and install it via the Package Manager, as you would any other mod package.

Please refer to the Online Manual for more details about patching and upgrading.


Finally, as always, please do not use this topic for support requests. You will receive a much quicker and better response by posting in the 2.1.x Support Board.

Thank you for using SMF!

Regards,
Simple Machines
45 comments

xx SMF 2.1.1 Released

February 11, 2022, 08:21:50 PM by Sesquipedalian
Dear Members,

Simple Machines has released our first patch to the 2.1.x line of SMF, bringing our latest release version to 2.1.1.

  • Restores support for PHP 7.0–7.2
  • Fixes a minor bug in the Package Manager

How to update to 2.1.1

If you are running version 2.1.0, you can update your forum to the latest version by using the package manager. You should see the update notification in the admin panel notifications and in the package manager, which will allow you to download and install the patch seamlessly.  If you do not see the notification about the patch, please run the scheduled task "Fetch Simple Machines files" from the Scheduled Tasks page (Admin > Maintenance > Scheduled Tasks).

For other install and upgrade options, please see below.


Since SMF 2.1.1 comes soon after SMF 2.1.0, which was released only a few days ago, we are including a copy the SMF 2.1.0 release announcement for your convenience:


Simple Machines is pleased to announce the official release of the long awaited SMF 2.1.

This release marks the transition of SMF 2.1 into the current stable release of SMF. This means that:

  • SMF 2.1 is now the recommended version for use on live production forums. We encourage everyone to start planning for an upgrade to SMF 2.1.
  • SMF 2.0 remains supported and will continue to receive security updates for the foreseeable future, but this release officially marks the end of further 2.0 development. We will release a separate announcement for any future changes to SMF 2.0's status.


Notable changes in 2.1

The changes between SMF 2.0.x and SMF 2.1 are too many to count, but here are a few highlights:

  • New features for users
    • A new WYSIWYG editor, SCEditor
    • Real-time alerts in addition to email notifications
    • A new default theme with full support for mobile devices
    • Draft messages (you can save & resume later)
    • Mentions using @name syntax
    • Drag & drop attachments
    • Attachments can be embedded directly into post text
  • New features for moderators and administrators
    • An improved Administrator Control Panel
    • Support for moderator groups, not just individuals
    • Many security enhancements, including support for optional Two Factor Authentication.
    • IPv6 support
    • Designed with GDPR support
  • New features for modification and theme authors
    • A massive expansion of the number of integration hooks available
    • More powerful BBCode possibilities
    • Background tasks
    • New capabilities in the Package SDK

You can learn more about the many new features and changes in SMF 2.1 here.


How to install a new SMF 2.1 forum

You can install SMF 2.1 using the "Full Install" package from the Download page.

Please refer to the Online Manual for more details about installing.


How to upgrade to SMF 2.1

You can upgrade to SMF 2.1 from any previous version using the "Large Upgrade" package from the Download page.

Be aware that upgrading to SMF 2.1 will remove any modifications you may have installed on your existing SMF forum, and that SMF 2.1 is incompatible with custom themes designed for earlier versions of SMF. You will need to install new versions of those modifications and/or themes after upgrading. Many modifications and themes have already been updated by their authors to support SMF 2.1, but you may wish to check the status of individual modifications or themes before proceeding.

Please refer to the Online Manual for more details about upgrading.


With this release we'd like to take the opportunity to recognize the effort and dedication of all the people who have volunteered their time to help the SMF project. We would like to thank everyone, past and present, who has contributed to the development of SMF over the past years.

Finally, as always, please do not use this topic for support requests. You will receive a much quicker and better response by asking for help in the SMF 2.1.x Support board.

Thank you for using SMF!

Regards,
Simple Machines
55 comments

xx SMF 2.1.0 Released

February 09, 2022, 12:42:51 PM by Sesquipedalian
Dear Members,

Simple Machines is pleased to announce the official release of the long awaited SMF 2.1.

This release marks the transition of SMF 2.1 into the current stable release of SMF. This means that:

  • SMF 2.1 is now the recommended version for use on live production forums. We encourage everyone to start planning for an upgrade to SMF 2.1.
  • SMF 2.0 remains supported and will continue to receive security updates for the foreseeable future, but this release officially marks the end of further 2.0 development. We will release a separate announcement for any future changes to SMF 2.0's status.


Notable changes in 2.1

The changes between SMF 2.0.x and SMF 2.1 are too many to count, but here are a few highlights:

  • New features for users
    • A new WYSIWYG editor, SCEditor
    • Real-time alerts in addition to email notifications
    • A new default theme with full support for mobile devices
    • Draft messages (you can save & resume later)
    • Mentions using @name syntax
    • Drag & drop attachments
    • Attachments can be embedded directly into post text
  • New features for moderators and administrators
    • An improved Administrator Control Panel
    • Support for moderator groups, not just individuals
    • Many security enhancements, including support for optional Two Factor Authentication
    • IPv6 support
    • Designed with GDPR support
  • New features for modification and theme authors
    • A massive expansion of the number of integration hooks available
    • More powerful BBCode possibilities
    • Background tasks
    • New capabilities in the Package SDK

You can learn more about the many new features and changes in SMF 2.1 here.


How to install a new SMF 2.1 forum

You can install SMF 2.1 using the "Full Install" package from the Download page.

Please refer to the Online Manual for more details about installing.


How to upgrade to SMF 2.1

You can upgrade to SMF 2.1 from any previous version using the "Large Upgrade" package from the Download page.

Be aware that upgrading to SMF 2.1 will remove any modifications you may have installed on your existing SMF forum, and that SMF 2.1 is incompatible with custom themes designed for earlier versions of SMF. You will need to install new versions of those modifications and/or themes after upgrading. Many modifications and themes have already been updated by their authors to support SMF 2.1, but you may wish to check the status of individual modifications or themes before proceeding.

Please refer to the Online Manual for more details about upgrading.


With this release we'd like to take the opportunity to recognize the effort and dedication of all the people who have volunteered their time to help the SMF project. We would like to thank everyone, past and present, who has contributed to the development of SMF over the past years.

Finally, as always, please do not use this topic for support requests. You will receive a much quicker and better response by asking for help in the SMF 2.1.x Support board.

Thank you for using SMF!

Regards,
Simple Machines
87 comments

Menubar Function

Displays a menu bar, like one displayed at the top of the forum.

Code

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

Result

Quick Search Function

Code

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

Result

Show Single Poll

Shows a poll in the specified topic.

Code

Code: [Select]
<?php ssi_showPoll($topicID); ?>

Result

Not shown because it needs specific topic ID that contains a poll.

Show Single Post

Fetches a post with a particular IDs. By default will only show if you have permission to the see the board in question. This can be overridden by passing the 2nd parameter as true.

Code

Code: [Select]
<?php ssi_fetchPosts($postIDs, $isOverride); ?>

Result

Not shown because it needs a specific post ID.

Show Single Member

Shows the specified member's name and profile link.

Code

Code: [Select]
<?php ssi_fetchMember($memberIDs); ?>

Result

Not shown because it needs a specific member ID.

Show Group Members

Shows all members in a specified group.

Code

Code: [Select]
<?php ssi_fetchGroupMembers($groupIDs); ?>

Result

Not shown because it needs specific membergroup IDs.

Home Page Sample

This sample uses the following features: ssi_recentTopics(), ssi_logOnline(), ssi_welcome(), and ssi_boardNews(). ssi_recentTopics() is fetched using the array method, to allow further customizations on the output.

Code

Code: Select
<?php require("SSI.php"); ?> <!DOCTYPE html> <html> <head> <title>SSI.php example for home page</title> <style> body { font-family: Arial, Tahoma, sans-serif; font-size: 80%; background: #DFDFDF; color: #FFFFFF; margin: 0 } ul,ol { padding-left: 19px; margin: 0; } li { font-size: 11px; } h1,h2,h3 { margin: 0; padding: 0; } h3 { font-size: 15px; } a:link,a:visited { color: #FF9000; text-decoration: none; } a:hover { text-decoration: underline; } #container { background: #52514E; width: 100%; border: 1px solid midnightblue; line-height: 150%; margin: 0; } #header,#footer { color: lightgray; background-color: #2A2825; clear: both; padding: .5em; } #leftbar { background: #DF7E00; float: left; width: 160px; margin: 0; padding: 1em; } #leftbar a { color: #000000; text-decoration: underline; } #content { margin-left: 190px; padding: 1em; } #navigation { float: right; } #navigation a:link,#navigation a:visited { color: #FF9000; } </style> </head> <body> <div id="container"> <div id="header"> <div id="navigation"> <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> | <a href="#">Link</a> </div> <h1 class="header">YourWebsite.com</h1> </div> <div id="leftbar"> <h3>Recent Forum Topics</h3> <ul> <?php // Using array method to show shorter display style. $topics = ssi_recentTopics(8, null, null, 'array'); foreach ($topics as $topic) { // Uncomment the following code to get a listing of array elements that SMF provides for this function. // echo '<pre>', print_r($topic), '</pre>'; echo ' <li><a href=\"', $topic['href'], '\">', $topic['subject'], '</a> ', $txt['by'], ' ', $topics[$i]['poster']['link'], '</li>'; } unset($topics); ?> </ul><br> <h3>Online Users</h3> <?php ssi_logOnline(); ?> </div> <div id="content"> <?php ssi_welcome(); ?><br><br> <h2>News</h2> <?php ssi_boardNews(); ?> </div> <div id="footer"> <a target="_blank" rel="noopener" rel="license" href="https://creativecommons.org/licenses/publicdomain/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/publicdomain/88x31.png"></a> This sample website layout is dedicated to the <a target="_blank" rel="noopener" rel="license" href="https://creativecommons.org/licenses/publicdomain/">Public Domain</a>. </div> </div> </body> </html>

Result