SMF SSI.php Functions
Current Version: 2.1.2
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:
<?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)
<?php ssi_recentTopics(); ?>
Code (advanced mode)
<?php ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo'); ?>
Result
[Modifications and Packages] | Re: Stop Spammer by Steve | Today at 07:31:28 AM |
[Theme Previews] | Re: [Preview] Smf 2.1 Steyle V3 Beta by webtiryaki | Today at 04:49:34 AM |
[Theme Site Themes] | Re: NameX by jsx | Today at 04:47:02 AM |
[Modifications and Packages] | Re: Happy Birthday by Rick53 | Today at 03:37:05 AM |
[SMF Coding Discussion] | Re: mergeSMF.php - Script to merge two SMF forums, v2.0.17 by GL700Wing | Today at 02:23:48 AM |
[Graphics and Templates] | Re: quick question about where the type in the banner is kept by gaswigg | Today at 01:00:20 AM |
[Español (Spanish)] | Re: Error 404 al descargar un adjunto con usuario sin permisos by -Rock Lee- | Yesterday at 10:48:02 PM |
[SMF 2.1.x Support] | Re: Cannot find the option to backup database in SMF 2.1.2 by Sir Osis of Liver | Yesterday at 09:38:57 PM |
Recent Posts Function
Code
<?php ssi_recentPosts(); ?>
Result
[Modifications and Packages] | Re: Stop Spammer by Steve | Today at 07:31:28 AM |
[Theme Previews] | Re: [Preview] Smf 2.1 Steyle V3 Beta by webtiryaki | Today at 04:49:34 AM |
[Theme Site Themes] | Re: NameX by jsx | Today at 04:47:02 AM |
[Modifications and Packages] | Re: Happy Birthday by Rick53 | Today at 03:37:05 AM |
[SMF Coding Discussion] | Re: mergeSMF.php - Script to merge two SMF forums, v2.0.17 by GL700Wing | Today at 02:23:48 AM |
[Graphics and Templates] | Re: quick question about where the type in the banner is kept by gaswigg | Today at 01:00:20 AM |
[Español (Spanish)] | Re: Error 404 al descargar un adjunto con usuario sin permisos by -Rock Lee- | Yesterday at 10:48:02 PM |
[SMF 2.1.x Support] | Re: Cannot find the option to backup database in SMF 2.1.2 by Sir Osis of Liver | Yesterday at 09:38:57 PM |
Top Boards Function
Shows top boards by the number of posts.
Code
<?php ssi_topBoards(); ?>
Result
Board | Topics | Posts |
---|---|---|
SMF Online Manual | 0 | 5,570,944 |
Bosanski (Bosnian) | 0 | 2,874,406 |
Hrvatski (Croatian) | 0 | 2,855,953 |
Srpski (Serbian) | 0 | 2,800,922 |
Bugtracker (Github) | 0 | 2,781,828 |
SMF 1.1.x Support New | 82,868 | 520,573 |
SMF 2.0.x Support New | 49,490 | 371,257 |
Modifications and Packages New | 2,729 | 341,824 |
Arşiv New | 31,575 | 228,763 |
Español (Spanish) New | 29,647 | 177,023 |
Top Topics
Shows top topics by the number of replies or views.
Code (show by number of views)
<?php ssi_topTopicsViews(); ?>
Result
Views | Replies | |
---|---|---|
Simple Machines Forum Conference Survey | 3,719,103 | 52 |
PHP security warning | 3,664,935 | 21 |
SMF 1.0 Beta 1 Released! | 2,984,583 | 152 |
SMF 2.0.3, 1.1.17 and 1.0.23 security patches released | 2,919,329 | 181 |
End of life of SMF 1.0 | 2,876,012 | 59 |
SMF Big Boards | 2,799,403 | 45 |
General support topic for Aeva Media (Latest release: July 28, 2010) | 2,676,277 | 7,172 |
SMF 2.0.1 and 1.1.15 critical security patches released | 2,532,890 | 175 |
Server maintenance | 2,492,727 | 50 |
SMF's ban policy and how to "appeal" it. | 2,435,367 | 8 |
Code (show by number of replies)
<?php ssi_topTopicsReplies(); ?>
Result
Views | Replies | |
---|---|---|
AjaxChat Integration (latest version 3.2.1) | 2,330,587 | 9,111 |
Pretty URLs | 2,372,788 | 8,217 |
Ad Management mod | 1,971,413 | 8,025 |
General support topic for Aeva Media (Latest release: July 28, 2010) | 2,676,277 | 7,172 |
Off Topic - Svaštara | 1,394,000 | 6,614 |
nneonneo's Shoutbox | 2,384,638 | 6,118 |
SimplePortal | 1,595,767 | 5,666 |
SMF Media Gallery (SMG) - 2.0.5 is out! (December 2) | 1,303,818 | 5,532 |
SMF Arcade | 1,729,832 | 5,231 |
Aeva 6.9.99 and earlier (old) | 249,442 | 5,030 |
Top Poster Function
Shows the top poster's name and profile link.Code
<?php ssi_topPoster(); ?>
Result
Latest Member Function
Shows the latest member's name and profile link.
Code
<?php ssi_latestMember(); ?>
Result
Member of the Day
Shows one random member of the day. This changes once a day.
Code
<?php ssi_randomMember('day'); ?>
Result
Who's Online Function
This function shows who are online inside the forum.
Code
<?php ssi_whosOnline(); ?>
Result
ForumSever, leffa, marcio maxy, @rjen, mickjav, Steve, JessyKa, prnewswire
[Support Specialist]
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
<?php ssi_logOnline(); ?>
Result
ForumSever, leffa, marcio maxy, @rjen, mickjav, Steve, JessyKa, prnewswire
[Support Specialist]
Login Function
Shows a login box only when user is not logged in.
Code
<?php ssi_login(); ?>
Result
Logout Function
Shows a logout link only when user is logged in.
Code
<?php ssi_logout(); ?>
Result
Welcome Function
Greets users or guests, also shows user's messages if logged in.
Code
<?php ssi_welcome(); ?>
Result
Today's Calendar Function
Code
<?php ssi_todaysCalendar(); ?>
Result
Today's Birthdays Function
Code
<?php ssi_todaysBirthdays(); ?>
Result
Today's Holidays Function
Code
<?php ssi_todaysHolidays(); ?>
Result
Today's Events Function
Code
<?php ssi_todaysEvents(); ?>
Result
Forum Stats
Shows some basic forum stats: total members, posts, topics, boards, etc.
Code
<?php ssi_boardStats(); ?>
Result
Total Posts: 3,888,610
Total Topics: 461,908
Total Categories: 13
Total Boards: 224
News Function
Shows random forum news.
Code
<?php ssi_news(); ?>
Result
Board News Function
Shows the latest posts from read only boards, or a specific board.
Code
<?php ssi_boardNews(); ?>
Result
SMF 2.1.2 Released
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
- 25 people like this.
SMF 2.1.1 Released
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
- 23 people like this.
SMF 2.1.0 Released
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
- 60 people like this.
SMF 2.0.19 Released
Simple Machines is pleased to announce a new patch for the 2.0.x line of SMF, which pushes the version number to 2.0.19.
Notable changes in 2.0.19
- Ensures compatibility with PHP 8.1 MySQLi error mode.
- Fixes a bug where members could not download their basic profile data if RSS feeds were disabled.
- Fixes a bug where double encoded entities could appear in RSS feeds and SSI functions
- Fixes bugs related to birthdates in member profiles.
- Improves protection against race conditions when saving Settings.php
- Avoids an issue with certain versions of Chrome and Edge where viewing one page of a multi-page topic could cause unread posts on the next page to be incorrectly marked as read.
- Security improvements.
Please see the changelog for more information.
How to update to 2.0.19
If you are currently using version 2.0.18 you can perform the update using the Package Manager (Administration Center > Package Manager). There you should see a notification about 2.0.19, including a "click here to install" 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 earlier version of the 2.0.x line, you can use the process described above to apply previous update patches successively until you reach version 2.0.19.
If you are currently using an older version of SMF, you can upgrade directly to 2.0.19 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 a version of the 2.0.x series, 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.0.x Support Board.
Thank you for using SMF!
Regards,
Simple Machines
- 29 people like this.
SMF 2.1 RC4 Released
Major changes:
- Raises minimum PHP version to 5.6
- Updates SCEditor to version 3 and fixes multiple editor bugs
- Improves numerous database queries
- Makes numerous improvements to theme templates and CSS
- Makes numerous corrections and improvements to language strings and documentation
- Allows CORS requests in SMF
User-facing changes:
- Uses "Forever" as the default time option when logging in
- Moves logout button to profile menu (with fallback for non-JS users)
- Sends HTTP error code 403 (Forbidden) when a banned user tries to log in
- Handles TFA enable/disable menu items consistently in profile menu
- Redirects user back to previous URL after changing language
- Prevents bogus mention notifications
- Fixes various issues with setting user notification preferences
- Adds functionality to remove old alerts after they have been read
- Avoids showing an alert counter with a value of zero
- Improves the UI for attachment uploads
- Improves the templates and UI logic for the PM system
- Fixes an issue with pagination while viewing PM drafts
- Improves handling of time zones
- Uses correct time zone when suggesting default times for a new event
- Fixes issues involving max width of images on different screens
- Fixes issues with attachment images when printing a topic
- Always uses correct rotation for attachment thumbnails
- Fixes several errors while uploading attachments
- Fixes a permissions issue that never allowed guests to upload images
- Uses lazy loading for external avatars, BBC images, iframes, etc.
- Improves BBC parsing in board descriptions
- Keeps order of poll choices consistent across time
- Neutralizes evil control characters in preparsecode()
- Renders quotes with nested url tags correctly
- Fixes an error when attempting to preview a poll
- Allows the time picker script to be translated
- Respects drafts_autosave_enabled user setting
- Removes obsolete spellcheck feature
Admin and back-end changes:
- Fixes issues with reordering custom profile fields
- Improves email notifications regarding registration approval
- Fixes an issue where notifications about reported members used "(N/A)" instead of the member's name
- Improves UI to display the error log
- Improves package manager UI
- Improves the smiley editor
- Fixes issues regarding time zones in admin member search
- Allows the email field to be disabled for guests
- Hides random news line from guests who cannot browse the forum
- Confirms logouts and redirects when necessary (improves interactions with external integrations)
- Implements new, more robust version of updateSettingsFile()
- Retires old entries in log_packages table when a package is upgraded
- Fixes issue logging changes to custom fields when nothing actually changed
- Prunes log_topics, log_boards & log_mark_boards_read during maintenance
- Fixes an issue with logging moderation actions
- Fixes errors when an external avatar URL was too long
- Fixes "Out of range value for column page_hits" error
- Fixes issues regarding $user_info in background tasks
- Shows correct file names in integration hooks list
- Adds support for more password hashing schemes for converters
- Fixes a session write fail issue
- Fixes issues when merging topics
- Ensures $modSettings['board_manager_groups'] is always defined
- Ensures trackStats() & AddMailQueue() exist before calling them in obExit()
- Improves get_proxied_url() and general proxy handling
- Supports Cloudflare in auto-detection of Reverse Proxy IP headers
- Avoids a database error on MariaDB during profile export
- Fixes an undefined index error when board has grandchild boards
- Fixes autoloading for cache classes
- Fixes an issue where membergroups were not displayed via SSI Who's Online
- Removes Afrinic.net WHOIS link, since they no longer support it
- Adds link to the Read Logs settings from the Scheduled Tasks settings
- Improves handling of 4-byte UTF-8 in script.js
Installer and upgrader changes:
- Fixes issues installing SMF on PHP 8.0
- Fixes typos affecting the installer
- Fixes upgrader freezes
- Fixes handling of legacy attachments during upgrade
- Fixes undefined PHP function error during upgrade
- Includes karma data in database backup during upgrade
- Create record for all watched topics and boards during upgrade
- Improves handling of some HTTPS URLs during upgrade
- Correctly preserves membergroup properties during upgrade
- Correctly handles invalid year-only birthdates during upgrade
- Fixes issues with deleting upgrader files after upgrade is complete
- Fixes issues with running the upgrader from CLI
- Fixes various database queries in the upgrader
- Sets default notification frequency to "Straight Away" instead of "Never"
- Fixes issues upgrading from SMF 1.x
- Fixes registration "no access" error after upgrading
This release is considered to be an RC (Release Candidate), which means that it is sufficiently functional, but that it has known and unknown bugs. These bugs do not necessarily prevent a release, rather they need to be addressed before the next dev cycle release.
SMF RC4 can be installed as a brand new installation, or an SMF 2.0.x installation can be upgraded to SMF RC4, however, please do note that there are no updates packages for any RC releases.
We highly encourage testing this version on local or development/QA environments. Testing the release will greatly help us in narrowing down, and focusing on, issues and improvements towards the Final release. Note, however, that we do not recommend using an RC package on any live installation and/or production forum owing to the very nature of RC packages.
Finally, this announcement topic is not for support. Please use the SMF 2.1 support board instead.
A very special thanks goes to our community, team members, code contributors and beta testers. Without your help, this would not have been possible.
Thank you for using SMF!
Kind regards,
Simple Machines
- 5 people like this.
Recent Attachments Function
Code
<?php ssi_recentAttachments(); ?>
Result
File | Posted by | Downloads | Filesize |
---|---|---|---|
![]() |
shadav | 343 | 38.84KB |
![]() |
shawnb61 | 7826 | 38.13KB |
![]() |
Dzonny | 986 | 78.08KB |
![]() |
Aleksi "Lex" Kilpinen | 602 | 31.67KB |
![]() |
Antes | 4980 | 47.94KB |
![]() |
Antes | 1388 | 4.89KB |
![]() |
Oldiesmann | 1332 | 1.84KB |
![]() |
Burke ♞ Knight | 2507 | 36.75KB |
![]() |
SleePy | 1046 | 1.53KB |
![]() |
Norv | 1212 | 20.38KB |
Show Single Poll
Shows a poll in the specified topic.
Code
<?php ssi_showPoll($topicID); ?>
Result
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
<?php ssi_fetchPosts($postIDs, $isOverride); ?>
Result
Show Single Member
Shows the specified member's name and profile link.
Code
<?php ssi_fetchMember($memberIDs); ?>
Result
Show Group Members
Shows all members in a specified group.
Code
<?php ssi_fetchGroupMembers($groupIDs); ?>
Result
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
<?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>