Documentation

ServerSideIncludes
in package

Performs all the necessary setup and security checks for SSI access, and provides a number of useful functions that allow external scripts to access SMF data.

External scripts can affect various aspects of SSI behaviour using global variables that are named in this class's $ssi_globals property. For more information on this, see the DocBlock comments below.

Table of Contents

Properties

$ban  : bool
$guest_access  : bool
$gzip  : bool
$layers  : array<string|int, mixed>
$maintenance_off  : bool
$on_error_method  : bool|string
$theme  : int
$error_reporting  : int
$setup_done  : bool
$ssi_globals  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructor. Sets up stuff we need for safe use of SSI.
boardNews()  : array<string|int, mixed>|null
Show the latest news, with a template... by board.
boardStats()  : array<string|int, mixed>|null
Show some basic stats: Total This: XXXX, etc.
checkPassword()  : bool
Checks whether the specified password is correct for the specified user.
copyright()  : string|null
Show the forum copyright. Only used in our ssi_examples files.
execute()  : true
Allows accessing an SSI function via URL parameters.
fetchGroupMembers()  : array<string|int, mixed>|null
Get all members in the specified group
fetchMember()  : array<string|int, mixed>|null
Fetch specific members
fetchPosts()  : array<string|int, mixed>|null
Fetches one or more posts by ID.
fullVersion()  : string|null
Show the full SMF version string.
latestMember()  : array<string|int, mixed>|null
Show a link to the latest member: Please welcome, Someone, our latest member.
login()  : bool|null
Shows a login box
logOnline()  : array<string|int, mixed>|null
Just like whosOnline except it also logs the online presence.
logout()  : string|bool|null
Show a logout link.
menubar()  : array<string|int, mixed>|null
Display a menu bar, like is displayed at the top of the forum.
news()  : string|null
Show a random forum news item
pollVote()  : void
Handles voting in a poll (done automatically)
queryMembers()  : array<string|int, mixed>|null
Pulls info about members based on the specified parameters. Used by other functions to eliminate duplication.
queryPosts()  : array<string|int, mixed>|null
This handles actually pulling post info. Called from other functions to eliminate duplication.
quickSearch()  : string|null
Shows a search box
randomMember()  : array<string|int, mixed>|null
Fetches a random member.
recentAttachments()  : array<string|int, mixed>|null
Shows the most recent attachments that the user can see
recentEvents()  : array<string|int, mixed>|null
Show the most recent events
recentPoll()  : array<string|int, mixed>|null
Shows the most recent poll
recentPosts()  : array<string|int, mixed>|null
Recent post list: [board] Subject by Poster Date
recentTopics()  : void|array<string|int, mixed>
Recent topic list: [board] Subject by Poster Date
showPoll()  : array<string|int, mixed>|null
Shows the poll from the specified topic
shutdown()  : void
This shuts down the SSI and shows the footer.
softwareYear()  : string|null
Show the SMF software year.
todaysBirthdays()  : array<string|int, mixed>|null
Show today's birthdays.
todaysCalendar()  : array<string|int, mixed>|string|null
Shows today's calendar items (events, birthdays and holidays)
todaysEvents()  : array<string|int, mixed>|null
Shows today's events.
todaysHolidays()  : array<string|int, mixed>|null
Shows today's holidays.
topBoards()  : array<string|int, mixed>|null
Shows a list of top boards based on activity
topPoll()  : array<string|int, mixed>|null
Show the top poll based on votes
topPoster()  : array<string|int, mixed>|null
Shows a list of top posters
topTopics()  : array<string|int, mixed>|null
Shows a list of top topics based on views or replies
topTopicsReplies()  : array<string|int, mixed>|null
Top topics based on replies
topTopicsViews()  : array<string|int, mixed>|null
Top topics based on views
version()  : string|null
Show the SMF version.
welcome()  : User|null
Display a welcome message, like: Hey, User, you have 0 messages, 0 are new.
whosOnline()  : array<string|int, mixed>|null
Shows a list of online users: YY Guests, ZZ Users and then a list... Alias: ssi_whosOnline()

Properties

$ban

public bool $ban = false

Local copy of the global $ssi_ban variable.

Whether to check that the viewing user is not banned.

$guest_access

public bool $guest_access = false

Local copy of the global $ssi_guest_access variable.

If true, allows guests to see SSI data even when they cannot access the forum itself.

$gzip

public bool $gzip

Local copy of the global $ssi_gzip variable.

Whether to compress output using the GZip algorithm.

