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

[Off Topic] Product Ratings And Reviews by GeraldKit 05 February 2015, 12:03:17 AM
[Off Topic] mininova chloroquine by Donatelonib 05 February 2015, 12:03:14 AM
[General Discussion] Strattera cheapest in USA online .Buy VIAGRA $0.22 per pill !!! by Marysefs 05 February 2015, 12:03:12 AM
[Off Topic] pinamox expiry date by CorettaGaf 05 February 2015, 12:03:11 AM
[Off Topic] viagra overnight Virginia by DeannaSn 05 February 2015, 12:03:08 AM
[Off Topic] terapia ossiuri vermox by Michaelenib 05 February 2015, 12:03:04 AM
[Off Topic] hot tight blode teen porn videos - YCX A by Robdatvam 05 February 2015, 12:02:59 AM
[Help Wanted - Medusa] 20 mg levitra by DennisdarA 05 February 2015, 12:02:52 AM

Recent Posts Function

Code

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

Result

[Off Topic] Product Ratings And Reviews by GeraldKit 05 February 2015, 12:03:17 AM
[Off Topic] mininova chloroquine by Donatelonib 05 February 2015, 12:03:14 AM
[General Discussion] generic doxazosin mesylate online us pharmacy by Marysefs 05 February 2015, 12:03:12 AM
[Off Topic] pinamox expiry date by CorettaGaf 05 February 2015, 12:03:11 AM
[Off Topic] viagra overnight Virginia by DeannaSn 05 February 2015, 12:03:08 AM
[Off Topic] terapia ossiuri vermox by Michaelenib 05 February 2015, 12:03:04 AM
[Off Topic] hot tight blode teen porn videos - YCX A by Robdatvam 05 February 2015, 12:02:59 AM
[Help Wanted - Medusa] 20 mg levitra by DennisdarA 05 February 2015, 12:02:52 AM

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
Off Topic New 381453 479484
General Discussion New 22139 36386
Announcements New 51 16098
Ideas and Suggestions New 579 7381
Join The Team New 273 3244
Gameplay Strategies New 659 3230
General Discussion - Medusa New 576 2757
Online Games and Replays New 551 1866
History New 321 1691
Bug Reports and Feedback New 273 1463

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

1 Guest, 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

1 Guest, 0 Users

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, Guest. Please login or register.
Did you miss your activation email?

Today's Calendar Function

Code

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

Result

Thanksgiving

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: 12115
Total Posts: 571301
Total Topics: 410079
Total Categories: 5
Total Boards: 34

News Function

Shows random forum news.

Code

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

Result

V|GO v2.1 - The Hydra Release is out now!

Board News Function

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

Code

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

Result

exclamation Mod of the Year Awards 2011 - We Made Top 100!

11 December 2011, 07:21:44 PM by ScreamingCricket


Thanks to all of your votes, we made the Mod Database Top 100 in their Mod of the Year awards for 2011! We couldn't have done this without your support and belief in our project!


Now that we are in Top 100, we could sure use your support and votes for the final round of voting! Simply click HERE and press the GREEN VOTE button on the main page just below the summary, be sure to log in as member votes count more than a guest vote!

Be sure to VOTE!



To repay your dedication and loyalty we have put together something for our fans...

The Cerberus Release!


The Cerberus Release is the Vietnam Glory Obscured Original Soundtrack, a collection of music from the past 7 years!

VGO | OST includes 20 music tracks, including 2 never before heard songs by Effect29. There are also 2 bonus orchestral tracks not present in the game, one made by Effect29. Never before have these songs been released in an official capacity!

Download the VGO | OST

VGO|OST includes the following tracks:

Effect29 Songs
Title Screen - The River
Title Credits - All or Nothing
Bonus - Be There
Bonus - I Wouldnt Know

NVA Tracks
NVA01 - The Calling
NVA02 - Along the Trails
NVA03 - Rumble in the Jungle
NVA04 - Breaking the Lines
NVA05 - The Tet Offensive
NVA06 - The Calm *bonus by Effect29*
NVA07 - Village by the Stream *bonus*

USA Tracks
USA01 - Welcome to Vietnam
USA02 - Search and Destroy
USA03 - Weapons of War
USA04 - Acrimonious Engagement
USA05 - Commence
USA06 - War Time
USA07 - We Will Rise Again
USA08 - Hold the Lines
USA09 - Glory Obscured


Thanks for your support!
714 comments | Write Comment

exclamation Mod of the Year Awards 2011 - Vote for Us

30 November 2011, 11:21:34 AM by ScreamingCricket


Seven years and we now have a full release with 2 factions, but now we need your vote for the annual Mod Database "Mod of the Year" awards! Simply click on the image above and press the VOTE button on the main page just below the summary, be sure to log in as member votes count more than a guest vote!



If you haven't tried the Hydra Release yet, you can download it here. If you have an older version of Hydra, just open the mod launcher and it will automatically update to the latest version, Hydra 2.1.

Also be sure to check out the Tutorials on how to play our mod and Battle Commentary of our developers playing the different factions so you can see their tactics!

Stay tuned for more news and be sure to VOTE!
237 comments | Write Comment

xx The Great Forum Crash

31 October 2011, 12:07:45 AM by ScreamingCricket
As many of you know (and were SO kind to point out all weekend) the forums were down. Yes, I knew the forums were down and worked all weekend to get them back up.

The reason for the downtime was due to a bad update released by SMF. They did eventually release a fix for the update, but that didn't help with the current issue of forums with the bad install. Their solution to that problem was to delete everything and reinstall the forums from scratch. Almost 7 years worth of databases was a lot to lose, so I spent all weekend installing the update files manually on my server and restoring the databases.

I believe most (if not all) the information was recovered. You might notice some issues and changes to the forums, but I'll try to get those sorted through out the week. The most obvious change was the forum theme, unfortunately the old theme is no longer compatible with the latest forum updates bells and whistles.

So welcome back. How was your weekend?
58 comments | Write Comment

exclamation Vietnam | Glory Obscured v2.1 - The Hydra Patch!

02 July 2011, 01:37:53 PM by ScreamingCricket

Vietnam Glory Obscured - Hydra v2.1

The first official patch for Hydra is now released! We've fixed some Bugs that people found, as well as some Balance Changes due to people exploiting some of the units and some units not working as well as we intended. Along with these changes, we've also added some New Particle Effects made by Boidy himself.

When you start the Mod Launcher, Hydra will automatically update to version 2.1

Graphical Changes
- New HE mortar explosion.
- New tank shell explosion.
- New howitzer explosion (Tango, AC130, firebase, M110).
- New commando vault explosion.
- New BM21 firing fx.
- New SA7/Redeye trails.
- Fixed BM21 missile size.

Balance Changes
- Build time of NVA rocket pods increased from 15s to 60s. Individual upgrade increased from 10s to 20s
- Mig17 equipped with anti-infantry machine guns.
- M110 damage radius increased from 20m to 30m.
- Increased truck damage from small arms from 3% to 8%.
- Transports can evacuate on the move.
- Helidrop cost reduced from 1600 to 1400.

Bug Fixes
- Different mortar types restricted to Rank II mortar.
- Snake cannot be revived, as this caused multiple snakes.
- Fixed ZPU deployment on bridges.


Vietnam Glory Obscured v2.1 - The Hydra Release

Don't have the mod yet and want to try it out? DOWNLOAD the mod and it will automatically update to 2.1! Also feel free to swing by IRC or our Forums if you're looking for a game!


Video Tutorials

Technical Support




You Review VGO!

Did you love the mod? Hate the mod? Or somewhere in between? Let us know what you thought, what you liked, what you didn't. It can't get better if you don't let us know! Go to Mod Db and post you're own review!

Find some bugs you want us to fix? Let us know the details!

--------------

If you played Pegasus, then you may remember the USA Command Center having a flag that displayed the team color. For Evan, one of our Beta Testers, having the flag be a team color was in no way acceptable. He insisted it display a texture of the American Flag. Bug reports poured in with things needing American flags. After annoying the hell out of us, Evan finally got his wish - and you can thank him, the American flag appears all over for the USA faction. Evan has leveled up Patriotism - He is a True Patriot (even the Patriot appears in the mod).

Happy 4th of July Weekend!
339 comments | Write Comment

exclamation The Hydra Tournament - and death will have his day

27 June 2011, 06:09:12 PM by ScreamingCricket


The Hydra Tournament

The time has come to prove your worth. Which Commander will stand above the rest?

Now that the Hydra Release has been out for a few weeks, players should be familiar enough with the new NVA faction and the changes and additions to the USA faction. The tournament will also feature the different game play types available in the Hydra Release including Bombardment and King of the Hill!

Pick your favorite faction and fight your way to victory!




By now, all those who signed up have been messaged some details about the tournament, and if you want in on the action, be sure to:



All participants in the Hydra Tournament must be confirmed by this Saturday, 2nd July 2011.





Hydra Patch 2.1

In time for the tournament, we intend to release the 2.1 patch. The patch includes some minor bug and balance fixes, and perhaps more excitingly, a host of new particle FX produced by Boidy - some of which are shown below:

157 comments | Write Comment

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

Recent Attachments Function

Code

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

Result

File Posted by Downloads Filesize
89.gif Nelliehig 0 3.43kB
144.gif Nelliehig 0 3.18kB
138.gif Nelliehig 0 1.55kB
186.gif Nelliehig 0 3kB
23.gif Alfrednulk 0 10.01kB
67.gif Alfrednulk 0 9.13kB
17.gif Victorysi 0 9.08kB
20.gif Victorysi 0 8.32kB
87.gif Victorysi 0 9.08kB
_0001_4.jpg irinaslvtr 0 52.43kB

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 overriden 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SSI.php example for home page</title> <style type="text/css"> 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="license" href="http://creativecommons.org/licenses/publicdomain/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/publicdomain/88x31.png" /></a> This sample website layout is dedicated to the <a target="_blank" rel="license" href="http://creativecommons.org/licenses/publicdomain/">Public Domain</a>. </div> </div> </body> </html>

Result