$layers

public array<string|int, mixed> $layers

Local copy of the global $ssi_layers variable.

An array of template layers in which to wrap the content. If not set, the theme's defaults will be used.

$maintenance_off

public bool $maintenance_off = false

Local copy of the global $ssi_maintenance_off variable.

If true, allows SSI access even when the forum is in maintenance mode.

$on_error_method

public static bool|string $on_error_method = false

Local copy of the global $ssi_on_error_method variable.

Set this to one of three values depending on what you want to happen in the case of a fatal error:

false: Default. Will just load the error sub template and die without putting any theme layers around it.

true: Will load the error sub template AND put the SMF layers around it. (Not useful if on total custom pages.)

string: Name of a callback function to call in the event of an error to allow you to define your own methods. Will die after function returns.

$theme

public int $theme = 0

Local copy of the global $ssi_theme variable.

ID number of a theme to use for SSI functions.

$error_reporting

protected int $error_reporting

Remembers the error_reporting level prior to SSI starting, so that we can restore it once we are done.

$setup_done

protected static bool $setup_done = false

Whether SSI setup has been completed.

$ssi_globals

protected array<string|int, mixed> $ssi_globals = ['ssi_on_error_method', 'ssi_maintenance_off', 'ssi_theme', 'ssi_layers', 'ssi_gzip', 'ssi_ban', 'ssi_guest_access']

Names of various global variables that external scripts can declare in order to influence the behaviour of SSI.

Methods

__construct()

Constructor. Sets up stuff we need for safe use of SSI.

public __construct() : mixed

boardNews()

Show the latest news, with a template... by board.

public static boardNews([null|int $board = null ][, null|int $limit = null ][, null|int $start = null ][, null|int $length = null ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_boardNews()

Parameters
$board : null|int = null

The ID of the board to get the info from. Defaults to $board or $_GET['board'] if not set.

$limit : null|int = null

How many items to show. Defaults to $_GET['limit'] or 5 if not set.

$start : null|int = null

Start with the specified item. Defaults to $_GET['start'] or 0 if not set.

$length : null|int = null

How many characters to show from each post. Defaults to $_GET['length'] or 0 (no limit) if not set.

$output_method : string = 'echo'

The output method. If 'echo', displays the news items, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays the news items or returns an array of info about them, depending on output_method.

boardStats()

Show some basic stats: Total This: XXXX, etc.

public static boardStats([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_boardStats()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays the stats, otherwise returns an array of info about them

Return values
array<string|int, mixed>|null

Doesn't return anything if the user can't view stats. Otherwise either displays the stats or returns an array of info about them, depending on output_method.

checkPassword()

Checks whether the specified password is correct for the specified user.

public static checkPassword([int|string $id = null ][, string $password = null ][, bool $is_username = false ]) : bool

Alias: ssi_checkPassword()

Parameters
$id : int|string = null

The ID or username of a user

$password : string = null

The password to check

$is_username : bool = false

If true, treats $id as a username rather than a user ID

Return values
bool

Whether or not the password is correct.

Show the forum copyright. Only used in our ssi_examples files.

public static copyright([string $output_method = 'echo' ]) : string|null

Alias: ssi_copyright()

Parameters
$output_method : string = 'echo'

If 'echo', displays the forum copyright, otherwise returns it

Return values
string|null

Returns nothing if output_method is 'echo', otherwise returns the copyright string

execute()

Allows accessing an SSI function via URL parameters.

public execute() : true
Return values
true

fetchGroupMembers()

Get all members in the specified group

public static fetchGroupMembers([int $group_id = null ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_fetchGroupMembers()

Parameters
$group_id : int = null

The ID of the group to get members from

$output_method : string = 'echo'

The output method. If 'echo', returns a list of group members, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays a list of group members or returns an array of info about them, depending on output_method.

fetchMember()

Fetch specific members

public static fetchMember([array<string|int, mixed> $member_ids = [] ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_fetchMember()

Parameters
$member_ids : array<string|int, mixed> = []

The IDs of the members to fetch

$output_method : string = 'echo'

The output method. If 'echo', displays a list of links to the members' profiles, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays links to the specified members' profiles or returns an array of info about them, depending on output_method.

fetchPosts()

Fetches one or more posts by ID.

public static fetchPosts([array<string|int, int> $post_ids = [] ][, bool $override_permissions = false ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_fetchPosts()

Parameters
$post_ids : array<string|int, int> = []

An array containing the IDs of the posts to show

$override_permissions : bool = false

Whether to ignore permissions. If true, will show posts even if the user doesn't have permission to see them.

$output_method : string = 'echo'

The output method. If 'echo', displays the posts, otherwise returns an array of info about them

Return values
array<string|int, mixed>|null

Displays the specified posts or returns an array of info about them, depending on output_method.

fullVersion()

Show the full SMF version string.

public static fullVersion([string $output_method = 'echo' ]) : string|null

Alias: ssi_full_version()

Parameters
$output_method : string = 'echo'

If 'echo', displays the full version string, otherwise returns it

Return values
string|null

Returns nothing if output_method is 'echo', otherwise returns the version string

latestMember()

Show a link to the latest member: Please welcome, Someone, our latest member.

public static latestMember([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_latestMember()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', returns a string with a link to the latest member's profile, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays a "welcome" message for the latest member or returns an array of info about them, depending on output_method.

login()

Shows a login box

public static login([string $redirect_to = '' ][, string $output_method = 'echo' ]) : bool|null

Alias: ssi_login()

Parameters
$redirect_to : string = ''

The URL to redirect the user to after they login

$output_method : string = 'echo'

The output method. If 'echo' and the user is a guest, displays a login box, otherwise returns whether the user is a guest

Return values
bool|null

Either displays a login box or returns whether the user is a guest, depending on whether the user is logged in and output_method.

logOnline()

Just like whosOnline except it also logs the online presence.

public static logOnline([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_logOnline()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays a list, otherwise returns an array of info about the online users.

Return values
array<string|int, mixed>|null

Either displays a list of online users or returns an array of info about them, depending on output_method.

logout()

Show a logout link.

public static logout([string $redirect_to = '' ][, string $output_method = 'echo' ]) : string|bool|null

Alias: ssi_logout()

Parameters
$redirect_to : string = ''

A URL to redirect the user to after they log out.

$output_method : string = 'echo'

The output method. If 'echo', shows a logout link, otherwise returns the HTML for it.

Return values
string|bool|null

Displays a logout link or returns its HTML depending on output_method.

menubar()

Display a menu bar, like is displayed at the top of the forum.

public static menubar([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_menubar()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', will display the menu, otherwise returns an array of menu data.

Return values
array<string|int, mixed>|null

Displays the menu or returns an array of menu data depending on output_method.

news()

Show a random forum news item

public static news([string $output_method = 'echo' ]) : string|null

Alias: ssi_news()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', shows the news item, otherwise returns it.

Return values
string|null

Shows or returns a random forum news item, depending on output_method.

pollVote()

Handles voting in a poll (done automatically)

public static pollVote() : void

Alias: ssi_pollVote()

queryMembers()

Pulls info about members based on the specified parameters. Used by other functions to eliminate duplication.

public static queryMembers([string $query_where = null ][, array<string|int, mixed> $query_where_params = [] ][, string|int $query_limit = '' ][, string $query_order = 'id_member DESC' ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_queryMembers()

Parameters
$query_where : string = null

The info for the WHERE clause of the query

$query_where_params : array<string|int, mixed> = []

The parameters for the WHERE clause

$query_limit : string|int = ''

The number of rows to return or an empty string to return all

$query_order : string = 'id_member DESC'

The info for the ORDER BY clause of the query

$output_method : string = 'echo'

The output method. If 'echo', displays a list of members, otherwise returns an array of info about them

Return values
array<string|int, mixed>|null

Displays a list of members or returns an array of info about them, depending on output_method.

queryPosts()

This handles actually pulling post info. Called from other functions to eliminate duplication.

public static queryPosts([string $query_where = '' ][, array<string|int, mixed> $query_where_params = [] ][, int $query_limit = 10 ][, string $query_order = 'm.id_msg DESC' ][, string $output_method = 'echo' ][, bool $limit_body = false ][, bool $override_permissions = false ]) : array<string|int, mixed>|null

Alias: ssi_queryPosts()

Parameters
$query_where : string = ''

The WHERE clause for the query

$query_where_params : array<string|int, mixed> = []

An array of parameters for the WHERE clause

$query_limit : int = 10

The maximum number of rows to return

$query_order : string = 'm.id_msg DESC'

The ORDER BY clause for the query

$output_method : string = 'echo'

The output method. If 'echo', displays the posts, otherwise returns an array of info about them.

$limit_body : bool = false

If true, will only show the first 384 characters of the post rather than all of it

$override_permissions : bool = false

Whether or not to ignore permissions. If true, will show all posts regardless of whether the user can actually see them

Return values
array<string|int, mixed>|null

Displays the posts or returns an array of info about them, depending on output_method

quickSearch()

Shows a search box

public static quickSearch([string $output_method = 'echo' ]) : string|null

Alias: ssi_quickSearch()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays a search box, otherwise returns the URL of the search page.

Return values
string|null

Displays a search box or returns the URL to the search page depending on output_method. If you don't have permission to search, the function won't return anything.

randomMember()

Fetches a random member.

public static randomMember([string $random_type = '' ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_randomMember()

Parameters
$random_type : string = ''

If 'day', only fetches a new random member once a day.

$output_method : string = 'echo'

The output method. If 'echo', displays a link to the member's profile, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays a link to a random member's profile or returns an array of info about them depending on output_method.

recentAttachments()

Shows the most recent attachments that the user can see

public static recentAttachments([int $num_attachments = 10 ][, array<string|int, mixed> $attachment_ext = [] ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_recentAttachments()

Parameters
$num_attachments : int = 10

How many to show

$attachment_ext : array<string|int, mixed> = []

Only shows attachments with the specified extensions ('jpg', 'gif', etc.) if set

$output_method : string = 'echo'

The output method. If 'echo', displays a table with links/info, otherwise returns an array with information about the attachments

Return values
array<string|int, mixed>|null

Displays a table of attachment info or returns an array containing info about the attachments, depending on output_method.

recentEvents()

Show the most recent events

public static recentEvents([int $max_events = 7 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_recentEvents()

Parameters
$max_events : int = 7

The maximum number of events to show

$output_method : string = 'echo'

The output method. If 'echo', displays the events, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays the events or returns an array of info about them, depending on output_method.

recentPoll()

Shows the most recent poll

public static recentPoll([bool $topPollInstead = false ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_recentPoll()

Parameters
$topPollInstead : bool = false

Whether to show the top poll (based on votes) instead of the most recent one

$output_method : string = 'echo'

The output method. If 'echo', displays the poll, otherwise returns an array of info about it.

Return values
array<string|int, mixed>|null

Either shows the poll or returns an array of info about it, depending on output_method.

recentPosts()

Recent post list: [board] Subject by Poster Date

public static recentPosts([int $num_recent = 8 ][, null|array<string|int, mixed> $exclude_boards = null ][, null|array<string|int, mixed> $include_boards = null ][, string $output_method = 'echo' ][, bool $limit_body = true ]) : array<string|int, mixed>|null

Alias: ssi_recentPosts()

Parameters
$num_recent : int = 8

How many recent posts to display

$exclude_boards : null|array<string|int, mixed> = null

If set, doesn't show posts from the specified boards

$include_boards : null|array<string|int, mixed> = null

If set, only includes posts from the specified boards

$output_method : string = 'echo'

The output method. If 'echo', displays the posts, otherwise returns an array of information about them.

$limit_body : bool = true

Whether or not to only show the first 384 characters of each post

Return values
array<string|int, mixed>|null

Displays a list of recent posts or returns an array of information about them depending on output_method.

recentTopics()

Recent topic list: [board] Subject by Poster Date

public static recentTopics([int $num_recent = 8 ][, null|array<string|int, mixed> $exclude_boards = null ][, null|array<string|int, mixed> $include_boards = null ][, string $output_method = 'echo' ]) : void|array<string|int, mixed>

Alias: ssi_recentTopics()

Parameters
$num_recent : int = 8

How many recent topics to show

$exclude_boards : null|array<string|int, mixed> = null

If set, exclude topics from the specified board(s)

$include_boards : null|array<string|int, mixed> = null

If set, only include topics from the specified board(s)

$output_method : string = 'echo'

The output method. If 'echo', displays a list of topics, otherwise returns an array of info about them

Return values
void|array<string|int, mixed>

Either displays a list of topics or returns an array of info about them, depending on output_method.

showPoll()

Shows the poll from the specified topic

public static showPoll([null|int $topic = null ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_showPoll()

Parameters
$topic : null|int = null

The topic to show the poll from. If null, $_REQUEST['ssi_topic'] will be used instead.

$output_method : string = 'echo'

The output method. If 'echo', displays the poll, otherwise returns an array of info about it.

Return values
array<string|int, mixed>|null

Either displays the poll or returns an array of info about it, depending on output_method.

shutdown()

This shuts down the SSI and shows the footer.

public static shutdown() : void

Alias: ssi_shutdown()

softwareYear()

Show the SMF software year.

public static softwareYear([string $output_method = 'echo' ]) : string|null

Alias: ssi_software_year()

Parameters
$output_method : string = 'echo'

If 'echo', displays the software year, otherwise returns it

Return values
string|null

Returns nothing if output_method is 'echo', otherwise returns the software year

todaysBirthdays()

Show today's birthdays.

public static todaysBirthdays([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_todaysBirthdays()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays a list of users, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays a list of users or returns an array of info about them depending on output_method.

todaysCalendar()

Shows today's calendar items (events, birthdays and holidays)

public static todaysCalendar([string $output_method = 'echo' ]) : array<string|int, mixed>|string|null

Alias: ssi_todaysCalendar()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays a list of calendar items, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|string|null

Displays a list of calendar items or returns an array of info about them depending on output_method

todaysEvents()

Shows today's events.

public static todaysEvents([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_todaysEvents()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays a list of events, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays a list of events or returns an array of info about them depending on output_method

todaysHolidays()

Shows today's holidays.

public static todaysHolidays([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_todaysHolidays()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays a list of holidays, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays a list of holidays or returns an array of info about them depending on output_method

topBoards()

Shows a list of top boards based on activity

public static topBoards([int $num_top = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_topBoards()

Parameters
$num_top : int = 10

How many boards to display

$output_method : string = 'echo'

The output method. If 'echo', displays a list of boards, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Displays a list of the top boards or returns an array of info about them, depending on output_method.

topPoll()

Show the top poll based on votes

public static topPoll([string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_topPoll()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays the poll, otherwise returns an array of info about it

Return values
array<string|int, mixed>|null

Either shows the top poll or returns an array of info about it, depending on output_method.

topPoster()

Shows a list of top posters

public static topPoster([int $topNumber = 1 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_topPoster()

Parameters
$topNumber : int = 1

How many top posters to list

$output_method : string = 'echo'

The output method. If 'echo', will display a list of users, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Either displays a list of users or returns an array of info about them, depending on output_method.

topTopics()

Shows a list of top topics based on views or replies

public static topTopics([string $type = 'replies' ][, int $num_topics = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_topTopics()

Parameters
$type : string = 'replies'

Can be either replies or views

$num_topics : int = 10

How many topics to display

$output_method : string = 'echo'

The output method. If 'echo', displays a list of topics, otherwise returns an array of info about them.

Return values
array<string|int, mixed>|null

Either displays a list of topics or returns an array of info about them, depending on output_method.

topTopicsReplies()

Top topics based on replies

public static topTopicsReplies([int $num_topics = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_topTopicsReplies()

Parameters
$num_topics : int = 10

How many topics to show

$output_method : string = 'echo'

The output method. If 'echo', displays a list of topics, otherwise returns an array of info about them

Return values
array<string|int, mixed>|null

Either displays a list of top topics or returns an array of info about them, depending on output_method.

topTopicsViews()

Top topics based on views

public static topTopicsViews([int $num_topics = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null

Alias: ssi_topTopicsViews()

Parameters
$num_topics : int = 10

How many topics to show

$output_method : string = 'echo'

The output method. If 'echo', displays a list of topics, otherwise returns an array of info about them

Return values
array<string|int, mixed>|null

Either displays a list of top topics or returns an array of info about them, depending on output_method.

version()

Show the SMF version.

public static version([string $output_method = 'echo' ]) : string|null

Alias: ssi_version()

Parameters
$output_method : string = 'echo'

If 'echo', displays the version, otherwise returns it

Return values
string|null

Returns nothing if output_method is 'echo', otherwise returns the version

welcome()

Display a welcome message, like: Hey, User, you have 0 messages, 0 are new.

public static welcome([string $output_method = 'echo' ]) : User|null

Alias: ssi_welcome()

Parameters
$output_method : string = 'echo'

The output method. If 'echo', will display everything. Otherwise returns an array of user info.

Return values
User|null

Displays a welcome message or returns an array of user data depending on output_method.

whosOnline()

Shows a list of online users: YY Guests, ZZ Users and then a list... Alias: ssi_whosOnline()

public static whosOnline([string $output_method = 'echo' ]) : array<string|int, mixed>|null
Parameters
$output_method : string = 'echo'

The output method. If 'echo', displays a list, otherwise returns an array of info about the online users.

Return values
array<string|int, mixed>|null

Either displays a list of online users or returns an array of info about them, depending on output_method.


        
On this page

Search results