SMF
Table of Contents
Interfaces
- ActionInterface
- Interface for all action classes.
- CacheApiInterface
- DatabaseApiInterface
- Interface DatabaseApiInterface
- MailAgentInterface
- OutputTypeInterface
- Interface for all output ttypes
- Routable
- Classes implementing this interface can build routes from URL query parameters and parse routes back into URL query parameters.
- SearchApiInterface
- Interface SearchApiInterface
- WebFetchApiInterface
Classes
- closing_tag_fixer
- Ensure line endings match SMF standards.
- TimezoneUpdater
- Updates SMF's time zone data.
- Lang
- A cheap stand-in for the real Lang class.
- Activate
- Activates a user's account.
- ACP
- This class, unpredictable as this might be, handles basic administration.
- AntiSpam
- Handles anti-spam settings.
- Attachments
- Maintains and manages attachments and avatars.
- Bans
- This class contains all the methods used for the ban center.
- Boards
- Manages and maintains the boards and categories of the forum.
- Calendar
- This class allows you to manage the calendar.
- EndSession
- Ends an admin session, requiring authentication to access the ACP again.
- ErrorLog
- Shows a list of all errors that were logged on the forum, and allows filtering and deleting them.
- Features
- Class to manage various core features.
- Find
- Provides the search functionality inside the admin control panel.
- Home
- The administration home page.
- Languages
- This class handles the administration of languages tasks.
- Logs
- Dispatcher to show various kinds of logs.
- Handles mail configuration, as well as reviewing the mail queue.
- Maintenance
- Forum maintenance. Important stuff.
- Membergroups
- This class is concerned with anything in the Manage Membergroups admin screen.
- Members
- Shows a list of members or a selection of members.
- Mods
- This my friend, is for all the mod authors out there.
- News
- This class manages... the news. :P
- Permissions
- Permissions handles all possible permission stuff.
- Posts
- This class contains all the administration settings for topics and posts.
- Registration
- This class helps the administrator setting registration settings and policy as well as allow the administrator to register new members themselves.
- RepairBoards
- This is here for the "repair any errors" feature in the admin center.
- Reports
- This class is exclusively for generating reports to help assist forum administrators keep track of their forum configuration and state.
- Search
- The admin screen to change the search settings.
- SearchEngines
- Manages the settings related to search engines.
- Server
- Contains all the functionality required to be able to edit the core server settings. This includes anything from which an error may result in the forum destroying itself in a fiery fury.
- Smileys
- This class takes care of all administration of smileys.
- Subscriptions
- Contains all the administration functions for paid subscriptions.
- Tasks
- This class concerns itself with scheduled tasks management.
- Themes
- This class concerns itself almost completely with theme administration.
- Warnings
- Moderation type settings - although there are fewer than we have you believe ;)
- Agreement
- The purpose of this class is to show the user the registration agreement and privacy policy, and to ask the user to accept them if they haven't already done so.
- AgreementAccept
- Records when the user accepted the registration agreement and privacy policy.
- Announce
- This class handles sending announcements about topics.
- AttachmentApprove
- Allows the moderator to approve or reject attachments.
- AttachmentDownload
- Downloads an avatar or attachment based on $_GET['attach'], and increments the download count.
- AttachmentUpload
- This class handles adding/deleting attachments
- AutoSuggest
- Suggests members, membergroups, or SMF versions in reply to AJAX requests.
- BoardIndex
- This class shows the board index.
- BuddyListToggle
- This simple action adds/removes the passed user from the current user's buddy list.
- Calendar
- This class has only one real task, showing the calendar.
- CoppaForm
- Displays the COPPA form during registration.
- Credits
- This action prepares credit and copyright information for the credits page and the admin page.
- Display
- This class loads the posts in a topic so they can be displayed.
- DisplayAdminFile
- Get one of the admin information files from Simple Machines.
- Feed
- This class contains the code necessary to display XML feeds.
- Groups
- Shows group info.
- Help
- This class has the important job of taking care of help messages and the help center.
- HelpAdmin
- Shows popup help for the admin (and moderators sometimes) to describe complex settings and such.
- JavaScriptModify
- Used to edit the body or subject of a message inline.
- Like
- Handles liking posts and displaying the list of who liked a post.
- Login
- Shows the login form.
- Login2
- Validates the submitted credentials and logs the user in if they pass.
- LoginTFA
- Handles Two-Factor Authentication credentials.
- Logout
- Logs the user out.
- MarkRead
- Mark boards and topics as read (or unread in some cases).
- Memberlist
- This class contains the methods for displaying and searching in the members list.
- MessageIndex
- This class shows the list of topics in a board.
- EndSession
- Ends a moderator session, requiring authentication to access the moderation center again.
- Groups
- Shows group info and allows certain privileged members to add/remove members.
- Home
- This is the home page of the moderation center.
- Logs
- The moderation and administration logs are this class's only job.
- Main
- This is the Moderation Center.
- Posts
- Handles things related to post moderation.
- ReportedContent
- Handles reported members and posts, as well as moderation comments.
- ShowNotice
- Shows a notice sent to a user.
- Warnings
- Allows the moderator to view stuff related to warnings.
- WatchedUsers
- Rename here and in the exportStatic call at the end of the file.
- MsgDelete
- This action handles the deletion of posts.
- Notify
- This abstract class contains the main functionality to toggle email notification preferences for topics, boards and announcements.
- NotifyAnnouncements
- Toggles email notification preferences for announcements.
- NotifyBoard
- Toggles email notification preferences for boards.
- NotifyTopic
- Toggles email notification preferences for topics.
- PersonalMessage
- This class is mainly meant for controlling the actions related to personal messages. It allows viewing, sending, deleting, and marking personal messages.
- PollEdit
- Display screen for editing or adding a poll.
- PollEdit2
- Update the settings for a poll, or add a new one.
- PollLock
- Lock the voting for a poll.
- PollRemove
- Remove a poll from a topic without removing the topic.
- PollVote
- Allow the user to vote.
- Post
- This class handles posting and modifying replies and new topics.
- Post2
- This class handles posting and modifying replies and new topics.
- Account
- Handles the account section of the profile.
- Activate
- Activates an account.
- AlertsPopup
- Shows the popup for the current user's alerts.
- BuddyIgnoreLists
- Show all the users buddies, as well as an add/delete interface.
- Delete
- Handles deleting an account.
- Export
- This class contains functions to export a member's profile data to a downloadable file.
- ExportAttachment
- Downloads an attachment that was linked from a profile export.
- ExportDownload
- Downloads exported profile data file.
- ForumProfile
- Handles the main "Forum Profile" section of the profile.
- GroupMembership
- Allows a user to choose, or at least request, group memberships.
- IgnoreBoards
- Handles the "ignored boards" section of the profile (if enabled)
- IssueWarning
- Rename here and in the exportStatic call at the end of the file.
- Main
- This class has the primary job of showing and editing people's profiles.
- Notification
- Handles preferences related to notifications.
- PaidSubs
- Class for doing all the paid subscription stuff - kinda.
- Popup
- Shows the popup menu for the current user's profile.
- ShowAlerts
- Shows all alerts for a member.
- ShowPermissions
- Rename here and in the exportStatic call at the end of the file.
- ShowPosts
- Rename here and in the exportStatic call at the end of the file.
- StatPanel
- Rename here and in the exportStatic call at the end of the file.
- Summary
- Shows a summary of a member's profile.
- TFADisable
- Provides interface to disable two-factor authentication in SMF.
- TFASetup
- Provides interface to set up two-factor authentication in SMF.
- ThemeOptions
- Handles the "Look and Layout" section of the profile
- Tracking
- Rename here and in the exportStatic call at the end of the file.
- ViewWarning
- Rename here and in the exportStatic call at the end of the file.
- QuickModeration
- Handles moderation from the message index.
- QuickModerationInTopic
- Handles quick moderation actions from within a topic.
- QuoteFast
- This class handles quoting posts via JavaScript.
- Recent
- Finds and retrieves information about recently posted messages.
- Register
- Shows the registration form.
- Register2
- Actually registers the new member.
- Reminder
- Handle sending out reminders, and checking the secret answer and question.
- ReportToMod
- Deals with reporting posts or profiles to mods and admins.
- RequestMembers
- Outputs each member name on its own line.
- Search
- Shows the search form.
- Search2
- Shows the search form.
- SendActivation
- Despite the name, which is what it is for historical reasons, this action doesn't actually send anything. It just shows a message for a guest.
- SmStats
- Lets simplemachines.org gather statistics if, and only if, the admin allows.
- Stats
- Provides a display for forum statistics.
- ThemeChooser
- Shows an interface to allow a member to choose a new theme.
- ThemeSetOption
- Sets a theme option via an AJAX call.
- TopicLock
- Locks a topic... either by way of a moderator or the topic starter.
- TopicMerge
- Handles merging of topics.
- TopicMove
- This action provides UI to allow topics to be moved from one board to another.
- TopicMove2
- This action handles moving topics from one board to another board.
- TopicPrint
- This class formats a topic to be printer friendly.
- TopicRemove
- This action handles the deletion of topics.
- TopicRestore
- This action handles restoring a topic from the recycle board back to its original board.
- TopicSplit
- Handles splitting of topics.
- TopicSticky
- Sticky a topic.
- TrackIP
- Rename here and in the exportStatic call at the end of the file.
- Unknown
- Class Unknown
- Unread
- Finds and retrieves information about new posts and topics.
- UnreadReplies
- Finds and retrieves information about replies to the user's posts.
- VerificationCode
- Shows the verification code or let it be heard.
- ViewQuery
- Provides a way to view database queries. Used for debugging.
- Who
- Who's online, and what are they doing? This class prepares the who's online data for the Who template.
- XmlHttp
- Handles XML-based interaction (mainly XMLhttp)
- Alert
- Represents an alert and provides methods for working with alerts.
- Attachment
- This class represents a file attachment.
- Autolinker
- Detects URLs in strings.
- Board
- This class loads information about the current board, as well as other boards when needed. It also handles low-level tasks for managing boards, such as creating, deleting, and modifying them.
- BrowserDetector
- Class BrowserDetector This class is an experiment for the job of correctly detecting browsers and settings needed for them.
- CacheApi
- Birthday
- Represents a member's birthday.
- Event
- Represents a (possibly recurring) calendar event.
- EventAdjustment
- Used to apply adjustments to properties of EventOccurrence objects.
- EventOccurrence
- Represents a single occurrence of a calendar event.
- Holiday
- Represents a holiday.
- RecurrenceIterator
- Iterator to calculate all occurrences of a recurring event.
- RRule
- Represents a recurrence rule from RFC 5545.
- VTimeZone
- Represents iCalendar time zone data, which RFC 5545 labels as a VTIMEZONE.
- Abidjan
- Africa/Abidjan
- Algiers
- Africa/Algiers
- Bissau
- Africa/Bissau
- Cairo
- Africa/Cairo
- Casablanca
- Africa/Casablanca
- Ceuta
- Africa/Ceuta
- El_Aaiun
- Africa/El_Aaiun
- Johannesburg
- Africa/Johannesburg
- Juba
- Africa/Juba
- Khartoum
- Africa/Khartoum
- Lagos
- Africa/Lagos
- Maputo
- Africa/Maputo
- Monrovia
- Africa/Monrovia
- Nairobi
- Africa/Nairobi
- Ndjamena
- Africa/Ndjamena
- Sao_Tome
- Africa/Sao_Tome
- Tripoli
- Africa/Tripoli
- Tunis
- Africa/Tunis
- Windhoek
- Africa/Windhoek
- Adak
- America/Adak
- Anchorage
- America/Anchorage
- Araguaina
- America/Araguaina
- Buenos_Aires
- America/Argentina/Buenos_Aires
- Catamarca
- America/Argentina/Catamarca
- Cordoba
- America/Argentina/Cordoba
- Jujuy
- America/Argentina/Jujuy
- La_Rioja
- America/Argentina/La_Rioja
- Mendoza
- America/Argentina/Mendoza
- Rio_Gallegos
- America/Argentina/Rio_Gallegos
- Salta
- America/Argentina/Salta
- San_Juan
- America/Argentina/San_Juan
- San_Luis
- America/Argentina/San_Luis
- Tucuman
- America/Argentina/Tucuman
- Ushuaia
- America/Argentina/Ushuaia
- Asuncion
- America/Asuncion
- Bahia
- America/Bahia
- Bahia_Banderas
- America/Bahia_Banderas
- Barbados
- America/Barbados
- Belem
- America/Belem
- Belize
- America/Belize
- Boa_Vista
- America/Boa_Vista
- Bogota
- America/Bogota
- Boise
- America/Boise
- Cambridge_Bay
- America/Cambridge_Bay
- Campo_Grande
- America/Campo_Grande
- Cancun
- America/Cancun
- Caracas
- America/Caracas
- Cayenne
- America/Cayenne
- Chicago
- America/Chicago
- Chihuahua
- America/Chihuahua
- Ciudad_Juarez
- America/Ciudad_Juarez
- Costa_Rica
- America/Costa_Rica
- Cuiaba
- America/Cuiaba
- Danmarkshavn
- America/Danmarkshavn
- Dawson
- America/Dawson
- Dawson_Creek
- America/Dawson_Creek
- Denver
- America/Denver
- Detroit
- America/Detroit
- Edmonton
- America/Edmonton
- Eirunepe
- America/Eirunepe
- El_Salvador
- America/El_Salvador
- Fort_Nelson
- America/Fort_Nelson
- Fortaleza
- America/Fortaleza
- Glace_Bay
- America/Glace_Bay
- Goose_Bay
- America/Goose_Bay
- Grand_Turk
- America/Grand_Turk
- Guatemala
- America/Guatemala
- Guayaquil
- America/Guayaquil
- Guyana
- America/Guyana
- Halifax
- America/Halifax
- Havana
- America/Havana
- Hermosillo
- America/Hermosillo
- Indianapolis
- America/Indiana/Indianapolis
- Knox
- America/Indiana/Knox
- Marengo
- America/Indiana/Marengo
- Petersburg
- America/Indiana/Petersburg
- Tell_City
- America/Indiana/Tell_City
- Vevay
- America/Indiana/Vevay
- Vincennes
- America/Indiana/Vincennes
- Winamac
- America/Indiana/Winamac
- Inuvik
- America/Inuvik
- Iqaluit
- America/Iqaluit
- Jamaica
- America/Jamaica
- Juneau
- America/Juneau
- Louisville
- America/Kentucky/Louisville
- Monticello
- America/Kentucky/Monticello
- La_Paz
- America/La_Paz
- Lima
- America/Lima
- Los_Angeles
- America/Los_Angeles
- Maceio
- America/Maceio
- Managua
- America/Managua
- Manaus
- America/Manaus
- Martinique
- America/Martinique
- Matamoros
- America/Matamoros
- Mazatlan
- America/Mazatlan
- Menominee
- America/Menominee
- Merida
- America/Merida
- Metlakatla
- America/Metlakatla
- Mexico_City
- America/Mexico_City
- Miquelon
- America/Miquelon
- Moncton
- America/Moncton
- Monterrey
- America/Monterrey
- Montevideo
- America/Montevideo
- New_York
- America/New_York
- Nome
- America/Nome
- Noronha
- America/Noronha
- Beulah
- America/North_Dakota/Beulah
- Center
- America/North_Dakota/Center
- New_Salem
- America/North_Dakota/New_Salem
- Nuuk
- America/Nuuk
- Ojinaga
- America/Ojinaga
- Panama
- America/Panama
- Paramaribo
- America/Paramaribo
- Phoenix
- America/Phoenix
- Port_au_Prince
- America/Port-au-Prince
- Porto_Velho
- America/Porto_Velho
- Puerto_Rico
- America/Puerto_Rico
- Punta_Arenas
- America/Punta_Arenas
- Rankin_Inlet
- America/Rankin_Inlet
- Recife
- America/Recife
- Regina
- America/Regina
- Resolute
- America/Resolute
- Rio_Branco
- America/Rio_Branco
- Santarem
- America/Santarem
- Santiago
- America/Santiago
- Santo_Domingo
- America/Santo_Domingo
- Sao_Paulo
- America/Sao_Paulo
- Scoresbysund
- America/Scoresbysund
- Sitka
- America/Sitka
- St_Johns
- America/St_Johns
- Swift_Current
- America/Swift_Current
- Tegucigalpa
- America/Tegucigalpa
- Thule
- America/Thule
- Tijuana
- America/Tijuana
- Toronto
- America/Toronto
- Vancouver
- America/Vancouver
- Whitehorse
- America/Whitehorse
- Winnipeg
- America/Winnipeg
- Yakutat
- America/Yakutat
- Casey
- Antarctica/Casey
- Davis
- Antarctica/Davis
- Macquarie
- Antarctica/Macquarie
- Mawson
- Antarctica/Mawson
- Palmer
- Antarctica/Palmer
- Rothera
- Antarctica/Rothera
- Troll
- Antarctica/Troll
- Vostok
- Antarctica/Vostok
- Almaty
- Asia/Almaty
- Amman
- Asia/Amman
- Anadyr
- Asia/Anadyr
- Aqtau
- Asia/Aqtau
- Aqtobe
- Asia/Aqtobe
- Ashgabat
- Asia/Ashgabat
- Atyrau
- Asia/Atyrau
- Baghdad
- Asia/Baghdad
- Baku
- Asia/Baku
- Bangkok
- Asia/Bangkok
- Barnaul
- Asia/Barnaul
- Beirut
- Asia/Beirut
- Bishkek
- Asia/Bishkek
- Chita
- Asia/Chita
- Colombo
- Asia/Colombo
- Damascus
- Asia/Damascus
- Dhaka
- Asia/Dhaka
- Dili
- Asia/Dili
- Dubai
- Asia/Dubai
- Dushanbe
- Asia/Dushanbe
- Famagusta
- Asia/Famagusta
- Gaza
- Asia/Gaza
- Hebron
- Asia/Hebron
- Ho_Chi_Minh
- Asia/Ho_Chi_Minh
- Hong_Kong
- Asia/Hong_Kong
- Hovd
- Asia/Hovd
- Irkutsk
- Asia/Irkutsk
- Jakarta
- Asia/Jakarta
- Jayapura
- Asia/Jayapura
- Jerusalem
- Asia/Jerusalem
- Kabul
- Asia/Kabul
- Kamchatka
- Asia/Kamchatka
- Karachi
- Asia/Karachi
- Kathmandu
- Asia/Kathmandu
- Khandyga
- Asia/Khandyga
- Kolkata
- Asia/Kolkata
- Krasnoyarsk
- Asia/Krasnoyarsk
- Kuching
- Asia/Kuching
- Macau
- Asia/Macau
- Magadan
- Asia/Magadan
- Makassar
- Asia/Makassar
- Manila
- Asia/Manila
- Nicosia
- Asia/Nicosia
- Novokuznetsk
- Asia/Novokuznetsk
- Novosibirsk
- Asia/Novosibirsk
- Omsk
- Asia/Omsk
- Oral
- Asia/Oral
- Pontianak
- Asia/Pontianak
- Pyongyang
- Asia/Pyongyang
- Qatar
- Asia/Qatar
- Qostanay
- Asia/Qostanay
- Qyzylorda
- Asia/Qyzylorda
- Riyadh
- Asia/Riyadh
- Sakhalin
- Asia/Sakhalin
- Samarkand
- Asia/Samarkand
- Seoul
- Asia/Seoul
- Shanghai
- Asia/Shanghai
- Singapore
- Asia/Singapore
- Srednekolymsk
- Asia/Srednekolymsk
- Taipei
- Asia/Taipei
- Tashkent
- Asia/Tashkent
- Tbilisi
- Asia/Tbilisi
- Tehran
- Asia/Tehran
- Thimphu
- Asia/Thimphu
- Tokyo
- Asia/Tokyo
- Tomsk
- Asia/Tomsk
- Ulaanbaatar
- Asia/Ulaanbaatar
- Urumqi
- Asia/Urumqi
- Ust_Nera
- Asia/Ust-Nera
- Vladivostok
- Asia/Vladivostok
- Yakutsk
- Asia/Yakutsk
- Yangon
- Asia/Yangon
- Yekaterinburg
- Asia/Yekaterinburg
- Yerevan
- Asia/Yerevan
- Azores
- Atlantic/Azores
- Bermuda
- Atlantic/Bermuda
- Canary
- Atlantic/Canary
- Cape_Verde
- Atlantic/Cape_Verde
- Faroe
- Atlantic/Faroe
- Madeira
- Atlantic/Madeira
- South_Georgia
- Atlantic/South_Georgia
- Stanley
- Atlantic/Stanley
- Adelaide
- Australia/Adelaide
- Brisbane
- Australia/Brisbane
- Broken_Hill
- Australia/Broken_Hill
- Darwin
- Australia/Darwin
- Eucla
- Australia/Eucla
- Hobart
- Australia/Hobart
- Lindeman
- Australia/Lindeman
- Lord_Howe
- Australia/Lord_Howe
- Melbourne
- Australia/Melbourne
- Perth
- Australia/Perth
- Sydney
- Australia/Sydney
- GMT
- Etc/GMT
- GMT1
- Etc/GMT+1
- GMT10
- Etc/GMT+10
- GMT11
- Etc/GMT+11
- GMT12
- Etc/GMT+12
- GMT2
- Etc/GMT+2
- GMT3
- Etc/GMT+3
- GMT4
- Etc/GMT+4
- GMT5
- Etc/GMT+5
- GMT6
- Etc/GMT+6
- GMT7
- Etc/GMT+7
- GMT8
- Etc/GMT+8
- GMT9
- Etc/GMT+9
- GMT_1
- Etc/GMT-1
- GMT_10
- Etc/GMT-10
- GMT_11
- Etc/GMT-11
- GMT_12
- Etc/GMT-12
- GMT_13
- Etc/GMT-13
- GMT_14
- Etc/GMT-14
- GMT_2
- Etc/GMT-2
- GMT_3
- Etc/GMT-3
- GMT_4
- Etc/GMT-4
- GMT_5
- Etc/GMT-5
- GMT_6
- Etc/GMT-6
- GMT_7
- Etc/GMT-7
- GMT_8
- Etc/GMT-8
- GMT_9
- Etc/GMT-9
- UTC
- Etc/UTC
- Andorra
- Europe/Andorra
- Astrakhan
- Europe/Astrakhan
- Athens
- Europe/Athens
- Belgrade
- Europe/Belgrade
- Berlin
- Europe/Berlin
- Brussels
- Europe/Brussels
- Bucharest
- Europe/Bucharest
- Budapest
- Europe/Budapest
- Chisinau
- Europe/Chisinau
- Dublin
- Europe/Dublin
- Gibraltar
- Europe/Gibraltar
- Helsinki
- Europe/Helsinki
- Istanbul
- Europe/Istanbul
- Kaliningrad
- Europe/Kaliningrad
- Kirov
- Europe/Kirov
- Kyiv
- Europe/Kyiv
- Lisbon
- Europe/Lisbon
- London
- Europe/London
- Madrid
- Europe/Madrid
- Malta
- Europe/Malta
- Minsk
- Europe/Minsk
- Moscow
- Europe/Moscow
- Paris
- Europe/Paris
- Prague
- Europe/Prague
- Riga
- Europe/Riga
- Rome
- Europe/Rome
- Samara
- Europe/Samara
- Saratov
- Europe/Saratov
- Simferopol
- Europe/Simferopol
- Sofia
- Europe/Sofia
- Tallinn
- Europe/Tallinn
- Tirane
- Europe/Tirane
- Ulyanovsk
- Europe/Ulyanovsk
- Vienna
- Europe/Vienna
- Vilnius
- Europe/Vilnius
- Volgograd
- Europe/Volgograd
- Warsaw
- Europe/Warsaw
- Zurich
- Europe/Zurich
- Chagos
- Indian/Chagos
- Maldives
- Indian/Maldives
- Mauritius
- Indian/Mauritius
- Apia
- Pacific/Apia
- Auckland
- Pacific/Auckland
- Bougainville
- Pacific/Bougainville
- Chatham
- Pacific/Chatham
- Easter
- Pacific/Easter
- Efate
- Pacific/Efate
- Fakaofo
- Pacific/Fakaofo
- Fiji
- Pacific/Fiji
- Galapagos
- Pacific/Galapagos
- Gambier
- Pacific/Gambier
- Guadalcanal
- Pacific/Guadalcanal
- Guam
- Pacific/Guam
- Honolulu
- Pacific/Honolulu
- Kanton
- Pacific/Kanton
- Kiritimati
- Pacific/Kiritimati
- Kosrae
- Pacific/Kosrae
- Kwajalein
- Pacific/Kwajalein
- Marquesas
- Pacific/Marquesas
- Nauru
- Pacific/Nauru
- Niue
- Pacific/Niue
- Norfolk
- Pacific/Norfolk
- Noumea
- Pacific/Noumea
- Pago_Pago
- Pacific/Pago_Pago
- Palau
- Pacific/Palau
- Pitcairn
- Pacific/Pitcairn
- Port_Moresby
- Pacific/Port_Moresby
- Rarotonga
- Pacific/Rarotonga
- Tahiti
- Pacific/Tahiti
- Tarawa
- Pacific/Tarawa
- Tongatapu
- Pacific/Tongatapu
- Category
- This class loads information about categories. It also handles low-level tasks for managing categories, such as creating, deleting, and modifying them.
- Config
- Handles loading and saving SMF's settings, both in Settings.php and database.
- Cookie
- Represents a cookie.
- MySQL
- Interacts with MySQL databases.
- PostgreSQL
- Interacts with PostgreSQL databases.
- DatabaseApi
- Class DatabaseApi
- DebugUtils
- Contains functions that aid in debugging and are generally useful to developers.
- Draft
- Represents a post draft.
- Editor
- Creates the editor input box so that people can write messages to post.
- ErrorHandler
- SMF's error handler.
- Forum
- The root Forum class. Used when browsing the forum normally.
- ColorTable
- File
- FileHeader
- Image
- ImageHeader
- LzwCompression
- Class LzwCompression
- Image
- Represents an image and allows low-level graphics operations to be performed, specially as needed for avatars, attachments, etc.
- Group
- Represents a member group.
- IntegrationHook
- Handles adding, removing, and calling hooked integration functions.
- IP
- Represents an IP address and allows performing various operations on it.
- ItemList
- This class provides a standard way of displaying lists for SMF.
- Lang
- Handles the localizable strings shown in SMF's user interface.
- AsciiTransliterator
- Transliterates Unicode to ASCII.
- MessageFormatter
- Provides the ability to process ICU MessageFormat strings, regardless whether the host has the intl extension installed.
- Logging
- This class concerns itself with logging and tracking statistics.
- Class for preparing and handling email messages.
- SendMail
- Sends mail via SendMail
- SMTP
- Sends mail via SMTP
- SMTPTLS
- Sends mail via SMTP using TLS
- MailAgent
- Mentions
- This really is a pseudo class, I couldn't justify having instance of it while mentioning so I just made every method static
- Menu
- Represents a menu, such as the admin menu or profile menu.
- Msg
- Class for a single posted message.
- Html
- Json
- Xml
- FtpConnection
- Class FtpConnection Simple FTP protocol implementation.
- PackageManager
- This is the main package manager.
- SubsPackage
- Various utility functions for working with packages.
- XmlArray
- Class XmlArray Represents an XML array
- PageIndex
- Constructs a page list.
- Parser
- Class Parser
- BBCodeParser
- Parses Bulletin Board Code in a string and converts it to HTML.
- MarkdownParser
- Converts Markdown to BBCode or HTML.
- SmileyParser
- Converts smiley codes to HTML img tags.
- Conversation
- Represents a collection of related personal messages.
- DraftPM
- Represents a personal message draft.
- Folder
- Represents a personal message folder (i.e. "inbox" or "sent items")
- Label
- Represents a personal message label.
- PM
- Represents a single personal message.
- Popup
- The popup menu for unread personal messages.
- Received
- This class represents the received copy of a personal message in a member's inbox. It has info such as whether the PM has been read by this member, deleted by the member, etc., and whether it was sent to this member as a visible recipient or as a hidden one (i.e a "BCC" recipient).
- Rule
- Represents a sorting rule that can be applied to incoming personal messages.
- Search
- Shows the search form.
- SearchResult
- Shows personal message search results.
- Poll
- Represents a poll.
- PollChoice
- Represents one of the choices a user can vote for in a poll.
- Profile
- Represents a member's profile as shown by ?action=profile.
- ProxyServer
- This is a lightweight proxy for serving images, generally meant to be used alongside SSL.
- QueryString
- Handles the query string, request variables, and session management.
- Sapi
- Server Application Programming Interface.
- Custom
- Used for the "custom search index" option
- Fulltext
- Class Fulltext Used for fulltext index searching
- Parsed
- Search index API.
- Standard
- Standard non full index, non custom index search
- SearchApi
- Class SearchApi
- SearchResult
- Class for a single posted message.
- Security
- A collection of miscellaneous methods related to forum security.
- SecurityToken
- Represents a security token.
- ServerSideIncludes
- 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.
- Session
- Implementation of PHP's session API.
- Slug
- Creates slug strings for use in queryless URLs.
- Display
- Class for returning available form data for this gateway
- Payment
- Class of functions to validate a IPN response and provide details of the payment
- TaskRunner
- Runs background tasks (a.k.a. cron jobs), including scheduled tasks.
- ApprovePost_Notify
- This class contains code used to notify moderators when there are posts that need to be approved.
- ApproveReply_Notify
- This class contains code used to notify a member when a moderator replied to the member's own unapproved topic.
- BackgroundTask
- Base class for all background tasks.
- Birthday_Notify
- This class contains code used to send out "Happy Birthday" emails.
- Buddy_Notify
- This class contains code used to notify members when they have been added to other members' buddy lists.
- CreateAttachment_Notify
- This class contains code used to notify moderators when there are attachments that need to be approved.
- CreatePost_Notify
- This class contains code used to notify people when a new post is created that is relevant to them in some way: new topics in boards they watch, replies to topics they watch, posts that mention them, and/or posts that quote them.
- DailyMaintenance
- Does some daily cleaning up.
- EventNew_Notify
- This class contains code used to notify people that a new event has been added to the calendar - but only when no topic has been created.
- ExportProfileData
- This class contains code used to incrementally export a member's profile data to one or more downloadable files.
- FetchCalendarSubscriptions
- Imports updates from subscribed calendars into SMF's calendar.
- FetchSMFiles
- Retrieves data (e.g. last version of SMF) from simplemachines.org.
- GenericScheduledTask
- A class for running scheduled tasks with custom callable functions.
- GenericTask
- A class for running background tasks with custom callable functions.
- GroupAct_Notify
- This class contains code used to notify a member when a group moderator has taken action on that member's request to join a group.
- GroupReq_Notify
- This class contains code used to notify group moderators that a member has requested to join the group.
- Likes_Notify
- This class contains code used to notify members when something is liked.
- MemberReport_Notify
- This class contains code used to notify moderators when someone files a report about another member's profile.
- MemberReportReply_Notify
- This class contains code used to notify a moderator when another moderator replies to a profile moderation report that the first mod has commented on.
- MsgReport_Notify
- This class contains code used to notify moderators when someone files a report about a message.
- MsgReportReply_Notify
- This class contains code used to notify a moderator when another moderator replies to a message moderation report that the first mod has commented on.
- PaidSubs
- Performs the standard checks on expiring/near expiring subscriptions.
- PruneLogTopics
- Prunes log_topics, log_boards, and log_mark_boards_read.
- Register_Notify
- This class contains code used to notify people when a new member new signs up.
- RemoveOldDrafts
- Check for old drafts and remove them.
- RemoveTempAttachments
- Removes old, unposted attachments from the attachment upload directory.
- RemoveTopicRedirects
- Deletes moved topic notices that have passed their best-by date.
- ScheduledTask
- Base class for scheduled tasks.
- SendDigests
- Send out a daily or weekly email of all subscribed topics.
- UpdateSpoofDetectorNames
- Updates the values of the spoofdetector_name column in the members table.
- UpdateTldRegex
- This file contains code used to initiate updates of Config::$modSettings['tld_regex']
- UpdateUnicode
- This class contains code used to update SMF's Unicode data files.
- WeeklyMaintenance
- Does some weekly maintenance.
- Theme
- Represents a loaded theme. Also provides many theme-related static methods.
- Time
- Extends \DateTime with some extra features for SMF.
- TimeInterval
- Extends \DateInterval with some extra features for SMF.
- TimeZone
- This class provides some methods to simplify working with time zones.
- Topic
- Represents a topic.
- SpoofDetector
- Class SpoofDetector
- Utf8String
- A class for manipulating UTF-8 strings.
- Url
- Represents a URL string and allows performing various operations on the URL.
- User
- Represents a user, including both guests and registered members.
- Utils
- Holds some widely used stuff, like $context and $smcFunc.
- Uuid
- Generates, compresses, and expands Universally Unique Identifiers.
- Verifier
- Sets up the anti-spam control that tries to verify the user's humanity.
- CurlFetcher
- Class CurlFetcher
- FtpFetcher
- Fetches data from FTP URLs.
- SocketFetcher
- Fetches data from HTTP URLs via socket connections.
- WebFetchApi
- Class SearchApi
Traits
- ActionRouter
- Provides a simple implementation of the SMF\Routable interface for actions.
- BackwardCompatibility
- BackwardCompatibility
- ActionSuffixRouter
- Similar to SMF\ActionRouter, but designed to build routes for actions that are appended to board or topic routes rather than having their own independent routes.
- ActionTrait
- ArrayAccessHelper
- Simplifies and standardizes implementing \ArrayAccess.
- BackwardCompatibility
- Assists in providing backward compatibility with code written for earlier versions of SMF.
- DynamicPropertyHelper
- Simplifies and standardizes implementing dynamic properties.
Constants
- DB_SCRIPT_VERSION = '3-0'
- DEBUG_MODE = \false
- Simple Machines Forum (SMF)
- EXPORTING = 1
- FROM_CLI = Sapi::isCLI()
- IMAGETYPE_AVIF = 19
- JQUERY_VERSION = '3.6.3'
- JQUERY_VERSION = '3.6.3'
- JQUERY_VERSION = '3.6.3'
- MAX_CLAIM_THRESHOLD = self::MAX_CLAIM_THRESHOLD
- MAX_CRON_TIME = self::MAX_CRON_TIME
- MYSQL_TITLE = 'MySQL'
- MYSQL_TITLE = 'MySQL'
- MYSQL_TITLE = 'MySQL'
- POSTGRE_TITLE = 'PostgreSQL'
- POSTGRE_TITLE = 'PostgreSQL'
- POSTGRE_TITLE = 'PostgreSQL'
- SMF = 'BACKGROUND'
- SMF = 1
- SMF = 1
- SMF = basename(__FILE__)
- SMF = 'BACKGROUND'
- SMF = 1
- SMF = 'PROXY'
- SMF = 'SSI'
- SMF_FULL_VERSION = 'SMF ' . \SMF_VERSION
- SMF_FULL_VERSION = 'SMF ' . \SMF_VERSION
- SMF_FULL_VERSION = 'SMF ' . \SMF_VERSION
- SMF_INSTALLING = 1
- SMF_INSTALLING = 1
- SMF_LANG_VERSION = '3.0 Alpha 2'
- SMF_SETTINGS_BACKUP_FILE = \dirname(\SMF_SETTINGS_FILE) . '/' . \pathinfo(\SMF_SETTINGS_FILE, \PATHINFO_FILENAME) . '_bak.php'
- SMF_SETTINGS_BACKUP_FILE = __DIR__ . '/Settings_bak.php'
- SMF_SETTINGS_BACKUP_FILE = dirname(SMF_SETTINGS_FILE) . '/' . pathinfo(SMF_SETTINGS_FILE, PATHINFO_FILENAME) . '_bak.php'
- SMF_SETTINGS_FILE = __DIR__ . '/Settings.php'
- SMF_SETTINGS_FILE = __DIR__ . '/Settings.php'
- SMF_SETTINGS_FILE = $settingsFile
- SMF_SOFTWARE_YEAR = '2025'
- SMF_SOFTWARE_YEAR = '2025'
- SMF_SOFTWARE_YEAR = $matches[1]
- SMF_SOFTWARE_YEAR = '2025'
- SMF_UNICODE_VERSION = '16.0.0.0'
- SMF_USER_AGENT = 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
- SMF_USER_AGENT = 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
- SMF_USER_AGENT = 'SMF'
- SMF_USER_AGENT = 'SMF'
- SMF_USER_AGENT = 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
- SMF_VERSION = '3.0 Alpha 2'
- SMF_VERSION = '3.0 Alpha 2'
- SMF_VERSION = $matches[1]
- SMF_VERSION = '3.0 Alpha 2'
- TIME_START = \microtime(\true)
- TIME_START = \microtime(\true)
- TIME_START = \microtime(\true)
- TIME_START = \microtime(\true)
Functions
- initialize_inputs() : mixed
- load_lang_file() : mixed
- load_database() : mixed
- installExit() : mixed
- Welcome() : mixed
- CheckFilesWritable() : mixed
- DatabaseSettings() : mixed
- ForumSettings() : mixed
- DatabasePopulation() : mixed
- AdminAccount() : mixed
- DeleteInstall() : mixed
- installer_updateSettingsFile() : mixed
- fixModSecurity() : mixed
- template_install_above() : mixed
- template_install_below() : mixed
- template_welcome_message() : mixed
- template_warning_divs() : mixed
- template_chmod_files() : mixed
- template_database_settings() : mixed
- template_forum_settings() : mixed
- template_populate_database() : mixed
- template_admin_account() : mixed
- template_delete_install() : mixed
- getFiles() : array<string|int, mixed>
- upgrade_clean_cache() : mixed
- Clean the cache using the SMF 2.1 CacheAPI.
- getMemberGroups() : array<string|int, mixed>
- Returns a list of member groups. Used to upgrade 1.0 and 1.1.
- makeFilesWritable() : bool
- Make files writable. First try to use regular chmod, but if that fails, try to use FTP.
- quickFileWritable() : bool
- The quick version of makeFilesWritable, which does not support FTP.
- deleteFile() : mixed
- Delete a file. Check permissions first, just in case.
- print_error() : mixed
- Prints an error to stderr.
- throw_error() : bool
- Throws a graphical error message.
- smf_mysql_fetch_assoc() : array<string|int, mixed>|null
- smf_mysql_fetch_row() : array<string|int, mixed>|null
- smf_mysql_free_result() : mixed
- smf_mysql_insert_id() : int|string
- smf_mysql_num_rows() : int
- smf_mysql_real_escape_string() : mixed
- array_column() : mixed
- upgradeCacheSettings() : string
- Creates the json_encoded array for the current cache option.
- upgradeExit() : mixed
- findSettingsFile() : mixed
- load_lang_file() : mixed
- redirectLocation() : mixed
- loadEssentialData() : mixed
- initialize_inputs() : mixed
- WelcomeLogin() : mixed
- checkFolders() : mixed
- checkLogin() : mixed
- UpgradeOptions() : mixed
- BackupDatabase() : mixed
- backupTable() : mixed
- DatabaseChanges() : mixed
- setSqlMode() : mixed
- DeleteUpgrade() : mixed
- addBackgroundTasks() : mixed
- cli_scheduled_fetchSMfiles() : mixed
- convertSettingsToTheme() : mixed
- convertSettingstoOptions() : mixed
- php_version_check() : mixed
- db_version_check() : mixed
- fixRelativePath() : mixed
- parse_sql() : mixed
- upgrade_query() : mixed
- protected_alter() : mixed
- textfield_alter() : mixed
- Alter a text column definition preserving its character set.
- nextSubstep() : mixed
- cmdStep0() : mixed
- ConvertUtf8() : mixed
- Handles converting your database to UTF-8
- upgrade_unserialize() : string|bool
- Wrapper for unserialize that attempts to repair corrupted serialized data strings
- serialize_to_json() : mixed
- Cleanup() : mixed
- CleanupLanguages() : mixed
- CleanupAgreements() : mixed
- template_chmod() : mixed
- template_upgrade_above() : mixed
- template_upgrade_below() : mixed
- template_xml_above() : mixed
- template_xml_below() : mixed
- template_error_message() : mixed
- template_welcome_message() : mixed
- template_upgrade_options() : mixed
- template_backup_database() : mixed
- template_backup_xml() : mixed
- template_database_changes() : mixed
- template_database_xml() : mixed
- template_convert_utf8() : mixed
- template_convert_xml() : mixed
- template_serialize_json() : mixed
- template_serialize_json_xml() : mixed
- template_cleanup() : mixed
- template_cleanup_xml() : mixed
- template_upgrade_complete() : mixed
- MySQLConvertOldIp() : void
- Convert MySQL (var)char ip col to binary
- upgradeGetColumnInfo() : array<string|int, mixed>
- Get the column info. This is basically the same as smf_db_list_columns but we get 1 column, force detail and other checks.
- Activate() : mixed
- Activate an users account.
- AdminMain() : mixed
- The main admin handling function.<br> It initialises all the basic context required for the admin center.<br> It passes execution onto the relevant admin section.<br> If the passed section is not found it shows the admin home page.
- prepareDBSettingContext() : void
- Helper function, it sets up the context for database settings.
- saveSettings() : void
- Helper function. Saves settings by putting them in Settings.php or saving them in the settings table.
- saveDbSettings() : void
- Helper function for saving database settings.
- getServerVersions() : array<string|int, mixed>
- Get a list of versions that are currently installed on the server.
- getFileVersions() : array<string|int, mixed>
- Search through source, theme and language files to determine their version.
- updateAdminPreferences() : void
- Saves the admin's current preferences to the database.
- emailAdmins() : void
- Send all the administrators a lovely email.
- adminLogin() : void
- Question the verity of the admin by asking for his or her password.
- ModifyAntispamSettings() : array<string|int, mixed>|null
- Let's try keep the spam to a minimum ah Thantos?
- ManageAttachments() : mixed
- The main 'Attachments and Avatars' management function.
- attachDirStatus() : array<string|int, mixed>
- Checks the status of an attachment directory and returns an array of the status key, if that status key signifies an error, and the file count.
- ManageAttachmentSettings() : array<string|int, mixed>|null
- Allows to show/change attachment settings.
- ManageAvatarSettings() : array<string|int, mixed>|null
- This allows to show/change avatar settings.
- BrowseFiles() : void
- Show a list of attachment or avatar files.
- MaintainFiles() : void
- Show several file maintenance options.
- RemoveAttachment() : void
- Remove a selection of attachments or avatars.
- RemoveAttachmentByAge() : void
- Remove attachments older than a given age.
- RemoveAttachmentBySize() : void
- Remove attachments larger than a given size.
- RemoveAllAttachments() : void
- Removes all attachments in a single click Called from the maintenance screen by ?action=admin;area=manageattachments;sa=removeall.
- RepairAttachments() : void
- This function should find attachments in the database that no longer exist and clear them, and fix filesize issues.
- ManageAttachmentPaths() : void
- This function lists and allows updating of multiple attachments paths.
- TransferAttachments() : void
- Maintance function to move attachments from one directory to another
- Ban() : void
- Ban center. The main entrance point for all ban center functions.
- updateBanMembers() : void
- As it says... this tries to review the list of banned members, to match new bans.
- BanList() : void
- Shows a list of bans currently set.
- BanEdit() : void
- This function is behind the screen for adding new bans and modifying existing ones.
- BanBrowseTriggers() : void
- This handles the screen for showing the banned entities It is accessed by ?action=admin;area=ban;sa=browse It uses sub-tabs for browsing by IP, hostname, email or username.
- BanEditTrigger() : void
- This function handles the ins and outs of the screen for adding new ban triggers or modifying existing ones.
- BanLog() : void
- This handles the listing of ban log entries, and allows their deletion.
- ManageBoards() : void
- The main dispatcher; doesn't do anything, just delegates.
- EditBoardSettings() : array<string|int, mixed>|null
- A screen to set a few general board and category settings.
- ManageCalendar() : void
- The main controlling function doesn't have much to do... yet.
- ModifyHolidays() : void
- The function that handles adding, and deleting holiday data
- EditHoliday() : void
- This function is used for adding/editing a specific holiday
- ModifyCalendarSettings() : array<string|int, mixed>|null
- Show and allow to modify calendar settings. Obviously.
- AdminEndSession() : void
- This ends a admin session, requiring authentication to access the ACP again.
- ViewErrorLog() : void
- View the forum's error log.
- ModifyFeatureSettings() : void
- This function passes control through to the relevant tab.
- ModifyBasicSettings() : array<string|int, mixed>|null
- Config array for changing the basic forum settings Accessed from ?action=admin;area=featuresettings;sa=basic;
- ModifyBBCSettings() : array<string|int, mixed>|null
- Set a few Bulletin Board Code settings. It loads a list of Bulletin Board Code tags to allow disabling tags.
- ModifyLayoutSettings() : array<string|int, mixed>|null
- Allows modifying the global layout settings in the forum Accessed through ?action=admin;area=featuresettings;sa=layout;
- ModifySignatureSettings() : array<string|int, mixed>|null
- You'll never guess what this function does.
- ShowCustomProfiles() : void
- Show all the custom profile fields available to the user.
- EditCustomProfiles() : void
- Edit some profile fields?
- ModifyLikesSettings() : array<string|int, mixed>|null
- Config array for changing like settings Accessed from ?action=admin;area=featuresettings;sa=likes;
- ModifyMentionsSettings() : array<string|int, mixed>|null
- Config array for changing like settings Accessed from ?action=admin;area=featuresettings;sa=mentions;
- ModifyAlertsSettings() : void
- Handles modifying the alerts settings
- AdminSearch() : void
- This function allocates out all the search stuff.
- AdminHome() : void
- The main administration section.
- ManageLanguages() : void
- This is the main function for the languages area.
- ModifyLanguages() : void
- This lists all the current languages and allows editing of them.
- AddLanguage() : void
- Interface for adding a new language
- ModifyLanguageSettings() : array<string|int, mixed>|null
- Edit language related settings.
- DownloadLanguage() : void
- Download a language file from the Simple Machines website.
- ModifyLanguage() : void
- Edit a particular set of language entries.
- AdminLogs() : array<string|int, mixed>|null
- This function decides which log to load.
- ManageMail() : void
- Main dispatcher. This function checks permissions and passes control through to the relevant section.
- BrowseMailQueue() : void
- Display the mail queue.
- ClearMailQueue() : void
- This function clears the mail queue of all emails, and at the end redirects to browse.
- ModifyMailSettings() : array<string|int, mixed>|null
- Allows to view and modify the mail settings.
- TestMailSend() : void
- Test mail sending ability.
- ManageMaintenance() : void
- Main dispatcher, the maintenance access point.
- get_integration_hooks_data() : array<string|int, mixed>
- Callback function for the integration hooks list (list_integration_hooks) Gets all of the hooks in the system and their status
- reattributePosts() : array<string|int, mixed>
- This function is used to reassociate members with relevant posts.
- MaintainRoutine() : void
- Supporting function for the routine maintenance area.
- MaintainDatabase() : void
- Supporting function for the database maintenance area.
- MaintainMembers() : void
- Supporting function for the members maintenance area.
- MaintainTopics() : void
- Supporting function for the topics maintenance area.
- list_integration_hooks() : void
- Generates a list of integration hooks for display Accessed through ?action=admin;area=maintain;sa=hooks; Allows for removal or disabling of selected hooks
- VersionDetail() : void
- Perform a detailed version check. A very good thing ;).
- MaintainFindFixErrors() : void
- Find and fix all errors on the forum.
- AdminBoardRecount() : void
- Recount many forum totals that can be recounted automatically without harm.
- RebuildSettingsFile() : void
- Rebuilds Settings.php to make it nice and pretty.
- MaintainEmptyUnimportantLogs() : void
- Empties all uninmportant logs
- MaintainCleanCache() : void
- Wipes the whole cache.
- OptimizeTables() : void
- Optimizes all tables in the database and lists how much was saved.
- ConvertEntities() : void
- Converts HTML-entities to their UTF-8 character equivalents.
- ConvertMsgBody() : void
- Convert the column "body" of the table {db_prefix}messages from TEXT to MEDIUMTEXT and vice versa.
- MaintainReattributePosts() : void
- Re-attribute posts.
- MaintainPurgeInactiveMembers() : void
- Removing old members. Done and out!
- MaintainRecountPosts() : void
- Recalculate all members post counts it requires the admin_forum permission.
- MaintainMassMoveTopics() : void
- Moves topics from one board to another.
- MaintainRemoveOldPosts() : void
- Removing old posts doesn't take much as we really pass through.
- MaintainRemoveOldDrafts() : void
- Removing old drafts
- ModifyMembergroups() : void
- Main dispatcher, the entrance point for all 'Manage Membergroup' actions.
- AddMemberGroup() : void
- This function handles adding a membergroup and setting some initial properties.
- DeleteMembergroup() : void
- Deleting a membergroup by URL (not implemented).
- EditMembergroup() : void
- Editing a membergroup.
- MembergroupIndex() : void
- Shows an overview of the current membergroups.
- ModifyMembergroupsettings() : array<string|int, mixed>|null
- Set some general membergroup settings and permissions.
- ViewMembers() : void
- The main entrance point for the Manage Members screen.
- ViewMemberlist() : void
- View all members list. It allows sorting on several columns, and deletion of selected members. It also handles the search query sent by ?action=admin;area=viewmembers;sa=search.
- AdminApprove() : void
- This function handles the approval, rejection, activation or deletion of members.
- MembersAwaitingActivation() : void
- List all members who are awaiting approval / activation, sortable on different columns.
- SearchMembers() : void
- Search the member list, using one or more criteria.
- ModifyModSettings() : array<string|int, mixed>|null
- This my friend, is for all the mod authors out there.
- ManageNews() : void
- The news dispatcher; doesn't do anything, just delegates.
- prepareMailingForPreview() : void
- Prepare subject and message of an email for the preview box Used in ComposeMailing and RetrievePreview (Xml.php)
- EditNews() : void
- Let the administrator(s) edit the news items for the forum.
- SelectMailingMembers() : void
- This function allows a user to select the membergroups to send their mailing to.
- ComposeMailing() : void
- Shows a form to edit a forum mailing and its recipients.
- SendMailing() : void
- Handles the sending of the forum mailing in batches.
- ModifyNewsSettings() : array<string|int, mixed>|null
- Set general news and newsletter settings and permissions.
- ModifyPermissions() : void
- Dispatches to the right function based on the given subaction.
- theme_inline_permissions() : void
- Show a collapsible box to set a specific permission.
- loadPermissionProfiles() : void
- Load permissions profiles.
- updateChildPermissions() : bool|null
- This function updates the permissions of any groups based off this group.
- loadIllegalPermissions() : array<string|int, mixed>
- Load permissions someone cannot grant.
- PermissionIndex() : void
- Sets up the permissions by membergroup index page.
- PermissionsByBoard() : void
- Handle permissions by board... more or less. :P
- ModifyMembergroup() : void
- Initializes the necessary to modify a membergroup's permissions.
- ModifyMembergroup2() : void
- This function actually saves modifications to a membergroup's board permissions.
- SetQuickGroups() : void
- Handles permission modification actions from the upper part of the permission manager index.
- ModifyPostModeration() : void
- Present a nice way of applying post moderation.
- EditPermissionProfiles() : void
- Add/Edit/Delete profiles.
- GeneralPermissionSettings() : array<string|int, mixed>|null
- A screen to set some general settings for permissions.
- ManagePostSettings() : void
- The main entrance point for the 'Posts and topics' screen.
- ModifyPostSettings() : array<string|int, mixed>|null
- Modify any setting related to posts and posting.
- ModifyTopicSettings() : array<string|int, mixed>|null
- Modify any setting related to topics.
- ModifyDraftSettings() : array<string|int, mixed>|null
- Modify any setting related to drafts.
- RegCenter() : void
- Entrance point for the registration center, it checks permissions and forwards to the right function based on the subaction.
- AdminRegister() : void
- This function allows the admin to register a new member by hand.
- EditAgreement() : void
- Allows the administrator to edit the registration agreement, and choose whether it should be shown or not. It writes and saves the agreement to the agreement.txt file.
- EditPrivacyPolicy() : void
- Sure, you can sell my personal info for profit (...or not)
- SetReserved() : void
- Set the names under which users are not allowed to register.
- ModifyRegistrationSettings() : array<string|int, mixed>|null
- This function handles registration settings, and provides a few pretty stats too while it's at it.
- RepairBoards() : void
- Finds or repairs errors in the database to fix possible problems.
- ReportsMain() : void
- Handling function for generating reports.
- BoardReport() : void
- Standard report about what settings the boards have.
- BoardPermissionsReport() : void
- Generate a report on the current permissions by board and membergroup.
- MemberGroupsReport() : void
- Show what the membergroups are made of.
- GroupPermissionsReport() : void
- Show the large variety of group permissions assigned to each membergroup.
- StaffReport() : void
- Report for showing all the forum staff members - quite a feat! functions ending with "Report" are responsible for generating data for reporting.
- ManageSearch() : void
- Main entry point for the admin search settings screen.
- EditSearchSettings() : array<string|int, mixed>|null
- Edit some general settings related to the search function.
- EditWeights() : void
- Edit the relative weight of the search factors.
- EditSearchMethod() : void
- Edit the search method and search index used.
- CreateMessageIndex() : void
- Create a custom search index for the messages table.
- SearchEngines() : void
- Entry point for this section.
- consolidateSpiderStats() : void
- This function takes any unprocessed hits and turns them into stats.
- recacheSpiderNames() : void
- Recache spider names?
- SpiderStats() : void
- Show the spider statistics.
- SpiderLogs() : void
- See what spiders have been up to.
- ViewSpiders() : void
- View a list of all the spiders we know about.
- ManageSearchEngineSettings() : array<string|int, mixed>|null
- This is really just the settings page.
- EditSpider() : void
- Here we can add, and edit, spider info!
- ModifySettings() : void
- This is the main dispatcher. Sets up all the available sub-actions, all the tabs and selects the appropriate one based on the sub-action.
- prepareServerSettingsContext() : mixed
- Helper function, it sets up the context for the manage server settings.
- ModifyGeneralSettings() : array<string|int, mixed>|null
- General forum settings - forum name, maintenance mode, etc.
- ModifyDatabaseSettings() : array<string|int, mixed>|null
- Basic database and paths settings - database name, host, etc.
- ModifyCookieSettings() : array<string|int, mixed>|null
- This function handles cookies settings modifications.
- ModifyGeneralSecuritySettings() : array<string|int, mixed>|null
- Settings really associated with general security aspects.
- ModifyCacheSettings() : array<string|int, mixed>|null
- Simply modifying cache functions
- ModifyExportSettings() : array<string|int, mixed>|null
- Controls settings for data export functionality
- ModifyLoadBalancingSettings() : array<string|int, mixed>|null
- Allows to edit load balancing settings.
- ShowPHPinfoSettings() : void
- Allows us to see the servers php settings
- ManageSmileys() : void
- This is the dispatcher of smileys administration.
- EditSmileySettings() : array<string|int, mixed>|null
- Handles modifying smileys settings.
- AddSmiley() : void
- Add a smiley, that's right.
- EditSmileys() : void
- Add, remove, edit smileys.
- EditSmileyOrder() : void
- Allows to edit smileys order.
- InstallSmileySet() : void
- Install a smiley set.
- EditMessageIcons() : void
- Handles editing message icons
- ManagePaidSubscriptions() : void
- The main entrance point for the 'Paid Subscription' screen, calling the right function based on the given sub-action.
- loadSubscriptions() : array<string|int, mixed>
- This just kind of caches all the subscription data.
- addSubscription() : void
- Add or extend a subscription of a user.
- removeSubscription() : void
- Removes a subscription from a user, as in removes the groups.
- reapplySubscriptions() : void
- Reapplies all subscription rules for each of the users.
- loadPaymentGateways() : array<string|int, mixed>
- Load all the payment gateways.
- ViewSubscriptions() : void
- View a list of all the current subscriptions Requires the admin_forum permission.
- ViewSubscribedUsers() : void
- View all the users subscribed to a particular subscription.
- ModifySubscription() : void
- Adding, editing and deleting subscriptions.
- ModifyUserSubscription() : void
- Edit or add a user subscription.
- ModifySubscriptionSettings() : array<string|int, mixed>|null
- Set any setting related to paid subscriptions, i.e.
- ManageScheduledTasks() : void
- Scheduled tasks management dispatcher. This function checks permissions and delegates to the appropriate function based on the sub-action.
- ScheduledTasks() : void
- List all the scheduled task in place on the forum.
- EditTask() : void
- Function for editing a task.
- TaskLog() : void
- Show the log of all tasks that have taken place.
- TaskSettings() : array<string|int, mixed>|null
- This handles settings related to scheduled tasks
- ThemesMain() : void
- Subaction handler - manages the action and delegates control to the proper sub-action.
- ThemeAdmin() : void
- This function allows administration of themes and their settings, as well as global theme settings.
- ThemeList() : void
- This function lists the available themes and provides an interface to reset the paths of all the installed themes.
- SetThemeOptions() : void
- Administrative global settings.
- RemoveTheme() : void
- Remove a theme from the database.
- EnableTheme() : void
- Handles enabling/disabling a theme from the admin center
- ThemeInstall() : void
- Installs new themes, calls the respective function according to the install type.
- EditTheme() : void
- Shows an interface for editing the templates.
- CopyTemplate() : void
- Makes a copy of a template file in a new location
- ModifyWarningSettings() : array<string|int, mixed>|null
- Moderation type settings - although there are fewer than we have you believe ;)
- ModEndSession() : void
- This ends a moderator session, requiring authentication to access the MCP again.
- ModerationHome() : void
- This function basically is the home page of the moderation center.
- ViewModlog() : void
- Prepares the information from the moderation log for viewing.
- ModerationMain() : void
- Entry point for the moderation center.
- PostModerationMain() : void
- This is a handling function for all things post moderation.
- approveAllData() : void
- This is a helper function - basically approve everything!
- UnapprovedPosts() : void
- View all unapproved posts.
- UnapprovedAttachments() : void
- View all unapproved attachments.
- ApproveMessage() : void
- Approve a post, just the one.
- ReportedContent() : void
- Sets and call a function based on the given subaction. Acts as a dispatcher function.
- recountOpenReports() : int
- Recount all open reports. Sets a SESSION var with the updated info.
- ShowReports() : void
- Shows all currently open reported posts.
- ShowClosedReports() : void
- Shows all currently closed reported posts.
- ReportDetails() : void
- Shows detailed information about a report. such as report comments and moderator comments.
- HandleReport() : void
- Performs closing/ignoring actions for a given report.
- HandleComment() : void
- Creates/Deletes moderator comments.
- EditComment() : void
- Shows a textarea for editing a moderator comment.
- ShowNotice() : void
- Show a notice sent to a user.
- ViewWarnings() : void
- Entry point for viewing warning related stuff.
- ViewWarningLog() : void
- Simply put, look at the warning log!
- ViewWarningTemplates() : void
- Load all the warning templates.
- ModifyWarningTemplate() : void
- Edit a warning template.
- ViewWatchedUsers() : void
- View watched users.
- account() : void
- Handles the account section of the profile
- activateAccount() : void
- Activate an account.
- alerts_popup() : void
- Set up the requirements for the alerts popup - the area that shows all the alerts just quickly for the current user.
- editBuddyIgnoreLists() : void
- Show all the users buddies, as well as a add/delete interface.
- editBuddies() : void
- Show all the users buddies, as well as a add/delete interface.
- editIgnoreList() : void
- Allows the user to view their ignore list, as well as the option to manage members on it.
- deleteAccount() : void
- Present a screen to make sure the user wants to be deleted
- deleteAccount2() : void
- Actually delete an account.
- export_profile_data() : void
- Initiates exports a member's profile, posts, and personal messages to a file.
- create_export_dir() : string|bool
- Returns the path to a secure directory for storing exported profile data.
- get_export_formats() : array<string|int, mixed>
- Helper function that defines data export formats in a single location.
- export_attachment() : void
- Allows a member to export their attachments.
- download_export_file() : void
- Downloads exported profile data file.
- forumProfile() : void
- Handles the main "Forum Profile" section of the profile
- groupMembership() : void
- Function to allow the user to choose group membership etc.
- groupMembership2() : string
- This function actually makes all the group changes
- ignoreboards() : void
- Handles the "ignored boards" section of the profile (if enabled)
- issueWarning() : void
- Issue/manage an user's warning status.
- ModifyProfile() : void
- The main designating function for modifying profiles. Loads up info, determins what to do, etc.
- notification() : void
- Display the notifications and settings for changes.
- alert_configuration() : void
- Handles configuration of alert preferences
- alert_markread() : void
- Marks all alerts as read for the specified user
- alert_notifications_topics() : void
- Handles alerts related to topics and posts
- alert_notifications_boards() : void
- Handles preferences related to board-level notifications
- makeNotificationChanges() : void
- Make any notification changes that need to be made.
- subscriptions() : void
- Function for doing all the paid subscription stuff - kinda.
- profile_popup() : void
- Set up the requirements for the profile popup - the area that is shown as the popup menu for the current user.
- showAlerts() : void
- Shows all alerts for a member
- showPermissions() : void
- Shows which permissions a user has
- showPosts() : void
- Show all posts by a member
- showUnwatched() : void
- Show all the unwatched topics.
- showAttachments() : void
- Show all the attachments belonging to a member.
- statPanel() : void
- Gets the user stats for display
- summary() : void
- View a summary.
- tfadisable() : void
- Provides interface to disable two-factor authentication in SMF
- tfasetup() : void
- Provides interface to setup Two Factor Auth in SMF
- theme() : void
- Handles the "Look and Layout" section of the profile
- tracking() : void
- Loads up the information for the "track user" section of the profile
- trackActivity() : void
- Handles tracking a user's activity
- trackEdits() : void
- Tracks a user's profile edits
- trackGroupReq() : void
- Display the history of group requests made by the user whose profile we are viewing.
- TrackLogins() : void
- Tracks a user's logins.
- viewWarning() : void
- View a member's warnings
- Agreement() : void
- Let's tell them there's a new agreement
- canRequireAgreement() : bool
- Checks whether this user needs to accept the registration agreement.
- canRequirePrivacyPolicy() : bool
- Checks whether this user needs to accept the privacy policy.
- AcceptAgreement() : void
- I solemly swear to no longer chase squirrels.
- AnnounceTopic() : void
- Handle the announce topic function (action=announce).
- AnnouncementSelectMembergroup() : void
- Allow a user to chose the membergroups to send the announcement to.
- AnnouncementSend() : void
- Send the announcement in chunks.
- ApproveAttach() : void
- Called from a mouse click, works out what we want to do with attachments and actions it.
- showAttachment() : void
- Downloads an avatar or attachment based on $_GET['attach'], and increments the download count.
- AutoSuggestHandler() : bool|null
- This keeps track of all registered handling functions for auto suggest functionality and passes execution to them.
- AutoSuggest_Search_Member() : array<string|int, mixed>
- Search for a member - by real_name or member_name by default.
- AutoSuggest_Search_MemberGroups() : array<string|int, mixed>
- Search for a membergroup by name
- AutoSuggest_Search_SMFVersions() : array<string|int, mixed>
- Provides a list of possible SMF versions to use in emulation
- BoardIndex() : BoardIndex
- This function shows the board index.
- getBoardIndex() : array<string|int, mixed>
- Fetches a list of boards and (optional) categories including statistical information, child boards and moderators.
- BuddyListToggle() : void
- This simple function adds/removes the passed user from the current users buddy list.
- CalendarMain() : void
- Show the calendar.
- iCalDownload() : void
- This function offers up a download of an event in iCal 2.0 format.
- CalendarPost() : void
- This function processes posting/editing/deleting a calendar event.
- getBirthdayRange() : array<string|int, mixed>
- Get all birthdays within the given time range.
- getEventRange() : array<string|int, mixed>
- Get all calendar events within the given time range.
- getHolidayRange() : array<string|int, mixed>
- Get all holidays within the given time range.
- canLinkEvent() : void
- Does permission checks to see if an event can be linked to a board/topic.
- getTodayInfo() : array<string|int, mixed>
- Returns date information about 'today' relative to the users time offset.
- getCalendarGrid() : array<string|int, mixed>
- Provides information (link, month, year) about the previous and next month.
- getCalendarWeek() : array<string|int, mixed>
- Returns the information needed to show a calendar for the given week.
- getCalendarList() : array<string|int, mixed>
- Returns the information needed to show a list of upcoming events, birthdays, and holidays on the calendar.
- loadDatePicker() : void
- Loads the necessary JavaScript and CSS to create a datepicker.
- loadTimePicker() : void
- Loads the necessary JavaScript and CSS to create a timepicker.
- loadDatePair() : void
- Loads the necessary JavaScript for Datepair.js.
- cache_getOffsetIndependentEvents() : array<string|int, mixed>
- Retrieve all events for the given days, independently of the users offset.
- cache_getRecentEvents() : array<string|int, mixed>
- cache callback function used to retrieve the upcoming birthdays, holidays, and events within the given period, taking into account the users time offset.
- validateEventPost() : void
- Makes sure the calendar post is valid.
- getEventPoster() : int|bool
- Get the event's poster.
- removeHolidays() : void
- Remove a holiday from the calendar
- CoppaForm() : void
- This function will display the contact information for the forum, as well a form to fill in.
- Credits() : void
- It prepares credit and copyright information for the credits page or the admin page
- Display() : void
- The central part of the board - topic display.
- DisplayAdminFile() : void
- Get one of the admin information files from Simple Machines.
- ShowXmlFeed() : void
- Outputs xml data representing recent information or a profile.
- buildXmlFeed() : array<string|int, mixed>
- Builds the XML from the data.
- cdata_parse() : string
- Ensures supplied data is properly encapsulated in cdata xml tags Called from getXmlProfile in News.php
- JSMembers() : void
- Called by index.php?action=findmember.
- Groups() : void
- Entry point function, permission checks, admin bars, etc.
- listMembergroupMembers_Href() : bool
- Gets the members of a supplied membergroup Returns them as a link for display
- GroupList() : void
- This very simply lists the groups, nothing snazy.
- MembergroupMembers() : void
- Display members of a group, and allow adding of members to a group. Silly function name though ;) It can be called from ManageMembergroups if it needs templating within the admin environment.
- GroupRequests() : void
- Show and manage all group requests.
- ShowHelp() : void
- Redirect to the user help ;).
- HelpIndex() : void
- The main page for the Help section
- ShowAdminHelp() : void
- Show some of the more detailed help to give the admin an idea... It shows a popup for administrative or user help.
- JavaScriptModify() : void
- Used to edit the body or subject of a message inline called from action=jsmodify from script and topic js
- Login() : void
- Ask them for their login information. (shows a page for the user to type in their username and password.) It caches the referring URL in $_SESSION['login_url'].
- Login2() : void
- Actually logs you in.
- validatePasswordFlood() : void
- This protects against brute force attacks on a member's password.
- LoginTFA() : void
- Allows the user to enter their Two-Factor Authentication code
- Logout() : void
- Logs the current user out of their account.
- MarkRead() : void
- Mark one or more boards as read.
- Memberlist() : void
- Shows a listing of registered members.
- MLAll() : void
- List all members, page by page, with sorting.
- MLSearch() : void
- Search for members, or display search results.
- printMemberListRows() : void
- Retrieves results of the request passed to it Puts results of request into the context for the sub template.
- getCustFieldsMList() : array<string|int, mixed>
- Sets the label, sort and join info for every custom field column.
- MessageIndex() : void
- Show the list of topics in this board, along with any child boards.
- getBoardList() : array<string|int, mixed>
- Generates the query to determine the list of available boards for a user Executes the query and returns the list
- DeleteMessage() : void
- Remove just a single post.
- getNotifyPrefs() : array<string|int, mixed>
- Fetches the list of preferences (or a single/subset of preferences) for notifications for one or more users.
- setNotifyPrefs() : mixed
- Sets the list of preferences for a single user.
- deleteNotifyPrefs() : mixed
- Deletes notification preference
- getMemberWithToken() : array<string|int, mixed>
- Verifies a member's unsubscribe token, then returns some member info
- createUnsubscribeToken() : string
- Builds an unsubscribe token
- AnnouncementsNotify() : void
- Turn off/on notifications for announcements.
- BoardNotify() : void
- Turn off/on notification for a particular board.
- TopicNotify() : void
- Turn off/on unread replies subscription for a topic as well as sets individual topic's alert preferences Must be called with a topic specified in the URL.
- MessageMain() : void
- This helps organize things.
- MessageFolder() : void
- A folder, ie. inbox/sent etc.
- MessagePopup() : void
- The popup for when we ask for the popup from the user.
- ManageLabels() : void
- This function handles adding, deleting and editing labels on messages.
- ManageRules() : void
- List all rules, and allow adding/entering etc.
- MessageActionsApply() : void
- This function performs all additional stuff.
- MessagePrune() : mixed
- This function allows the user to delete all messages older than so many days.
- MessageKillAll() : void
- Delete ALL the messages!
- ReportMessage() : void
- Allows the user to report a personal message to an administrator.
- MessageSearch() : void
- Allows searching through personal messages.
- MessageSearch2() : void
- Actually do the search of personal messages.
- MessagePost() : void
- Send a new message?
- MessagePost2() : void
- Send it!
- MessageSettings() : void
- Allows to edit Personal Message Settings.
- MessageDrafts() : void
- This function allows the user to view their PM drafts
- Post() : void
- Handles showing the post screen, loading the post to be modified, and loading any post quoted.
- Post2() : void
- Posts or saves the message composed with Post().
- QuickModeration() : void
- Handles moderation from the message index.
- QuickInTopicModeration() : void
- In-topic quick moderation.
- QuoteFast() : void
- Loads a post an inserts it into the current editing text box.
- RecentPosts() : void
- Find the ten most recent posts.
- getLastPost() : array<string|int, mixed>
- Get the latest post made on the system
- Register() : void
- Begin the registration process.
- Register2() : void
- Actually register the member.
- registerMember() : int|array<string|int, mixed>
- Registers a member to the forum.
- RemindMe() : void
- This is the controlling delegator
- ReportToModerator() : void
- Report a post or profile to the moderator... ask for a comment.
- ReportToModerator2() : void
- Send the emails.
- reportPost() : void
- Actually reports a post using information specified from a form
- reportUser() : void
- Actually reports a user's profile using information specified from a form
- RequestMembers() : void
- Outputs each member name on its own line.
- PlushSearch1() : void
- Ask the user what they want to search for.
- PlushSearch2() : void
- Gather the results and show them.
- SendActivation() : void
- It doesn't actually send anything, this action just shows a message for a guest.
- SMStats() : void
- This is the function which returns stats to simplemachines.org IF enabled! called by simplemachines.org.
- DisplayStats() : void
- Display some useful/interesting board statistics.
- MergeTopics() : void
- merges two or more topics into one topic.
- MergeIndex() : void
- allows to pick a topic to merge the current topic with.
- MergeExecute() : void
- set merge options and do the actual merge of two or more topics.
- MergeDone() : void
- Shows a 'merge completed' screen.
- MoveTopic() : void
- This function allows to move a topic, making sure to ask the moderator to give reason for topic move.
- MoveTopic2() : void
- Execute the move of a topic.
- moveTopicConcurrence() : mixed
- Called after a topic is moved to update $board_link and $topic_link to point to new location
- PrintTopic() : void
- Format a topic to be printer friendly.
- RemoveTopic2() : void
- Completely remove an entire topic.
- removeDeleteConcurrence() : bool
- Try to determine if the topic has already been deleted by another user.
- RemoveOldTopics2() : mixed
- So long as you are sure... all old posts will be gone.
- RestoreTopic() : void
- Move back a topic from the recycle board to its original board.
- SplitTopics() : void
- splits a topic into two topics.
- splitTopic() : int
- general function to split off a topic.
- SplitIndex() : void
- screen shown before the actual split.
- SplitExecute() : void
- do the actual split.
- SplitSelectTopics() : void
- allows the user to select the messages to be split.
- SplitSelectionExecute() : void
- do the actual split of a selection of topics.
- TrackIP() : void
- Handles tracking a particular IP address
- UnreadTopics() : void
- Find unread topics and replies.
- VerificationCode() : void
- Show the verification code or let it be heard.
- ViewQuery() : void
- Show the database queries for debugging What this does: - Toggles the session variable 'view_queries'.
- Who() : void
- Who's online, and what are they doing? This function prepares the who's online data for the Who template.
- determineActions() : array<string|int, mixed>
- This function determines the actions of the members passed in urls.
- XMLhttpMain() : void
- The main handler and designator for AJAX stuff - jumpto, message icons and previews
- GetJumpTo() : void
- Get a list of boards and categories used for the jumpto dropdown.
- ListMessageIcons() : void
- Gets a list of available message icons and sends the info to the template for display
- RetrievePreview() : bool|null
- Handles retrieving previews of news items, newsletters, signatures and warnings.
- loadCacheAccelerator() : object|false
- Try to load up a supported caching method. This is saved in $cacheAPI if we are not overriding it.
- loadCacheAPIs() : array<string|int, mixed>
- Get the installed Cache API implementations.
- clean_cache() : void
- Empty out the cache in use as best it can
- cache_quick_get() : string
- Try to retrieve a cache entry. On failure, call the appropriate function.
- cache_put_data() : void
- Puts value in the cache under key for ttl seconds.
- cache_get_data() : array<string|int, mixed>|null
- Gets the value from the cache specified by key, so long as it is not older than ttl seconds.
- reloadSettings() : mixed
- Load the $modSettings array.
- updateSettings() : mixed
- Updates the settings table as well as $modSettings... only does one at a time if $update is true.
- get_auth_secret() : string
- Gets, and if necessary creates, the authentication secret to use for cookies, tokens, etc.
- get_settings_defs() : array<string|int, mixed>
- Describes properties of all known Settings.php variables and other content.
- updateSettingsFile() : bool
- Update the Settings.php file.
- safe_file_write() : bool
- Writes data to a file, optionally making a backup, while avoiding race conditions.
- smf_var_export() : mixed
- A wrapper around var_export whose output matches SMF coding conventions.
- updateDbLastError() : bool
- Saves the time of the last db error for the error log - Done separately from updateSettingsFile to avoid race conditions which can occur during a db error - If it fails Settings.php will assume 0
- sm_temp_dir() : string
- Locates the most appropriate temp directory.
- smf_seed_generator() : mixed
- Generate a random seed and ensure it's stored in settings.
- check_cron() : mixed
- Ensures SMF's scheduled tasks are being run as intended
- loadDatabase() : DatabaseApi
- Initialize a database connection.
- db_extend() : void
- Extend the database functionality. It calls the respective file's init to add the implementations in that file to $smcFunc array.
- imageMemoryCheck() : bool
- See if we have enough memory to thumbnail an image
- url_image_size() : array<string|int, mixed>|false
- Get the size of a specified image with better error handling.
- gif_outputAsPng() : bool
- Writes a gif file to disk as a png file.
- getSvgSize() : array<string|int, mixed>
- Gets the dimensions of an SVG image (specifically, of its viewport).
- createThumbnail() : bool
- Create a thumbnail of the given source.
- reencodeImage() : bool
- Used to re-econodes an image to a specified image format - creates a copy of the file at the same location as fileName.
- checkImageContents() : bool
- Searches through the file to see if there's potentially harmful non-binary content.
- checkSvgContents() : bool
- Searches through an SVG file to see if there's potentially harmful content.
- resizeImageFile() : bool
- Resizes an image from a remote location or a local file.
- resizeImage() : bool
- Resizes src_img proportionally to fit within max_width and max_height limits if it is too large.
- read_tgz_file() : array<string|int, mixed>|false
- Reads an archive from either a remote location or from the local filesystem.
- read_tgz_data() : array<string|int, mixed>|false
- Extracts a file or files from the .tar.gz contained in data.
- read_zip_data() : mixed
- Extract zip data.
- url_exists() : bool
- Checks the existence of a remote file since file_exists() does not do remote.
- loadInstalledPackages() : array<string|int, mixed>
- Loads and returns an array of installed packages.
- getPackageInfo() : array<string|int, mixed>|string
- Loads a package's information and returns a representative array.
- create_chmod_control() : array<string|int, mixed>
- Create a chmod control for chmoding files.
- list_restoreFiles() : array<string|int, mixed>
- Get a listing of files that will need to be set back to the original state
- packageRequireFTP() : array<string|int, mixed>
- Use FTP functions to work with a package download/install
- parsePackageInfo() : array<string|int, mixed>
- Parses the actions in package-info.xml file from packages.
- matchHighestPackageVersion() : string|bool
- Checks if version matches any of the versions in `$versions`.
- matchPackageVersion() : bool
- Checks if the forum version matches any of the available versions from the package install xml.
- compareVersions() : int
- Compares two versions and determines if one is newer, older or the same, returns - (-1) if version1 is lower than version2 - (0) if version1 is equal to version2 - (1) if version1 is higher than version2
- parse_path() : string
- Parses special identifiers out of the specified path.
- deltree() : void
- Deletes a directory, and all the files and direcories inside it.
- mktree() : bool
- Creates the specified tree structure with the mode specified.
- copytree() : void
- Copies one directory structure over to another.
- listtree() : array<string|int, mixed>
- Create a tree listing for a given directory path
- parseModification() : array<string|int, mixed>
- Parses a xml-style modification file (file).
- parseBoardMod() : array<string|int, mixed>
- Parses a boardmod-style (.mod) modification file
- package_get_contents() : string
- Get the physical contents of a packages file
- package_put_contents() : int
- Writes data to a file, almost exactly like the file_put_contents() function.
- package_flush_cache() : void
- Flushes the cache from memory to the filesystem
- package_chmod() : bool
- Try to make a file writable.
- package_crypt() : string
- Used to crypt the supplied ftp password in this session
- package_unique_filename() : string
- package_create_backup() : bool
- Creates a backup of forum files prior to modifying them
- package_validate_installtest() : array<string|int, mixed>
- Validate a package during install
- package_validate() : array<string|int, mixed>
- Validate multiple packages.
- package_validate_send() : array<string|int, mixed>
- Sending data off to validate packages.
- sendpm() : array<string|int, mixed>
- Sends an personal message from the specified person to the specified people ($from defaults to the user)
- deleteMessages() : void
- Delete the specified personal messages.
- markMessages() : void
- Mark the specified personal messages read.
- messagePostError() : void
- An error in the message.
- isAccessiblePM() : bool
- Check if the PM is available to the current user.
- LoadRules() : array<string|int, mixed>
- Load up all the rules for the current user.
- ApplyRules() : void
- This will apply rules to all unread messages. If all_messages is set will, clearly, do it to all!
- findSearchAPI() : search_api_interface
- Creates a search API and returns the object.
- loadSearchAPIs() : array<string|int, mixed>
- Get the installed Search API implementations.
- highlight() : string
- Highlighting matching string
- utf8_decompose() : array<string|int, mixed>
- Helper function for utf8_normalize_d and utf8_normalize_kd.
- utf8_compose() : array<string|int, mixed>
- Helper function for utf8_normalize_c and utf8_normalize_kc.
- utf8_strtolower() : string
- Converts the given UTF-8 string into lowercase.
- utf8_strtoupper() : string
- Convert the given UTF-8 string to uppercase.
- utf8_casefold() : string
- Casefolds the given UTF-8 string.
- utf8_convert_case() : string
- Converts the case of the given UTF-8 string.
- utf8_normalize_d() : string
- Normalizes UTF-8 via Canonical Decomposition.
- utf8_normalize_kd() : string
- Normalizes UTF-8 via Compatibility Decomposition.
- utf8_normalize_c() : string
- Normalizes UTF-8 via Canonical Decomposition then Canonical Composition.
- utf8_normalize_kc() : string
- Normalizes UTF-8 via Compatibility Decomposition then Canonical Composition.
- utf8_normalize_kc_casefold() : string
- Casefolds UTF-8 via Compatibility Composition Casefolding.
- utf8_is_normalized() : bool
- Checks whether a string is already normalized to a given form.
- utf8_sanitize_invisibles() : string
- Helper function for sanitize_chars() that deals with invisible characters.
- fetch_web_data() : string|false
- Get the contents of a URL, irrespective of allow_url_fopen.
- fetch_alerts() : array<string|int, mixed>
- Fetch the alerts a member currently has.
- alert_count() : int
- Counts how many alerts a user has - either unread or all depending on $unread We can't use db_num_rows here, as we have to determine what boards the user can see Possibly in future versions as database support for json is mainstream, we can simplify this.
- alert_mark() : int
- Marks a group of alerts as un/read
- alert_delete() : int|null
- Deletes a single or a group of alerts by ID
- alert_purge() : void
- Deletes all the alerts that a user has already read.
- automanage_attachments_check_directory() : bool|null
- Check if the current directory is still valid or not.
- automanage_attachments_create_directory() : bool
- Creates a directory
- automanage_attachments_by_space() : bool|null
- Called when a directory space limit is reached.
- processAttachments() : void
- Moves an attachment to the proper directory and set the relevant data into $_SESSION['temp_attachments']
- attachmentChecks() : bool
- Performs various checks on an uploaded file.
- createAttachment() : bool
- Create an attachment, with the given array of parameters.
- assignAttachments() : bool
- Assigns the given attachments to the given message ID.
- ApproveAttachments() : int|null
- Approve an attachment, or maybe even more - no permission check!
- parseAttachBBC() : mixed
- Gets an attach ID and tries to load all its info.
- getAttachMsgInfo() : array<string|int, mixed>
- Gets all needed message data associated with an attach ID
- loadAttachmentContext() : array<string|int, mixed>
- This loads an attachment's contextual data including, most importantly, its size if it is an image.
- prepareAttachsByMsg() : void
- prepare the Attachment api for all messages
- getAttachmentFilename() : string
- Backward compatibility only.
- get_signature_allowed_bbc_tags() : array<string|int, mixed>
- Return an array with allowed bbc tags for signatures, that can be passed to parse_bbc().
- highlight_php_code() : string
- Highlight any code.
- parse_bbc() : string
- Parse bulletin board code in a string, as well as smileys optionally.
- parseSmileys() : void
- Parse smileys in the passed message.
- html_to_bbc() : string
- Converts HTML to BBC As of SMF 2.1, only used by ManageBoards.php (and possibly mods)
- loadBoard() : array<string|int, mixed>
- Check for moderators and see if they have access to the board.
- markBoardsRead() : void
- Mark a board or multiple boards read.
- getMsgMemberID() : int
- Get the id_member associated with the specified message.
- modifyBoard() : void
- Modify the settings and position of a board.
- createBoard() : int
- Create a new board and set its properties and position.
- deleteBoards() : void
- Remove one or more boards.
- reorderBoards() : void
- Put all boards in the right order and sorts the records of the boards table.
- fixChildren() : void
- Fixes the children of a board by setting their child_levels to new values.
- sortBoards() : void
- Takes a board array and sorts it
- getBoardModerators() : array<string|int, mixed>
- Returns the given board's moderators, with their names and links
- getBoardModeratorGroups() : array<string|int, mixed>
- Returns board's moderator groups with their names and link
- isChildOf() : bool
- Returns whether the child board id is actually a child of the parent (recursive).
- getBoardParents() : array<string|int, mixed>
- Get all parent boards (requires first parent as parameter) It finds all the parents of id_parent, and that board itself.
- detectBrowser() : void
- Loads information about what browser the user is viewing with and places it in $context - uses the class from {@link Class-BrowserDetect.php}
- isBrowser() : bool
- Are we using this browser?
- modifyCategory() : void
- Edit the position and properties of a category.
- createCategory() : mixed
- Create a new category.
- deleteCategories() : void
- Remove one or more categories.
- sortCategories() : void
- Takes a category array and sorts it
- getTreeOrder() : array<string|int, mixed>
- Tries to load up the entire board order and category very very quickly Returns an array with two elements, cats and boards
- getBoardTree() : void
- Load a lot of useful information regarding the boards and categories.
- recursiveBoards() : void
- Recursively get a list of boards.
- setLoginCookie() : void
- Sets the SMF-style login cookie and session based on the id_member and password passed.
- setTFACookie() : void
- Sets Two Factor Auth cookie
- url_parts() : array<string|int, mixed>
- Get the domain and path for the cookie - normally, local and global should be the localCookies and globalCookies settings, respectively.
- hash_salt() : string
- Hashes password with salt and authentication secret. This is solely used for cookies.
- smf_setcookie() : void
- A wrapper for setcookie that gives integration hook access to it
- DeleteDraft() : bool
- Deletes one or many drafts from the DB Validates the drafts are from the user is supplied an array of drafts will attempt to remove all of them
- ShowDrafts() : bool
- Loads in a group of drafts for the user of a given type (0/posts, 1/pm's) loads a specific draft for forum use if selected.
- showProfileDrafts() : void
- Show all drafts of a given type by the current user Uses the showdraft template Allows for the deleting and loading/editing of drafts
- create_control_richedit() : Editor
- Creates a box that can be used for richedit stuff like BBC, Smileys etc.
- getMessageIcons() : array<string|int, mixed>
- Retrieves a list of message icons.
- smf_error_handler() : void
- Handler for standard error messages, standard PHP error handler replacement.
- log_error() : string
- Log an error, if the error logging is enabled.
- fatal_error() : void
- An irrecoverable error. This function stops execution and displays an error message.
- fatal_lang_error() : mixed
- Shows a fatal error with a message stored in the language file.
- display_maintenance_message() : void
- Show a message for the (full block) maintenance mode.
- display_db_error() : void
- Show an error message for the connection problems.
- display_loadavg_error() : void
- Show an error message for load average blocking problems.
- insertEvent() : void
- Consolidating the various INSERT statements into this function.
- modifyEvent() : void
- modifies an event.
- removeEvent() : void
- Remove an event removes an event.
- cache_getMembergroupList() : array<string|int, mixed>
- Retrieve a list of (visible) membergroups used by the cache.
- call_integration_hook() : array<string|int, mixed>
- Process functions of an integration hook.
- add_integration_function() : void
- Add a function for integration hook.
- remove_integration_function() : void
- Remove an integration hook function.
- ip2range() : array<string|int, mixed>
- Convert a single IP to a ranged IP.
- range2ip() : string
- Convert a range of given IP number into a single string.
- isValidIP() : bool
- Check the given String if he is a valid IPv4 or IPv6 return true or false
- isValidIPv6() : bool
- Validates a IPv6 address. returns true if it is ipv6.
- host_from_ip() : string
- Lookup an IP; try shell_exec first because we can do a timeout on it.
- inet_ptod() : string|false
- Converts an IP address into binary
- inet_dtop() : string|false
- Converts a binary version of an IP address into a readable format
- expandIPv6() : string|bool
- Expands a IPv6 address to its full form.
- matchIPtoCIDR() : bool
- Detect if a IP is in a CIDR address - returns true or false
- createList() : ItemList
- Create a new list
- loadLanguage() : string
- Load a language file. Tries the current and default themes as well as the user and global languages.
- getLanguages() : array<string|int, mixed>
- Attempt to reload our known languages.
- censorText() : string
- Replace all vulgar words with respective proper words. (substring or whole words..) What this function does: - it censors the passed string.
- tokenTxtReplace() : string
- sentence_list() : string
- Concatenates an array of strings into a grammatically correct sentence list
- comma_format() : string
- - Formats a number.
- writeLog() : void
- Put this user in the online log.
- logAction() : int
- This function logs an action to the database. It is a thin wrapper around {@link logActions()}.
- logActions() : int
- Log changes to the forum, such as moderation events or administrative changes. This behaves just like {@link logAction()} in SMF 2.0, except that it is designed to log multiple actions at once.
- updateStats() : void
- Update some basic statistics.
- trackStats() : bool
- Track Statistics.
- trackStatsUsersOnline() : void
- Check if the number of users online is a record and store it.
- getMembersOnlineStats() : array<string|int, mixed>
- Retrieve a list and several other statistics of the users currently online.
- displayDebug() : void
- This function shows the debug information tracked when $db_show_debug = true in Settings.php
- sendMail() : bool
- This function sends an email to the specified recipient(s).
- AddMailQueue() : bool
- Add an email to the mail queue.
- reduceQueue() : bool
- mimespecialchars() : array<string|int, mixed>
- Prepare text strings for sending as email body or header.
- serverParse() : bool
- sendNotifications() : mixed
- Sends a notification to members who have elected to receive emails when things happen to a topic, such as replies are posted.
- adminNotify() : void
- This simple function gets a list of all administrators and sends them an email to let them know a new member has joined.
- loadEmailTemplate() : array<string|int, mixed>
- Load a template from EmailTemplates language file.
- createMenu() : bool|array<string|int, mixed>
- Create a menu.
- destroyMenu() : bool|void
- Delete a menu.
- preparsecode() : void
- Takes a message and parses it, returning nothing.
- un_preparsecode() : string
- This is very simple, and just removes things done by preparsecode.
- fixTags() : void
- Fix any URLs posted - ie. remove 'javascript:'.
- fixTag() : void
- Fix a specific class of tag - ie. url with =.
- createPost() : bool
- Create a post, either as new topic (id_topic = 0) or in an existing one.
- modifyPost() : bool
- Modifying a post.
- approvePosts() : bool
- Approve (or not) some posts... without permission checks.
- clearApprovalAlerts() : void
- Upon approval, clear unread alerts.
- updateLastMessages() : bool|null
- Takes an array of board IDs and updates their last messages.
- removeMessage() : bool
- Remove a specific message (including permission checks).
- constructPageIndex() : string
- Constructs a page list.
- Vote() : void
- Allow the user to vote.
- LockVoting() : void
- Lock the voting for a poll.
- EditPoll() : void
- Display screen for editing or adding a poll.
- EditPoll2() : void
- Update the settings for a poll, or add a new one.
- RemovePoll() : void
- Remove a poll from a topic without removing the topic.
- profileValidateSignature() : bool|string
- Validate the signature
- profileLoadGroups() : true
- Handles the "manage groups" section of the profile
- loadProfileFields() : void
- This defines every profile field known to man.
- loadCustomFields() : void
- Load any custom fields for this area... no area means load all, 'summary' loads all public ones.
- loadThemeOptions() : void
- Loads the theme options for a user
- setupProfileContext() : void
- Setup the context for a page load!
- makeCustomFieldChanges() : array<string|int, mixed>|null
- Save any changes to the custom profile fields
- makeThemeChanges() : void
- Make any theme changes that are sent with the profile.
- cleanRequest() : void
- is_filtered_request() : bool
- Compares existance request variables against an array.
- ob_sessrewrite() : string
- Rewrite URLs to include the session ID.
- setMemoryLimit() : bool
- Helper function to set the system memory to a needed value - If the needed memory is greater than current, will attempt to get more - if in_use is set to true, will also try to take the current memory usage in to account
- memoryReturnBytes() : int
- Helper function to convert memory string settings to bytes
- validatePassword() : null|string
- Checks whether a password meets the current forum rules - called when registering/choosing a password.
- generateValidationCode() : string
- Generate a random validation code.
- hash_password() : string
- Hashes the user's password
- hash_verify_password() : bool
- Verifies a raw SMF password against the encrypted string
- hash_benchmark() : int
- Benchmarks the server to figure out an appropriate cost factor (minimum 9)
- checkConfirm() : bool|string
- Check if a specific confirm parameter was given.
- checkSubmitOnce() : bool|null
- Check whether a form has been submitted twice.
- spamProtection() : bool
- This function attempts to protect from spammed messages and the like.
- secureDirectory() : bool|array<string|int, mixed>
- A generic function to create a pair of index.php and .htaccess files in a directory
- frameOptionsHeader() : mixed
- This sets the X-Frame-Options header.
- corsPolicyHeader() : void
- This sets the Access-Control-Allow-Origin header.
- KickGuest() : void
- Throws guests out to the login screen when guest access is off.
- createToken() : array<string|int, mixed>
- Lets give you a token of our appreciation.
- validateToken() : bool
- Only patrons with valid tokens can ride this ride.
- cleanTokens() : void
- Removes old unused tokens from session defaults to 3 hours before a token is considered expired if $complete = true will remove all tokens
- ssi_shutdown() : void
- This shuts down the SSI and shows the footer.
- ssi_version() : void|string
- Show the SMF version.
- ssi_full_version() : void|string
- Show the full SMF version string.
- ssi_software_year() : void|string
- Show the SMF software year.
- ssi_copyright() : void|string
- Show the forum copyright. Only used in our ssi_examples files.
- ssi_welcome() : void|array<string|int, mixed>
- Display a welcome message, like: Hey, User, you have 0 messages, 0 are new.
- ssi_menubar() : array<string|int, mixed>|null
- Display a menu bar, like is displayed at the top of the forum.
- ssi_logout() : string|bool|null
- Show a logout link.
- ssi_recentPosts() : array<string|int, mixed>|null
- Recent post list: [board] Subject by Poster Date
- ssi_fetchPosts() : array<string|int, mixed>|null
- Fetches one or more posts by ID.
- ssi_queryPosts() : array<string|int, mixed>|null
- This handles actually pulling post info. Called from other functions to eliminate duplication.
- ssi_recentTopics() : void|array<string|int, mixed>
- Recent topic list: [board] Subject by Poster Date
- ssi_topPoster() : array<string|int, mixed>|null
- Shows a list of top posters
- ssi_topBoards() : array<string|int, mixed>|null
- Shows a list of top boards based on activity
- ssi_topTopics() : array<string|int, mixed>|null
- Shows a list of top topics based on views or replies
- ssi_topTopicsReplies() : array<string|int, mixed>|null
- Top topics based on replies
- ssi_topTopicsViews() : array<string|int, mixed>|null
- Top topics based on views
- ssi_latestMember() : array<string|int, mixed>|null
- Show a link to the latest member: Please welcome, Someone, our latest member.
- ssi_randomMember() : array<string|int, mixed>|null
- Fetches a random member.
- ssi_fetchMember() : array<string|int, mixed>|null
- Fetch specific members
- ssi_fetchGroupMembers() : array<string|int, mixed>|null
- Get all members in the specified group
- ssi_queryMembers() : array<string|int, mixed>|null
- Pulls info about members based on the specified parameters. Used by other functions to eliminate duplication.
- ssi_boardStats() : array<string|int, mixed>|null
- Show some basic stats: Total This: XXXX, etc.
- ssi_whosOnline() : array<string|int, mixed>|null
- Shows a list of online users: YY Guests, ZZ Users and then a list.
- ssi_logOnline() : array<string|int, mixed>|null
- Just like whosOnline except it also logs the online presence.
- ssi_login() : bool|null
- Shows a login box
- ssi_topPoll() : array<string|int, mixed>|null
- Show the top poll based on votes
- ssi_recentPoll() : array<string|int, mixed>|null
- Shows the most recent poll
- ssi_showPoll() : array<string|int, mixed>|null
- Shows the poll from the specified topic
- ssi_pollVote() : mixed
- Handles voting in a poll (done automatically)
- ssi_quickSearch() : string|null
- Shows a search box
- ssi_news() : string|null
- Show a random forum news item
- ssi_todaysBirthdays() : array<string|int, mixed>|null
- Show today's birthdays.
- ssi_todaysHolidays() : array<string|int, mixed>|null
- Shows today's holidays.
- ssi_todaysEvents() : array<string|int, mixed>|null
- Shows today's events.
- ssi_todaysCalendar() : array<string|int, mixed>|string|null
- Shows today's calendar items (events, birthdays and holidays)
- ssi_boardNews() : array<string|int, mixed>|null
- Show the latest news, with a template... by board.
- ssi_recentEvents() : array<string|int, mixed>|null
- Show the most recent events
- ssi_checkPassword() : bool
- Checks whether the specified password is correct for the specified user.
- ssi_recentAttachments() : array<string|int, mixed>|null
- Shows the most recent attachments that the user can see
- loadSession() : void
- Attempt to start the session, unless it already has been.
- CalculateNextTrigger() : void
- Calculate the next time the passed tasks should be triggered.
- loadTheme() : mixed
- Load a theme, by ID.
- loadEssentialThemeData() : void
- This loads the bare minimum data to allow us to load language files!
- loadTemplate() : bool
- Load a template - if the theme doesn't include it, use the default.
- loadSubTemplate() : mixed
- Load a sub-template.
- loadCSSFile() : void
- Add a CSS file for output later
- addInlineCss() : bool|null
- Add a block of inline css code to be executed later
- loadJavaScriptFile() : void
- Add a Javascript file for output later
- addJavaScriptVar() : mixed
- Add a Javascript variable for output later (for feeding text strings and similar to JS) Cleaner and easier (for modders) than to use the function below.
- addInlineJavaScript() : bool|null
- Add a block of inline Javascript code to be executed later
- setupThemeContext() : mixed
- Sets up the basic theme context stuff.
- setupMenuContext() : void
- Sets up all of the top menu buttons Saves them in the cache if it is available and on Places the results in $context
- template_header() : void
- The header template
- theme_copyright() : void
- Show the copyright.
- template_footer() : void
- The template footer
- template_javascript() : void
- Output the Javascript files - tabbing in this function is to make the HTML source look good and proper - if deferred is set function will output all JS set to load at page end
- template_css() : void
- Output the CSS files
- custMinify() : array<string|int, mixed>
- Get an array of previously defined files and adds them to our main minified files.
- deleteAllMinified() : void
- Clears out old minimized CSS and JavaScript files and ensures $modSettings['browser_cache'] is up to date
- SetJavaScript() : void
- Set an option via javascript.
- WrapAction() : void
- Possibly the simplest and best example of how to use the template system.
- PickTheme() : void
- Choose a theme from a list.
- smf_strftime() : string
- Replacement for strftime() that is compatible with PHP 8.1+.
- smf_gmstrftime() : string
- Replacement for gmstrftime() that is compatible with PHP 8.1+.
- get_date_or_time_format() : string
- Gets a version of a strftime() format that only shows the date or time components
- timeformat() : string
- Format a time to make it look purdy.
- convertDateToEnglish() : string
- Helper function to convert date string to english so that date_parse can parse the date
- forum_time() : int
- Deprecated function that formerly applied manual offsets to Unix timestamps in order to provide a fake version of time zone support on ancient versions of PHP. It now simply returns an unaltered timestamp.
- smf_list_timezones() : array<string|int, mixed>
- Get a list of time zones.
- get_tzid_metazones() : array<string|int, mixed>
- Returns an array that instructs SMF how to map specific time zones (e.g. "America/Denver") onto the user-friendly "meta-zone" labels that most people think of as time zones (e.g. "Mountain Time").
- get_sorted_tzids_for_country() : array<string|int, mixed>
- Returns an array of all the time zones in a country, ranked according to population and/or political significance.
- get_tzid_fallbacks() : array<string|int, mixed>
- Checks a list of time zone identifiers to make sure they are all defined in the installed version of the time zone database, and returns an array of key-value substitution pairs.
- validate_iso_country_codes() : array<string|int, mixed>|string
- Validates a set of two-character ISO 3166-1 country codes.
- LockTopic() : void
- Locks a topic... either by way of a moderator or the topic starter.
- Sticky() : void
- Sticky a topic.
- approveTopics() : bool
- Approve topics?
- moveTopics() : mixed
- Moves one or more topics to a specific board. (doesn't check permissions.) Determines the source boards for the supplied topics Handles the moving of mark_read data Updates the posts count of the affected boards
- removeTopics() : mixed
- Removes the passed id_topic's. (permissions are NOT checked here!).
- prepareLikesContext() : array<string|int, mixed>
- Prepares an array of "likes" info for the topic specified by $topic
- set_tld_regex() : void
- Creates an optimized regex to match all known top level domains.
- parse_iri() : string|int|array<string|int, mixed>|null|bool
- A wrapper for `parse_url($url)` that can handle URLs with international characters (a.k.a. IRIs)
- validate_iri() : string|bool
- A wrapper for `filter_var($url, FILTER_VALIDATE_URL)` that can handle URLs with international characters (a.k.a. IRIs)
- sanitize_iri() : string|bool
- A wrapper for `filter_var($url, FILTER_SANITIZE_URL)` that can handle URLs with international characters (a.k.a. IRIs)
- normalize_iri() : string|bool
- Performs Unicode normalization on IRIs.
- iri_to_url() : string|bool
- Converts a URL with international characters (an IRI) into a pure ASCII URL
- url_to_iri() : string|bool
- Decodes a URL containing encoded international characters to UTF-8
- get_proxied_url() : string
- Gets the appropriate URL to use for images (or whatever) when using SSL
- ssl_cert_found() : bool
- Check if the passed url has an SSL certificate.
- https_redirect_active() : bool
- Check if the passed url has a redirect to https:// by querying headers.
- build_query_board() : array<string|int, mixed>
- Build query_wanna_see_board and query_see_board for a userid
- set_avatar_data() : array<string|int, mixed>
- Helper function to set an array of data for an user's avatar.
- updateMemberData() : void
- Updates the columns in the members table.
- getUserTimezone() : string
- Gets a member's selected time zone identifier
- deleteMembers() : void
- Delete one or more members.
- validateUsername() : array<string|int, mixed>|null
- Checks a username obeys a load of rules
- isReservedName() : bool|void
- Check if a name is in the reserved words list.
- isBannedEmail() : void
- Checks if a given email address might be banned.
- findMembers() : array<string|int, mixed>
- Finds members by email address, username, or real name.
- membersAllowedTo() : array<string|int, mixed>
- Retrieves a list of members that have a given permission (on a given board).
- groupsAllowedTo() : array<string|int, mixed>
- Retrieves a list of membergroups that have the given permission, either on a given board or in general.
- getGroupsWithPermissions() : array<string|int, mixed>
- Retrieves a list of membergroups with the given permissions.
- logSpider() : void
- Log the spider presence online.
- loadMemberData() : array<string|int, mixed>
- Loads an array of users' data by ID or member_name.
- loadUserSettings() : void
- Load all the important user information.
- loadPermissions() : void
- Load this user's permissions.
- loadMemberContext() : bool|array<string|int, mixed>
- Loads the user's basic values... meant for template/theme usage.
- is_not_guest() : void
- Require a user who is logged in. (not a guest.) Checks if the user is currently a guest, and if so asks them to login with a message telling them why.
- is_not_banned() : void
- Do banning related stuff. (ie. disallow access....) Checks if the user is banned, and if so dies with an error.
- banPermissions() : void
- Fix permissions according to ban status.
- log_ban() : void
- Log a ban in the database.
- validateSession() : string|null
- Check if the user is who he/she says he is Makes sure the user is who they claim to be by requiring a password to be typed in every hour.
- checkSession() : string
- Make sure the user's correct session was passed, and they came from here.
- allowedTo() : bool
- Check the user's permissions.
- isAllowedTo() : bool
- Fatal error if they cannot.
- boardsAllowedTo() : array<string|int, mixed>
- Return the boards a user has a certain (board) permission on. (array(0) if all.) - returns a list of boards on which the user is allowed to do the specified permission.
- sanitize_chars() : string
- Replaces invalid characters with a substitute.
- normalize_spaces() : string
- Normalizes space characters and line breaks.
- htmlspecialchars__recursive() : array<string|int, mixed>|string
- Adds html entities to the array/variable. Uses two underscores to guard against overloading.
- un_htmlspecialchars() : string
- Replaces special entities in strings with the real characters.
- htmltrim__recursive() : array<string|int, mixed>|string
- Trim a string including the HTML space, character 160. Uses two underscores to guard against overloading.
- shorten_subject() : string
- Shorten a subject + internationalization concerns.
- text2words() : array<string|int, mixed>
- Chops a string into words and prepares them to be inserted into (or searched from) the database.
- build_regex() : string|array<string|int, mixed>
- Creates optimized regular expressions from arrays of strings.
- cleanXml() : string
- Clean up the XML to make sure it doesn't contain invalid characters.
- JavaScriptEscape() : string
- Escapes (replaces) characters in strings to make them safe for use in JavaScript
- stripslashes__recursive() : array<string|int, mixed>|string
- Remove slashes recursively. Uses two underscores to guard against overloading.
- urldecode__recursive() : array<string|int, mixed>|string
- Removes url stuff from the array/variable. Uses two underscores to guard against overloading.
- escapestring__recursive() : array<string|int, mixed>|string
- Adds slashes to the array/variable.
- unescapestring__recursive() : array<string|int, mixed>|string
- Unescapes any array or variable. Uses two underscores to guard against overloading.
- truncate_array() : array<string|int, mixed>
- Truncate an array to a specified length
- array_length() : int
- array_length Recursive
- smf_json_decode() : array<string|int, mixed>
- Wrapper function for json_decode() with error handling.
- safe_serialize() : string
- Wrapper for _safe_serialize() that handles exceptions and multibyte encoding issues.
- safe_unserialize() : mixed
- Wrapper for _safe_unserialize() that handles exceptions and multibyte encoding issue
- get_mime_type() : string|bool
- Attempts to determine the MIME type of some data or a file.
- check_mime_type() : int
- Checks whether a file or data has the expected MIME type.
- smf_chmod() : bool
- Tries different modes to make file/dirs writable. Wrapper function for chmod()
- send_http_status() : void
- Sends an appropriate HTTP status header based on a given status code
- smf_serverResponse() : string
- Outputs a response.
- redirectexit() : void
- Make sure the browser doesn't come back and repost the form data.
- obExit() : void
- Ends execution. Takes care of template loading and remembering the previous URL.
- call_helper() : string|array<string|int, mixed>|bool
- Receives a string and tries to figure it out if its a method or a function.
- replaceEntities__callback() : string
- Decode numeric html entities to their ascii or UTF8 equivalent character.
- fixchar__callback() : string
- Converts html entities to utf8 equivalents
- entity_fix__callback() : string
- Strips out invalid html entities, replaces others with html style { codes
- create_control_verification() : bool|array<string|int, mixed>
- Create a anti-bot verification control?
- sanitizeMSCutPaste() : string
- Microsoft uses their own character set Code Page 1252 (CP1252), which is a superset of ISO 8859-1, defining several characters between DEC 128 and 159 that are not normally displayable. This converts the popular ones that appear from a cut and paste from Windows.
- smf_crc32() : string
- Compatibility function.
- idn_to_ascii() : string|bool
- Compatibility function.
- idn_to_utf8() : string|bool
- Compatibility function.
- array_is_list() : bool
- utf8_casefold_simple_maps() : array<string|int, mixed>
- Helper function for utf8_casefold.
- utf8_casefold_maps() : array<string|int, mixed>
- Helper function for utf8_casefold.
- utf8_strtolower_simple_maps() : array<string|int, mixed>
- Helper function for utf8_strtolower.
- utf8_strtolower_maps() : array<string|int, mixed>
- Helper function for utf8_strtolower.
- utf8_titlecase_simple_maps() : array<string|int, mixed>
- Helper function for utf8_convert_case.
- utf8_titlecase_maps() : array<string|int, mixed>
- Helper function for utf8_convert_case.
- utf8_strtoupper_simple_maps() : array<string|int, mixed>
- Helper function for utf8_strtoupper.
- utf8_strtoupper_maps() : array<string|int, mixed>
- Helper function for utf8_strtoupper.
- utf8_combining_classes() : array<string|int, mixed>
- Helper function for utf8_normalize_d.
- utf8_compose_maps() : array<string|int, mixed>
- Helper function for utf8_compose.
- utf8_confusables() : array<string|int, mixed>
- Helper function for SMF\Unicode\SpoofDetector::getSkeletonString.
- utf8_character_scripts() : array<string|int, mixed>
- Helper function for SpoofDetector::resolveScriptSet.
- utf8_regex_identifier_status() : array<string|int, mixed>
- Helper function for SpoofDetector::checkHomographNames.
- currencies() : array<string|int, mixed>
- Helper function for SMF\Localization\MessageFormatter::formatMessage.
- country_currencies() : array<string|int, mixed>
- Helper function for SMF\Localization\MessageFormatter::formatMessage.
- utf8_normalize_d_maps() : array<string|int, mixed>
- Helper function for utf8_normalize_d.
- utf8_normalize_kd_maps() : array<string|int, mixed>
- Helper function for utf8_normalize_kd.
- utf8_default_ignorables() : array<string|int, mixed>
- Helper function for utf8_normalize_kc_casefold.
- idna_maps() : array<string|int, mixed>
- Helper function for idn_to_* polyfills.
- idna_maps_deviation() : array<string|int, mixed>
- Helper function for idn_to_* polyfills.
- idna_regex() : array<string|int, mixed>
- Helper function for idn_to_* polyfills.
- plurals() : array<string|int, mixed>
- Helper function for SMF\Localization\MessageFormatter::formatMessage.
- utf8_regex_quick_check() : array<string|int, mixed>
- Helper function for utf8_is_normalized.
- utf8_regex_properties() : array<string|int, mixed>
- Helper function for utf8_sanitize_invisibles and utf8_convert_case.
- utf8_regex_variation_selectors() : array<string|int, mixed>
- Helper function for utf8_sanitize_invisibles.
- utf8_regex_joining_type() : array<string|int, mixed>
- Helper function for utf8_sanitize_invisibles.
- utf8_regex_indic() : array<string|int, mixed>
- Helper function for utf8_sanitize_invisibles.
- template_ssi_above() : mixed
- Displays the header for this file
- template_ssi_below() : mixed
- Displays the footer for this file
- template_homepage_sample1() : string|void
- Displays a sample homepage to give you an idea of what's possible using SSI functions
- template_homepage_sample1_php() : mixed
- Generates the sample homepage. Used with template_homepage_sample1 if $method isn't 'source'.
- template_homepage_sample1_html() : string
- Generates the HTML for the homepage sample. Used in conjunction with template_homepage_sample1 if method is 'source'
- generateSubscriptionError() : mixed
- Log an error then exit
- template_admin() : mixed
- This is the administration center home.
- template_credits() : mixed
- Show some support information and credits to those who helped make this.
- template_view_versions() : mixed
- Displays information about file versions installed, and compares them to current version.
- template_edit_censored() : mixed
- Form for stopping people using naughty words, etc.
- template_not_done() : mixed
- This is the page shown when we've temporarily paused things such as during maintenance tasks, sending newsletters, etc.
- template_show_settings() : mixed
- Template for showing settings (Of any kind really!)
- template_show_custom_profile() : mixed
- Template for showing custom profile fields.
- template_edit_profile_field() : mixed
- Template for editing a custom profile field
- template_admin_search_results() : mixed
- Results page for an admin search.
- template_callback_question_answer_list() : mixed
- This little beauty shows questions and answer from the captcha type feature.
- template_repair_boards() : mixed
- Repairing boards.
- template_php_info() : mixed
- Retrieves info from the php_info function, scrubs and preps it for display
- template_clean_cache_button_above() : mixed
- Content shown above the clean cache button
- template_clean_cache_button_below() : mixed
- Content shown below the clean cache button?
- template_admin_quick_search() : mixed
- This shows the admin search form
- template_main() : mixed
- template_boardindex_outer_above() : mixed
- The top part of the outer layer of the boardindex
- template_newsfader() : mixed
- This shows the newsfader
- template_main() : mixed
- This actually displays the board index
- template_bi_board_icon() : mixed
- Outputs the board icon for a standard board.
- template_bi_redirect_icon() : mixed
- Outputs the board icon for a redirect.
- template_bi_board_info() : mixed
- Outputs the board info for a standard board or redirect.
- template_bi_board_stats() : mixed
- Outputs the board stats for a standard board.
- template_bi_redirect_stats() : mixed
- Outputs the board stats for a redirect.
- template_bi_board_lastpost() : mixed
- Outputs the board lastposts for a standard board or a redirect.
- template_bi_board_children() : mixed
- Outputs the board children for a standard board.
- template_boardindex_outer_below() : mixed
- The lower part of the outer layer of the board index
- template_info_center() : mixed
- Displays the info center
- template_ic_block_recent() : mixed
- The recent posts section of the info center
- template_ic_block_calendar() : mixed
- The calendar section of the info center
- template_ic_block_stats() : mixed
- The stats section of the info center
- template_ic_block_online() : mixed
- The who's online section of the info center
- template_main() : mixed
- Our main calendar template, which encapsulates weeks and months.
- template_show_upcoming_list() : void|bool
- Display a list of upcoming events, birthdays, and holidays.
- template_show_month_grid() : void|bool
- Display a monthly calendar grid.
- template_show_week_grid() : void|bool
- Shows a weekly grid
- template_calendar_top() : mixed
- Calendar controls under the title
- template_event_post() : mixed
- Template for posting a calendar event.
- template_bcd() : mixed
- Displays a clock
- template_hms() : mixed
- Displays the hours, minutes and seconds for our clock
- template_omfg() : mixed
- Displays a binary clock
- template_thetime() : mixed
- Displays the time
- template_main() : mixed
- This template handles displaying a topic
- template_single_post() : mixed
- Template for displaying a single post.
- template_quickreply() : mixed
- The template for displaying the quick reply box.
- template_fatal_error() : mixed
- THis displays a fatal error message
- template_error_log() : mixed
- This template handles the error log in the admin center.
- template_show_file() : mixed
- This template shows a snippet of code from a file and highlights which line caused the error.
- template_attachment_errors() : mixed
- This template handles showing attachment-related errors
- template_show_backtrace() : mixed
- This template shows a backtrace of the given error
- template_event_options() : mixed
- Template for the event options fieldset that is used when creating an event.
- template_event_link_to() : mixed
- Template for linking an existing topic to an event.
- template_event_unlink() : mixed
- Template for unlinking a topic and an event.
- template_event_board() : mixed
- Template for choosing a board to create a linked topic in.
- template_event_new() : mixed
- Template for entering info about a new event.
- template_occurrence_options() : mixed
- Template used when editing a single occurrence of an event.
- template_rrule() : mixed
- Template for the recurrence rule options for events.
- template_linked_events() : mixed
- Template to show linked events.
- template_control_richedit() : mixed
- This function displays all the stuff you get with a richedit box - BBC, smileys, etc.
- template_control_richedit_buttons() : mixed
- This template shows the form buttons at the bottom of the editor
- template_control_verification() : bool
- This template displays a verification form
- template_show_list() : mixed
- This template handles displaying a list
- template_additional_rows() : mixed
- This template displays additional rows above or below the list.
- template_generic_menu_dropdown_above() : mixed
- This contains the HTML for the menu bar at the top of the admin center.
- template_generic_menu_dropdown_below() : mixed
- Part of the admin layer - used with generic_menu_dropdown_above to close the admin content div.
- template_generic_menu() : mixed
- The template for displaying a menu
- template_generic_menu_tabs() : mixed
- The code for displaying the menu
- template_popup() : mixed
- This displays a help popup thingy
- template_manual() : mixed
- The main help page
- template_init() : mixed
- Initialize the template... mainly little settings.
- template_html_above() : mixed
- The main sub template above the content.
- template_body_above() : mixed
- The upper part of the main template layer. This is the stuff that shows above the main forum content.
- template_body_below() : mixed
- The stuff shown immediately below the main content, including the footer
- template_html_below() : mixed
- This shows any deferred JavaScript and closes out the HTML
- theme_linktree() : mixed
- Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".
- template_menu() : mixed
- Show the menu up top. Something like [home] [help] [profile] [logout].
- template_button_strip() : mixed
- Generate a strip of buttons.
- template_quickbuttons() : void|string
- Generate a list of quickbuttons.
- template_maint_warning_above() : mixed
- The upper part of the maintenance warning box
- template_maint_warning_below() : mixed
- The lower part of the maintenance warning box.
- template_security_warning_above() : mixed
- The upper part of the security warning box
- template_security_warning_below() : mixed
- The lower part of the security warning box.
- template_banned_warning_above() : mixed
- The upper part of the ban warning box
- template_banned_warning_below() : mixed
- The lower part of the ban warning box.
- template_popup() : mixed
- This shows the popup that shows who likes a particular post.
- template_like() : mixed
- Display a like button and info about how many people liked something
- template_generic() : mixed
- A generic template that outputs any data passed to it.
- template_login() : mixed
- This is just the basic "login" form.
- template_login_tfa() : mixed
- TFA authentication form
- template_kick_guest() : mixed
- Tell a guest to get lost or login!
- template_maintenance() : mixed
- This is for maintenance mode.
- template_admin_login() : mixed
- This is for the security stuff - makes administrators login every so often.
- template_retry_activate() : mixed
- Activate your account manually?
- template_resend() : mixed
- The form for resending the activation code.
- template_logout() : mixed
- Confirm a logout.
- template_avatar_settings_above() : mixed
- This template wraps around the simple settings page to add javascript functionality.
- template_avatar_settings_below() : mixed
- JavaScript to be output below the simple settings page
- template_maintenance() : mixed
- The attachment maintenance page
- template_attachment_repair() : mixed
- The file repair page
- template_attachment_paths() : mixed
- The page that handles managing attachment paths.
- template_ban_edit() : mixed
- Add or edit a ban
- template_ban_edit_trigger() : mixed
- Add or edit a ban trigger
- template_main() : mixed
- Template for listing all the current categories and boards.
- template_modify_category() : mixed
- Template for editing/adding a category on the forum.
- template_confirm_category_delete() : mixed
- A template to confirm if a user wishes to delete a category - and whether they want to save the boards.
- template_modify_board() : mixed
- Below is the template for adding/editing a board on the forum.
- template_confirm_board_delete() : mixed
- A template used when a user is deleting a board with child boards in it - to see what they want to do with them.
- template_edit_holiday() : mixed
- Editing or adding holidays.
- template_import() : mixed
- Importing iCalendar data.
- template_download_language() : mixed
- Download a new language file.
- template_modify_language_entries() : mixed
- Edit language entries. Note that this doesn't always work because of PHP's max_post_vars setting.
- template_add_language() : mixed
- Add a new language
- template_browse() : mixed
- Template for browsing the mail queue.
- template_mailtest() : mixed
- Template for testing mail send.
- template_maintain_database() : mixed
- Template for the database maintenance tasks.
- template_maintain_routine() : mixed
- Template for the routine maintenance tasks.
- template_maintain_members() : mixed
- Template for the member maintenance tasks.
- template_maintain_topics() : mixed
- Template for the topic maintenance tasks.
- template_optimize() : mixed
- Simple template for showing results of our optimization.
- template_convert_entities() : mixed
- Template for converting entities to UTF-8 characters
- template_convert_msgbody() : mixed
- Template for converting posts to UTF-8.
- template_main() : mixed
- The main page listing all the groups.
- template_new_group() : mixed
- Add a new membergroup.
- template_edit_group() : mixed
- Edit an existing membergroup.
- template_add_edit_group_boards_list() : mixed
- The template for determining which boards a group has access to.
- template_group_members() : mixed
- Template for viewing the members of a group.
- template_group_request_reason() : mixed
- Allow the moderator to enter a reason to each user being rejected.
- template_search_members() : mixed
- The admin member search form
- template_admin_browse() : mixed
- The admin member list.
- template_email_members() : mixed
- The template for sending newsletters
- template_email_members_compose() : mixed
- The form for composing a newsletter
- template_email_members_send() : mixed
- The page shown while the newsletter is being sent
- template_news_lists() : mixed
- The settings page.
- template_modify_subscription() : mixed
- The template for adding or editing a subscription.
- template_delete_subscription() : mixed
- The page for deleting a subscription.
- template_modify_user_subscription() : mixed
- Add or edit an existing subscriber.
- template_user_subscription() : mixed
- Template for a user to edit/pick their subscriptions.
- template_choose_payment() : mixed
- The "choose payment" dialog.
- template_paid_done() : mixed
- The "thank you" bit.
- template_permission_index() : mixed
- The main manage permissions page
- template_by_board() : mixed
- THe page that shows which permissions profile applies to each board
- template_edit_profiles() : mixed
- Edit permission profiles (predefined).
- template_modify_group() : mixed
- Modify a group's permissions
- template_modify_group_display() : mixed
- The way of looking at permissions.
- template_inline_permissions() : mixed
- A form for displaying inline permissions, such as on a settings page.
- template_postmod_permissions() : mixed
- Edit post moderation permissions.
- template_view_scheduled_tasks() : mixed
- Template for listing all scheduled tasks.
- template_edit_scheduled_tasks() : mixed
- A template for, you guessed it, editing a task!
- template_modify_weights() : mixed
- Modify the search weights.
- template_select_search_method() : mixed
- Select the search method.
- template_create_index() : mixed
- Create a search index.
- template_create_index_progress() : mixed
- Display a progress page while creating a search index.
- template_create_index_done() : mixed
- Done creating a search index.
- template_spider_edit() : mixed
- Add or edit a search engine spider.
- template_show_spider_logs() : mixed
- Show... spider... logs.
- template_show_spider_stats() : mixed
- Show... spider... stats.
- template_editsets() : mixed
- Shows a list of smiley sets so you can edit them.
- template_modifyset() : mixed
- Modifying a smiley set.
- template_modifysmiley() : mixed
- Editing an individual smiley
- template_addsmiley() : mixed
- Adding a new smiley.
- template_setorder() : mixed
- Ordering smileys.
- template_editicons() : mixed
- Editing Message Icons
- template_editicon() : mixed
- Editing an individual message icon
- template_main() : mixed
- Displays a sortable listing of all members registered on the forum.
- template_search() : mixed
- A page allowing people to search the member list.
- template_main() : mixed
- The main messageindex.
- template_bi_board_icon() : mixed
- Outputs the board icon for a standard board.
- template_bi_redirect_icon() : mixed
- Outputs the board icon for a redirect.
- template_bi_board_info() : mixed
- Outputs the board info for a standard board or redirect.
- template_bi_board_stats() : mixed
- Outputs the board stats for a standard board.
- template_bi_redirect_stats() : mixed
- Outputs the board stats for a redirect.
- template_bi_board_lastpost() : mixed
- Outputs the board lastposts for a standard board or a redirect.
- template_bi_board_children() : mixed
- Outputs the board children for a standard board.
- template_topic_legend() : mixed
- Shows a legend for topic icons.
- template_moderation_center() : mixed
- The main moderation center.
- template_group_requests_block() : mixed
- Show all the group requests the user can see.
- template_watched_users() : mixed
- A list of watched users
- template_reported_posts_block() : mixed
- A list of reported posts
- template_reported_users_block() : mixed
- A list of reported users
- template_notes() : mixed
- Little section for making... notes.
- template_unapproved_posts() : mixed
- Show a list of all the unapproved posts
- template_user_watch_post_callback() : string
- Callback function for showing a watched users post in the table.
- template_moderation_settings() : mixed
- The moderation settings page.
- template_show_notice() : mixed
- Show a notice sent to a user.
- template_warn_template() : mixed
- Add or edit a warning template.
- template_move() : mixed
- Show an interface for selecting which board to move a post to.
- template_redirect_options() : mixed
- Redirection topic options
- template_merge_done() : mixed
- Confirmation page shown when finished merging topics.
- template_merge() : mixed
- Merge topic page.
- template_merge_extra_options() : mixed
- Extra options related to merging topics.
- template_main() : mixed
- The main notification bar.
- template_notify_board() : mixed
- Board notification bar.
- template_notify_announcements() : mixed
- template_notify_pref_changed() : mixed
- Displays a message indicating the user's notification preferences were successfully changed
- template_main() : mixed
- The main template
- template_view_package() : mixed
- View package details when installing/uninstalling
- template_extract_package() : mixed
- Extract package contents
- template_list() : mixed
- List files in a package
- template_examine() : mixed
- Examine a single file within a package
- template_browse() : mixed
- List all packages
- template_servers() : mixed
- List package servers
- template_package_confirm() : mixed
- Confirm package operation
- template_package_list() : mixed
- List packages.
- template_downloaded() : mixed
- Confirmation page showing a package was uploaded/downloaded successfully.
- template_install_options() : mixed
- Installation options - FTP info and backup settings
- template_control_chmod() : bool
- CHMOD control form
- template_ftp_required() : mixed
- Wrapper for the above template function showing that FTP is required
- template_view_operations() : mixed
- View operation details.
- template_file_permissions() : mixed
- The file permissions page.
- template_permission_show_contents() : mixed
- Shows permissions for items within a directory (called from template_file_permissions)
- template_action_permissions() : mixed
- A progress page showing what permissions changes are being applied
- template_pm_above() : mixed
- This is for stuff above the menu in the personal messages section
- template_pm_below() : mixed
- Just the end of the index bar, nothing special.
- template_pm_popup() : mixed
- Displays a popup with information about your personal messages
- template_folder() : mixed
- Shows a particular folder (eg inbox or outbox), all the PMs in it, etc.
- template_single_pm() : mixed
- Template for displaying a single personal message.
- template_subject_list() : mixed
- Just list all the personal message subjects - to make templates easier.
- template_search() : mixed
- The form for the PM search feature
- template_search_results() : mixed
- Displays results from a PM search
- template_send() : mixed
- The form for sending a new PM
- template_ask_delete() : mixed
- This template asks the user whether they wish to empty out their folder/messages.
- template_prune() : mixed
- This template asks the user what messages they want to prune.
- template_labels() : mixed
- Here we allow the user to setup labels, remove labels and change rules for labels (i.e, do quite a bit)
- template_report_message() : mixed
- Template for reporting a personal message.
- template_report_message_complete() : mixed
- Little template just to say "Yep, it's been submitted"
- template_rules() : mixed
- Manage rules.
- template_add_rule() : mixed
- Template for adding/editing a rule.
- template_showPMDrafts() : mixed
- Template for showing all of a user's PM drafts.
- template_main() : mixed
- A form for creating and/or editing a poll.
- template_main() : mixed
- The main template for the post page.
- template_spellcheck() : mixed
- The template for the spellchecker.
- template_quotefast() : mixed
- The template for the AJAX quote feature
- template_announce() : mixed
- The form for sending out an announcement
- template_announcement_send() : mixed
- The confirmation/progress page, displayed after the admin has clicked the button to send the announcement.
- template_post_header() : mixed
- Prints the input fields in the form's header (subject, message icon, guest name & email, etc.)
- template_print_above() : mixed
- The header. Defines the look and layout of the page as well as a form for choosing print options.
- template_main() : mixed
- The main page. This shows the relevant info in a printer-friendly format
- template_print_below() : mixed
- The footer.
- template_print_options() : mixed
- Displays the print page options
- template_profile_above() : mixed
- Minor stuff shown above the main profile - mostly used for error messages and showing that the profile update was successful.
- template_profile_below() : mixed
- Template for any HTML needed below the profile (closing off divs/tables, etc.)
- template_profile_popup() : mixed
- Template for showing off the spiffy popup of the menu
- template_alerts_popup() : mixed
- The "popup" showing the user's alerts
- template_alerts_all_read() : mixed
- A simple template to say "You don't have any unread alerts".
- template_summary() : mixed
- This template displays a user's details without any option to edit them.
- template_showPosts() : mixed
- Template for showing all the posts of the user, in chronological order.
- template_showAlerts() : mixed
- Template for showing all alerts
- template_showDrafts() : mixed
- Template for showing all of a user's drafts
- template_editBuddies() : mixed
- Template for showing and managing the buddy list.
- template_editIgnoreList() : mixed
- Template for showing the ignore list of the current user.
- template_trackActivity() : mixed
- This template shows an admin information on a users IP addresses used and errors attributed to them.
- template_trackIP() : mixed
- The template for trackIP, allowing the admin to see where/who a certain IP has been used.
- template_showPermissions() : mixed
- This template shows an admin which permissions a user have and which group(s) give them each permission.
- template_statPanel() : mixed
- Template for user statistics, showing graphs and the like.
- template_edit_options() : mixed
- Template for editing profile options.
- template_profile_pm_settings() : mixed
- Personal Message settings.
- template_profile_theme_settings() : mixed
- Template for showing theme settings. Note: template_options() actually adds the theme specific options.
- template_alert_configuration() : mixed
- The template for configuring alerts
- template_alert_notifications_topics() : mixed
- Template for showing which topics you're subscribed to
- template_alert_notifications_boards() : mixed
- Template for showing which boards you're subscribed to
- template_groupMembership() : mixed
- Template for choosing group membership.
- template_ignoreboards() : mixed
- Template for managing ignored boards
- template_load_warning_variables() : mixed
- Simply loads some theme variables common to several warning templates.
- template_viewWarning() : mixed
- Template for viewing a user's warnings
- template_issueWarning() : mixed
- Template for issuing warnings
- template_deleteAccount() : mixed
- Template to show for deleting a user's account - now with added delete post capability!
- template_profile_save() : mixed
- Template for the password box/save button stuck at the bottom of every profile page.
- template_error_message() : mixed
- Small template for showing an error message upon a save problem in the profile.
- template_profile_group_manage() : mixed
- Display a load of drop down selectors for allowing the user to change group.
- template_profile_birthdate() : mixed
- Callback function for entering a birthdate!
- template_profile_signature_modify() : mixed
- Show the signature editing box?
- template_profile_avatar_select() : mixed
- Template for selecting an avatar
- template_max_size() : mixed
- This is just a really little helper to avoid duplicating code unnecessarily
- template_profile_timeformat_modify() : mixed
- Select the time format!
- template_profile_theme_pick() : mixed
- Template for picking a theme
- template_profile_smiley_pick() : mixed
- Smiley set picker.
- template_tfasetup() : mixed
- Template for setting up and managing Two-Factor Authentication.
- template_tfadisable() : mixed
- Template for disabling two-factor authentication.
- template_tfasetup_backup() : mixed
- Template for setting up 2FA backup code
- template_profile_tfa() : mixed
- Simple template for showing the 2FA area when editing a profile.
- template_export_profile_data() : mixed
- Template for initiating and retrieving profile data exports
- template_recent() : mixed
- Template for showing recent posts
- template_unread() : mixed
- Template for showing unread posts
- template_replies() : mixed
- Template for showing unread replies (eg new replies to topics you've posted in)
- template_registration_agreement() : mixed
- Before showing users a registration form, show them the registration agreement.
- template_registration_form() : mixed
- Before registering - get their information.
- template_after() : mixed
- After registration... all done ;).
- template_coppa() : mixed
- Template for giving instructions about COPPA activation.
- template_coppa_form() : mixed
- An easily printable form for giving permission to access the forum for a minor.
- template_verification_sound() : mixed
- Show a window containing the spoken verification code.
- template_admin_register() : mixed
- The template for the form allowing an admin to register a user from the admin center.
- template_edit_agreement() : mixed
- Form for editing the agreement shown for people registering to the forum.
- template_edit_reserved_words() : mixed
- Template for editing reserved words.
- template_edit_privacy_policy() : mixed
- template_main() : mixed
- The main "Here's how you can reset your password" page
- template_reminder_pick() : mixed
- The page to pick an option - secret question/answer (if set) or email
- template_sent() : mixed
- Just a simple "We sent you an email. Click the link in it to continue." message
- template_set_password() : mixed
- Template for setting the new password
- template_ask() : mixed
- The page that asks a user to answer their secret question
- template_reported_posts() : mixed
- Displays all reported posts.
- template_reported_posts_block() : mixed
- A block to show the current top reported posts.
- template_viewmodreport() : mixed
- Handles viewing details of and managing a specific report
- template_edit_comment() : mixed
- Template for editing a mod comment.
- template_reported_members_block() : mixed
- A block to show the current top reported member profiles.
- template_reported_members() : mixed
- Lists all reported members
- template_viewmemberreport() : mixed
- Template for viewing and managing a specific report about a user's profile
- template_report_type() : mixed
- Choose which type of report to run?
- template_main() : mixed
- This is the standard template for showing reports.
- template_print_above() : mixed
- Header of the print page!
- template_print() : mixed
- The main print page
- template_print_below() : mixed
- Footer of the print page.
- template_main() : mixed
- The main "report this to the moderator" page
- template_main() : mixed
- The main search form
- template_results() : mixed
- The search results page.
- template_options() : mixed
- This pseudo-template defines all the theme options
- template_settings() : mixed
- This pseudo-template defines all the available theme settings (but not their actual values)
- template_ask() : mixed
- The form that asks how you want to split things
- template_main() : mixed
- A simple confirmation that things were split as expected, with links to the current board and the old and new topics.
- template_select() : mixed
- The form for selecting which posts to split.
- template_main() : mixed
- The stats page.
- template_main() : mixed
- The main sub template - for theme administration.
- template_list_themes() : mixed
- This lists all themes
- template_reset_list() : mixed
- This lets you reset themes
- template_set_options() : mixed
- This displays the form for setting theme options
- template_set_settings() : mixed
- The page for setting and managing theme settings.
- template_pick() : mixed
- This template allows for the selection of different themes ;)
- template_installed() : mixed
- Okay, that theme was installed/updated successfully!
- template_edit_list() : mixed
- The page for editing themes.
- template_copy_template() : mixed
- The page allowing you to copy a template from one theme to another.
- template_edit_browse() : mixed
- This lets you browse a list of files in a theme so you can choose which one to edit.
- template_edit_style() : mixed
- Wanna edit the stylesheet?
- template_edit_template() : mixed
- This edits the template.
- template_edit_file() : mixed
- This allows you to edit a file
- template_main() : mixed
- This handles the Who's Online page
- template_credits() : mixed
- This displays a nice credits page
- template_sendbody() : mixed
- This defines the XML for sending the body of a message
- template_quotefast() : mixed
- This defines the XML for the AJAX quote feature
- template_modifyfast() : mixed
- This defines the XML for the inline edit feature
- template_modifydone() : mixed
- The XML for handling things when you're done editing a post inline
- template_modifytopicdone() : mixed
- This handles things when editing a topic's subject from the messageindex.
- template_post() : mixed
- The massive XML for previewing posts.
- template_pm() : mixed
- All the XML for previewing a PM
- template_warning() : mixed
- The XML for previewing a warning
- template_stats() : mixed
- The XML for hiding/showing stats sections via AJAX
- template_split() : mixed
- The XML for selecting items to split
- template_button_strip() : mixed
- template_menu() : mixed
- theme_linktree() : mixed
- template_results() : mixed
- XML for search results
- template_jump_to() : mixed
- The XML for the Jump To box
- template_message_icons() : mixed
- The XML for displaying a column of message icons and selecting one via AJAX
- template_check_username() : mixed
- The XML for instantly showing whether a username is valid on the registration page
- template_generic_xml() : mixed
- This prints XML in its most generic form.
- template_generic_xml_recursive() : mixed
- Recursive function for displaying generic XML data.
- find_signed_off() : mixed
- find_gpg() : mixed
- find_signed_off_parents() : mixed
- debugPrint() : mixed
- checkLanguageDirectory() : mixed
- prepareCLIhandler() : mixed
Constants
DB_SCRIPT_VERSION
public
mixed
DB_SCRIPT_VERSION
= '3-0'
DEBUG_MODE
Simple Machines Forum (SMF)
public
mixed
DEBUG_MODE
= \false
Tags
EXPORTING
public
mixed
EXPORTING
= 1
FROM_CLI
public
mixed
FROM_CLI
= Sapi::isCLI()
IMAGETYPE_AVIF
public
mixed
IMAGETYPE_AVIF
= 19
JQUERY_VERSION
public
mixed
JQUERY_VERSION
= '3.6.3'
JQUERY_VERSION
public
mixed
JQUERY_VERSION
= '3.6.3'
JQUERY_VERSION
public
mixed
JQUERY_VERSION
= '3.6.3'
MAX_CLAIM_THRESHOLD
public
mixed
MAX_CLAIM_THRESHOLD
= self::MAX_CLAIM_THRESHOLD
MAX_CRON_TIME
public
mixed
MAX_CRON_TIME
= self::MAX_CRON_TIME
MYSQL_TITLE
public
mixed
MYSQL_TITLE
= 'MySQL'
MYSQL_TITLE
public
mixed
MYSQL_TITLE
= 'MySQL'
MYSQL_TITLE
public
mixed
MYSQL_TITLE
= 'MySQL'
POSTGRE_TITLE
public
mixed
POSTGRE_TITLE
= 'PostgreSQL'
POSTGRE_TITLE
public
mixed
POSTGRE_TITLE
= 'PostgreSQL'
POSTGRE_TITLE
public
mixed
POSTGRE_TITLE
= 'PostgreSQL'
SMF
public
mixed
SMF
= 'BACKGROUND'
SMF
public
mixed
SMF
= 1
SMF
public
mixed
SMF
= 1
SMF
public
mixed
SMF
= basename(__FILE__)
SMF
public
mixed
SMF
= 'BACKGROUND'
SMF
public
mixed
SMF
= 1
SMF
public
mixed
SMF
= 'PROXY'
SMF
public
mixed
SMF
= 'SSI'
SMF_FULL_VERSION
public
mixed
SMF_FULL_VERSION
= 'SMF ' . \SMF_VERSION
SMF_FULL_VERSION
public
mixed
SMF_FULL_VERSION
= 'SMF ' . \SMF_VERSION
SMF_FULL_VERSION
public
mixed
SMF_FULL_VERSION
= 'SMF ' . \SMF_VERSION
SMF_INSTALLING
public
mixed
SMF_INSTALLING
= 1
SMF_INSTALLING
public
mixed
SMF_INSTALLING
= 1
SMF_LANG_VERSION
public
mixed
SMF_LANG_VERSION
= '3.0 Alpha 2'
SMF_SETTINGS_BACKUP_FILE
public
mixed
SMF_SETTINGS_BACKUP_FILE
= \dirname(\SMF_SETTINGS_FILE) . '/' . \pathinfo(\SMF_SETTINGS_FILE, \PATHINFO_FILENAME) . '_bak.php'
SMF_SETTINGS_BACKUP_FILE
public
mixed
SMF_SETTINGS_BACKUP_FILE
= __DIR__ . '/Settings_bak.php'
SMF_SETTINGS_BACKUP_FILE
public
mixed
SMF_SETTINGS_BACKUP_FILE
= dirname(SMF_SETTINGS_FILE) . '/' . pathinfo(SMF_SETTINGS_FILE, PATHINFO_FILENAME) . '_bak.php'
SMF_SETTINGS_FILE
public
mixed
SMF_SETTINGS_FILE
= __DIR__ . '/Settings.php'
SMF_SETTINGS_FILE
public
mixed
SMF_SETTINGS_FILE
= __DIR__ . '/Settings.php'
SMF_SETTINGS_FILE
public
mixed
SMF_SETTINGS_FILE
= $settingsFile
SMF_SOFTWARE_YEAR
public
mixed
SMF_SOFTWARE_YEAR
= '2025'
SMF_SOFTWARE_YEAR
public
mixed
SMF_SOFTWARE_YEAR
= '2025'
SMF_SOFTWARE_YEAR
public
mixed
SMF_SOFTWARE_YEAR
= $matches[1]
SMF_SOFTWARE_YEAR
public
mixed
SMF_SOFTWARE_YEAR
= '2025'
SMF_UNICODE_VERSION
public
mixed
SMF_UNICODE_VERSION
= '16.0.0.0'
SMF_USER_AGENT
public
mixed
SMF_USER_AGENT
= 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
SMF_USER_AGENT
public
mixed
SMF_USER_AGENT
= 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
SMF_USER_AGENT
public
mixed
SMF_USER_AGENT
= 'SMF'
SMF_USER_AGENT
public
mixed
SMF_USER_AGENT
= 'SMF'
SMF_USER_AGENT
public
mixed
SMF_USER_AGENT
= 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
SMF_VERSION
public
mixed
SMF_VERSION
= '3.0 Alpha 2'
SMF_VERSION
public
mixed
SMF_VERSION
= '3.0 Alpha 2'
SMF_VERSION
public
mixed
SMF_VERSION
= $matches[1]
SMF_VERSION
public
mixed
SMF_VERSION
= '3.0 Alpha 2'
TIME_START
public
mixed
TIME_START
= \microtime(\true)
TIME_START
public
mixed
TIME_START
= \microtime(\true)
TIME_START
public
mixed
TIME_START
= \microtime(\true)
TIME_START
public
mixed
TIME_START
= \microtime(\true)
Functions
initialize_inputs()
initialize_inputs() : mixed
load_lang_file()
load_lang_file() : mixed
load_database()
load_database() : mixed
installExit()
installExit([mixed $fallThrough = false ]) : mixed
Parameters
- $fallThrough : mixed = false
Welcome()
Welcome() : mixed
CheckFilesWritable()
CheckFilesWritable() : mixed
DatabaseSettings()
DatabaseSettings() : mixed
ForumSettings()
ForumSettings() : mixed
DatabasePopulation()
DatabasePopulation() : mixed
AdminAccount()
AdminAccount() : mixed
DeleteInstall()
DeleteInstall() : mixed
installer_updateSettingsFile()
installer_updateSettingsFile(mixed $vars[, mixed $rebuild = false ]) : mixed
Parameters
- $vars : mixed
- $rebuild : mixed = false
fixModSecurity()
fixModSecurity() : mixed
template_install_above()
template_install_above() : mixed
template_install_below()
template_install_below() : mixed
template_welcome_message()
template_welcome_message() : mixed
template_warning_divs()
template_warning_divs() : mixed
template_chmod_files()
template_chmod_files() : mixed
template_database_settings()
template_database_settings() : mixed
template_forum_settings()
template_forum_settings() : mixed
template_populate_database()
template_populate_database() : mixed
template_admin_account()
template_admin_account() : mixed
template_delete_install()
template_delete_install() : mixed
getFiles()
getFiles(string $dir) : array<string|int, mixed>
Parameters
- $dir : string
Return values
array<string|int, mixed>upgrade_clean_cache()
Clean the cache using the SMF 2.1 CacheAPI.
upgrade_clean_cache() : mixed
If coming from SMF 2.0 and below it should wipe the cache using the SMF backend.
getMemberGroups()
Returns a list of member groups. Used to upgrade 1.0 and 1.1.
getMemberGroups() : array<string|int, mixed>
Return values
array<string|int, mixed>makeFilesWritable()
Make files writable. First try to use regular chmod, but if that fails, try to use FTP.
makeFilesWritable(mixed &$files) : bool
Parameters
- $files : mixed
Return values
boolquickFileWritable()
The quick version of makeFilesWritable, which does not support FTP.
quickFileWritable(string $file) : bool
Parameters
- $file : string
Return values
booldeleteFile()
Delete a file. Check permissions first, just in case.
deleteFile(string $file) : mixed
Parameters
- $file : string
print_error()
Prints an error to stderr.
print_error(mixed $message[, bool $fatal = false ]) : mixed
Parameters
- $message : mixed
- $fatal : bool = false
throw_error()
Throws a graphical error message.
throw_error(mixed $message) : bool
Parameters
- $message : mixed
Return values
boolsmf_mysql_fetch_assoc()
smf_mysql_fetch_assoc(mixed $rs) : array<string|int, mixed>|null
Parameters
- $rs : mixed
Return values
array<string|int, mixed>|nullsmf_mysql_fetch_row()
smf_mysql_fetch_row(mixed $rs) : array<string|int, mixed>|null
Parameters
- $rs : mixed
Return values
array<string|int, mixed>|nullsmf_mysql_free_result()
smf_mysql_free_result(mixed $rs) : mixed
Parameters
- $rs : mixed
smf_mysql_insert_id()
smf_mysql_insert_id([mixed $rs = null ]) : int|string
Parameters
- $rs : mixed = null
-
Ignored
Return values
int|stringsmf_mysql_num_rows()
smf_mysql_num_rows(mixed $rs) : int
Parameters
- $rs : mixed
Return values
intsmf_mysql_real_escape_string()
smf_mysql_real_escape_string(mixed $string) : mixed
Parameters
- $string : mixed
array_column()
array_column(mixed $input, mixed $column_key[, mixed $index_key = null ]) : mixed
Parameters
- $input : mixed
- $column_key : mixed
- $index_key : mixed = null
upgradeCacheSettings()
Creates the json_encoded array for the current cache option.
upgradeCacheSettings() : string
Return values
string —a json_encoded array with the selected API options
upgradeExit()
upgradeExit([mixed $fallThrough = false ]) : mixed
Parameters
- $fallThrough : mixed = false
findSettingsFile()
findSettingsFile() : mixed
load_lang_file()
load_lang_file() : mixed
redirectLocation()
redirectLocation(mixed $location[, mixed $addForm = true ]) : mixed
Parameters
- $location : mixed
- $addForm : mixed = true
loadEssentialData()
loadEssentialData() : mixed
initialize_inputs()
initialize_inputs() : mixed
WelcomeLogin()
WelcomeLogin() : mixed
checkFolders()
checkFolders() : mixed
checkLogin()
checkLogin() : mixed
UpgradeOptions()
UpgradeOptions() : mixed
BackupDatabase()
BackupDatabase() : mixed
backupTable()
backupTable(mixed $table) : mixed
Parameters
- $table : mixed
DatabaseChanges()
DatabaseChanges() : mixed
setSqlMode()
setSqlMode([mixed $strict = true ]) : mixed
Parameters
- $strict : mixed = true
DeleteUpgrade()
DeleteUpgrade() : mixed
addBackgroundTasks()
addBackgroundTasks() : mixed
cli_scheduled_fetchSMfiles()
cli_scheduled_fetchSMfiles() : mixed
convertSettingsToTheme()
convertSettingsToTheme() : mixed
convertSettingstoOptions()
convertSettingstoOptions() : mixed
php_version_check()
php_version_check() : mixed
db_version_check()
db_version_check() : mixed
fixRelativePath()
fixRelativePath(mixed $path) : mixed
Parameters
- $path : mixed
parse_sql()
parse_sql(mixed $filename) : mixed
Parameters
- $filename : mixed
upgrade_query()
upgrade_query(mixed $string[, mixed $unbuffered = false ]) : mixed
Parameters
- $string : mixed
- $unbuffered : mixed = false
protected_alter()
protected_alter(mixed $change, mixed $substep[, mixed $is_test = false ]) : mixed
Parameters
- $change : mixed
- $substep : mixed
- $is_test : mixed = false
textfield_alter()
Alter a text column definition preserving its character set.
textfield_alter(array<string|int, mixed> $change, int $substep) : mixed
Parameters
- $change : array<string|int, mixed>
- $substep : int
nextSubstep()
nextSubstep(mixed $substep) : mixed
Parameters
- $substep : mixed
cmdStep0()
cmdStep0() : mixed
ConvertUtf8()
Handles converting your database to UTF-8
ConvertUtf8() : mixed
upgrade_unserialize()
Wrapper for unserialize that attempts to repair corrupted serialized data strings
upgrade_unserialize(string $string) : string|bool
Parameters
- $string : string
-
Serialized data that may or may not have been corrupted
Return values
string|bool —The unserialized data, or false if the repair failed
serialize_to_json()
serialize_to_json() : mixed
Cleanup()
Cleanup() : mixed
CleanupLanguages()
CleanupLanguages() : mixed
CleanupAgreements()
CleanupAgreements() : mixed
template_chmod()
template_chmod() : mixed
template_upgrade_above()
template_upgrade_above() : mixed
template_upgrade_below()
template_upgrade_below() : mixed
template_xml_above()
template_xml_above() : mixed
template_xml_below()
template_xml_below() : mixed
template_error_message()
template_error_message() : mixed
template_welcome_message()
template_welcome_message() : mixed
template_upgrade_options()
template_upgrade_options() : mixed
template_backup_database()
template_backup_database() : mixed
template_backup_xml()
template_backup_xml() : mixed
template_database_changes()
template_database_changes() : mixed
template_database_xml()
template_database_xml() : mixed
template_convert_utf8()
template_convert_utf8() : mixed
template_convert_xml()
template_convert_xml() : mixed
template_serialize_json()
template_serialize_json() : mixed
template_serialize_json_xml()
template_serialize_json_xml() : mixed
template_cleanup()
template_cleanup() : mixed
template_cleanup_xml()
template_cleanup_xml() : mixed
template_upgrade_complete()
template_upgrade_complete() : mixed
MySQLConvertOldIp()
Convert MySQL (var)char ip col to binary
MySQLConvertOldIp(string $targetTable, string $oldCol, string $newCol[, int $limit = 50000 ][, int $setSize = 100 ]) : void
newCol needs to be a varbinary(16) null able field
Parameters
- $targetTable : string
-
The table to perform the operation on
- $oldCol : string
-
The old column to gather data from
- $newCol : string
-
The new column to put data in
- $limit : int = 50000
-
The amount of entries to handle at once.
- $setSize : int = 100
-
The amount of entries after which to update the database.
upgradeGetColumnInfo()
Get the column info. This is basically the same as smf_db_list_columns but we get 1 column, force detail and other checks.
upgradeGetColumnInfo(string $targetTable, string $column) : array<string|int, mixed>
Parameters
- $targetTable : string
-
The table to perform the operation on
- $column : string
-
The column we are looking for.
Return values
array<string|int, mixed> —Info on the table.
Activate()
Activate an users account.
Activate() : mixed
Checks for mail changes, resends password if needed.
AdminMain()
The main admin handling function.<br> It initialises all the basic context required for the admin center.<br> It passes execution onto the relevant admin section.<br> If the passed section is not found it shows the admin home page.
AdminMain() : mixed
prepareDBSettingContext()
Helper function, it sets up the context for database settings.
prepareDBSettingContext(array<string|int, mixed> &$config_vars) : void
Parameters
- $config_vars : array<string|int, mixed>
-
An array of configuration variables
Tags
saveSettings()
Helper function. Saves settings by putting them in Settings.php or saving them in the settings table.
saveSettings(array<string|int, mixed> &$config_vars) : void
- Saves those settings set from ?action=admin;area=serversettings.
- Requires the admin_forum permission.
- Contains arrays of the types of data to save into Settings.php.
Parameters
- $config_vars : array<string|int, mixed>
-
An array of configuration variables
saveDbSettings()
Helper function for saving database settings.
saveDbSettings(array<string|int, mixed> &$config_vars) : void
Parameters
- $config_vars : array<string|int, mixed>
-
An array of configuration variables
Tags
getServerVersions()
Get a list of versions that are currently installed on the server.
getServerVersions(array<string|int, mixed> $checkFor) : array<string|int, mixed>
Parameters
- $checkFor : array<string|int, mixed>
-
An array of what to check versions for - can contain one or more of 'gd', 'imagemagick', 'db_server', 'phpa', 'memcache', 'php' or 'server'
Return values
array<string|int, mixed> —An array of versions (keys are same as what was in $checkFor, values are the versions)
getFileVersions()
Search through source, theme and language files to determine their version.
getFileVersions(array<string|int, mixed> &$versionOptions) : array<string|int, mixed>
Get detailed version information about the physical SMF files on the server.
- the input parameter allows to set whether to include SSI.php and whether the results should be sorted.
- returns an array containing information on source files, templates and language files found in the default theme directory (grouped by language).
Parameters
- $versionOptions : array<string|int, mixed>
-
An array of options. Can contain one or more of 'include_ssi', 'include_subscriptions', 'include_tasks' and 'sort_results'
Return values
array<string|int, mixed> —An array of file version info.
updateAdminPreferences()
Saves the admin's current preferences to the database.
updateAdminPreferences() : void
emailAdmins()
Send all the administrators a lovely email.
emailAdmins(string $template[, array<string|int, mixed> $replacements = [] ][, array<string|int, mixed> $additional_recipients = [] ]) : void
- loads all users who are admins or have the admin forum permission.
- uses the email template and replacements passed in the parameters.
- sends them an email.
Parameters
- $template : string
-
Which email template to use
- $replacements : array<string|int, mixed> = []
-
An array of items to replace the variables in the template
- $additional_recipients : array<string|int, mixed> = []
-
An array of arrays of info for additional recipients. Should have 'id', 'email' and 'name' for each.
adminLogin()
Question the verity of the admin by asking for his or her password.
adminLogin([string $type = 'admin' ]) : void
- loads Login.template.php and uses the admin_login sub template.
- sends data to template so the admin is sent on to the page they wanted if their password is correct, otherwise they can try again.
Parameters
- $type : string = 'admin'
-
What login type is this - can be 'admin' or 'moderate'
ModifyAntispamSettings()
Let's try keep the spam to a minimum ah Thantos?
ModifyAntispamSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ManageAttachments()
The main 'Attachments and Avatars' management function.
ManageAttachments() : mixed
This function is the entry point for index.php?action=admin;area=manageattachments and it calls a function based on the sub-action. It requires the manage_attachments permission.
Uses ManageAttachments template. Uses Admin language file. Uses template layer 'manage_files' for showing the tab bar.
attachDirStatus()
Checks the status of an attachment directory and returns an array of the status key, if that status key signifies an error, and the file count.
attachDirStatus(string $dir, int $expected_files) : array<string|int, mixed>
Parameters
- $dir : string
-
The directory to check
- $expected_files : int
-
How many files should be in that directory
Return values
array<string|int, mixed> —An array containing the status of the directory, whether the number of files was what we expected and how many were in the directory
ManageAttachmentSettings()
Allows to show/change attachment settings.
ManageAttachmentSettings([bool $return_config = false ]) : array<string|int, mixed>|null
This is the default sub-action of the 'Attachments and Avatars' center. Called by index.php?action=admin;area=manageattachments;sa=attachments. Uses 'attachments' sub template.
Parameters
- $return_config : bool = false
-
Whether to return the array of config variables (used for admin search)
Return values
array<string|int, mixed>|null —If $return_config is true, simply returns the config_vars array, otherwise returns nothing
ManageAvatarSettings()
This allows to show/change avatar settings.
ManageAvatarSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Called by index.php?action=admin;area=manageattachments;sa=avatars. Show/set permissions for permissions: 'profile_server_avatar', 'profile_upload_avatar' and 'profile_remote_avatar'.
Parameters
- $return_config : bool = false
-
Whether to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns the config_vars array if $return_config is true, otherwise returns nothing
BrowseFiles()
Show a list of attachment or avatar files.
BrowseFiles() : void
Called by ?action=admin;area=manageattachments;sa=browse for attachments and ?action=admin;area=manageattachments;sa=browse;avatars for avatars. Allows sorting by name, date, size and member. Paginates results.
MaintainFiles()
Show several file maintenance options.
MaintainFiles() : void
Called by ?action=admin;area=manageattachments;sa=maintain. Calculates file statistics (total file size, number of attachments, number of avatars, attachment space available).
Tags
RemoveAttachment()
Remove a selection of attachments or avatars.
RemoveAttachment() : void
Called from the browse screen as submitted form by ?action=admin;area=manageattachments;sa=remove
RemoveAttachmentByAge()
Remove attachments older than a given age.
RemoveAttachmentByAge() : void
Called from the maintenance screen by ?action=admin;area=manageattachments;sa=byAge. It optionally adds a certain text to the messages the attachments were removed from.
Tags
RemoveAttachmentBySize()
Remove attachments larger than a given size.
RemoveAttachmentBySize() : void
Called from the maintenance screen by ?action=admin;area=manageattachments;sa=bySize. Optionally adds a certain text to the messages the attachments were removed from.
RemoveAllAttachments()
Removes all attachments in a single click Called from the maintenance screen by ?action=admin;area=manageattachments;sa=removeall.
RemoveAllAttachments() : void
RepairAttachments()
This function should find attachments in the database that no longer exist and clear them, and fix filesize issues.
RepairAttachments() : void
ManageAttachmentPaths()
This function lists and allows updating of multiple attachments paths.
ManageAttachmentPaths() : void
TransferAttachments()
Maintance function to move attachments from one directory to another
TransferAttachments() : void
Ban()
Ban center. The main entrance point for all ban center functions.
Ban() : void
It is accesssed by ?action=admin;area=ban. It choses a function based on the 'sa' parameter, like many others. The default sub-action is BanList(). It requires the ban_members permission. It initializes the admin tabs.
Uses ManageBans template.
updateBanMembers()
As it says... this tries to review the list of banned members, to match new bans.
updateBanMembers() : void
Note: is_activated >= 10: a member is banned.
BanList()
Shows a list of bans currently set.
BanList() : void
It is accessed by ?action=admin;area=ban;sa=list. It removes expired bans. It allows sorting on different criteria. It also handles removal of selected ban items.
Uses the main ManageBans template.
BanEdit()
This function is behind the screen for adding new bans and modifying existing ones.
BanEdit() : void
Adding new bans: - is accessed by ?action=admin;area=ban;sa=add. - uses the ban_edit sub template of the ManageBans template. Modifying existing bans:
- is accessed by ?action=admin;area=ban;sa=edit;bg=x
- uses the ban_edit sub template of the ManageBans template.
- shows a list of ban triggers for the specified ban.
BanBrowseTriggers()
This handles the screen for showing the banned entities It is accessed by ?action=admin;area=ban;sa=browse It uses sub-tabs for browsing by IP, hostname, email or username.
BanBrowseTriggers() : void
Uses a standard list (@see createList())
BanEditTrigger()
This function handles the ins and outs of the screen for adding new ban triggers or modifying existing ones.
BanEditTrigger() : void
Adding new ban triggers: - is accessed by ?action=admin;area=ban;sa=edittrigger;bg=x - uses the ban_edit_trigger sub template of ManageBans. Editing existing ban triggers:
- is accessed by ?action=admin;area=ban;sa=edittrigger;bg=x;bi=y
- uses the ban_edit_trigger sub template of ManageBans.
BanLog()
This handles the listing of ban log entries, and allows their deletion.
BanLog() : void
Shows a list of logged access attempts by banned users. It is accessed by ?action=admin;area=ban;sa=log. How it works:
- allows sorting of several columns.
- also handles deletion of (a selection of) log entries.
ManageBoards()
The main dispatcher; doesn't do anything, just delegates.
ManageBoards() : void
This is the main entry point for all the manageboards admin screens. Called by ?action=admin;area=manageboards. It checks the permissions, based on the sub-action, and calls a function based on the sub-action.
Uses ManageBoards language file.
EditBoardSettings()
A screen to set a few general board and category settings.
EditBoardSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether to return the $config_vars array (used for admin search)
Tags
Return values
array<string|int, mixed>|null —Returns nothing or the array of config vars if $return_config is true
ManageCalendar()
The main controlling function doesn't have much to do... yet.
ManageCalendar() : void
Just check permissions and delegate to the rest.
Uses ManageCalendar language file.
ModifyHolidays()
The function that handles adding, and deleting holiday data
ModifyHolidays() : void
EditHoliday()
This function is used for adding/editing a specific holiday
EditHoliday() : void
ModifyCalendarSettings()
Show and allow to modify calendar settings. Obviously.
ModifyCalendarSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether to return the $config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns $config_vars if $return_config is true
AdminEndSession()
This ends a admin session, requiring authentication to access the ACP again.
AdminEndSession() : void
ViewErrorLog()
View the forum's error log.
ViewErrorLog() : void
This function sets all the context up to show the error log for maintenance. It requires the maintain_forum permission. It is accessed from ?action=admin;area=logs;sa=errorlog.
Tags
ModifyFeatureSettings()
This function passes control through to the relevant tab.
ModifyFeatureSettings() : void
ModifyBasicSettings()
Config array for changing the basic forum settings Accessed from ?action=admin;area=featuresettings;sa=basic;
ModifyBasicSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyBBCSettings()
Set a few Bulletin Board Code settings. It loads a list of Bulletin Board Code tags to allow disabling tags.
ModifyBBCSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Requires the admin_forum permission. Accessed from ?action=admin;area=featuresettings;sa=bbc.
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Tags
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyLayoutSettings()
Allows modifying the global layout settings in the forum Accessed through ?action=admin;area=featuresettings;sa=layout;
ModifyLayoutSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifySignatureSettings()
You'll never guess what this function does.
ModifySignatureSettings([bool $return_config = false ]) : array<string|int, mixed>|null
..
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ShowCustomProfiles()
Show all the custom profile fields available to the user.
ShowCustomProfiles() : void
EditCustomProfiles()
Edit some profile fields?
EditCustomProfiles() : void
ModifyLikesSettings()
Config array for changing like settings Accessed from ?action=admin;area=featuresettings;sa=likes;
ModifyLikesSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyMentionsSettings()
Config array for changing like settings Accessed from ?action=admin;area=featuresettings;sa=mentions;
ModifyMentionsSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyAlertsSettings()
Handles modifying the alerts settings
ModifyAlertsSettings() : void
AdminSearch()
This function allocates out all the search stuff.
AdminSearch() : void
AdminHome()
The main administration section.
AdminHome() : void
It prepares all the data necessary for the administration front page. It uses the Admin template along with the admin sub template. It requires the moderate_forum, manage_membergroups, manage_bans, admin_forum, manage_permissions, manage_attachments, manage_smileys, manage_boards, edit_news, or send_mail permission. It uses the index administrative area. It can be found by going to ?action=admin.
ManageLanguages()
This is the main function for the languages area.
ManageLanguages() : void
It dispatches the requests. Loads the ManageLanguages template. (sub-actions will use it)
Tags
ModifyLanguages()
This lists all the current languages and allows editing of them.
ModifyLanguages() : void
AddLanguage()
Interface for adding a new language
AddLanguage() : void
Tags
ModifyLanguageSettings()
Edit language related settings.
ModifyLanguageSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether to return the $config_vars array (used in admin search)
Return values
array<string|int, mixed>|null —Returns nothing or the $config_vars array if $return_config is true
DownloadLanguage()
Download a language file from the Simple Machines website.
DownloadLanguage() : void
Requires a valid download ID ("did") in the URL. Also handles installing language files. Attempts to chmod things as needed. Uses a standard list to display information about all the files and where they'll be put.
Tags
ModifyLanguage()
Edit a particular set of language entries.
ModifyLanguage() : void
AdminLogs()
This function decides which log to load.
AdminLogs([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
Return values
array<string|int, mixed>|nullManageMail()
Main dispatcher. This function checks permissions and passes control through to the relevant section.
ManageMail() : void
BrowseMailQueue()
Display the mail queue.
BrowseMailQueue() : void
..
ClearMailQueue()
This function clears the mail queue of all emails, and at the end redirects to browse.
ClearMailQueue() : void
ModifyMailSettings()
Allows to view and modify the mail settings.
ModifyMailSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether to return the $config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
TestMailSend()
Test mail sending ability.
TestMailSend() : void
ManageMaintenance()
Main dispatcher, the maintenance access point.
ManageMaintenance() : void
This, as usual, checks permissions, loads language files, and forwards to the actual workers.
get_integration_hooks_data()
Callback function for the integration hooks list (list_integration_hooks) Gets all of the hooks in the system and their status
get_integration_hooks_data(int $start, int $per_page, string $sort, array<string|int, mixed> $filtered_hooks, string $normalized_boarddir, string $normalized_sourcedir) : array<string|int, mixed>
Parameters
- $start : int
-
The item to start with (for pagination purposes)
- $per_page : int
-
How many items to display on each page
- $sort : string
-
A string indicating how to sort things
- $filtered_hooks : array<string|int, mixed>
- $normalized_boarddir : string
- $normalized_sourcedir : string
Return values
array<string|int, mixed> —An array of information about the integration hooks
reattributePosts()
This function is used to reassociate members with relevant posts.
reattributePosts(int $memID[, bool|string $email = null ][, bool|string $membername = null ][, bool $post_count = false ]) : array<string|int, mixed>
Reattribute guest posts to a specified member. Does not check for any permissions. If add_to_post_count is set, the member's post count is increased.
Parameters
- $memID : int
-
The ID of the original poster
- $email : bool|string = null
-
If set, should be the email of the poster
- $membername : bool|string = null
-
If set, the membername of the poster
- $post_count : bool = false
-
Whether to adjust post counts
Return values
array<string|int, mixed> —An array containing the number of messages, topics and reports updated
MaintainRoutine()
Supporting function for the routine maintenance area.
MaintainRoutine() : void
MaintainDatabase()
Supporting function for the database maintenance area.
MaintainDatabase() : void
MaintainMembers()
Supporting function for the members maintenance area.
MaintainMembers() : void
MaintainTopics()
Supporting function for the topics maintenance area.
MaintainTopics() : void
list_integration_hooks()
Generates a list of integration hooks for display Accessed through ?action=admin;area=maintain;sa=hooks; Allows for removal or disabling of selected hooks
list_integration_hooks() : void
VersionDetail()
Perform a detailed version check. A very good thing ;).
VersionDetail() : void
The function parses the comment headers in all files for their version information, and outputs that for some javascript to check with simplemachines.org. It does not connect directly with simplemachines.org, but rather expects the client to.
It requires the admin_forum permission. Uses the view_versions admin area. Accessed through ?action=admin;area=maintain;sa=routine;activity=version.
Tags
MaintainFindFixErrors()
Find and fix all errors on the forum.
MaintainFindFixErrors() : void
AdminBoardRecount()
Recount many forum totals that can be recounted automatically without harm.
AdminBoardRecount() : void
it requires the admin_forum permission. It shows the maintain_forum admin area.
Totals recounted:
- fixes for topics with wrong num_replies.
- updates for num_posts and num_topics of all boards.
- recounts instant_messages but not unread_messages.
- repairs messages pointing to boards with topics pointing to other boards.
- updates the last message posted in boards and children.
- updates member count, latest member, topic count, and message count.
The function redirects back to ?action=admin;area=maintain when complete. It is accessed via ?action=admin;area=maintain;sa=database;activity=recount.
RebuildSettingsFile()
Rebuilds Settings.php to make it nice and pretty.
RebuildSettingsFile() : void
MaintainEmptyUnimportantLogs()
Empties all uninmportant logs
MaintainEmptyUnimportantLogs() : void
MaintainCleanCache()
Wipes the whole cache.
MaintainCleanCache() : void
OptimizeTables()
Optimizes all tables in the database and lists how much was saved.
OptimizeTables() : void
It requires the admin_forum permission. It shows as the maintain_forum admin area. It is accessed from ?action=admin;area=maintain;sa=database;activity=optimize. It also updates the optimize scheduled task such that the tables are not automatically optimized again too soon.
Tags
ConvertEntities()
Converts HTML-entities to their UTF-8 character equivalents.
ConvertEntities() : void
This requires the admin_forum permission. Pre-condition: UTF-8 has been set as database and global character set.
It is divided in steps of 10 seconds. This action is linked from the maintenance screen (if applicable). It is accessed by ?action=admin;area=maintain;sa=database;activity=convertentities.
Tags
ConvertMsgBody()
Convert the column "body" of the table {db_prefix}messages from TEXT to MEDIUMTEXT and vice versa.
ConvertMsgBody() : void
It requires the admin_forum permission. This is needed only for MySQL. During the conversion from MEDIUMTEXT to TEXT it check if any of the posts exceed the TEXT length and if so it aborts. This action is linked from the maintenance screen (if it's applicable). Accessed by ?action=admin;area=maintain;sa=database;activity=convertmsgbody.
Tags
MaintainReattributePosts()
Re-attribute posts.
MaintainReattributePosts() : void
MaintainPurgeInactiveMembers()
Removing old members. Done and out!
MaintainPurgeInactiveMembers() : void
Tags
MaintainRecountPosts()
Recalculate all members post counts it requires the admin_forum permission.
MaintainRecountPosts() : void
- recounts all posts for members found in the message table
- updates the members post count record in the members table
- honors the boards post count flag
- does not count posts in the recycle bin
- zeros post counts for all members with no posts in the message table
- runs as a delayed loop to avoid server overload
- uses the not_done template in Admin.template
The function redirects back to action=admin;area=maintain;sa=members when complete. It is accessed via ?action=admin;area=maintain;sa=members;activity=recountposts
MaintainMassMoveTopics()
Moves topics from one board to another.
MaintainMassMoveTopics() : void
Tags
MaintainRemoveOldPosts()
Removing old posts doesn't take much as we really pass through.
MaintainRemoveOldPosts() : void
MaintainRemoveOldDrafts()
Removing old drafts
MaintainRemoveOldDrafts() : void
ModifyMembergroups()
Main dispatcher, the entrance point for all 'Manage Membergroup' actions.
ModifyMembergroups() : void
It forwards to a function based on the given subaction, default being subaction 'index', or, without manage_membergroup permissions, then 'settings'. Called by ?action=admin;area=membergroups. Requires the manage_membergroups or the admin_forum permission.
Uses ManageMembergroups template. Uses ManageMembers language file.
AddMemberGroup()
This function handles adding a membergroup and setting some initial properties.
AddMemberGroup() : void
Called by ?action=admin;area=membergroups;sa=add. It requires the manage_membergroups permission. Allows to use a predefined permission profile or copy one from another group. Redirects to action=admin;area=membergroups;sa=edit;group=x.
Tags
DeleteMembergroup()
Deleting a membergroup by URL (not implemented).
DeleteMembergroup() : void
Called by ?action=admin;area=membergroups;sa=delete;group=x;session_var=y. Requires the manage_membergroups permission. Redirects to ?action=admin;area=membergroups.
Tags
EditMembergroup()
Editing a membergroup.
EditMembergroup() : void
Screen to edit a specific membergroup. Called by ?action=admin;area=membergroups;sa=edit;group=x. It requires the manage_membergroups permission. Also handles the delete button of the edit form. Redirects to ?action=admin;area=membergroups.
Tags
MembergroupIndex()
Shows an overview of the current membergroups.
MembergroupIndex() : void
Called by ?action=admin;area=membergroups. Requires the manage_membergroups permission. Splits the membergroups in regular ones and post count based groups. It also counts the number of members part of each membergroup.
Uses ManageMembergroups template, main.
ModifyMembergroupsettings()
Set some general membergroup settings and permissions.
ModifyMembergroupsettings([bool $return_config = false ]) : array<string|int, mixed>|null
Called by ?action=admin;area=membergroups;sa=settings Requires the admin_forum permission (and manage_permissions for changing permissions) Redirects to itself.
Parameters
- $return_config : bool = false
Tags
Return values
array<string|int, mixed>|nullViewMembers()
The main entrance point for the Manage Members screen.
ViewMembers() : void
As everyone else, it calls a function based on the given sub-action. Called by ?action=admin;area=viewmembers. Requires the moderate_forum permission.
Uses ManageMembers template Uses ManageMembers language file.
ViewMemberlist()
View all members list. It allows sorting on several columns, and deletion of selected members. It also handles the search query sent by ?action=admin;area=viewmembers;sa=search.
ViewMemberlist() : void
Called by ?action=admin;area=viewmembers;sa=all or ?action=admin;area=viewmembers;sa=query. Requires the moderate_forum permission.
Uses a standard list (@see createList())
AdminApprove()
This function handles the approval, rejection, activation or deletion of members.
AdminApprove() : void
Called by ?action=admin;area=viewmembers;sa=approve. Requires the moderate_forum permission. Redirects to ?action=admin;area=viewmembers;sa=browse with the same parameters as the calling page.
MembersAwaitingActivation()
List all members who are awaiting approval / activation, sortable on different columns.
MembersAwaitingActivation() : void
It allows instant approval or activation of (a selection of) members. Called by ?action=admin;area=viewmembers;sa=browse;type=approve or ?action=admin;area=viewmembers;sa=browse;type=activate. The form submits to ?action=admin;area=viewmembers;sa=approve. Requires the moderate_forum permission.
Tags
SearchMembers()
Search the member list, using one or more criteria.
SearchMembers() : void
Called by ?action=admin;area=viewmembers;sa=search. Requires the moderate_forum permission. form is submitted to action=admin;area=viewmembers;sa=query.
Tags
ModifyModSettings()
This my friend, is for all the mod authors out there.
ModifyModSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
Return values
array<string|int, mixed>|nullManageNews()
The news dispatcher; doesn't do anything, just delegates.
ManageNews() : void
This is the entrance point for all News and Newsletter screens. Called by ?action=admin;area=news. It does the permission checks, and calls the appropriate function based on the requested sub-action.
prepareMailingForPreview()
Prepare subject and message of an email for the preview box Used in ComposeMailing and RetrievePreview (Xml.php)
prepareMailingForPreview() : void
EditNews()
Let the administrator(s) edit the news items for the forum.
EditNews() : void
It writes an entry into the moderation log. This function uses the edit_news administration area. Called by ?action=admin;area=news. Requires the edit_news permission. Can be accessed with ?action=admin;sa=editnews.
Uses a standard list (@see createList())
SelectMailingMembers()
This function allows a user to select the membergroups to send their mailing to.
SelectMailingMembers() : void
Called by ?action=admin;area=news;sa=mailingmembers. Requires the send_mail permission. Form is submitted to ?action=admin;area=news;mailingcompose.
Tags
ComposeMailing()
Shows a form to edit a forum mailing and its recipients.
ComposeMailing() : void
Called by ?action=admin;area=news;sa=mailingcompose. Requires the send_mail permission. Form is submitted to ?action=admin;area=news;sa=mailingsend.
Tags
SendMailing()
Handles the sending of the forum mailing in batches.
SendMailing() : void
Called by ?action=admin;area=news;sa=mailingsend Requires the send_mail permission. Redirects to itself when more batches need to be sent. Redirects to ?action=admin;area=news;sa=mailingmembers after everything has been sent.
Tags
ModifyNewsSettings()
Set general news and newsletter settings and permissions.
ModifyNewsSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Called by ?action=admin;area=news;sa=settings. Requires the forum_admin permission.
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Tags
Return values
array<string|int, mixed>|null —Returns nothing or returns the config_vars array if $return_config is true
ModifyPermissions()
Dispatches to the right function based on the given subaction.
ModifyPermissions() : void
Checks the permissions, based on the sub-action. Called by ?action=managepermissions.
Uses ManagePermissions language file.
theme_inline_permissions()
Show a collapsible box to set a specific permission.
theme_inline_permissions(string $permission) : void
The function is called by templates to show a list of permissions settings. Calls the template function template_inline_permissions().
Parameters
- $permission : string
-
The permission to display inline
loadPermissionProfiles()
Load permissions profiles.
loadPermissionProfiles() : void
updateChildPermissions()
This function updates the permissions of any groups based off this group.
updateChildPermissions([null|array<string|int, mixed> $parents = null ][, null|int $profile = null ]) : bool|null
Parameters
- $parents : null|array<string|int, mixed> = null
-
The parent groups
- $profile : null|int = null
-
the ID of a permissions profile to update
Return values
bool|null —Returns nothing if successful or false if there are no child groups to update
loadIllegalPermissions()
Load permissions someone cannot grant.
loadIllegalPermissions() : array<string|int, mixed>
Return values
array<string|int, mixed>PermissionIndex()
Sets up the permissions by membergroup index page.
PermissionIndex() : void
Called by ?action=managepermissions Creates an array of all the groups with the number of members and permissions.
Uses ManagePermissions language file. Uses ManagePermissions template file.
Tags
PermissionsByBoard()
Handle permissions by board... more or less. :P
PermissionsByBoard() : void
ModifyMembergroup()
Initializes the necessary to modify a membergroup's permissions.
ModifyMembergroup() : void
ModifyMembergroup2()
This function actually saves modifications to a membergroup's board permissions.
ModifyMembergroup2() : void
SetQuickGroups()
Handles permission modification actions from the upper part of the permission manager index.
SetQuickGroups() : void
ModifyPostModeration()
Present a nice way of applying post moderation.
ModifyPostModeration() : void
EditPermissionProfiles()
Add/Edit/Delete profiles.
EditPermissionProfiles() : void
GeneralPermissionSettings()
A screen to set some general settings for permissions.
GeneralPermissionSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether to return the $config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the config_vars array if $return_config is true
ManagePostSettings()
The main entrance point for the 'Posts and topics' screen.
ManagePostSettings() : void
Like all others, it checks permissions, then forwards to the right function based on the given sub-action. Defaults to sub-action 'posts'. Accessed from ?action=admin;area=postsettings. Requires (and checks for) the admin_forum permission.
ModifyPostSettings()
Modify any setting related to posts and posting.
ModifyPostSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Requires the admin_forum permission. Accessed from ?action=admin;area=postsettings;sa=posts.
Parameters
- $return_config : bool = false
-
Whether or not to return the $config_vars array (used for admin search)
Tags
Return values
array<string|int, mixed>|null —Returns nothing or returns the config_vars array if $return_config is true
ModifyTopicSettings()
Modify any setting related to topics.
ModifyTopicSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Requires the admin_forum permission. Accessed from ?action=admin;area=postsettings;sa=topics.
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Tags
Return values
array<string|int, mixed>|null —Returns nothing or returns $config_vars if $return_config is true
ModifyDraftSettings()
Modify any setting related to drafts.
ModifyDraftSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Requires the admin_forum permission. Accessed from ?action=admin;area=postsettings;sa=drafts
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Tags
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
RegCenter()
Entrance point for the registration center, it checks permissions and forwards to the right function based on the subaction.
RegCenter() : void
Accessed by ?action=admin;area=regcenter. Requires either the moderate_forum or the admin_forum permission.
Uses Login language file Uses Register template.
AdminRegister()
This function allows the admin to register a new member by hand.
AdminRegister() : void
It also allows assigning a primary group to the member being registered. Accessed by ?action=admin;area=regcenter;sa=register Requires the moderate_forum permission.
Tags
EditAgreement()
Allows the administrator to edit the registration agreement, and choose whether it should be shown or not. It writes and saves the agreement to the agreement.txt file.
EditAgreement() : void
Accessed by ?action=admin;area=regcenter;sa=agreement. Requires the admin_forum permission.
Tags
EditPrivacyPolicy()
Sure, you can sell my personal info for profit (...or not)
EditPrivacyPolicy() : void
SetReserved()
Set the names under which users are not allowed to register.
SetReserved() : void
Accessed by ?action=admin;area=regcenter;sa=reservednames. Requires the admin_forum permission.
Tags
ModifyRegistrationSettings()
This function handles registration settings, and provides a few pretty stats too while it's at it.
ModifyRegistrationSettings([bool $return_config = false ]) : array<string|int, mixed>|null
General registration settings and Coppa compliance settings. Accessed by ?action=admin;area=regcenter;sa=settings. Requires the admin_forum permission.
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
RepairBoards()
Finds or repairs errors in the database to fix possible problems.
RepairBoards() : void
Requires the admin_forum permission. Calls createSalvageArea() to create a new board, if necessary. Accessed by ?action=admin;area=repairboards.
Tags
ReportsMain()
Handling function for generating reports.
ReportsMain() : void
Requires the admin_forum permission. Loads the Reports template and language files. Decides which type of report to generate, if this isn't passed through the querystring it will set the report_type sub-template to force the user to choose which type. When generating a report chooses which sub_template to use. Depends on the cal_enabled setting, and many of the other cal_ settings. Will call the relevant report generation function. If generating report will call finishTables before returning. Accessed through ?action=admin;area=reports.
BoardReport()
Standard report about what settings the boards have.
BoardReport() : void
functions ending with "Report" are responsible for generating data for reporting. they are all called from ReportsMain. never access the context directly, but use the data handling functions to do so.
BoardPermissionsReport()
Generate a report on the current permissions by board and membergroup.
BoardPermissionsReport() : void
functions ending with "Report" are responsible for generating data for reporting. they are all called from ReportsMain. never access the context directly, but use the data handling functions to do so.
MemberGroupsReport()
Show what the membergroups are made of.
MemberGroupsReport() : void
functions ending with "Report" are responsible for generating data for reporting. they are all called from ReportsMain. never access the context directly, but use the data handling functions to do so.
GroupPermissionsReport()
Show the large variety of group permissions assigned to each membergroup.
GroupPermissionsReport() : void
functions ending with "Report" are responsible for generating data for reporting. they are all called from ReportsMain. never access the context directly, but use the data handling functions to do so.
StaffReport()
Report for showing all the forum staff members - quite a feat! functions ending with "Report" are responsible for generating data for reporting.
StaffReport() : void
they are all called from ReportsMain. never access the context directly, but use the data handling functions to do so.
ManageSearch()
Main entry point for the admin search settings screen.
ManageSearch() : void
It checks permissions, and it forwards to the appropriate function based on the given sub-action. Defaults to sub-action 'settings'. Called by ?action=admin;area=managesearch. Requires the admin_forum permission.
Uses ManageSearch template. Uses Search language file.
EditSearchSettings()
Edit some general settings related to the search function.
EditSearchSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Called by ?action=admin;area=managesearch;sa=settings. Requires the admin_forum permission.
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Tags
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
EditWeights()
Edit the relative weight of the search factors.
EditWeights() : void
Called by ?action=admin;area=managesearch;sa=weights. Requires the admin_forum permission.
Tags
EditSearchMethod()
Edit the search method and search index used.
EditSearchMethod() : void
Calculates the size of the current search indexes in use. Allows to create and delete a fulltext index on the messages table. Allows to delete a custom index (that CreateMessageIndex() created). Called by ?action=admin;area=managesearch;sa=method. Requires the admin_forum permission.
Tags
CreateMessageIndex()
Create a custom search index for the messages table.
CreateMessageIndex() : void
Called by ?action=admin;area=managesearch;sa=createmsgindex. Linked from the EditSearchMethod screen. Requires the admin_forum permission. Depending on the size of the message table, the process is divided in steps.
Tags
SearchEngines()
Entry point for this section.
SearchEngines() : void
consolidateSpiderStats()
This function takes any unprocessed hits and turns them into stats.
consolidateSpiderStats() : void
recacheSpiderNames()
Recache spider names?
recacheSpiderNames() : void
SpiderStats()
Show the spider statistics.
SpiderStats() : void
SpiderLogs()
See what spiders have been up to.
SpiderLogs() : void
ViewSpiders()
View a list of all the spiders we know about.
ViewSpiders() : void
ManageSearchEngineSettings()
This is really just the settings page.
ManageSearchEngineSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
EditSpider()
Here we can add, and edit, spider info!
EditSpider() : void
ModifySettings()
This is the main dispatcher. Sets up all the available sub-actions, all the tabs and selects the appropriate one based on the sub-action.
ModifySettings() : void
Requires the admin_forum permission. Redirects to the appropriate function based on the sub-action.
Uses edit_settings adminIndex.
prepareServerSettingsContext()
Helper function, it sets up the context for the manage server settings.
prepareServerSettingsContext(array<string|int, mixed> &$config_vars) : mixed
- The basic usage of the six numbered key fields are
- array (0 ,1, 2, 3, 4, 5 0 variable name - the name of the saved variable 1 label - the text to show on the settings page 2 saveto - file or db, where to save the variable name - value pair 3 type - type of data to save, int, float, text, check 4 size - false or field size 5 help - '' or helptxt variable name )
the following named keys are also permitted 'disabled' => A string of code that will determine whether or not the setting should be disabled 'postinput' => Text to display after the input field 'preinput' => Text to display before the input field 'subtext' => Additional descriptive text to display under the field's label 'min' => minimum allowed value (for int/float). Defaults to 0 if not set. 'max' => maximum allowed value (for int/float) 'step' => how much to increment/decrement the value by (only for int/float - mostly used for float values).
Parameters
- $config_vars : array<string|int, mixed>
-
An array of configuration variables
ModifyGeneralSettings()
General forum settings - forum name, maintenance mode, etc.
ModifyGeneralSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Practically, this shows an interface for the settings in Settings.php to be changed.
- Requires the admin_forum permission.
- Uses the edit_settings administration area.
- Contains the actual array of settings to show from Settings.php.
- Accessed from ?action=admin;area=serversettings;sa=general.
Parameters
- $return_config : bool = false
-
Whether to return the $config_vars array (for pagination purposes)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyDatabaseSettings()
Basic database and paths settings - database name, host, etc.
ModifyDatabaseSettings([bool $return_config = false ]) : array<string|int, mixed>|null
- It shows an interface for the settings in Settings.php to be changed.
- It contains the actual array of settings to show from Settings.php.
- Requires the admin_forum permission.
- Uses the edit_settings administration area.
- Accessed from ?action=admin;area=serversettings;sa=database.
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyCookieSettings()
This function handles cookies settings modifications.
ModifyCookieSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyGeneralSecuritySettings()
Settings really associated with general security aspects.
ModifyGeneralSecuritySettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyCacheSettings()
Simply modifying cache functions
ModifyCacheSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyExportSettings()
Controls settings for data export functionality
ModifyExportSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModifyLoadBalancingSettings()
Allows to edit load balancing settings.
ModifyLoadBalancingSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ShowPHPinfoSettings()
Allows us to see the servers php settings
ShowPHPinfoSettings() : void
- loads the settings into an array for display in a template
- drops cookie values just in case
ManageSmileys()
This is the dispatcher of smileys administration.
ManageSmileys() : void
EditSmileySettings()
Handles modifying smileys settings.
EditSmileySettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
AddSmiley()
Add a smiley, that's right.
AddSmiley() : void
EditSmileys()
Add, remove, edit smileys.
EditSmileys() : void
EditSmileyOrder()
Allows to edit smileys order.
EditSmileyOrder() : void
InstallSmileySet()
Install a smiley set.
InstallSmileySet() : void
EditMessageIcons()
Handles editing message icons
EditMessageIcons() : void
ManagePaidSubscriptions()
The main entrance point for the 'Paid Subscription' screen, calling the right function based on the given sub-action.
ManagePaidSubscriptions() : void
It defaults to sub-action 'view'. Accessed from ?action=admin;area=paidsubscribe. It requires admin_forum permission for admin based actions.
loadSubscriptions()
This just kind of caches all the subscription data.
loadSubscriptions() : array<string|int, mixed>
Return values
array<string|int, mixed>addSubscription()
Add or extend a subscription of a user.
addSubscription(int $id_subscribe, int $id_member[, int|string $renewal = 0 ][, int $forceStartTime = 0 ][, int $forceEndTime = 0 ]) : void
Parameters
- $id_subscribe : int
-
The subscription ID
- $id_member : int
-
The ID of the member
- $renewal : int|string = 0
-
0 if we're forcing start/end time, otherwise a string indicating how long to renew the subscription for ('D', 'W', 'M' or 'Y')
- $forceStartTime : int = 0
-
If set, forces the subscription to start at the specified time
- $forceEndTime : int = 0
-
If set, forces the subscription to end at the specified time
removeSubscription()
Removes a subscription from a user, as in removes the groups.
removeSubscription(int $id_subscribe, int $id_member[, bool $delete = false ]) : void
Parameters
- $id_subscribe : int
-
The ID of the subscription
- $id_member : int
-
The ID of the member
- $delete : bool = false
-
Whether to delete the subscription or just disable it
reapplySubscriptions()
Reapplies all subscription rules for each of the users.
reapplySubscriptions(array<string|int, mixed> $users) : void
Parameters
- $users : array<string|int, mixed>
-
An array of user IDs
loadPaymentGateways()
Load all the payment gateways.
loadPaymentGateways() : array<string|int, mixed>
Checks the Sources directory for any files fitting the format of a payment gateway, loads each file to check it's valid, includes each file and returns the function name and whether it should work with this version of SMF.
Return values
array<string|int, mixed> —An array of information about available payment gateways
ViewSubscriptions()
View a list of all the current subscriptions Requires the admin_forum permission.
ViewSubscriptions() : void
Accessed from ?action=admin;area=paidsubscribe;sa=view.
ViewSubscribedUsers()
View all the users subscribed to a particular subscription.
ViewSubscribedUsers() : void
Requires the admin_forum permission. Accessed from ?action=admin;area=paidsubscribe;sa=viewsub.
Subscription ID is required, in the form of $_GET['sid'].
ModifySubscription()
Adding, editing and deleting subscriptions.
ModifySubscription() : void
Accessed from ?action=admin;area=paidsubscribe;sa=modify.
ModifyUserSubscription()
Edit or add a user subscription.
ModifyUserSubscription() : void
Accessed from ?action=admin;area=paidsubscribe;sa=modifyuser.
ModifySubscriptionSettings()
Set any setting related to paid subscriptions, i.e.
ModifySubscriptionSettings([bool $return_config = false ]) : array<string|int, mixed>|null
modify which payment methods are to be used. It requires the moderate_forum permission Accessed from ?action=admin;area=paidsubscribe;sa=settings.
Parameters
- $return_config : bool = false
-
Whether or not to return the $config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the config_vars array if $return_config is true
ManageScheduledTasks()
Scheduled tasks management dispatcher. This function checks permissions and delegates to the appropriate function based on the sub-action.
ManageScheduledTasks() : void
Everything here requires admin_forum permission.
Uses ManageScheduledTasks template file Uses ManageScheduledTasks language file
ScheduledTasks()
List all the scheduled task in place on the forum.
ScheduledTasks() : void
Tags
EditTask()
Function for editing a task.
EditTask() : void
Tags
TaskLog()
Show the log of all tasks that have taken place.
TaskLog() : void
Uses ManageScheduledTasks language file
TaskSettings()
This handles settings related to scheduled tasks
TaskSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config vars. Used in the admin search.
Return values
array<string|int, mixed>|null —If return_config is true, returns the array of $config_vars
ThemesMain()
Subaction handler - manages the action and delegates control to the proper sub-action.
ThemesMain() : void
It loads both the Themes and Settings language files. Checks the session by GET or POST to verify the sent data. Requires the user not be a guest. (@todo what?) Accessed via ?action=admin;area=theme.
ThemeAdmin()
This function allows administration of themes and their settings, as well as global theme settings.
ThemeAdmin() : void
- sets the settings theme_allow, theme_guests, and knownThemes.
- requires the admin_forum permission.
- accessed with ?action=admin;area=theme;sa=admin.
Uses Themes template Uses Admin language file
ThemeList()
This function lists the available themes and provides an interface to reset the paths of all the installed themes.
ThemeList() : void
SetThemeOptions()
Administrative global settings.
SetThemeOptions() : void
RemoveTheme()
Remove a theme from the database.
RemoveTheme() : void
- removes an installed theme.
- requires an administrator.
- accessed with ?action=admin;area=theme;sa=remove.
EnableTheme()
Handles enabling/disabling a theme from the admin center
EnableTheme() : void
ThemeInstall()
Installs new themes, calls the respective function according to the install type.
ThemeInstall() : void
- puts themes in $boardurl/Themes.
- assumes the gzip has a root directory in it. (ie default.) Requires admin_forum. Accessed with ?action=admin;area=theme;sa=install.
EditTheme()
Shows an interface for editing the templates.
EditTheme() : void
- uses the Themes template and edit_template/edit_style sub template.
- accessed via ?action=admin;area=theme;sa=edit
CopyTemplate()
Makes a copy of a template file in a new location
CopyTemplate() : void
Tags
ModifyWarningSettings()
Moderation type settings - although there are fewer than we have you believe ;)
ModifyWarningSettings([bool $return_config = false ]) : array<string|int, mixed>|null
Parameters
- $return_config : bool = false
-
Whether or not to return the config_vars array (used for admin search)
Return values
array<string|int, mixed>|null —Returns nothing or returns the $config_vars array if $return_config is true
ModEndSession()
This ends a moderator session, requiring authentication to access the MCP again.
ModEndSession() : void
ModerationHome()
This function basically is the home page of the moderation center.
ModerationHome() : void
ViewModlog()
Prepares the information from the moderation log for viewing.
ViewModlog() : void
Show the moderation log. If clearing the log, leaves a message in the log to indicate it was cleared, by whom and when. Requires the admin_forum permission. Accessed via ?action=moderate;area=modlog.
Uses Modlog template, main sub-template.
ModerationMain()
Entry point for the moderation center.
ModerationMain([bool $dont_call = false ]) : void
Parameters
- $dont_call : bool = false
-
If true, just creates the menu and doesn't call the function for the appropriate mod area.
PostModerationMain()
This is a handling function for all things post moderation.
PostModerationMain() : void
approveAllData()
This is a helper function - basically approve everything!
approveAllData() : void
UnapprovedPosts()
View all unapproved posts.
UnapprovedPosts() : void
UnapprovedAttachments()
View all unapproved attachments.
UnapprovedAttachments() : void
ApproveMessage()
Approve a post, just the one.
ApproveMessage() : void
ReportedContent()
Sets and call a function based on the given subaction. Acts as a dispatcher function.
ReportedContent() : void
It requires the moderate_forum permission.
Uses ModerationCenter template. Uses ModerationCenter language file.
recountOpenReports()
Recount all open reports. Sets a SESSION var with the updated info.
recountOpenReports(string $type) : int
Parameters
- $type : string
-
the type of reports to count
Return values
int —the update open report count.
ShowReports()
Shows all currently open reported posts.
ShowReports() : void
Handles closing multiple reports
ShowClosedReports()
Shows all currently closed reported posts.
ShowClosedReports() : void
ReportDetails()
Shows detailed information about a report. such as report comments and moderator comments.
ReportDetails() : void
Shows a list of moderation actions for the specific report.
HandleReport()
Performs closing/ignoring actions for a given report.
HandleReport() : void
HandleComment()
Creates/Deletes moderator comments.
HandleComment() : void
EditComment()
Shows a textarea for editing a moderator comment.
EditComment() : void
Handles the edited comment and stores it on the DB.
ShowNotice()
Show a notice sent to a user.
ShowNotice() : void
ViewWarnings()
Entry point for viewing warning related stuff.
ViewWarnings() : void
ViewWarningLog()
Simply put, look at the warning log!
ViewWarningLog() : void
ViewWarningTemplates()
Load all the warning templates.
ViewWarningTemplates() : void
ModifyWarningTemplate()
Edit a warning template.
ModifyWarningTemplate() : void
ViewWatchedUsers()
View watched users.
ViewWatchedUsers() : void
account()
Handles the account section of the profile
account() : void
activateAccount()
Activate an account.
activateAccount() : void
alerts_popup()
Set up the requirements for the alerts popup - the area that shows all the alerts just quickly for the current user.
alerts_popup() : void
editBuddyIgnoreLists()
Show all the users buddies, as well as a add/delete interface.
editBuddyIgnoreLists() : void
editBuddies()
Show all the users buddies, as well as a add/delete interface.
editBuddies(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
editIgnoreList()
Allows the user to view their ignore list, as well as the option to manage members on it.
editIgnoreList(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
deleteAccount()
Present a screen to make sure the user wants to be deleted
deleteAccount() : void
deleteAccount2()
Actually delete an account.
deleteAccount2(int $memID) : void
Parameters
- $memID : int
-
The member ID
export_profile_data()
Initiates exports a member's profile, posts, and personal messages to a file.
export_profile_data() : void
Tags
create_export_dir()
Returns the path to a secure directory for storing exported profile data.
create_export_dir([string $fallback = '' ]) : string|bool
The directory is created if it does not yet exist, and is secured using the same method that we use to secure attachment directories. Files in this directory can only be downloaded via the download_export_file() function.
Parameters
- $fallback : string = ''
Return values
string|bool —The path to the directory, or false on error.
get_export_formats()
Helper function that defines data export formats in a single location.
get_export_formats() : array<string|int, mixed>
Return values
array<string|int, mixed> —Information about supported data formats for profile exports.
export_attachment()
Allows a member to export their attachments.
export_attachment() : void
Mostly just a wrapper for showAttachment() but with a few tweaks.
download_export_file()
Downloads exported profile data file.
download_export_file() : void
forumProfile()
Handles the main "Forum Profile" section of the profile
forumProfile() : void
groupMembership()
Function to allow the user to choose group membership etc.
groupMembership() : void
..
groupMembership2()
This function actually makes all the group changes
groupMembership2(array<string|int, mixed> $profile_vars, array<string|int, mixed> $post_errors, int $memID) : string
Note: $profile_vars and $post_errors were unused even in 2.1.
Parameters
- $profile_vars : array<string|int, mixed>
-
The profile variables. (Ignored.)
- $post_errors : array<string|int, mixed>
-
Any errors that have occurred. (Ignored.)
- $memID : int
-
The ID of the member.
Return values
string —What type of change this is - 'primary' if changing the primary group, 'request' if requesting to join a group or 'free' if it's an open group
ignoreboards()
Handles the "ignored boards" section of the profile (if enabled)
ignoreboards(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
issueWarning()
Issue/manage an user's warning status.
issueWarning(int $memID) : void
Parameters
- $memID : int
-
The ID of the user
ModifyProfile()
The main designating function for modifying profiles. Loads up info, determins what to do, etc.
ModifyProfile([array<string|int, mixed> $post_errors = [] ]) : void
Parameters
- $post_errors : array<string|int, mixed> = []
-
Any errors that occurred
notification()
Display the notifications and settings for changes.
notification() : void
alert_configuration()
Handles configuration of alert preferences
alert_configuration(int $memID[, bool $defaultSettings = false ]) : void
Parameters
- $memID : int
-
The ID of the member
- $defaultSettings : bool = false
-
If true, we are loading default options.
alert_markread()
Marks all alerts as read for the specified user
alert_markread(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
alert_notifications_topics()
Handles alerts related to topics and posts
alert_notifications_topics(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
alert_notifications_boards()
Handles preferences related to board-level notifications
alert_notifications_boards(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
makeNotificationChanges()
Make any notification changes that need to be made.
makeNotificationChanges(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
subscriptions()
Function for doing all the paid subscription stuff - kinda.
subscriptions() : void
profile_popup()
Set up the requirements for the profile popup - the area that is shown as the popup menu for the current user.
profile_popup() : void
showAlerts()
Shows all alerts for a member
showAlerts(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
showPermissions()
Shows which permissions a user has
showPermissions(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
showPosts()
Show all posts by a member
showPosts(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
Tags
showUnwatched()
Show all the unwatched topics.
showUnwatched(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
showAttachments()
Show all the attachments belonging to a member.
showAttachments(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
statPanel()
Gets the user stats for display
statPanel(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
summary()
View a summary.
summary(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
tfadisable()
Provides interface to disable two-factor authentication in SMF
tfadisable() : void
tfasetup()
Provides interface to setup Two Factor Auth in SMF
tfasetup() : void
theme()
Handles the "Look and Layout" section of the profile
theme() : void
tracking()
Loads up the information for the "track user" section of the profile
tracking() : void
trackActivity()
Handles tracking a user's activity
trackActivity(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
trackEdits()
Tracks a user's profile edits
trackEdits(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
trackGroupReq()
Display the history of group requests made by the user whose profile we are viewing.
trackGroupReq(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
TrackLogins()
Tracks a user's logins.
TrackLogins(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
viewWarning()
View a member's warnings
viewWarning(int $memID) : void
Parameters
- $memID : int
-
The ID of the member
Agreement()
Let's tell them there's a new agreement
Agreement() : void
canRequireAgreement()
Checks whether this user needs to accept the registration agreement.
canRequireAgreement() : bool
Return values
bool —Whether they need to accept the agreement.
canRequirePrivacyPolicy()
Checks whether this user needs to accept the privacy policy.
canRequirePrivacyPolicy() : bool
Return values
bool —Whether they need to accept the policy.
AcceptAgreement()
I solemly swear to no longer chase squirrels.
AcceptAgreement() : void
AnnounceTopic()
Handle the announce topic function (action=announce).
AnnounceTopic() : void
checks the topic announcement permissions and loads the announcement template. requires the announce_topic permission. uses the ManageMembers template and Post language file. call the right function based on the sub-action.
AnnouncementSelectMembergroup()
Allow a user to chose the membergroups to send the announcement to.
AnnouncementSelectMembergroup() : void
lets the user select the membergroups that will receive the topic announcement.
AnnouncementSend()
Send the announcement in chunks.
AnnouncementSend() : void
splits the members to be sent a topic announcement into chunks. composes notification messages in all languages needed. does the actual sending of the topic announcements in chunks. calculates a rough estimate of the percentage items sent.
ApproveAttach()
Called from a mouse click, works out what we want to do with attachments and actions it.
ApproveAttach() : void
showAttachment()
Downloads an avatar or attachment based on $_GET['attach'], and increments the download count.
showAttachment() : void
It requires the view_attachments permission. It disables the session parser, and clears any previous output. It depends on the attachmentUploadDir setting being correct. It is accessed via the query string ?action=dlattach. Views to attachments do not increase hits and are not logged in the "Who's Online" log.
AutoSuggestHandler()
This keeps track of all registered handling functions for auto suggest functionality and passes execution to them.
AutoSuggestHandler([string|null $suggest_type = null ]) : bool|null
Parameters
- $suggest_type : string|null = null
Return values
bool|null —Returns whether the callback function is registered if $checkRegistered isn't null
AutoSuggest_Search_Member()
Search for a member - by real_name or member_name by default.
AutoSuggest_Search_Member() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of information for displaying the suggestions
AutoSuggest_Search_MemberGroups()
Search for a membergroup by name
AutoSuggest_Search_MemberGroups() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of information for displaying the suggestions
AutoSuggest_Search_SMFVersions()
Provides a list of possible SMF versions to use in emulation
AutoSuggest_Search_SMFVersions() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of data for displaying the suggestions
BoardIndex()
This function shows the board index.
BoardIndex() : BoardIndex
It uses the BoardIndex template, and main sub template. It updates the most online statistics. It is accessed by ?action=boardindex.
Return values
BoardIndexgetBoardIndex()
Fetches a list of boards and (optional) categories including statistical information, child boards and moderators.
getBoardIndex(array<string|int, mixed> $board_index_options) : array<string|int, mixed>
- Used by both the board index (main data) and the message index (child
boards).
- Depending on the include_categories setting returns an associative array with categories->boards->child_boards or an associative array with boards->child_boards.
Parameters
- $board_index_options : array<string|int, mixed>
-
An array of boardindex options
Return values
array<string|int, mixed> —An array of information for displaying the boardindex
BuddyListToggle()
This simple function adds/removes the passed user from the current users buddy list.
BuddyListToggle() : void
Requires profile_identity_own permission. Called by ?action=buddy;u=x;session_id=y. Redirects to ?action=profile;u=x.
CalendarMain()
Show the calendar.
CalendarMain() : void
It loads the specified month's events, holidays, and birthdays. It requires the calendar_view permission. It depends on the cal_enabled setting, and many of the other cal_ settings. It uses the calendar_start_day theme option. (Monday/Sunday) It uses the main sub template in the Calendar template. It goes to the month and year passed in 'month' and 'year' by get or post. It is accessed through ?action=calendar.
iCalDownload()
This function offers up a download of an event in iCal 2.0 format.
iCalDownload() : void
Follows the conventions in RFC5546 Sets events as all day events since we don't have hourly events Will honor and set multi day events Sets a sequence number if the event has been modified
Tags
CalendarPost()
This function processes posting/editing/deleting a calendar event.
CalendarPost() : void
- calls Post() function if event is linked to a post.
- calls insertEvent() to insert the event if not linked to post.
It requires the calendar_post permission to use. It uses the event_post sub template in the Calendar template. It is accessed with ?action=calendar;sa=post.
getBirthdayRange()
Get all birthdays within the given time range.
getBirthdayRange(string $low_date, string $high_date) : array<string|int, mixed>
finds all the birthdays in the specified range of days. works with birthdays set for no year, or any other year, and respects month and year boundaries.
Parameters
- $low_date : string
-
The low end of the range, inclusive, in YYYY-MM-DD format
- $high_date : string
-
The high end of the range, inclusive, in YYYY-MM-DD format
Return values
array<string|int, mixed> —An array of days, each of which is an array of birthday information for the context
getEventRange()
Get all calendar events within the given time range.
getEventRange(string $low_date, string $high_date[, bool $use_permissions = true ]) : array<string|int, mixed>
- finds all the posted calendar events within a date range.
- both the earliest_date and latest_date should be in the standard YYYY-MM-DD format.
- censors the posted event titles.
- uses the current user's permissions if use_permissions is true, otherwise it does nothing "permission specific"
Parameters
- $low_date : string
-
The low end of the range, inclusive, in YYYY-MM-DD format
- $high_date : string
-
The high end of the range, inclusive, in YYYY-MM-DD format
- $use_permissions : bool = true
-
Whether to use permissions
Return values
array<string|int, mixed> —Contextual information if use_permissions is true, and an array of the data needed to build that otherwise
getHolidayRange()
Get all holidays within the given time range.
getHolidayRange(string $low_date, string $high_date) : array<string|int, mixed>
Parameters
- $low_date : string
-
The low end of the range, inclusive, in YYYY-MM-DD format
- $high_date : string
-
The high end of the range, inclusive, in YYYY-MM-DD format
Return values
array<string|int, mixed> —An array of days, which are all arrays of holiday names.
canLinkEvent()
Does permission checks to see if an event can be linked to a board/topic.
canLinkEvent() : void
checks if the current user can link the current topic to the calendar, permissions et al. this requires the calendar_post permission, a forum moderator, or a topic starter. expects the $topic and $board variables to be set. if the user doesn't have proper permissions, an error will be shown.
getTodayInfo()
Returns date information about 'today' relative to the users time offset.
getTodayInfo() : array<string|int, mixed>
returns an array with the current date, day, month, and year. takes the users time offset into account.
Return values
array<string|int, mixed> —An array of info about today, based on forum time. Has 'day', 'month', 'year' and 'date' (in YYYY-MM-DD format)
getCalendarGrid()
Provides information (link, month, year) about the previous and next month.
getCalendarGrid(string $selected_date, array<string|int, mixed> $calendarOptions[, bool $is_previous = false ][, bool $has_picker = true ]) : array<string|int, mixed>
Parameters
- $selected_date : string
-
A date in YYYY-MM-DD format
- $calendarOptions : array<string|int, mixed>
-
An array of calendar options
- $is_previous : bool = false
-
Whether this is the previous month
- $has_picker : bool = true
-
Wheter to add javascript to handle a date picker
Return values
array<string|int, mixed> —A large array containing all the information needed to show a calendar grid for the given month
getCalendarWeek()
Returns the information needed to show a calendar for the given week.
getCalendarWeek(string $selected_date, array<string|int, mixed> $calendarOptions) : array<string|int, mixed>
Parameters
- $selected_date : string
-
A date in YYYY-MM-DD format
- $calendarOptions : array<string|int, mixed>
-
An array of calendar options
Return values
array<string|int, mixed> —An array of information needed to display the grid for a single week on the calendar
getCalendarList()
Returns the information needed to show a list of upcoming events, birthdays, and holidays on the calendar.
getCalendarList(string $start_date, string $end_date, array<string|int, mixed> $calendarOptions) : array<string|int, mixed>
Parameters
- $start_date : string
-
The start of a date range in YYYY-MM-DD format
- $end_date : string
-
The end of a date range in YYYY-MM-DD format
- $calendarOptions : array<string|int, mixed>
-
An array of calendar options
Return values
array<string|int, mixed> —An array of information needed to display a list of upcoming events, etc., on the calendar
loadDatePicker()
Loads the necessary JavaScript and CSS to create a datepicker.
loadDatePicker([string $selector = 'input.date_input' ][, string $date_format = '' ]) : void
Parameters
- $selector : string = 'input.date_input'
-
A CSS selector for the input field(s) that the datepicker should be attached to.
- $date_format : string = ''
-
The date format to use, in strftime() format.
loadTimePicker()
Loads the necessary JavaScript and CSS to create a timepicker.
loadTimePicker([string $selector = 'input.time_input' ][, string $time_format = '' ]) : void
Parameters
- $selector : string = 'input.time_input'
-
A CSS selector for the input field(s) that the timepicker should be attached to.
- $time_format : string = ''
-
A time format in strftime format
loadDatePair()
Loads the necessary JavaScript for Datepair.js.
loadDatePair(string $container[, string $date_class = '' ][, string $time_class = '' ]) : void
Datepair.js helps to keep date ranges sane in the UI.
Parameters
- $container : string
-
CSS selector for the containing element of the date/time inputs to be paired.
- $date_class : string = ''
-
The CSS class of the date inputs to be paired.
- $time_class : string = ''
-
The CSS class of the time inputs to be paired.
cache_getOffsetIndependentEvents()
Retrieve all events for the given days, independently of the users offset.
cache_getOffsetIndependentEvents(array<string|int, mixed> $eventOptions) : array<string|int, mixed>
cache callback function used to retrieve the birthdays, holidays, and events between now and now + days_to_index. widens the search range by an extra 24 hours to support time offset shifts. used by the cache_getRecentEvents function to get the information needed to calculate the events taking the users time offset into account.
Parameters
- $eventOptions : array<string|int, mixed>
-
With the keys 'num_days_shown', 'include_holidays', 'include_birthdays' and 'include_events'
Return values
array<string|int, mixed> —An array containing the data that was cached as well as an expression to calculate whether the data should be refreshed and when it expires
cache_getRecentEvents()
cache callback function used to retrieve the upcoming birthdays, holidays, and events within the given period, taking into account the users time offset.
cache_getRecentEvents(array<string|int, mixed> $eventOptions) : array<string|int, mixed>
Called from the BoardIndex to display the current day's events on the board index used by the board index and SSI to show the upcoming events.
Parameters
- $eventOptions : array<string|int, mixed>
-
An array of event options.
Return values
array<string|int, mixed> —An array containing the info that was cached as well as a few other relevant things
validateEventPost()
Makes sure the calendar post is valid.
validateEventPost() : void
getEventPoster()
Get the event's poster.
getEventPoster(int $event_id) : int|bool
Parameters
- $event_id : int
-
The ID of the event
Return values
int|bool —The ID of the poster or false if the event was not found
removeHolidays()
Remove a holiday from the calendar
removeHolidays(array<string|int, mixed> $holiday_ids) : void
Parameters
- $holiday_ids : array<string|int, mixed>
-
An array of IDs of holidays to delete
CoppaForm()
This function will display the contact information for the forum, as well a form to fill in.
CoppaForm() : void
Credits()
It prepares credit and copyright information for the credits page or the admin page
Credits([bool $in_admin = false ]) : void
Parameters
- $in_admin : bool = false
-
= false, if parameter is true the it will not load the sub-template nor the template file
Display()
The central part of the board - topic display.
Display() : void
This function loads the posts in a topic up so they can be displayed. It uses the main sub template of the Display template. It requires a topic, and can go to the previous or next topic from it. It jumps to the correct post depending on a number/time/IS_MSG passed. It depends on the messages_per_page, defaultMaxMessages and enableAllMessages settings. It is accessed by ?topic=id_topic.START.
DisplayAdminFile()
Get one of the admin information files from Simple Machines.
DisplayAdminFile() : void
ShowXmlFeed()
Outputs xml data representing recent information or a profile.
ShowXmlFeed() : void
Can be passed subactions which decide what is output: 'recent' for recent posts, 'news' for news topics, 'members' for recently registered members, 'profile' for a member's profile. 'posts' for a member's posts. 'personal_messages' for a member's personal messages.
When displaying a member's profile or posts, the u parameter identifies which member. Defaults to the current user's id. To display a member's personal messages, the u parameter must match the id of the current user.
Outputs can be in RSS 0.92, RSS 2, Atom, RDF, or our own custom XML format. Default is RSS 2.
Accessed via ?action=.xml.
Does not use any templates, sub templates, or template layers.
Uses Stats, Profile, Post, and PersonalMessage language files.
buildXmlFeed()
Builds the XML from the data.
buildXmlFeed(string $format, array<string|int, mixed> $data, array<string|int, mixed> $metadata, string $subaction) : array<string|int, mixed>
Returns an array containing three parts: the feed's header section, its items section, and its footer section. For convenience, the array is also made available as SMF\Utils::$context['feed'].
This method is static for the sake of the ExportProfileData task, which needs to do a lot of custom manipulation of the XML.
Parameters
- $format : string
-
A supported feed format.
- $data : array<string|int, mixed>
-
Structured data to build as XML.
- $metadata : array<string|int, mixed>
-
Metadata about the feed.
- $subaction : string
-
The sub-action that was requested.
Return values
array<string|int, mixed> —The feed's header, items, and footer.
cdata_parse()
Ensures supplied data is properly encapsulated in cdata xml tags Called from getXmlProfile in News.php
cdata_parse(string $data[, string $ns = '' ][, bool $force = false ]) : string
Parameters
- $data : string
-
XML data
- $ns : string = ''
-
A namespace prefix for the XML data elements (used by mods, maybe)
- $force : bool = false
-
If true, enclose the XML data in cdata tags no matter what (used by mods, maybe)
Return values
string —The XML data enclosed in cdata tags when necessary
JSMembers()
Called by index.php?action=findmember.
JSMembers() : void
- is used as a popup for searching members.
- uses sub template find_members of the Help template.
- also used to add members for PM's sent using wap2/imode protocol.
Groups()
Entry point function, permission checks, admin bars, etc.
Groups() : void
It allows moderators and users to access the group showing functions. It handles permission checks, and puts the moderation bar on as required.
listMembergroupMembers_Href()
Gets the members of a supplied membergroup Returns them as a link for display
listMembergroupMembers_Href(array<string|int, mixed> &$members, int $membergroup[, int $limit = null ]) : bool
Parameters
- $members : array<string|int, mixed>
-
The IDs of the members
- $membergroup : int
-
The ID of the group
- $limit : int = null
-
How many members to show (null for no limit)
Return values
bool —True if there are more members to display, false otherwise
GroupList()
This very simply lists the groups, nothing snazy.
GroupList() : void
MembergroupMembers()
Display members of a group, and allow adding of members to a group. Silly function name though ;) It can be called from ManageMembergroups if it needs templating within the admin environment.
MembergroupMembers() : void
It shows a list of members that are part of a given membergroup. It is called by ?action=moderate;area=viewgroups;sa=members;group=x It requires the manage_membergroups permission. It allows to add and remove members from the selected membergroup. It allows sorting on several columns. It redirects to itself.
Tags
GroupRequests()
Show and manage all group requests.
GroupRequests() : void
ShowHelp()
Redirect to the user help ;).
ShowHelp() : void
It loads information needed for the help section. It is accessed by ?action=help.
Uses Help template and Manual language file.
HelpIndex()
The main page for the Help section
HelpIndex() : void
ShowAdminHelp()
Show some of the more detailed help to give the admin an idea... It shows a popup for administrative or user help.
ShowAdminHelp() : void
It uses the help parameter to decide what string to display and where to get the string from. ($helptxt or $txt?) It is accessed via ?action=helpadmin;help=?.
Uses ManagePermissions language file, if the help starts with permissionhelp.
Tags
JavaScriptModify()
Used to edit the body or subject of a message inline called from action=jsmodify from script and topic js
JavaScriptModify() : void
Login()
Ask them for their login information. (shows a page for the user to type in their username and password.) It caches the referring URL in $_SESSION['login_url'].
Login() : void
It is accessed from ?action=login.
Uses Login template and language file with the login sub-template.
Login2()
Actually logs you in.
Login2() : void
What it does:
- checks credentials and checks that login was successful.
- it employs protection against a specific IP or user trying to brute force a login to an account.
- upgrades password encryption on login, if necessary.
- after successful login, redirects you to $_SESSION['login_url'].
- accessed from ?action=login2, by forms. On error, uses the same templates Login() uses.
validatePasswordFlood()
This protects against brute force attacks on a member's password.
validatePasswordFlood(int $id_member, string $member_name[, bool|string $password_flood_value = false ][, bool $was_correct = false ][, bool $tfa = false ]) : void
Importantly, even if the password was right we DON'T TELL THEM!
Parameters
- $id_member : int
-
The ID of the member
- $member_name : string
-
The name of the member.
- $password_flood_value : bool|string = false
-
False if we don't have a flood value, otherwise a string with a timestamp and number of tries separated by a |
- $was_correct : bool = false
-
Whether or not the password was correct
- $tfa : bool = false
-
Whether we're validating for two-factor authentication
LoginTFA()
Allows the user to enter their Two-Factor Authentication code
LoginTFA() : void
Logout()
Logs the current user out of their account.
Logout() : void
It requires that the session hash is sent as well, to prevent automatic logouts by images or javascript. It redirects back to $_SESSION['logout_url'], if it exists. It is accessed via ?action=logout;session_var=...
MarkRead()
Mark one or more boards as read.
MarkRead() : void
Memberlist()
Shows a listing of registered members.
Memberlist() : void
- If a subaction is not specified, lists all registered members.
- It allows searching for members with the 'search' sub action.
- It calls MLAll or MLSearch depending on the sub action.
- Requires the view_mlist permission.
- Accessed via ?action=mlist.
Uses Memberlist template, main sub template.
MLAll()
List all members, page by page, with sorting.
MLAll() : void
Called from MemberList(). Can be passed a sort parameter, to order the display of members. Calls printMemberListRows to retrieve the results of the query.
MLSearch()
Search for members, or display search results.
MLSearch() : void
- Called by MemberList().
- If variable 'search' is empty displays search dialog box, using the search sub template.
- Calls printMemberListRows to retrieve the results of the query.
printMemberListRows()
Retrieves results of the request passed to it Puts results of request into the context for the sub template.
printMemberListRows(resource $request) : void
Parameters
- $request : resource
-
An SQL result resource
getCustFieldsMList()
Sets the label, sort and join info for every custom field column.
getCustFieldsMList() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of info about the custom fields for the member list
MessageIndex()
Show the list of topics in this board, along with any child boards.
MessageIndex() : void
getBoardList()
Generates the query to determine the list of available boards for a user Executes the query and returns the list
getBoardList([array<string|int, mixed> $boardListOptions = [] ]) : array<string|int, mixed>
Parameters
- $boardListOptions : array<string|int, mixed> = []
-
An array of options for the board list
Return values
array<string|int, mixed> —An array of board info
DeleteMessage()
Remove just a single post.
DeleteMessage() : void
On completion redirect to the topic or to the board.
getNotifyPrefs()
Fetches the list of preferences (or a single/subset of preferences) for notifications for one or more users.
getNotifyPrefs(int|array<string|int, mixed> $members[, string|array<string|int, mixed> $prefs = '' ][, bool $process_defaults = false ]) : array<string|int, mixed>
Parameters
- $members : int|array<string|int, mixed>
-
A user id or an array of (integer) user ids to load preferences for
- $prefs : string|array<string|int, mixed> = ''
-
An empty string to load all preferences, or a string (or array) of preference name(s) to load
- $process_defaults : bool = false
Return values
array<string|int, mixed> —An array of user ids => array (pref name -> value), with user id 0 representing the defaults
setNotifyPrefs()
Sets the list of preferences for a single user.
setNotifyPrefs(int $memID[, array<string|int, mixed> $prefs = [] ]) : mixed
Parameters
- $memID : int
-
The user whose preferences you are setting
- $prefs : array<string|int, mixed> = []
-
An array key of pref -> value
deleteNotifyPrefs()
Deletes notification preference
deleteNotifyPrefs(int $memID, array<string|int, mixed> $prefs) : mixed
Parameters
- $memID : int
-
The user whose preference you're setting
- $prefs : array<string|int, mixed>
-
The preferences to delete
getMemberWithToken()
Verifies a member's unsubscribe token, then returns some member info
getMemberWithToken(string $type) : array<string|int, mixed>
Parameters
- $type : string
-
The type of notification the token is for (e.g. 'board', 'topic', etc.)
Return values
array<string|int, mixed> —The id and email address of the specified member
createUnsubscribeToken()
Builds an unsubscribe token
createUnsubscribeToken(int $memID, string $email[, string $type = '' ][, int $itemID = 0 ]) : string
Parameters
- $memID : int
-
The id of the member that this token is for
- $email : string
-
The member's email address
- $type : string = ''
-
The type of notification the token is for (e.g. 'board', 'topic', etc.)
- $itemID : int = 0
-
The id of the notification item, if applicable.
Return values
string —The unsubscribe token
AnnouncementsNotify()
Turn off/on notifications for announcements.
AnnouncementsNotify() : void
Only uses the template if no mode was given. Accessed via ?action=notifyannouncements.
BoardNotify()
Turn off/on notification for a particular board.
BoardNotify() : void
Must be called with a board specified in the URL. Only uses the template if no mode (or subaction) was given. Redirects the user back to the board after it is done. Accessed via ?action=notifyboard.
Tags
TopicNotify()
Turn off/on unread replies subscription for a topic as well as sets individual topic's alert preferences Must be called with a topic specified in the URL.
TopicNotify() : void
The mode can be from 0 to 3 0 => unwatched, 1 => no alerts/emails, 2 => alerts, 3 => emails/alerts Upon successful completion of action will direct user back to topic. Accessed via ?action=notifytopic.
MessageMain()
This helps organize things.
MessageMain() : void
..
Tags
MessageFolder()
A folder, ie. inbox/sent etc.
MessageFolder() : void
MessagePopup()
The popup for when we ask for the popup from the user.
MessagePopup() : void
ManageLabels()
This function handles adding, deleting and editing labels on messages.
ManageLabels() : void
ManageRules()
List all rules, and allow adding/entering etc.
ManageRules() : void
..
MessageActionsApply()
This function performs all additional stuff.
MessageActionsApply() : void
..
MessagePrune()
This function allows the user to delete all messages older than so many days.
MessagePrune() : mixed
MessageKillAll()
Delete ALL the messages!
MessageKillAll() : void
ReportMessage()
Allows the user to report a personal message to an administrator.
ReportMessage() : void
- In the first instance requires that the ID of the message to report is passed through $_GET.
- It allows the user to report to either a particular administrator - or the whole admin team.
- It will forward on a copy of the original message without allowing the reporter to make changes.
Tags
MessageSearch()
Allows searching through personal messages.
MessageSearch() : void
MessageSearch2()
Actually do the search of personal messages.
MessageSearch2() : void
MessagePost()
Send a new message?
MessagePost() : void
MessagePost2()
Send it!
MessagePost2() : void
MessageSettings()
Allows to edit Personal Message Settings.
MessageSettings() : void
Uses Profile.php Uses Profile-Modify.php Uses Profile template. Uses Profile language file.
MessageDrafts()
This function allows the user to view their PM drafts
MessageDrafts() : void
Post()
Handles showing the post screen, loading the post to be modified, and loading any post quoted.
Post([array<string|int, mixed> $post_errors = [] ]) : void
- additionally handles previews of posts.
- Uses the Post template and language file, main sub template.
- requires different permissions depending on the actions, but most notably post_new, post_reply_own, and post_reply_any.
- shows options for the editing and posting of calendar events and attachments, as well as the posting of polls.
- accessed from ?action=post.
Parameters
- $post_errors : array<string|int, mixed> = []
-
Holds any errors found while trying to post
Post2()
Posts or saves the message composed with Post().
Post2() : void
requires various permissions depending on the action. handles attachment, post, and calendar saving. sends off notifications, and allows for announcements and moderation. accessed from ?action=post2.
QuickModeration()
Handles moderation from the message index.
QuickModeration() : void
Tags
QuickInTopicModeration()
In-topic quick moderation.
QuickInTopicModeration() : void
QuoteFast()
Loads a post an inserts it into the current editing text box.
QuoteFast() : void
uses the Post language file. uses special (sadly browser dependent) javascript to parse entities for internationalization reasons. accessed with ?action=quotefast.
RecentPosts()
Find the ten most recent posts.
RecentPosts() : void
getLastPost()
Get the latest post made on the system
getLastPost() : array<string|int, mixed>
- respects approved, recycled, and board permissions
Return values
array<string|int, mixed> —An array of information about the last post that you can see
Register()
Begin the registration process.
Register([array<string|int, mixed> $reg_errors = [] ]) : void
Parameters
- $reg_errors : array<string|int, mixed> = []
-
Holds information about any errors that occurred
Register2()
Actually register the member.
Register2() : void
registerMember()
Registers a member to the forum.
registerMember(array<string|int, mixed> &$reg_options[, bool $return_errors = false ]) : int|array<string|int, mixed>
Allows two types of interface: 'guest' and 'admin'. The first includes hammering protection, the latter can perform the registration silently. The strings used in the options array are assumed to be escaped. Allows to perform several checks on the input, e.g. reserved names. The function will adjust member statistics. If an error is detected will fatal error on all errors unless return_errors is true.
Parameters
- $reg_options : array<string|int, mixed>
-
An array of registration options
- $return_errors : bool = false
-
Whether to return the errors
Return values
int|array<string|int, mixed> —The ID of the newly registered user or an array of error info if $return_errors is true
RemindMe()
This is the controlling delegator
RemindMe() : void
Uses Profile language files and Reminder template
ReportToModerator()
Report a post or profile to the moderator... ask for a comment.
ReportToModerator() : void
Gathers data from the user to report abuse to the moderator(s). Uses the ReportToModerator template, main sub template. Requires the report_any permission. Uses ReportToModerator2() if post data was sent. Accessed through ?action=reporttm.
ReportToModerator2()
Send the emails.
ReportToModerator2() : void
Sends off emails to all the moderators. Sends to administrators and global moderators. (1 and 2) Called by ReportToModerator(), and thus has the same permission and setting requirements as it does. Accessed through ?action=reporttm when posting.
reportPost()
Actually reports a post using information specified from a form
reportPost(int $msg, string $reason) : void
Parameters
- $msg : int
-
The ID of the post being reported
- $reason : string
-
The reason specified for reporting the post
reportUser()
Actually reports a user's profile using information specified from a form
reportUser(int $id_member, string $reason) : void
Parameters
- $id_member : int
-
The ID of the member whose profile is being reported
- $reason : string
-
The reason specified by the reporter for this report
RequestMembers()
Outputs each member name on its own line.
RequestMembers() : void
- used by javascript to find members matching the request.
PlushSearch1()
Ask the user what they want to search for.
PlushSearch1() : void
What it does:
- shows the screen to search forum posts (action=search)
- uses the main sub template of the Search template.
- uses the Search language file.
- requires the search_posts permission.
- decodes and loads search parameters given in the URL (if any).
- the form redirects to index.php?action=search2.
PlushSearch2()
Gather the results and show them.
PlushSearch2() : void
What it does:
- checks user input and searches the messages table for messages matching the query.
- requires the search_posts permission.
- uses the results sub template of the Search template.
- uses the Search language file.
- stores the results into the search cache.
- show the results of the search query.
SendActivation()
It doesn't actually send anything, this action just shows a message for a guest.
SendActivation() : void
SMStats()
This is the function which returns stats to simplemachines.org IF enabled! called by simplemachines.org.
SMStats() : void
only returns anything if stats was enabled during installation. can also be accessed by the admin, to show what stats sm.org collects. does not return any data directly to sm.org, instead starts a new request for security.
Tags
DisplayStats()
Display some useful/interesting board statistics.
DisplayStats() : void
gets all the statistics in order and puts them in. uses the Stats template and language file. (and main sub template.) requires the view_stats permission. accessed from ?action=stats.
MergeTopics()
merges two or more topics into one topic.
MergeTopics() : void
delegates to the other functions (based on the URL parameter sa). loads the SplitTopics template. requires the merge_any permission. is accessed with ?action=mergetopics.
MergeIndex()
allows to pick a topic to merge the current topic with.
MergeIndex() : void
is accessed with ?action=mergetopics;sa=index default sub action for ?action=mergetopics. uses 'merge' sub template of the MoveTopic template. allows to set a different target board.
MergeExecute()
set merge options and do the actual merge of two or more topics.
MergeExecute([array<string|int, mixed> $topics = [] ]) : void
the merge options screen:
- shows topics to be merged and allows to set some merge options.
- is accessed by ?action=mergetopics;sa=options.and can also internally be called by QuickModeration() (Subs-Boards.php).
- uses 'merge_extra_options' sub template of the MoveTopic template.
the actual merge:
- is accessed with ?action=mergetopics;sa=execute.
- updates the statistics to reflect the merge.
- logs the action in the moderation log.
- sends a notification is sent to all users monitoring this topic.
- redirects to ?action=mergetopics;sa=done.
Parameters
- $topics : array<string|int, mixed> = []
-
The IDs of the topics to merge
MergeDone()
Shows a 'merge completed' screen.
MergeDone() : void
is accessed with ?action=mergetopics;sa=done. uses 'merge_done' sub template of the SplitTopics template.
MoveTopic()
This function allows to move a topic, making sure to ask the moderator to give reason for topic move.
MoveTopic() : void
It must be called with a topic specified. (that is, global $topic must be set... @todo fix this thing.) If the member is the topic starter requires the move_own permission, otherwise the move_any permission. Accessed via ?action=movetopic.
Uses the MoveTopic template, main sub-template.
MoveTopic2()
Execute the move of a topic.
MoveTopic2() : void
It is called on the submit of MoveTopic. This function logs that topics have been moved in the moderation log. If the member is the topic starter requires the move_own permission, otherwise requires the move_any permission. Upon successful completion redirects to message index. Accessed via ?action=movetopic2.
Uses Subs-Post.php
moveTopicConcurrence()
Called after a topic is moved to update $board_link and $topic_link to point to new location
moveTopicConcurrence() : mixed
PrintTopic()
Format a topic to be printer friendly.
PrintTopic() : void
Must be called with a topic specified. Accessed via ?action=printpage.
Uses Printpage template, main sub-template. Uses print_above/print_below later without the main layer.
RemoveTopic2()
Completely remove an entire topic.
RemoveTopic2() : void
Redirects to the board when completed.
removeDeleteConcurrence()
Try to determine if the topic has already been deleted by another user.
removeDeleteConcurrence() : bool
Return values
bool —False if it can't be deleted (recycling not enabled or no recycling board set), true if we've confirmed it can be deleted. Dies with an error if it's already been deleted.
RemoveOldTopics2()
So long as you are sure... all old posts will be gone.
RemoveOldTopics2() : mixed
Used in ManageMaintenance.php to prune old topics.
RestoreTopic()
Move back a topic from the recycle board to its original board.
RestoreTopic() : void
SplitTopics()
splits a topic into two topics.
SplitTopics() : void
delegates to the other functions (based on the URL parameter 'sa'). loads the SplitTopics template. requires the split_any permission. is accessed with ?action=splittopics.
splitTopic()
general function to split off a topic.
splitTopic(int $split1_ID_TOPIC, array<string|int, mixed> $splitMessages, string $new_subject) : int
creates a new topic and moves the messages with the IDs in array messagesToBeSplit to the new topic. the subject of the newly created topic is set to 'newSubject'. marks the newly created message as read for the user splitting it. updates the statistics to reflect a newly created topic. logs the action in the moderation log. a notification is sent to all users monitoring this topic.
Parameters
- $split1_ID_TOPIC : int
-
The ID of the topic we're splitting
- $splitMessages : array<string|int, mixed>
-
The IDs of the messages being split
- $new_subject : string
-
The subject of the new topic
Return values
int —The ID of the new split topic.
SplitIndex()
screen shown before the actual split.
SplitIndex() : void
is accessed with ?action=splittopics;sa=index. default sub action for ?action=splittopics. uses 'ask' sub template of the SplitTopics template. redirects to SplitSelectTopics if the message given turns out to be the first message of a topic. shows the user three ways to split the current topic.
SplitExecute()
do the actual split.
SplitExecute() : void
is accessed with ?action=splittopics;sa=execute. uses the main SplitTopics template. supports three ways of splitting: (1) only one message is split off. (2) all messages after and including a given message are split off. (3) select topics to split (redirects to SplitSelectTopics()). uses splitTopic function to do the actual splitting.
SplitSelectTopics()
allows the user to select the messages to be split.
SplitSelectTopics() : void
is accessed with ?action=splittopics;sa=selectTopics. uses 'select' sub template of the SplitTopics template or (for XMLhttp) the 'split' sub template of the Xml template. supports XMLhttp for adding/removing a message to the selection. uses a session variable to store the selected topics. shows two independent page indexes for both the selected and not-selected messages (;topic=1.x;start2=y).
SplitSelectionExecute()
do the actual split of a selection of topics.
SplitSelectionExecute() : void
is accessed with ?action=splittopics;sa=splitSelection. uses the main SplitTopics template. uses splitTopic function to do the actual splitting.
TrackIP()
Handles tracking a particular IP address
TrackIP([int $memID = 0 ]) : void
Parameters
- $memID : int = 0
-
The ID of a member whose IP we want to track
UnreadTopics()
Find unread topics and replies.
UnreadTopics() : void
VerificationCode()
Show the verification code or let it be heard.
VerificationCode() : void
ViewQuery()
Show the database queries for debugging What this does: - Toggles the session variable 'view_queries'.
ViewQuery() : void
- Views a list of queries and analyzes them.
- Requires the admin_forum permission.
- Is accessed via ?action=viewquery.
- Strings in this function have not been internationalized.
Who()
Who's online, and what are they doing? This function prepares the who's online data for the Who template.
Who() : void
It requires the who_view permission. It is enabled with the who_enabled setting. It is accessed via ?action=who.
Uses Who template, main sub-template Uses Who language file.
determineActions()
This function determines the actions of the members passed in urls.
determineActions(mixed $urls[, string|bool $preferred_prefix = false ]) : array<string|int, mixed>
Adding actions to the Who's Online list: Adding actions to this list is actually relatively easy...
- for actions anyone should be able to see, just add a string named whoall_ACTION. (where ACTION is the action used in index.php.)
- for actions that have a subaction which should be represented differently, use whoall_ACTION_SUBACTION.
- for actions that include a topic, and should be restricted, use whotopic_ACTION.
- for actions that use a message, by msg or quote, use whopost_ACTION.
- for administrator-only actions, use whoadmin_ACTION.
- for actions that should be viewable only with certain permissions, use whoallow_ACTION and add a list of possible permissions to the $allowedActions array, using ACTION as the key.
Parameters
- $urls : mixed
-
a single url (string) or an array of arrays, each inner array being (JSON-encoded request data, id_member)
- $preferred_prefix : string|bool = false
-
= false
Return values
array<string|int, mixed> —an array of descriptions if you passed an array, otherwise the string describing their current location.
XMLhttpMain()
The main handler and designator for AJAX stuff - jumpto, message icons and previews
XMLhttpMain() : void
GetJumpTo()
Get a list of boards and categories used for the jumpto dropdown.
GetJumpTo() : void
ListMessageIcons()
Gets a list of available message icons and sends the info to the template for display
ListMessageIcons() : void
RetrievePreview()
Handles retrieving previews of news items, newsletters, signatures and warnings.
RetrievePreview() : bool|null
Calls the appropriate function based on $_POST['item']
Return values
bool|null —Returns false if $_POST['item'] isn't set or isn't valid
loadCacheAccelerator()
Try to load up a supported caching method. This is saved in $cacheAPI if we are not overriding it.
loadCacheAccelerator([string $overrideCache = '' ][, bool $fallbackSMF = true ]) : object|false
Parameters
- $overrideCache : string = ''
-
Try to use a different cache method other than that defined in $cache_accelerator.
- $fallbackSMF : bool = true
-
Use the default SMF method if the accelerator fails.
Return values
object|false —A object of $cacheAPI, or False on failure.
loadCacheAPIs()
Get the installed Cache API implementations.
loadCacheAPIs() : array<string|int, mixed>
Return values
array<string|int, mixed>clean_cache()
Empty out the cache in use as best it can
clean_cache([string $type = '' ]) : void
It may only remove the files of a certain type (if the $type parameter is given) Type can be user, data or left blank - user clears out user data
- data clears out system / opcode data
- If no type is specified will perform a complete cache clearing For cache engines that do not distinguish on types, a full cache flush will be done
Parameters
- $type : string = ''
-
The cache type ('memcached', 'zend' or something else for SMF's file cache)
cache_quick_get()
Try to retrieve a cache entry. On failure, call the appropriate function.
cache_quick_get(string $key, string $file, string $function, array<string|int, mixed> $params[, int $level = 1 ]) : string
Parameters
- $key : string
-
The key for this entry
- $file : string
-
The file associated with this entry
- $function : string
-
The function to call
- $params : array<string|int, mixed>
-
Parameters to be passed to the specified function
- $level : int = 1
-
The cache level
Return values
string —The cached data
cache_put_data()
Puts value in the cache under key for ttl seconds.
cache_put_data(string $key, mixed $value[, int $ttl = 120 ]) : void
- It may "miss" so shouldn't be depended on
- Uses the cache engine chosen in the ACP and saved in settings.php
- It supports: memcache: https://php.net/memcache APCu: https://php.net/book.apcu Zend: http://files.zend.com/help/Zend-Platform/output_cache_functions.htm Zend: http://files.zend.com/help/Zend-Platform/zend_cache_functions.htm
Parameters
- $key : string
-
A key for this value
- $value : mixed
-
The data to cache
- $ttl : int = 120
-
How long (in seconds) the data should be cached for
cache_get_data()
Gets the value from the cache specified by key, so long as it is not older than ttl seconds.
cache_get_data(string $key[, int $ttl = 120 ]) : array<string|int, mixed>|null
- It may often "miss", so shouldn't be depended on.
- It supports the same as cache_put_data().
Parameters
- $key : string
-
The key for the value to retrieve
- $ttl : int = 120
-
The maximum age of the cached data
Return values
array<string|int, mixed>|null —The cached data or null if nothing was loaded
reloadSettings()
Load the $modSettings array.
reloadSettings() : mixed
updateSettings()
Updates the settings table as well as $modSettings... only does one at a time if $update is true.
updateSettings(array<string|int, mixed> $change_array[, bool $update = false ]) : mixed
- updates both the settings table and $modSettings array.
- all of changeArray's indexes and values are assumed to have escaped apostrophes (')!
- if a variable is already set to what you want to change it to, that variable will be skipped over; it would be unnecessary to reset.
- When use_update is true, UPDATEs will be used instead of REPLACE.
- when use_update is true, the value can be true or false to increment or decrement it, respectively.
Parameters
- $change_array : array<string|int, mixed>
-
An array of info about what we're changing in 'setting' => 'value' format
- $update : bool = false
-
Whether to use an UPDATE query instead of a REPLACE query
get_auth_secret()
Gets, and if necessary creates, the authentication secret to use for cookies, tokens, etc.
get_auth_secret() : string
Note: Never use the $auth_secret variable directly. Always call this function instead.
Return values
string —The authentication secret.
get_settings_defs()
Describes properties of all known Settings.php variables and other content.
get_settings_defs() : array<string|int, mixed>
Helper for updateSettingsFile(); also called by saveSettings().
Return values
array<string|int, mixed> —Descriptions of all known Settings.php content
updateSettingsFile()
Update the Settings.php file.
updateSettingsFile(array<string|int, mixed> $config_vars[, bool|null $keep_quotes = null ][, bool $rebuild = false ]) : bool
The most important function in this file for mod makers happens to be the updateSettingsFile() function, but it shouldn't be used often anyway.
-
Updates the Settings.php file with the changes supplied in config_vars.
-
Expects config_vars to be an associative array, with the keys as the variable names in Settings.php, and the values the variable values.
-
Correctly formats the values using smf_var_export().
-
Restores standard formatting of the file, if $rebuild is true.
-
Checks for changes to db_last_error and passes those off to a separate handler.
-
Creates a backup file and will use it should the writing of the new settings file fail.
-
Tries to intelligently trim quotes and remove slashes from string values. This is done for backwards compatibility purposes (old versions of this function expected strings to have been manually escaped and quoted). This behaviour can be controlled by the $keep_quotes parameter.
MOD AUTHORS: If you are adding a setting to Settings.php, you should use the integrate_update_settings_file hook to define it in get_settings_defs().
Parameters
- $config_vars : array<string|int, mixed>
-
An array of one or more variables to update.
- $keep_quotes : bool|null = null
-
Whether to strip slashes & trim quotes from string values. Defaults to auto-detection.
- $rebuild : bool = false
-
If true, attempts to rebuild with standard format. Default false.
Return values
bool —True on success, false on failure.
safe_file_write()
Writes data to a file, optionally making a backup, while avoiding race conditions.
safe_file_write(string $file, string $data[, string $backup_file = null ][, int $mtime = null ][, bool $append = false ]) : bool
Parameters
- $file : string
-
The filepath of the file where the data should be written.
- $data : string
-
The data to be written to $file.
- $backup_file : string = null
-
The filepath where the backup should be saved. Default null.
- $mtime : int = null
-
If modification time of $file is more recent than this Unix timestamp, the write operation will abort. Defaults to time that the script started execution.
- $append : bool = false
-
If true, the data will be appended instead of overwriting the existing content of the file. Default false.
Return values
bool —Whether the write operation succeeded or not.
smf_var_export()
A wrapper around var_export whose output matches SMF coding conventions.
smf_var_export(mixed $var) : mixed
Parameters
- $var : mixed
-
The variable to export
Tags
Return values
mixed —A PHP-parseable representation of the variable's value
updateDbLastError()
Saves the time of the last db error for the error log - Done separately from updateSettingsFile to avoid race conditions which can occur during a db error - If it fails Settings.php will assume 0
updateDbLastError(int $time) : bool
Parameters
- $time : int
-
The timestamp of the last DB error
Return values
bool —True If we could succesfully put the file or not.
sm_temp_dir()
Locates the most appropriate temp directory.
sm_temp_dir() : string
Systems using open_basedir
restrictions may receive errors with
sys_get_temp_dir()
due to misconfigurations on servers. Other
cases sys_temp_dir may not be set to a safe value. Additionally
sys_get_temp_dir
may use a readonly directory. This attempts to
find a working temp directory that is accessible under the
restrictions and is writable to the web service account.
Directories checked against open_basedir
:
sys_get_temp_dir()
upload_tmp_dir
session.save_path
cachedir
Return values
stringsmf_seed_generator()
Generate a random seed and ensure it's stored in settings.
smf_seed_generator() : mixed
check_cron()
Ensures SMF's scheduled tasks are being run as intended
check_cron() : mixed
If the admin activated the cron_is_real_cron setting, but the cron job is not running things at least once per day, we need to go back to SMF's default behaviour using "web cron" JavaScript calls.
loadDatabase()
Initialize a database connection.
loadDatabase([array<string|int, mixed> $options = [] ]) : DatabaseApi
Parameters
- $options : array<string|int, mixed> = []
Return values
DatabaseApidb_extend()
Extend the database functionality. It calls the respective file's init to add the implementations in that file to $smcFunc array.
db_extend(string $type) : void
In SMF 3.0 this is a no-op.
Parameters
- $type : string
-
Indicates which additional file to load. ('extra', 'packages')
imageMemoryCheck()
See if we have enough memory to thumbnail an image
imageMemoryCheck(array<string|int, mixed> $sizes) : bool
Parameters
- $sizes : array<string|int, mixed>
-
image size
Return values
bool —Whether we do
url_image_size()
Get the size of a specified image with better error handling.
url_image_size(string $url) : array<string|int, mixed>|false
Parameters
- $url : string
-
The URL of the image
Tags
Return values
array<string|int, mixed>|false —The image size as array (width, height), or false on failure
gif_outputAsPng()
Writes a gif file to disk as a png file.
gif_outputAsPng(gif_file $gif, string $lpszFileName[, int $background_color = -1 ]) : bool
Parameters
- $gif : gif_file
-
A gif image resource
- $lpszFileName : string
-
The name of the file
- $background_color : int = -1
-
The background color
Return values
bool —Whether the operation was successful
getSvgSize()
Gets the dimensions of an SVG image (specifically, of its viewport).
getSvgSize(string $filepath) : array<string|int, mixed>
If $filepath is not the path to a valid SVG file, the returned width and height will both be null.
See https://www.w3.org/TR/SVG11/coords.html#IntrinsicSizing
Parameters
- $filepath : string
-
The path to the SVG file.
Return values
array<string|int, mixed> —The width and height of the SVG image in pixels.
createThumbnail()
Create a thumbnail of the given source.
createThumbnail(string $source, int $max_width, int $max_height) : bool
Parameters
- $source : string
-
The name of the source image
- $max_width : int
-
The maximum allowed width
- $max_height : int
-
The maximum allowed height
Tags
Return values
bool —Whether the thumbnail creation was successful.
reencodeImage()
Used to re-econodes an image to a specified image format - creates a copy of the file at the same location as fileName.
reencodeImage(string $source[, int $preferred_type = 0 ]) : bool
- the file would have the format preferred_format if possible, otherwise the default format is jpeg.
- the function makes sure that all non-essential image contents are disposed.
Parameters
- $source : string
- $preferred_type : int = 0
Return values
bool —Whether the reencoding was successful
checkImageContents()
Searches through the file to see if there's potentially harmful non-binary content.
checkImageContents(string $source[, bool $extensive = false ]) : bool
- if extensiveCheck is true, searches for asp/php short tags as well.
Parameters
- $source : string
- $extensive : bool = false
Return values
bool —Whether the image appears to be safe
checkSvgContents()
Searches through an SVG file to see if there's potentially harmful content.
checkSvgContents(string $source) : bool
Parameters
- $source : string
Return values
bool —Whether the image appears to be safe.
resizeImageFile()
Resizes an image from a remote location or a local file.
resizeImageFile(string $source, string $destination, int $max_width, int $max_height[, int $preferred_type = 0 ]) : bool
Puts the resized image at the destination location. The file would have the format preferred_format if possible, otherwise the default format is jpeg.
Parameters
- $source : string
-
The path to the source image
- $destination : string
-
The path to the destination image
- $max_width : int
-
The maximum allowed width
- $max_height : int
-
The maximum allowed height
- $preferred_type : int = 0
Tags
Return values
bool —Whether it succeeded.
resizeImage()
Resizes src_img proportionally to fit within max_width and max_height limits if it is too large.
resizeImage(resource $source, string $destination, int $src_width, int $src_height, int $max_width, int $max_height[, bool $force_resize = false ][, int $preferred_type = 0 ]) : bool
If GD2 is present, it'll use it to achieve better quality. It saves the new image to destination_filename, as preferred_format if possible, default is jpeg.
Uses Imagemagick (IMagick or MagickWand extension) or GD
Parameters
- $source : resource
-
The source image
- $destination : string
-
The path to the destination image
- $src_width : int
-
The width of the source image
- $src_height : int
-
The height of the source image
- $max_width : int
-
The maximum allowed width
- $max_height : int
-
The maximum allowed height
- $force_resize : bool = false
-
= false Whether to forcibly resize it
- $preferred_type : int = 0
-
- 1 for gif, 2 for jpeg, 3 for png, 6 for bmp or 15 for wbmp
Return values
bool —Whether the resize was successful
read_tgz_file()
Reads an archive from either a remote location or from the local filesystem.
read_tgz_file(string $gzfilename, string $destination[, bool $single_file = false ][, bool $overwrite = false ][, null|array<string|int, mixed> $files_to_extract = null ]) : array<string|int, mixed>|false
Parameters
- $gzfilename : string
-
The path to the tar.gz file
- $destination : string
-
The path to the desitnation directory
- $single_file : bool = false
-
If true returns the contents of the file specified by destination if it exists
- $overwrite : bool = false
-
Whether to overwrite existing files
- $files_to_extract : null|array<string|int, mixed> = null
-
Specific files to extract
Return values
array<string|int, mixed>|false —An array of information about extracted files or false on failure
read_tgz_data()
Extracts a file or files from the .tar.gz contained in data.
read_tgz_data(string $data, null|string $destination[, bool $single_file = false ][, bool $overwrite = false ][, null|array<string|int, mixed> $files_to_extract = null ]) : array<string|int, mixed>|false
detects if the file is really a .zip file, and if so returns the result of read_zip_data
if destination is null
- returns a list of files in the archive.
if single_file is true
- returns the contents of the file specified by destination, if it exists, or false.
- destination can start with * and / to signify that the file may come from any directory.
- destination should not begin with a / if single_file is true.
overwrites existing files with newer modification times if and only if overwrite is true. creates the destination directory if it doesn't exist, and is is specified. requires zlib support be built into PHP. returns an array of the files extracted. if files_to_extract is not equal to null only extracts file within this array.
Parameters
- $data : string
-
The gzipped tarball
- $destination : null|string
-
The destination
- $single_file : bool = false
-
Whether to only extract a single file
- $overwrite : bool = false
-
Whether to overwrite existing data
- $files_to_extract : null|array<string|int, mixed> = null
-
If set, only extracts the specified files
Return values
array<string|int, mixed>|false —An array of information about the extracted files or false on failure
read_zip_data()
Extract zip data.
read_zip_data(string $data, string $destination[, bool $single_file = false ][, bool $overwrite = false ][, array<string|int, mixed> $files_to_extract = null ]) : mixed
If single_file is true, destination can start with * and / to signify that the file may come from any directory. Destination should not begin with a / if single_file is true.
Parameters
- $data : string
-
ZIP data
- $destination : string
-
Null to display a listing of files in the archive, the destination for the files in the archive or the name of a single file to display (if $single_file is true)
- $single_file : bool = false
-
If true, returns the contents of the file specified by destination or false if the file can't be found (default value is false).
- $overwrite : bool = false
-
If true, will overwrite files with newer modication times. Default is false.
- $files_to_extract : array<string|int, mixed> = null
Return values
mixed —If destination is null, return a short array of a few file details optionally delimited by $files_to_extract. If $single_file is true, return contents of a file as a string; false otherwise
url_exists()
Checks the existence of a remote file since file_exists() does not do remote.
url_exists(string $url) : bool
will return false if the file is "moved permanently" or similar.
Parameters
- $url : string
-
The URL to parse
Return values
bool —Whether the specified URL exists
loadInstalledPackages()
Loads and returns an array of installed packages.
loadInstalledPackages() : array<string|int, mixed>
default sort order is package_installed time
Return values
array<string|int, mixed> —An array of info about installed packages
getPackageInfo()
Loads a package's information and returns a representative array.
getPackageInfo(string $gzfilename) : array<string|int, mixed>|string
- expects the file to be a package in Packages/.
- returns a error string if the package-info is invalid.
- otherwise returns a basic array of id, version, filename, and similar information.
- an xmlArray is available in 'xml'.
Parameters
- $gzfilename : string
-
The path to the file
Return values
array<string|int, mixed>|string —An array of info about the file or a string indicating an error
create_chmod_control()
Create a chmod control for chmoding files.
create_chmod_control([array<string|int, mixed> $chmodFiles = [] ][, array<string|int, mixed> $chmodOptions = [] ][, bool $restore_write_status = false ]) : array<string|int, mixed>
Parameters
- $chmodFiles : array<string|int, mixed> = []
-
Which files to chmod
- $chmodOptions : array<string|int, mixed> = []
-
Options for chmod
- $restore_write_status : bool = false
-
Whether to restore write status
Return values
array<string|int, mixed> —An array of file info
list_restoreFiles()
Get a listing of files that will need to be set back to the original state
list_restoreFiles(null $dummy1, null $dummy2, null $dummy3, bool $do_change) : array<string|int, mixed>
Parameters
- $dummy1 : null
- $dummy2 : null
- $dummy3 : null
- $do_change : bool
Return values
array<string|int, mixed> —An array of info about the files that need to be restored back to their original state
packageRequireFTP()
Use FTP functions to work with a package download/install
packageRequireFTP(string $destination_url[, null|array<string|int, mixed> $files = null ][, bool $return = false ]) : array<string|int, mixed>
Parameters
- $destination_url : string
-
The destination URL
- $files : null|array<string|int, mixed> = null
-
The files to CHMOD
- $return : bool = false
-
Whether to return an array of file info if there's an error
Return values
array<string|int, mixed> —An array of file info
parsePackageInfo()
Parses the actions in package-info.xml file from packages.
parsePackageInfo(xmlArray &$packageXML[, bool $testing_only = true ][, string $method = 'install' ][, string $previous_version = '' ]) : array<string|int, mixed>
- package should be an xmlArray with package-info as its base.
- testing_only should be true if the package should not actually be applied.
- method can be upgrade, install, or uninstall. Its default is install.
- previous_version should be set to the previous installed version of this package, if any.
- does not handle failure terribly well; testing first is always better.
Parameters
- $packageXML : xmlArray
-
The info from the package-info file
- $testing_only : bool = true
-
Whether we're only testing
- $method : string = 'install'
-
The method ('install', 'upgrade', or 'uninstall')
- $previous_version : string = ''
-
The previous version of the mod, if method is 'upgrade'
Return values
array<string|int, mixed> —An array of those changes made.
matchHighestPackageVersion()
Checks if version matches any of the versions in `$versions`.
matchHighestPackageVersion(string $versions, bool $reset, string $the_version) : string|bool
- supports comma separated version numbers, with or without whitespace.
- supports lower and upper bounds. (1.0-1.2)
- returns true if the version matched.
Parameters
- $versions : string
-
The versions that this package will install on
- $reset : bool
-
Whether to reset $near_version
- $the_version : string
-
The forum version
Return values
string|bool —Highest install value string or false
matchPackageVersion()
Checks if the forum version matches any of the available versions from the package install xml.
matchPackageVersion(string $version, string $versions) : bool
- supports comma separated version numbers, with or without whitespace.
- supports lower and upper bounds. (1.0-1.2)
- returns true if the version matched.
Parameters
- $version : string
-
The forum version
- $versions : string
-
The versions that this package will install on
Return values
bool —Whether the version matched
compareVersions()
Compares two versions and determines if one is newer, older or the same, returns - (-1) if version1 is lower than version2 - (0) if version1 is equal to version2 - (1) if version1 is higher than version2
compareVersions(string $version1, string $version2) : int
Parameters
- $version1 : string
-
The first version
- $version2 : string
-
The second version
Return values
int —-1 if version2 is greater than version1, 0 if they're equal, 1 if version1 is greater than version2
parse_path()
Parses special identifiers out of the specified path.
parse_path(string $path) : string
Parameters
- $path : string
-
The path
Return values
string —The parsed path
deltree()
Deletes a directory, and all the files and direcories inside it.
deltree(string $dir[, bool $delete_dir = true ]) : void
requires access to delete these files.
Parameters
- $dir : string
-
A directory
- $delete_dir : bool = true
-
If false, only deletes everything inside the directory but not the directory itself
mktree()
Creates the specified tree structure with the mode specified.
mktree(string $strPath, int $mode) : bool
creates every directory in path until it finds one that already exists.
Parameters
- $strPath : string
-
The path
- $mode : int
-
The permission mode for CHMOD (0666, etc.)
Return values
bool —True if successful, false otherwise
copytree()
Copies one directory structure over to another.
copytree(string $source, string $destination) : void
requires the destination to be writable.
Parameters
- $source : string
-
The directory to copy
- $destination : string
-
The directory to copy $source to
listtree()
Create a tree listing for a given directory path
listtree(string $path[, string $sub_path = '' ]) : array<string|int, mixed>
Parameters
- $path : string
-
The path
- $sub_path : string = ''
-
The sub-path
Return values
array<string|int, mixed> —An array of information about the files at the specified path/subpath
parseModification()
Parses a xml-style modification file (file).
parseModification(string $file[, bool $testing = true ][, bool $undo = false ][, array<string|int, mixed> $theme_paths = [] ]) : array<string|int, mixed>
Parameters
- $file : string
-
The modification file to parse
- $testing : bool = true
-
Whether we're just doing a test
- $undo : bool = false
-
If true, specifies that the modifications should be undone. Used when uninstalling. Doesn't work with regex.
- $theme_paths : array<string|int, mixed> = []
-
An array of information about custom themes to apply the changes to
Return values
array<string|int, mixed> —An array of those changes made.
parseBoardMod()
Parses a boardmod-style (.mod) modification file
parseBoardMod(string $file[, bool $testing = true ][, bool $undo = false ][, array<string|int, mixed> $theme_paths = [] ]) : array<string|int, mixed>
Parameters
- $file : string
-
The modification file to parse
- $testing : bool = true
-
Whether we're just doing a test
- $undo : bool = false
-
If true, specifies that the modifications should be undone. Used when uninstalling.
- $theme_paths : array<string|int, mixed> = []
-
An array of information about custom themes to apply the changes to
Return values
array<string|int, mixed> —An array of those changes made.
package_get_contents()
Get the physical contents of a packages file
package_get_contents(string $filename) : string
Parameters
- $filename : string
-
The package file
Return values
string —The contents of the specified file
package_put_contents()
Writes data to a file, almost exactly like the file_put_contents() function.
package_put_contents(string $filename, string $data[, bool $testing = false ]) : int
uses FTP to create/chmod the file when necessary and available. uses text mode for text mode file extensions. returns the number of bytes written.
Parameters
- $filename : string
-
The name of the file
- $data : string
-
The data to write to the file
- $testing : bool = false
-
Whether we're just testing things
Return values
int —The length of the data written (in bytes)
package_flush_cache()
Flushes the cache from memory to the filesystem
package_flush_cache([bool $trash = false ]) : void
Parameters
- $trash : bool = false
package_chmod()
Try to make a file writable.
package_chmod(string $filename[, string $perm_state = 'writable' ][, bool $track_change = false ]) : bool
Parameters
- $filename : string
-
The name of the file
- $perm_state : string = 'writable'
-
The permission state - can be either 'writable' or 'execute'
- $track_change : bool = false
-
Whether to track this change
Return values
bool —True if it worked, false if it didn't
package_crypt()
Used to crypt the supplied ftp password in this session
package_crypt(string $pass) : string
Parameters
- $pass : string
-
The password
Return values
string —The encrypted password
package_unique_filename()
package_unique_filename(string $dir, string $filename, string $ext) : string
Parameters
- $dir : string
- $filename : string
-
The filename without an extension
- $ext : string
Tags
Return values
string —The filename with a number appended but no extension
package_create_backup()
Creates a backup of forum files prior to modifying them
package_create_backup([string $id = 'backup' ]) : bool
Parameters
- $id : string = 'backup'
-
The name of the backup
Return values
bool —True if it worked, false if it didn't
package_validate_installtest()
Validate a package during install
package_validate_installtest(array<string|int, mixed> $package) : array<string|int, mixed>
Parameters
- $package : array<string|int, mixed>
-
Package data
Return values
array<string|int, mixed> —Results from the package validation.
package_validate()
Validate multiple packages.
package_validate(array<string|int, mixed> $packages) : array<string|int, mixed>
Parameters
- $packages : array<string|int, mixed>
-
Package data
Return values
array<string|int, mixed> —Results from the package validation.
package_validate_send()
Sending data off to validate packages.
package_validate_send(array<string|int, mixed> $sendData) : array<string|int, mixed>
Parameters
- $sendData : array<string|int, mixed>
-
Json encoded data to be sent to the validation servers.
Return values
array<string|int, mixed> —Results from the package validation.
sendpm()
Sends an personal message from the specified person to the specified people ($from defaults to the user)
sendpm(array<string|int, mixed> $recipients, string $subject, string $message[, bool $store_outbox = false ][, array<string|int, mixed> $from = null ][, int $pm_head = 0 ]) : array<string|int, mixed>
Parameters
- $recipients : array<string|int, mixed>
-
An array containing the arrays 'to' and 'bcc', both containing id_member's.
- $subject : string
-
Should have no slashes and no html entities
- $message : string
-
Should have no slashes and no html entities
- $store_outbox : bool = false
-
Whether to store it in the sender's outbox
- $from : array<string|int, mixed> = null
-
An array with the id, name, and username of the member.
- $pm_head : int = 0
-
The ID of the chain being replied to - if any.
Return values
array<string|int, mixed> —An array with log entries telling how many recipients were successful and which recipients it failed to send to.
deleteMessages()
Delete the specified personal messages.
deleteMessages(array<string|int, mixed>|null $personal_messages[, string|null $folder = null ][, array<string|int, mixed>|int|null $owner = null ]) : void
Parameters
- $personal_messages : array<string|int, mixed>|null
-
An array containing the IDs of PMs to delete or null to delete all of them
- $folder : string|null = null
-
Which "folder" to delete PMs from - 'sent' to delete them from the outbox, null or anything else to delete from the inbox
- $owner : array<string|int, mixed>|int|null = null
-
An array of IDs of users whose PMs are being deleted, the ID of a single user or null to use the current user's ID
markMessages()
Mark the specified personal messages read.
markMessages([array<string|int, mixed>|null $personal_messages = null ][, int|null $label = null ][, int|null $owner = null ]) : void
Parameters
- $personal_messages : array<string|int, mixed>|null = null
-
An array of PM IDs to mark or null to mark all
- $label : int|null = null
-
The ID of a label. If set, only messages with this label will be marked.
- $owner : int|null = null
-
If owner is set, marks messages owned by that member id
messagePostError()
An error in the message.
messagePostError(array<string|int, mixed> $error_types, array<string|int, mixed> $named_recipients[, mixed $recipient_ids = [] ]) : void
..
Parameters
- $error_types : array<string|int, mixed>
-
An array of strings indicating which type of errors occurred
- $named_recipients : array<string|int, mixed>
- $recipient_ids : mixed = []
isAccessiblePM()
Check if the PM is available to the current user.
isAccessiblePM(int $pmID[, string $folders = 'both' ]) : bool
Parameters
- $pmID : int
-
The ID of the PM
- $folders : string = 'both'
Return values
bool —Whether the PM is accessible in that folder for the current user
LoadRules()
Load up all the rules for the current user.
LoadRules([bool $reload = false ]) : array<string|int, mixed>
Parameters
- $reload : bool = false
-
Whether or not to reload all the rules from the database if $context['rules'] is set
Return values
array<string|int, mixed>ApplyRules()
This will apply rules to all unread messages. If all_messages is set will, clearly, do it to all!
ApplyRules([bool $all_messages = false ]) : void
Parameters
- $all_messages : bool = false
-
Whether to apply this to all messages or just unread ones
findSearchAPI()
Creates a search API and returns the object.
findSearchAPI() : search_api_interface
Return values
search_api_interface —An instance of the search API interface
loadSearchAPIs()
Get the installed Search API implementations.
loadSearchAPIs() : array<string|int, mixed>
This function checks for patterns in comments on top of the Search-API files! In addition to filenames pattern. It loads the search API classes if identified. This function is used by EditSearchMethod to list all installed API implementations.
Return values
array<string|int, mixed> —Info about the detected search APIs.
highlight()
Highlighting matching string
highlight(string $text, array<string|int, mixed> $words) : string
Parameters
- $text : string
-
Text to search through
- $words : array<string|int, mixed>
-
List of keywords to search
Return values
string —Text with highlighted keywords
utf8_decompose()
Helper function for utf8_normalize_d and utf8_normalize_kd.
utf8_decompose(array<string|int, mixed> $chars[, bool $compatibility = false ]) : array<string|int, mixed>
Parameters
- $chars : array<string|int, mixed>
-
Array of Unicode characters
- $compatibility : bool = false
-
If true, perform compatibility decomposition. Default false.
Return values
array<string|int, mixed> —Array of decomposed Unicode characters.
utf8_compose()
Helper function for utf8_normalize_c and utf8_normalize_kc.
utf8_compose(array<string|int, mixed> $chars) : array<string|int, mixed>
Parameters
- $chars : array<string|int, mixed>
-
Array of decomposed Unicode characters
Return values
array<string|int, mixed> —Array of composed Unicode characters.
utf8_strtolower()
Converts the given UTF-8 string into lowercase.
utf8_strtolower(string $string) : string
Equivalent to mb_strtolower($string, 'UTF-8'), except that we can keep the output consistent across PHP versions and up to date with the latest version of Unicode.
Parameters
- $string : string
-
The string
Return values
string —The lowercase version of $string
utf8_strtoupper()
Convert the given UTF-8 string to uppercase.
utf8_strtoupper(string $string) : string
Equivalent to mb_strtoupper($string, 'UTF-8'), except that we can keep the output consistent across PHP versions and up to date with the latest version of Unicode.
Parameters
- $string : string
-
The string
Return values
string —The uppercase version of $string
utf8_casefold()
Casefolds the given UTF-8 string.
utf8_casefold(string $string) : string
Equivalent to mb_convert_case($string, MB_CASE_FOLD, 'UTF-8'), except that we can keep the output consistent across PHP versions and up to date with the latest version of Unicode.
Parameters
- $string : string
-
The string
Return values
string —The uppercase version of $string
utf8_convert_case()
Converts the case of the given UTF-8 string.
utf8_convert_case(string $string, string $case[, bool $simple = false ]) : string
Parameters
- $string : string
-
The string.
- $case : string
-
One of 'upper', 'lower', 'fold', 'title', 'ucfirst', or 'ucwords'.
- $simple : bool = false
-
If true, use simple maps instead of full maps. Default: false.
Return values
string —A version of $string converted to the specified case.
utf8_normalize_d()
Normalizes UTF-8 via Canonical Decomposition.
utf8_normalize_d(string $string) : string
Parameters
- $string : string
-
A UTF-8 string
Return values
string —The decomposed version of $string
utf8_normalize_kd()
Normalizes UTF-8 via Compatibility Decomposition.
utf8_normalize_kd(string $string) : string
Parameters
- $string : string
-
A UTF-8 string.
Return values
string —The decomposed version of $string.
utf8_normalize_c()
Normalizes UTF-8 via Canonical Decomposition then Canonical Composition.
utf8_normalize_c(string $string) : string
Parameters
- $string : string
-
A UTF-8 string
Return values
string —The composed version of $string
utf8_normalize_kc()
Normalizes UTF-8 via Compatibility Decomposition then Canonical Composition.
utf8_normalize_kc(string $string) : string
Parameters
- $string : string
-
The string
Return values
string —The composed version of $string
utf8_normalize_kc_casefold()
Casefolds UTF-8 via Compatibility Composition Casefolding.
utf8_normalize_kc_casefold(string $string) : string
Used by idn_to_ascii polyfill in Subs-Compat.php
Parameters
- $string : string
-
The string
Return values
string —The casefolded version of $string
utf8_is_normalized()
Checks whether a string is already normalized to a given form.
utf8_is_normalized(string|array<string|int, mixed> $string, string $form) : bool
Parameters
- $string : string|array<string|int, mixed>
-
A string of UTF-8 characters.
- $form : string
-
One of 'd', 'c', 'kd', 'kc', or 'kc_casefold'
Return values
bool —Whether the string is already normalized to the given form.
utf8_sanitize_invisibles()
Helper function for sanitize_chars() that deals with invisible characters.
utf8_sanitize_invisibles(string $string, int $level, string $substitute) : string
This function deals with control characters, private use characters, non-characters, and characters that are invisible by definition in the Unicode standard. It does not deal with characters that are supposed to be visible according to the Unicode standard, and makes no attempt to compensate for possibly incomplete Unicode support in text rendering engines on client devices.
Parameters
- $string : string
-
The string to sanitize.
- $level : int
-
Controls how invisible formatting characters are handled. 0: Allow valid formatting characters. Use for sanitizing text in posts. 1: Allow necessary formatting characters. Use for sanitizing usernames. 2: Disallow all formatting characters. Use for internal comparisions only, such as in the word censor, search contexts, etc.
- $substitute : string
-
Replacement string for the invalid characters.
Return values
string —The sanitized string.
fetch_web_data()
Get the contents of a URL, irrespective of allow_url_fopen.
fetch_web_data(string $url[, string $post_data = [] ][, bool $keep_alive = false ]) : string|false
- reads the contents of an http or ftp address and returns the page in a string
- will accept up to 3 page redirections (redirectio_level in the function call is private)
- if post_data is supplied, the value and length is posted to the given url as form data
- URL must be supplied in lowercase
Parameters
- $url : string
-
The URL
- $post_data : string = []
-
The data to post to the given URL
- $keep_alive : bool = false
-
Whether to send keepalive info
Return values
string|false —The fetched data or false on failure
fetch_alerts()
Fetch the alerts a member currently has.
fetch_alerts(int $memID[, mixed $to_fetch = false ][, array<string|int, mixed> $limit = 0 ][, array<string|int, mixed> $offset = 0 ][, bool $with_avatar = false ][, bool $show_links = false ]) : array<string|int, mixed>
Parameters
- $memID : int
-
The ID of the member.
- $to_fetch : mixed = false
-
Alerts to fetch: true/false for all/unread, or a list of one or more IDs.
- $limit : array<string|int, mixed> = 0
-
Maximum number of alerts to fetch (0 for no limit).
- $offset : array<string|int, mixed> = 0
-
Number of alerts to skip for pagination. Ignored if $to_fetch is a list of IDs.
- $with_avatar : bool = false
-
Whether to load the avatar of the alert sender.
- $show_links : bool = false
-
Whether to show links in the constituent parts of the alert meessage.
Return values
array<string|int, mixed> —An array of information about the fetched alerts.
alert_count()
Counts how many alerts a user has - either unread or all depending on $unread We can't use db_num_rows here, as we have to determine what boards the user can see Possibly in future versions as database support for json is mainstream, we can simplify this.
alert_count(int $memID[, bool $unread = false ]) : int
Parameters
- $memID : int
-
The user ID.
- $unread : bool = false
-
Whether to only count unread alerts.
Return values
int —The number of requested alerts
alert_mark()
Marks a group of alerts as un/read
alert_mark(array<string|int, mixed>|int $members, array<string|int, mixed>|int $to_mark, bool|int $read) : int
Parameters
- $members : array<string|int, mixed>|int
-
The user IDs.
- $to_mark : array<string|int, mixed>|int
- $read : bool|int
-
To mark as read or unread, 1 for read, 0 or any other value different than 1 for unread.
Return values
int —How many alerts remain unread
alert_delete()
Deletes a single or a group of alerts by ID
alert_delete(int|array<string|int, mixed> $ids[, int|array<string|int, mixed> $members = [] ]) : int|null
Parameters
- $ids : int|array<string|int, mixed>
- $members : int|array<string|int, mixed> = []
Return values
int|null —If the $memID param is set, returns the new amount of unread alerts.
alert_purge()
Deletes all the alerts that a user has already read.
alert_purge([int $memID = 0 ][, int $before = 0 ]) : void
Parameters
- $memID : int = 0
-
The user ID. Defaults to the current user's ID.
- $before : int = 0
automanage_attachments_check_directory()
Check if the current directory is still valid or not.
automanage_attachments_check_directory() : bool|null
If not creates the new directory
Return values
bool|null —False if any error occurred
automanage_attachments_create_directory()
Creates a directory
automanage_attachments_create_directory(string $updir) : bool
Parameters
- $updir : string
-
The directory to be created
Return values
bool —False on errors
automanage_attachments_by_space()
Called when a directory space limit is reached.
automanage_attachments_by_space() : bool|null
Creates a new directory and increments the directory suffix number.
Return values
bool|null —False on errors, true if successful, nothing if auto-management of attachments is disabled
processAttachments()
Moves an attachment to the proper directory and set the relevant data into $_SESSION['temp_attachments']
processAttachments() : void
attachmentChecks()
Performs various checks on an uploaded file.
attachmentChecks(int $attachID) : bool
- Requires that $_SESSION['temp_attachments'][$attachID] be properly populated.
Parameters
- $attachID : int
-
The ID of the attachment
Return values
bool —Whether the attachment is OK
createAttachment()
Create an attachment, with the given array of parameters.
createAttachment(array<string|int, mixed> &$attachmentOptions) : bool
- Adds any additional or missing parameters to $attachmentOptions.
- Renames the temporary file.
- Creates a thumbnail if the file is an image and the option enabled.
Parameters
- $attachmentOptions : array<string|int, mixed>
-
An array of attachment options
Return values
bool —Whether the attachment was created successfully
assignAttachments()
Assigns the given attachments to the given message ID.
assignAttachments([mixed $attachIDs = [] ][, mixed $msgID = 0 ]) : bool
Parameters
- $attachIDs : mixed = []
-
array of attachment IDs to assign.
- $msgID : mixed = 0
-
integer the message ID.
Return values
bool —false on error or missing params.
ApproveAttachments()
Approve an attachment, or maybe even more - no permission check!
ApproveAttachments(array<string|int, mixed> $attachments) : int|null
Parameters
- $attachments : array<string|int, mixed>
-
The IDs of the attachments to approve
Return values
int|null —Returns 0 if the operation failed, otherwise returns nothing
parseAttachBBC()
Gets an attach ID and tries to load all its info.
parseAttachBBC([int $attachID = 0 ]) : mixed
Parameters
- $attachID : int = 0
-
the attachment ID to load info from.
Return values
mixed —If succesful, it will return an array of loaded data. String, most likely a $txt key if there was some error.
getAttachMsgInfo()
Gets all needed message data associated with an attach ID
getAttachMsgInfo(int $attachID) : array<string|int, mixed>
Parameters
- $attachID : int
-
the attachment ID to load info from.
Return values
array<string|int, mixed>loadAttachmentContext()
This loads an attachment's contextual data including, most importantly, its size if it is an image.
loadAttachmentContext(int $id_msg, array<string|int, mixed> $attachments) : array<string|int, mixed>
It requires the view_attachments permission to calculate image size. It attempts to keep the "aspect ratio" of the posted image in line, even if it has to be resized by the max_image_width and max_image_height settings.
Parameters
- $id_msg : int
-
ID of the post to load attachments for
- $attachments : array<string|int, mixed>
-
An array of already loaded attachments. This function no longer depends on having $topic declared, thus, you need to load the actual topic ID for each attachment.
Return values
array<string|int, mixed> —An array of attachment info
prepareAttachsByMsg()
prepare the Attachment api for all messages
prepareAttachsByMsg(array<string|int, mixed> $msgIDs) : void
Parameters
- $msgIDs : array<string|int, mixed>
getAttachmentFilename()
Backward compatibility only.
getAttachmentFilename(string $filename, int $attachment_id[, string|null $dir = null ][, bool $new = false ][, string $file_hash = '' ]) : string
New code should use Attachment::getFilePath() or Attachment::createHash() to get whichever type of output is desired for a given situation.
Get an attachment's encrypted filename. If $new is true, won't check for file existence.
This currently returns the hash if new, and the full filename otherwise, which is very messy. And of course everything that calls this function relies on that behavior and works around it. :P
Parameters
- $filename : string
-
The name of the file. (Ignored.)
- $attachment_id : int
-
The ID of the attachment.
- $dir : string|null = null
-
Which directory it should be in. (Ignored.)
- $new : bool = false
-
Whether this is a new attachment.
- $file_hash : string = ''
-
The file hash. (Ignored.)
Return values
string —A hash or the path to the file.
get_signature_allowed_bbc_tags()
Return an array with allowed bbc tags for signatures, that can be passed to parse_bbc().
get_signature_allowed_bbc_tags() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array containing allowed tags for signatures, or an empty array if all tags are allowed.
highlight_php_code()
Highlight any code.
highlight_php_code(string $code) : string
Uses PHP's highlight_string() to highlight PHP syntax does special handling to keep the tabs in the code available. used to parse PHP code from inside [code] and [php] tags.
Parameters
- $code : string
-
The code
Return values
string —The code with highlighted HTML.
parse_bbc()
Parse bulletin board code in a string, as well as smileys optionally.
parse_bbc(string|bool $message[, bool $smileys = true ][, string $cache_id = '' ][, array<string|int, mixed> $parse_tags = [] ]) : string
- only parses bbc tags which are not disabled in disabledBBC.
- handles basic HTML, if enablePostHTML is on.
- caches the from/to replace regular expressions so as not to reload them every time a string is parsed.
- only parses smileys if smileys is true.
- does nothing if the enableBBC setting is off.
- uses the cache_id as a unique identifier to facilitate any caching it may do.
- returns the modified message.
Parameters
- $message : string|bool
-
The message. When a empty string, nothing is done. When false we provide a list of BBC codes available. When a string, the message is parsed and bbc handled.
- $smileys : bool = true
-
Whether to parse smileys as well
- $cache_id : string = ''
-
The cache ID
- $parse_tags : array<string|int, mixed> = []
-
If set, only parses these tags rather than all of them
Return values
string —The parsed message
parseSmileys()
Parse smileys in the passed message.
parseSmileys(string &$message) : void
The smiley parsing function which makes pretty faces appear :). If custom smiley sets are turned off by smiley_enable, the default set of smileys will be used. These are specifically not parsed in code tags [url=mailto:Dad@blah.com] Caches the smileys from the database or array in memory. Doesn't return anything, but rather modifies message directly.
Parameters
- $message : string
-
The message to parse smileys in
html_to_bbc()
Converts HTML to BBC As of SMF 2.1, only used by ManageBoards.php (and possibly mods)
html_to_bbc(string $string) : string
Parameters
- $string : string
Return values
string —The text with html converted to bbc
loadBoard()
Check for moderators and see if they have access to the board.
loadBoard() : array<string|int, mixed>
What it does:
- sets up the $board_info array for current board information.
- if cache is enabled, the $board_info array is stored in cache.
- redirects to appropriate post if only message id is requested.
- is only used when inside a topic or board.
- determines the local moderators for the board.
- adds group id 3 if the user is a local moderator for the board they are in.
- prevents access if user is not in proper group nor a local moderator of the board.
Return values
array<string|int, mixed>markBoardsRead()
Mark a board or multiple boards read.
markBoardsRead(int|array<string|int, mixed> $boards[, bool $unread = false ]) : void
Parameters
- $boards : int|array<string|int, mixed>
-
The ID of a single board or an array of boards
- $unread : bool = false
-
Whether we're marking them as unread
getMsgMemberID()
Get the id_member associated with the specified message.
getMsgMemberID(int $messageID) : int
Parameters
- $messageID : int
-
The ID of the message
Return values
int —The ID of the member associated with that post
modifyBoard()
Modify the settings and position of a board.
modifyBoard(int $board_id, array<string|int, mixed> &$boardOptions) : void
Used by ManageBoards.php to change the settings of a board.
Parameters
- $board_id : int
-
The ID of the board
- $boardOptions : array<string|int, mixed>
-
An array of options related to the board
createBoard()
Create a new board and set its properties and position.
createBoard(array<string|int, mixed> $boardOptions) : int
Allows (almost) the same options as the modifyBoard() function. With the option inherit_permissions set, the parent board permissions will be inherited.
Parameters
- $boardOptions : array<string|int, mixed>
-
An array of information for the new board
Return values
int —The ID of the new board
deleteBoards()
Remove one or more boards.
deleteBoards(array<string|int, mixed> $boards_to_remove[, int $moveChildrenTo = null ]) : void
Allows to move the children of the board before deleting it if moveChildrenTo is set to null, the child boards will be deleted. Deletes:
- all topics that are on the given boards;
- all information that's associated with the given boards; updates the statistics to reflect the new situation.
Parameters
- $boards_to_remove : array<string|int, mixed>
-
The boards to remove
- $moveChildrenTo : int = null
-
The ID of the board to move the child boards to (null to remove the child boards, 0 to make them a top-level board)
reorderBoards()
Put all boards in the right order and sorts the records of the boards table.
reorderBoards() : void
Used by modifyBoard(), deleteBoards(), modifyCategory(), and deleteCategories() functions
fixChildren()
Fixes the children of a board by setting their child_levels to new values.
fixChildren(int $parent, int $newLevel, int $newParent) : void
Used when a board is deleted or moved, to affect its children.
Parameters
- $parent : int
-
The ID of the parent board
- $newLevel : int
-
The new child level for each of the child boards
- $newParent : int
-
The ID of the new parent board
sortBoards()
Takes a board array and sorts it
sortBoards(array<string|int, mixed> &$boards) : void
Parameters
- $boards : array<string|int, mixed>
-
The boards
getBoardModerators()
Returns the given board's moderators, with their names and links
getBoardModerators(array<string|int, mixed> $boards) : array<string|int, mixed>
Parameters
- $boards : array<string|int, mixed>
-
The boards to get moderators of
Return values
array<string|int, mixed> —An array containing information about the moderators of each board
getBoardModeratorGroups()
Returns board's moderator groups with their names and link
getBoardModeratorGroups(array<string|int, mixed> $boards) : array<string|int, mixed>
Parameters
- $boards : array<string|int, mixed>
-
The boards to get moderator groups of
Return values
array<string|int, mixed> —An array containing information about the groups assigned to moderate each board
isChildOf()
Returns whether the child board id is actually a child of the parent (recursive).
isChildOf(int $child, int $parent) : bool
Parameters
- $child : int
-
The ID of the child board
- $parent : int
-
The ID of a parent board
Return values
bool —Whether the specified child board is actually a child of the specified parent board.
getBoardParents()
Get all parent boards (requires first parent as parameter) It finds all the parents of id_parent, and that board itself.
getBoardParents(int $id_parent) : array<string|int, mixed>
Additionally, it detects the moderators of said boards.
Parameters
- $id_parent : int
-
The ID of the parent board
Return values
array<string|int, mixed> —An array of information about the boards found.
detectBrowser()
Loads information about what browser the user is viewing with and places it in $context - uses the class from {@link Class-BrowserDetect.php}
detectBrowser() : void
isBrowser()
Are we using this browser?
isBrowser(string $browser) : bool
Wrapper function for detectBrowser
Parameters
- $browser : string
-
The browser we are checking for.
Return values
bool —Whether or not the current browser is what we're looking for
modifyCategory()
Edit the position and properties of a category.
modifyCategory(int $category_id, array<string|int, mixed> $catOptions) : void
general function to modify the settings and position of a category. used by ManageBoards.php to change the settings of a category.
Parameters
- $category_id : int
-
The ID of the category
- $catOptions : array<string|int, mixed>
-
An array containing data and options related to the category
createCategory()
Create a new category.
createCategory(array<string|int, mixed> $catOptions) : mixed
general function to create a new category and set its position. allows (almost) the same options as the modifyCat() function. returns the ID of the newly created category.
Parameters
- $catOptions : array<string|int, mixed>
-
An array of data and settings related to the new category. Should have at least 'cat_name' and can also have 'cat_desc', 'move_after' and 'is_collapsable'
deleteCategories()
Remove one or more categories.
deleteCategories(array<string|int, mixed> $categories[, int $moveBoardsTo = null ]) : void
general function to delete one or more categories. allows to move all boards in the categories to a different category before deleting them. if moveChildrenTo is set to null, all boards inside the given categories will be deleted. deletes all information that's associated with the given categories. updates the statistics to reflect the new situation.
Parameters
- $categories : array<string|int, mixed>
-
The IDs of the categories to delete
- $moveBoardsTo : int = null
-
The ID of the category to move any boards to or null to delete the boards
sortCategories()
Takes a category array and sorts it
sortCategories(array<string|int, mixed> &$categories) : void
Parameters
- $categories : array<string|int, mixed>
-
The categories
getTreeOrder()
Tries to load up the entire board order and category very very quickly Returns an array with two elements, cats and boards
getTreeOrder() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of categories and boards
getBoardTree()
Load a lot of useful information regarding the boards and categories.
getBoardTree() : void
The information retrieved is stored in globals: $boards properties of each board. $boardList a list of boards grouped by category ID. $cat_tree properties of each category.
recursiveBoards()
Recursively get a list of boards.
recursiveBoards(mixed &$list, mixed &$tree) : void
Used by getBoardTree
Parameters
- $list : mixed
- $tree : mixed
setLoginCookie()
Sets the SMF-style login cookie and session based on the id_member and password passed.
setLoginCookie(int $cookie_length, int $id[, string $password = '' ]) : void
- password should be already encrypted with the cookie salt.
- logs the user out if id_member is zero.
- sets the cookie and session to last the number of seconds specified by cookie_length, or ends them if cookie_length is less than 0.
- when logging out, if the globalCookies setting is enabled, attempts to clear the subdomain's cookie too.
Parameters
- $cookie_length : int
-
How many seconds the cookie should last. If negative, forces logout.
- $id : int
-
The ID of the member to set the cookie for
- $password : string = ''
-
The hashed password
setTFACookie()
Sets Two Factor Auth cookie
setTFACookie(int $cookie_length, int $id, string $secret) : void
Parameters
- $cookie_length : int
-
How long the cookie should last, in seconds
- $id : int
-
The ID of the member
- $secret : string
-
Should be a salted secret using hash_salt
url_parts()
Get the domain and path for the cookie - normally, local and global should be the localCookies and globalCookies settings, respectively.
url_parts(bool $local, bool $global) : array<string|int, mixed>
- uses boardurl to determine these two things.
Parameters
- $local : bool
-
Whether we want local cookies
- $global : bool
-
Whether we want global cookies
Return values
array<string|int, mixed> —An array to set the cookie on with domain and path in it, in that order
hash_salt()
Hashes password with salt and authentication secret. This is solely used for cookies.
hash_salt(string $password, string $salt) : string
Parameters
- $password : string
-
The password
- $salt : string
-
The salt
Return values
string —The hashed password
smf_setcookie()
A wrapper for setcookie that gives integration hook access to it
smf_setcookie(string $name[, string $value = '' ][, int $expires = 0 ][, string $path = '' ][, string $domain = '' ][, bool|null $secure = null ][, bool $httponly = true ][, string|null $samesite = null ]) : void
Parameters
- $name : string
- $value : string = ''
-
= ''
- $expires : int = 0
-
= 0
- $path : string = ''
-
= ''
- $domain : string = ''
-
= ''
- $secure : bool|null = null
-
= null
- $httponly : bool = true
-
= true
- $samesite : string|null = null
-
= null
DeleteDraft()
Deletes one or many drafts from the DB Validates the drafts are from the user is supplied an array of drafts will attempt to remove all of them
DeleteDraft(int $id_draft[, bool $check = true ]) : bool
Parameters
- $id_draft : int
-
The ID of the draft to delete
- $check : bool = true
-
Whether or not to check that the draft belongs to the current user
Return values
bool —False if it couldn't be deleted (doesn't return anything otherwise)
ShowDrafts()
Loads in a group of drafts for the user of a given type (0/posts, 1/pm's) loads a specific draft for forum use if selected.
ShowDrafts(int $member_id[, bool|inr $reply_to = 0 ][, int $draft_type = 0 ]) : bool
Used in the posting screens to allow draft selection Will load a draft if selected is supplied via post
Parameters
- $member_id : int
-
ID of the member to show drafts for.
- $reply_to : bool|inr = 0
-
ID of the topic or PM being replied to.
- $draft_type : int = 0
-
The type of drafts to show: 0 = post, 1 = PM.
Return values
bool —False if the drafts couldn't be loaded, nothing otherwise
showProfileDrafts()
Show all drafts of a given type by the current user Uses the showdraft template Allows for the deleting and loading/editing of drafts
showProfileDrafts(int $memID[, int $draft_type = 0 ]) : void
Parameters
- $memID : int
- $draft_type : int = 0
create_control_richedit()
Creates a box that can be used for richedit stuff like BBC, Smileys etc.
create_control_richedit(array<string|int, mixed> $options) : Editor
Parameters
- $options : array<string|int, mixed>
Return values
EditorgetMessageIcons()
Retrieves a list of message icons.
getMessageIcons(int $board_id) : array<string|int, mixed>
- Based on the settings, the array will either contain a list of default message icons or a list of custom message icons retrieved from the database.
- The board_id is needed for the custom message icons (which can be set for each board individually).
Parameters
- $board_id : int
-
The ID of the board
Return values
array<string|int, mixed> —An array of info about available icons
smf_error_handler()
Handler for standard error messages, standard PHP error handler replacement.
smf_error_handler(int $error_level, string $error_string, string $file, int $line) : void
It dies with fatal_error() if the error_level matches with error_reporting.
Parameters
log_error()
Log an error, if the error logging is enabled.
log_error(string $error_message[, string|bool $error_type = 'general' ][, string $file = '' ][, int $line = 0 ]) : string
filename and line should be FILE and LINE, respectively. Example use: die(log_error($msg));
Parameters
- $error_message : string
-
The message to log
- $error_type : string|bool = 'general'
-
The type of error
- $file : string = ''
-
The name of the file where this error occurred
- $line : int = 0
-
The line where the error occurred
Return values
string —The message that was logged
fatal_error()
An irrecoverable error. This function stops execution and displays an error message.
fatal_error(string $error[, string|bool $log = 'general' ][, int $status = 500 ]) : void
It logs the error message if $log is specified.
Parameters
- $error : string
-
The error message
- $log : string|bool = 'general'
-
= 'general' What type of error to log this as (false to not log it))
- $status : int = 500
-
The HTTP status code associated with this error
fatal_lang_error()
Shows a fatal error with a message stored in the language file.
fatal_lang_error(string $error[, string|false $log = 'general' ][, array<string|int, mixed> $sprintf = [] ][, int $status = 403 ]) : mixed
This function stops execution and displays an error message by key.
- uses the string with the error_message_key key.
- logs the error in the forum's default language while displaying the error message in the user's language.
- uses Errors language file and applies the $sprintf information if specified.
- the information is logged if log is specified.
Parameters
- $error : string
-
The error message
- $log : string|false = 'general'
-
The type of error, or false to not log it
- $sprintf : array<string|int, mixed> = []
-
An array of data to be sprintf()'d into the specified message
- $status : int = 403
-
= false The HTTP status code associated with this error
display_maintenance_message()
Show a message for the (full block) maintenance mode.
display_maintenance_message() : void
It shows a complete page independent of language files or themes. It is used only if $maintenance = 2 in Settings.php. It stops further execution of the script.
display_db_error()
Show an error message for the connection problems.
display_db_error() : void
It shows a complete page independent of language files or themes. It is used only if there's no way to connect to the database. It stops further execution of the script.
display_loadavg_error()
Show an error message for load average blocking problems.
display_loadavg_error() : void
It shows a complete page independent of language files or themes. It is used only if the load averages are too high to continue execution. It stops further execution of the script.
insertEvent()
Consolidating the various INSERT statements into this function.
insertEvent(array<string|int, mixed> $eventOptions) : void
Inserts the passed event information into the calendar table. Allows to either set a time span (in days) or an end_date. Does not check any permissions of any sort.
Parameters
- $eventOptions : array<string|int, mixed>
-
An array of event options ('title', 'span', 'start_date', 'end_date', etc.)
modifyEvent()
modifies an event.
modifyEvent(int $event_id, array<string|int, mixed> &$eventOptions) : void
allows to either set a time span (in days) or an end_date. does not check any permissions of any sort.
Parameters
- $event_id : int
-
The ID of the event
- $eventOptions : array<string|int, mixed>
-
An array of event information
removeEvent()
Remove an event removes an event.
removeEvent(int $event_id) : void
does no permission checks.
Parameters
- $event_id : int
-
The ID of the event to remove
cache_getMembergroupList()
Retrieve a list of (visible) membergroups used by the cache.
cache_getMembergroupList() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of information about the cache
call_integration_hook()
Process functions of an integration hook.
call_integration_hook(string $name[, array<string|int, mixed> $parameters = [] ]) : array<string|int, mixed>
calls all functions of the given hook. supports static class method calls.
Parameters
- $name : string
-
The hook name
- $parameters : array<string|int, mixed> = []
-
An array of parameters this hook implements
Return values
array<string|int, mixed> —The results of the functions
add_integration_function()
Add a function for integration hook.
add_integration_function(string $name, string $function[, bool $permanent = true ][, string $file = '' ][, bool $object = false ]) : void
Does nothing if the function is already added. Cleans up enabled/disabled variants before taking requested action.
Parameters
- $name : string
-
The complete hook name.
- $function : string
-
The function name. Can be a call to a method via Class::method.
- $permanent : bool = true
-
If true, updates the value in settings table.
- $file : string = ''
-
The file. Must include one of the following wildcards: $boarddir, $sourcedir, $themedir, example: $sourcedir/Test.php
- $object : bool = false
-
Indicates if your class will be instantiated when its respective hook is called. If true, your function must be a method.
remove_integration_function()
Remove an integration hook function.
remove_integration_function(string $name, string $function[, bool $permanent = true ][, string $file = '' ][, bool $object = false ]) : void
Removes the given function from the given hook. Does nothing if the function is not available. Cleans up enabled/disabled variants before taking requested action.
Parameters
- $name : string
-
The complete hook name.
- $function : string
-
The function name. Can be a call to a method via Class::method.
- $permanent : bool = true
-
Irrelevant for the function itself but need to declare it to match
- $file : string = ''
-
The filename. Must include one of the following wildcards: $boarddir, $sourcedir, $themedir, example: $sourcedir/Test.php
- $object : bool = false
-
Indicates if your class will be instantiated when its respective hook is called. If true, your function must be a method.
Tags
ip2range()
Convert a single IP to a ranged IP.
ip2range(string $addr) : array<string|int, mixed>
internal function used to convert a user-readable format to a format suitable for the database.
Parameters
- $addr : string
Return values
array<string|int, mixed> —An array of IP parts
range2ip()
Convert a range of given IP number into a single string.
range2ip(array<string|int, mixed> $low, array<string|int, mixed> $high) : string
It's practically the reverse function of ip2range().
Parameters
- $low : array<string|int, mixed>
-
The low end of the range in IPv4 format
- $high : array<string|int, mixed>
-
The high end of the range in IPv4 format
Tags
Return values
string —A string indicating the range
isValidIP()
Check the given String if he is a valid IPv4 or IPv6 return true or false
isValidIP(string $ip) : bool
Parameters
- $ip : string
Return values
boolisValidIPv6()
Validates a IPv6 address. returns true if it is ipv6.
isValidIPv6(string $ip) : bool
Parameters
- $ip : string
-
The ip address to be validated
Return values
bool —Whether the specified IP is a valid IPv6 address
host_from_ip()
Lookup an IP; try shell_exec first because we can do a timeout on it.
host_from_ip(string $ip) : string
Parameters
- $ip : string
-
The IP to get the hostname from
Return values
string —The hostname
inet_ptod()
Converts an IP address into binary
inet_ptod(string $ip) : string|false
Parameters
- $ip : string
Return values
string|false —The IP address in binary or false
inet_dtop()
Converts a binary version of an IP address into a readable format
inet_dtop(string $ip) : string|false
Parameters
- $ip : string
Return values
string|false —The IP address in presentation format or false on error
expandIPv6()
Expands a IPv6 address to its full form.
expandIPv6(string $ip[, bool $return_bool_if_invalid = true ]) : string|bool
Parameters
- $ip : string
- $return_bool_if_invalid : bool = true
Return values
string|bool —The expanded IPv6 address or false if $strict_check is true and the result isn't valid
matchIPtoCIDR()
Detect if a IP is in a CIDR address - returns true or false
matchIPtoCIDR(string $ip_address, string $cidr_address) : bool
Parameters
- $ip_address : string
-
IP address to check
- $cidr_address : string
-
CIDR address to verify
Return values
bool —Whether the IP matches the CIDR
createList()
Create a new list
createList(array<string|int, mixed> $options) : ItemList
Parameters
- $options : array<string|int, mixed>
Return values
ItemListloadLanguage()
Load a language file. Tries the current and default themes as well as the user and global languages.
loadLanguage(string $template_name[, string $lang = '' ][, bool $fatal = true ][, bool $force_reload = false ]) : string
Parameters
- $template_name : string
-
The name of a template file
- $lang : string = ''
-
A specific language to load this file from
- $fatal : bool = true
-
Whether to die with an error if it can't be loaded
- $force_reload : bool = false
-
Whether to load the file again if it's already loaded
Return values
string —The language actually loaded.
getLanguages()
Attempt to reload our known languages.
getLanguages([bool $use_cache = true ]) : array<string|int, mixed>
It will try to choose only utf8 or non-utf8 languages.
Parameters
- $use_cache : bool = true
-
Whether or not to use the cache
Return values
array<string|int, mixed> —An array of information about available languages
censorText()
Replace all vulgar words with respective proper words. (substring or whole words..) What this function does: - it censors the passed string.
censorText(string &$text[, bool $force = false ]) : string
- if the theme setting allow_no_censored is on, and the theme option show_no_censored is enabled, does not censor, unless force is also set.
- it caches the list of censored words to reduce parsing.
Parameters
- $text : string
-
The text to censor
- $force : bool = false
-
Whether to censor the text regardless of settings
Return values
string —The censored text
tokenTxtReplace()
tokenTxtReplace([string $string = '' ]) : string
Parameters
- $string : string = ''
Return values
stringsentence_list()
Concatenates an array of strings into a grammatically correct sentence list
sentence_list(array<string|int, mixed> $list) : string
Uses formats defined in the language files to build the list appropropriately for the currently loaded language.
Parameters
- $list : array<string|int, mixed>
-
An array of strings to concatenate.
Return values
string —The localized sentence list.
comma_format()
- Formats a number.
comma_format(float $number[, int|null $decimals = null ]) : string
- uses the format of number_format to decide how to format the number. for example, it might display "1 234,50".
- caches the formatting data from the setting for optimization.
Parameters
- $number : float
-
A number
- $decimals : int|null = null
Return values
string —A formatted number
writeLog()
Put this user in the online log.
writeLog([bool $force = false ]) : void
Parameters
- $force : bool = false
-
Whether to force logging the data
logAction()
This function logs an action to the database. It is a thin wrapper around {@link logActions()}.
logAction(string $action[, array<string|int, mixed> $extra = [] ][, string $log_type = 'moderate' ]) : int
Parameters
- $action : string
-
A code for the report; a list of such strings can be found in Modlog.{language}.php (modlog_ac_ strings)
- $extra : array<string|int, mixed> = []
-
An associated array of parameters for the item being logged. Typically this will include 'topic' for the topic's id.
- $log_type : string = 'moderate'
-
A string reflecting the type of log.
Tags
Return values
int —The ID of the row containing the logged data
logActions()
Log changes to the forum, such as moderation events or administrative changes. This behaves just like {@link logAction()} in SMF 2.0, except that it is designed to log multiple actions at once.
logActions(array<string|int, mixed> $logs) : int
SMF uses three log types:
user
for actions executed that aren't related to moderation (e.g. signature or other changes from the profile);moderate
for moderation actions (e.g. topic changes);admin
for administrative actions.
Parameters
- $logs : array<string|int, mixed>
-
An array of log data
Return values
int —The last logged ID
updateStats()
Update some basic statistics.
updateStats(string $type[, mixed $parameter1 = null ][, mixed $parameter2 = null ]) : void
'member' statistic updates the latest member, the total member count, and the number of unapproved members. 'member' also only counts approved members when approval is on, but is much more efficient with it off.
'message' changes the total number of messages, and the highest message id by id_msg - which can be parameters 1 and 2, respectively.
'topic' updates the total number of topics, or if parameter1 is true simply increments them.
'subject' updates the log_search_subjects in the event of a topic being moved, removed or split. parameter1 is the topicid, parameter2 is the new subject
'postgroups' case updates those members who match condition's post-based membergroups in the database (restricted by parameter1).
Parameters
- $type : string
-
Stat type - can be 'member', 'message', 'topic', 'subject' or 'postgroups'
- $parameter1 : mixed = null
-
A parameter for updating the stats
- $parameter2 : mixed = null
-
A 2nd parameter for updating the stats
trackStats()
Track Statistics.
trackStats([array<string|int, mixed> $stats = [] ]) : bool
Caches statistics changes, and flushes them if you pass nothing. If '+' is used as a value, it will be incremented. It does not actually commit the changes until the end of the page view. It depends on the trackStats setting.
Parameters
- $stats : array<string|int, mixed> = []
-
An array of data
Return values
bool —Whether or not the info was updated successfully
trackStatsUsersOnline()
Check if the number of users online is a record and store it.
trackStatsUsersOnline(int $total_users_online) : void
Parameters
- $total_users_online : int
-
The total number of members online
getMembersOnlineStats()
Retrieve a list and several other statistics of the users currently online.
getMembersOnlineStats(array<string|int, mixed> $membersOnlineOptions) : array<string|int, mixed>
Used by the board index and SSI. Also returns the membergroups of the users that are currently online. (optionally) hides members that chose to hide their online presence.
Parameters
- $membersOnlineOptions : array<string|int, mixed>
-
An array of options for the list
Return values
array<string|int, mixed> —An array of information about the online users
displayDebug()
This function shows the debug information tracked when $db_show_debug = true in Settings.php
displayDebug() : void
sendMail()
This function sends an email to the specified recipient(s).
sendMail(array<string|int, mixed> $to, string $subject, string $message[, string $from = null ][, string $message_id = null ][, bool $send_html = false ][, int $priority = 3 ][, bool $hotmail_fix = null ][, bool $is_private = false ]) : bool
It uses the mail_type settings and webmaster_email variable.
Parameters
- $to : array<string|int, mixed>
-
The email(s) to send to
- $subject : string
-
Email subject, expected to have entities, and slashes, but not be parsed
- $message : string
-
Email body, expected to have slashes, no htmlentities
- $from : string = null
-
The address to use for replies
- $message_id : string = null
-
If specified, it will be used as local part of the Message-ID header.
- $send_html : bool = false
-
Whether or not the message is HTML vs. plain text
- $priority : int = 3
-
The priority of the message
- $hotmail_fix : bool = null
-
Whether to apply the "hotmail fix"
- $is_private : bool = false
-
Whether this is private
Return values
bool —Whether ot not the email was sent properly.
AddMailQueue()
Add an email to the mail queue.
AddMailQueue([bool $flush = false ][, array<string|int, mixed> $to_array = [] ][, string $subject = '' ][, string $message = '' ][, string $headers = '' ][, bool $send_html = false ][, int $priority = 3 ][, bool $is_private = false ]) : bool
Parameters
- $flush : bool = false
-
Whether to flush the queue
- $to_array : array<string|int, mixed> = []
-
An array of recipients
- $subject : string = ''
-
The subject of the message
- $message : string = ''
-
The message
- $headers : string = ''
-
The headers
- $send_html : bool = false
-
Whether to send in HTML format
- $priority : int = 3
-
The priority
- $is_private : bool = false
-
Whether this is private
Return values
bool —Whether the message was added
reduceQueue()
reduceQueue([bool|int $number = false ][, bool $override_limit = false ][, bool $force_send = false ]) : bool
Parameters
- $number : bool|int = false
- $override_limit : bool = false
- $force_send : bool = false
Return values
boolmimespecialchars()
Prepare text strings for sending as email body or header.
mimespecialchars(string $string[, bool $with_charset = true ][, bool $hotmail_fix = false ][, string $line_break = "
" ][, string $custom_charset = null ]) : array<string|int, mixed>
In case there are higher ASCII characters in the given string, this function will attempt the transport method 'quoted-printable'. Otherwise the transport method '7bit' is used.
Parameters
- $string : string
-
The string
- $with_charset : bool = true
-
Whether we're specifying a charset ($custom_charset must be set here)
- $hotmail_fix : bool = false
-
Whether to apply the hotmail fix (all higher ASCII characters are converted to HTML entities to assure proper display of the mail)
- $line_break : string = " "
-
The linebreak
- $custom_charset : string = null
-
If set, it uses this character set
Return values
array<string|int, mixed> —An array containing the character set, the converted string and the transport method.
serverParse()
serverParse(string $message, mixed $socket, string $code[, string|null &$response = null ]) : bool
Parameters
- $message : string
- $socket : mixed
- $code : string
- $response : string|null = null
Return values
boolsendNotifications()
Sends a notification to members who have elected to receive emails when things happen to a topic, such as replies are posted.
sendNotifications(array<string|int, mixed> $topics, string $type[, array<string|int, mixed> $exclude = [] ][, array<string|int, mixed> $members_only = [] ]) : mixed
The function automatically finds the subject and its board, and checks permissions for each member who is "signed up" for notifications. It will not send 'reply' notifications more than once in a row. Uses Post language file
Parameters
- $topics : array<string|int, mixed>
-
Represents the topics the action is happening to.
- $type : string
-
Can be any of reply, sticky, lock, unlock, remove, move, merge, and split. An appropriate message will be sent for each.
- $exclude : array<string|int, mixed> = []
-
Members in the exclude array will not be processed for the topic with the same key.
- $members_only : array<string|int, mixed> = []
-
Are the only ones that will be sent the notification if they have it on.
adminNotify()
This simple function gets a list of all administrators and sends them an email to let them know a new member has joined.
adminNotify(string $type, int $memberID[, string $member_name = null ]) : void
Called by registerMember() function in Subs-Members.php. Email is sent to all groups that have the moderate_forum permission. The language set by each member is being used (if available). Uses the Login language file
Parameters
- $type : string
-
The type. Types supported are 'approval', 'activation', and 'standard'.
- $memberID : int
-
The ID of the member
- $member_name : string = null
-
The name of the member (if null, it is pulled from the database)
loadEmailTemplate()
Load a template from EmailTemplates language file.
loadEmailTemplate(string $template[, array<string|int, mixed> $replacements = [] ][, string $lang = '' ][, bool $loadLang = true ]) : array<string|int, mixed>
Parameters
- $template : string
-
The name of the template to load
- $replacements : array<string|int, mixed> = []
-
An array of replacements for the variables in the template
- $lang : string = ''
-
The language to use, if different than the user's current language
- $loadLang : bool = true
-
Whether to load the language file first
Return values
array<string|int, mixed> —An array containing the subject and body of the email template, with replacements made
createMenu()
Create a menu.
createMenu(array<string|int, mixed> $data[, array<string|int, mixed> $options = [] ]) : bool|array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = []
Return values
bool|array<string|int, mixed> —False if nothing to show or an array of info about the selected menu item
destroyMenu()
Delete a menu.
destroyMenu([int|string $id = 'last' ]) : bool|void
Parameters
- $id : int|string = 'last'
Return values
bool|void —False if the menu doesn't exist, nothing otherwise
preparsecode()
Takes a message and parses it, returning nothing.
preparsecode(string &$message[, bool $previewing = false ]) : void
Cleans up links (javascript, etc.) and code/quote sections. Won't convert \n's and a few other things if previewing is true.
Parameters
- $message : string
-
The mesasge
- $previewing : bool = false
-
Whether we're previewing
un_preparsecode()
This is very simple, and just removes things done by preparsecode.
un_preparsecode(string $message) : string
Parameters
- $message : string
-
The message
Return values
stringfixTags()
Fix any URLs posted - ie. remove 'javascript:'.
fixTags(string &$message) : void
Used by preparsecode, fixes links in message and returns nothing.
Parameters
- $message : string
-
The message
fixTag()
Fix a specific class of tag - ie. url with =.
fixTag(string &$message, string $myTag, string $protocols[, bool $embeddedUrl = false ][, bool $hasEqualSign = false ][, bool $hasExtra = false ]) : void
Used by fixTags, fixes a specific tag's links.
Parameters
- $message : string
-
The message
- $myTag : string
-
The tag
- $protocols : string
-
The protocols
- $embeddedUrl : bool = false
-
Whether it can be set to something
- $hasEqualSign : bool = false
-
Whether it is set to something
- $hasExtra : bool = false
-
Whether it can have extra cruft after the begin tag.
createPost()
Create a post, either as new topic (id_topic = 0) or in an existing one.
createPost(array<string|int, mixed> &$msgOptions, array<string|int, mixed> &$topicOptions, array<string|int, mixed> &$posterOptions) : bool
The input parameters of this function assume:
- Strings have been escaped.
- Integers have been cast to integer.
- Mandatory parameters are set.
Parameters
- $msgOptions : array<string|int, mixed>
-
An array of information/options for the post
- $topicOptions : array<string|int, mixed>
-
An array of information/options for the topic
- $posterOptions : array<string|int, mixed>
-
An array of information/options for the poster
Return values
bool —Whether the operation was a success
modifyPost()
Modifying a post.
modifyPost(array<string|int, mixed> &$msgOptions, array<string|int, mixed> &$topicOptions, array<string|int, mixed> &$posterOptions) : bool
..
Parameters
- $msgOptions : array<string|int, mixed>
-
An array of information/options for the post
- $topicOptions : array<string|int, mixed>
-
An array of information/options for the topic
- $posterOptions : array<string|int, mixed>
-
An array of information/options for the poster
Return values
bool —Whether the post was modified successfully
approvePosts()
Approve (or not) some posts... without permission checks.
approvePosts(array<string|int, mixed> $msgs[, bool $approve = true ][, bool $notify = true ]) : bool
..
Parameters
- $msgs : array<string|int, mixed>
-
Array of message ids
- $approve : bool = true
-
Whether to approve the posts (if false, posts are unapproved)
- $notify : bool = true
-
Whether to notify users
Return values
bool —Whether the operation was successful
clearApprovalAlerts()
Upon approval, clear unread alerts.
clearApprovalAlerts(array<string|int, int> $content_ids, string $content_action) : void
Parameters
- $content_ids : array<string|int, int>
-
either id_msgs or id_topics
- $content_action : string
-
will be either 'unapproved_post' or 'unapproved_topic'
updateLastMessages()
Takes an array of board IDs and updates their last messages.
updateLastMessages(array<string|int, mixed> $setboards[, int $id_msg = 0 ]) : bool|null
If the board has a parent, that parent board is also automatically updated. The columns updated are id_last_msg and last_updated. Note that id_last_msg should always be updated using this function, and is not automatically updated upon other changes.
Parameters
- $setboards : array<string|int, mixed>
-
An array of board IDs
- $id_msg : int = 0
-
The ID of the message
Return values
bool|null —Returns false if $setboards is empty for some reason
removeMessage()
Remove a specific message (including permission checks).
removeMessage(int $message[, bool $decreasePostCount = true ]) : bool
Parameters
- $message : int
-
The message id
- $decreasePostCount : bool = true
-
Whether to decrease users' post counts
Return values
bool —Whether the operation succeeded
constructPageIndex()
Constructs a page list.
constructPageIndex(string $base_url, int &$start, int $num_items, int $num_per_page[, bool $short_format = false ][, bool $show_prevnext = true ]) : string
- builds the page list, e.g. 1 ... 6 7 [8] 9 10 ... 15.
- flexible_start causes it to use "url.page" instead of "url;start=page".
- very importantly, cleans up the start value passed, and forces it to be a multiple of num_per_page.
- checks that start is not more than max_value.
- base_url should be the URL without any start parameter on it.
- uses the compactTopicPagesEnable and compactTopicPagesContiguous settings to decide how to display the menu.
an example is available near the function definition. $pageindex = constructPageIndex($scripturl . '?board=' . $board, $_REQUEST['start'], $num_messages, $maxindex, true);
Parameters
- $base_url : string
-
The basic URL to be used for each link.
- $start : int
-
The start position, by reference. If this is not a multiple of the number of items per page, it is sanitized to be so and the value will persist upon the function's return.
- $num_items : int
-
The total number of items you are paginating for.
- $num_per_page : int
-
The number of items to be displayed on a given page. $start will be forced to be a multiple of this value.
- $short_format : bool = false
-
Whether a ;start=x component should be introduced into the URL automatically (see above)
- $show_prevnext : bool = true
-
Whether the Previous and Next links should be shown (should be on only when navigating the list)
Return values
string —The complete HTML of the page index that was requested, formatted by the template.
Vote()
Allow the user to vote.
Vote() : void
It is called to register a vote in a poll. Must be called with a topic and option specified. Requires the poll_vote permission. Upon successful completion of action will direct user back to topic. Accessed via ?action=vote.
Uses Post language file.
LockVoting()
Lock the voting for a poll.
LockVoting() : void
Must be called with a topic specified in the URL. An admin always has over riding permission to lock a poll. If not an admin must have poll_lock_any permission, otherwise must be poll starter with poll_lock_own permission. Upon successful completion of action will direct user back to topic. Accessed via ?action=lockvoting.
EditPoll()
Display screen for editing or adding a poll.
EditPoll() : void
Must be called with a topic specified in the URL. If the user is adding a poll to a topic, must contain the variable 'add' in the url. User must have poll_edit_any/poll_add_any permission for the relevant action, otherwise must be poll starter with poll_edit_own permission for editing, or be topic starter with poll_add_any permission for adding. Accessed via ?action=editpoll.
Uses Post language file. Uses Poll template, main sub-template.
EditPoll2()
Update the settings for a poll, or add a new one.
EditPoll2() : void
Must be called with a topic specified in the URL. The user must have poll_edit_any/poll_add_any permission for the relevant action. Otherwise they must be poll starter with poll_edit_own permission for editing, or be topic starter with poll_add_any permission for adding. In the case of an error, this function will redirect back to EditPoll and display the relevant error message. Upon successful completion of action will direct user back to topic. Accessed via ?action=editpoll2.
RemovePoll()
Remove a poll from a topic without removing the topic.
RemovePoll() : void
Must be called with a topic specified in the URL. Requires poll_remove_any permission, unless it's the poll starter with poll_remove_own permission. Upon successful completion of action will direct user back to topic. Accessed via ?action=removepoll.
profileValidateSignature()
Validate the signature
profileValidateSignature(string &$value) : bool|string
Parameters
- $value : string
-
The new signature
Return values
bool|string —True if the signature passes the checks, otherwise a string indicating what the problem is
profileLoadGroups()
Handles the "manage groups" section of the profile
profileLoadGroups([int|null $id = null ]) : true
Parameters
- $id : int|null = null
Return values
true —Always returns true
loadProfileFields()
This defines every profile field known to man.
loadProfileFields([bool $force_reload = false ][, int|null $id = null ]) : void
Parameters
- $force_reload : bool = false
-
Whether to reload the data
- $id : int|null = null
loadCustomFields()
Load any custom fields for this area... no area means load all, 'summary' loads all public ones.
loadCustomFields(int $id[, string $area = 'summary' ]) : void
Parameters
- $id : int
-
The ID of the member
- $area : string = 'summary'
-
Which area to load fields for
loadThemeOptions()
Loads the theme options for a user
loadThemeOptions(int $id[, bool $defaultSettings = false ]) : void
Parameters
- $id : int
-
The ID of the member
- $defaultSettings : bool = false
-
If true, we are loading default options.
setupProfileContext()
Setup the context for a page load!
setupProfileContext(array<string|int, mixed> $fields, int $id) : void
Parameters
- $fields : array<string|int, mixed>
-
The profile fields to display. Each item should correspond to an item in the $profile_fields array generated by loadProfileFields
- $id : int
makeCustomFieldChanges()
Save any changes to the custom profile fields
makeCustomFieldChanges(int $id, string $area[, bool $sanitize = true ][, bool $return_errors = false ]) : array<string|int, mixed>|null
Parameters
- $id : int
-
The ID of the member
- $area : string
-
The area of the profile these fields are in
- $sanitize : bool = true
-
= true Whether or not to sanitize the data
- $return_errors : bool = false
Return values
array<string|int, mixed>|null —Returns nothing or returns an array of error info if $returnErrors is true
makeThemeChanges()
Make any theme changes that are sent with the profile.
makeThemeChanges(int $id, int $id_theme) : void
Parameters
- $id : int
-
The ID of the user
- $id_theme : int
-
The ID of the theme
cleanRequest()
cleanRequest() : void
is_filtered_request()
Compares existance request variables against an array.
is_filtered_request(array<string|int, mixed> $value_list, string $var) : bool
The input array is associative, where keys denote accepted values
in a request variable denoted by $req_val
. Values can be:
- another associative array where at least one key must be found in the request and their values are accepted request values.
- A scalar value, in which case no furthur checks are done.
Parameters
- $value_list : array<string|int, mixed>
- $var : string
Return values
bool —whether any of the criteria was satisfied
ob_sessrewrite()
Rewrite URLs to include the session ID.
ob_sessrewrite(string $buffer) : string
What it does:
- rewrites the URLs outputted to have the session ID, if the user is not accepting cookies and is using a standard web browser.
- handles rewriting URLs for the queryless URLs option.
- can be turned off entirely by setting $scripturl to an empty string, ''. (it wouldn't work well like that anyway.)
- because of bugs in certain builds of PHP, does not function in versions lower than 4.3.0 - please upgrade if this hurts you.
Parameters
- $buffer : string
-
The unmodified output buffer
Return values
string —The modified buffer
setMemoryLimit()
Helper function to set the system memory to a needed value - If the needed memory is greater than current, will attempt to get more - if in_use is set to true, will also try to take the current memory usage in to account
setMemoryLimit(string $needed[, bool $in_use = false ]) : bool
Parameters
- $needed : string
-
The amount of memory to request, if needed, like 256M
- $in_use : bool = false
-
Set to true to account for current memory usage of the script
Return values
bool —True if we have at least the needed memory
memoryReturnBytes()
Helper function to convert memory string settings to bytes
memoryReturnBytes(string $val) : int
Parameters
- $val : string
-
The byte string, like 256M or 1G
Return values
int —The string converted to a proper integer in bytes
validatePassword()
Checks whether a password meets the current forum rules - called when registering/choosing a password.
validatePassword(string $password, string $username[, array<string|int, mixed> $restrict_in = [] ]) : null|string
- checks the password obeys the current forum settings for password strength.
- if password checking is enabled, will check that none of the words in restrict_in appear in the password.
- returns an error identifier if the password is invalid, or null.
Parameters
- $password : string
-
The desired password
- $username : string
-
The username
- $restrict_in : array<string|int, mixed> = []
-
An array of restricted strings that cannot be part of the password (email address, username, etc.)
Return values
null|string —Null if valid or a string indicating what the problem was
generateValidationCode()
Generate a random validation code.
generateValidationCode() : string
Return values
string —A random validation code
hash_password()
Hashes the user's password
hash_password(string $username, string $password[, int $cost = null ]) : string
Parameters
- $username : string
-
The username. Ignored since 3.0.
- $password : string
-
The unhashed password
- $cost : int = null
-
The cost
Return values
string —The hashed password
hash_verify_password()
Verifies a raw SMF password against the encrypted string
hash_verify_password(string $username, string $password, string $hash) : bool
Parameters
- $username : string
-
The username. Ignored since 3.0.
- $password : string
-
The password
- $hash : string
-
The hashed string
Return values
bool —Whether the hashed password matches the string
hash_benchmark()
Benchmarks the server to figure out an appropriate cost factor (minimum 9)
hash_benchmark([float $hashTime = 0.2 ]) : int
Parameters
- $hashTime : float = 0.2
-
Time to target, in seconds
Return values
int —The cost
checkConfirm()
Check if a specific confirm parameter was given.
checkConfirm(string $action) : bool|string
Parameters
- $action : string
-
The action we want to check against
Return values
bool|string —True if the check passed or a token
checkSubmitOnce()
Check whether a form has been submitted twice.
checkSubmitOnce(string $action[, bool $is_fatal = true ]) : bool|null
Registers a sequence number for a form. Checks whether a submitted sequence number is registered in the current session. Depending on the value of is_fatal shows an error or returns true or false. Frees a sequence number from the stack after it's been checked. Frees a sequence number without checking if action == 'free'.
Parameters
- $action : string
-
The action - can be 'register', 'check' or 'free'
- $is_fatal : bool = true
-
Whether to die with a fatal error
Return values
bool|null —If the action isn't check, returns nothing, otherwise returns whether the check was successful
spamProtection()
This function attempts to protect from spammed messages and the like.
spamProtection(string $error_type[, bool $only_return_result = false ]) : bool
The time taken depends on error_type - generally uses the modSetting.
Parameters
- $error_type : string
-
The error type. Also used as a $txt index (not an actual string).
- $only_return_result : bool = false
-
Whether you want the function to die with a fatal_lang_error.
Return values
bool —Whether they've posted within the limit
secureDirectory()
A generic function to create a pair of index.php and .htaccess files in a directory
secureDirectory(string|array<string|int, mixed> $paths[, bool $attachments = false ]) : bool|array<string|int, mixed>
Parameters
- $paths : string|array<string|int, mixed>
-
The (absolute) directory path
- $attachments : bool = false
-
Whether this is an attachment directory
Return values
bool|array<string|int, mixed> —True on success an array of errors if anything fails
frameOptionsHeader()
This sets the X-Frame-Options header.
frameOptionsHeader([string $override = null ]) : mixed
Parameters
- $override : string = null
-
An option to override (either 'SAMEORIGIN' or 'DENY')
Tags
corsPolicyHeader()
This sets the Access-Control-Allow-Origin header.
corsPolicyHeader([bool $set_header = true ]) : void
Parameters
- $set_header : bool = true
-
(Default: true): When false, we will do the logic, but not send the headers. The relevant logic is still saved in the $context and can be sent manually.
Tags
KickGuest()
Throws guests out to the login screen when guest access is off.
KickGuest() : void
- sets $_SESSION['login_url'] to $_SERVER['REQUEST_URL'].
- uses the 'kick_guest' sub template found in Login.template.php.
createToken()
Lets give you a token of our appreciation.
createToken(string $action[, string $type = 'post' ]) : array<string|int, mixed>
Parameters
- $action : string
-
The action to create the token for
- $type : string = 'post'
-
The type of token ('post', 'get' or 'request')
Return values
array<string|int, mixed> —An array containing the name of the token var and the actual token
validateToken()
Only patrons with valid tokens can ride this ride.
validateToken(string $action[, string $type = 'post' ][, bool $reset = true ]) : bool
Parameters
- $action : string
-
The action to validate the token for
- $type : string = 'post'
-
The type of request (get, request, or post)
- $reset : bool = true
-
Whether to reset the token and display an error if validation fails
Return values
bool —returns whether the validation was successful
cleanTokens()
Removes old unused tokens from session defaults to 3 hours before a token is considered expired if $complete = true will remove all tokens
cleanTokens([bool $complete = false ]) : void
Parameters
- $complete : bool = false
-
Whether to remove all tokens or only expired ones
ssi_shutdown()
This shuts down the SSI and shows the footer.
ssi_shutdown() : void
ssi_version()
Show the SMF version.
ssi_version([string $output_method = 'echo' ]) : void|string
Parameters
- $output_method : string = 'echo'
-
If 'echo', displays the version, otherwise returns it
Return values
void|string —Returns nothing if output_method is 'echo', otherwise returns the version
ssi_full_version()
Show the full SMF version string.
ssi_full_version([string $output_method = 'echo' ]) : void|string
Parameters
- $output_method : string = 'echo'
-
If 'echo', displays the full version string, otherwise returns it
Return values
void|string —Returns nothing if output_method is 'echo', otherwise returns the version string
ssi_software_year()
Show the SMF software year.
ssi_software_year([string $output_method = 'echo' ]) : void|string
Parameters
- $output_method : string = 'echo'
-
If 'echo', displays the software year, otherwise returns it
Return values
void|string —Returns nothing if output_method is 'echo', otherwise returns the software year
ssi_copyright()
Show the forum copyright. Only used in our ssi_examples files.
ssi_copyright([string $output_method = 'echo' ]) : void|string
Parameters
- $output_method : string = 'echo'
-
If 'echo', displays the forum copyright, otherwise returns it
Return values
void|string —Returns nothing if output_method is 'echo', otherwise returns the copyright string
ssi_welcome()
Display a welcome message, like: Hey, User, you have 0 messages, 0 are new.
ssi_welcome([string $output_method = 'echo' ]) : void|array<string|int, mixed>
Parameters
- $output_method : string = 'echo'
-
The output method. If 'echo', will display everything. Otherwise returns an array of user info.
Return values
void|array<string|int, mixed> —Displays a welcome message or returns an array of user data depending on output_method.
ssi_menubar()
Display a menu bar, like is displayed at the top of the forum.
ssi_menubar([string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_logout()
Show a logout link.
ssi_logout([string $redirect_to = '' ][, string $output_method = 'echo' ]) : string|bool|null
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.
ssi_recentPosts()
Recent post list: [board] Subject by Poster Date
ssi_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
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.
ssi_fetchPosts()
Fetches one or more posts by ID.
ssi_fetchPosts([array<string|int, int> $post_ids = [] ][, bool $override_permissions = false ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_queryPosts()
This handles actually pulling post info. Called from other functions to eliminate duplication.
ssi_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
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
ssi_recentTopics()
Recent topic list: [board] Subject by Poster Date
ssi_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>
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.
ssi_topPoster()
Shows a list of top posters
ssi_topPoster([int $topNumber = 1 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_topBoards()
Shows a list of top boards based on activity
ssi_topBoards([int $num_top = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_topTopics()
Shows a list of top topics based on views or replies
ssi_topTopics([string $type = 'replies' ][, int $num_topics = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_topTopicsReplies()
Top topics based on replies
ssi_topTopicsReplies([int $num_topics = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_topTopicsViews()
Top topics based on views
ssi_topTopicsViews([int $num_topics = 10 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_latestMember()
Show a link to the latest member: Please welcome, Someone, our latest member.
ssi_latestMember([string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_randomMember()
Fetches a random member.
ssi_randomMember([string $random_type = '' ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_fetchMember()
Fetch specific members
ssi_fetchMember([array<string|int, mixed> $member_ids = [] ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_fetchGroupMembers()
Get all members in the specified group
ssi_fetchGroupMembers([int $group_id = null ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_queryMembers()
Pulls info about members based on the specified parameters. Used by other functions to eliminate duplication.
ssi_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
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.
ssi_boardStats()
Show some basic stats: Total This: XXXX, etc.
ssi_boardStats([string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_whosOnline()
Shows a list of online users: YY Guests, ZZ Users and then a list.
ssi_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.
ssi_logOnline()
Just like whosOnline except it also logs the online presence.
ssi_logOnline([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.
ssi_login()
Shows a login box
ssi_login([string $redirect_to = '' ][, string $output_method = 'echo' ]) : bool|null
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.
ssi_topPoll()
Show the top poll based on votes
ssi_topPoll([string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_recentPoll()
Shows the most recent poll
ssi_recentPoll([bool $topPollInstead = false ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_showPoll()
Shows the poll from the specified topic
ssi_showPoll([null|int $topic = null ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_pollVote()
Handles voting in a poll (done automatically)
ssi_pollVote() : mixed
ssi_quickSearch()
Shows a search box
ssi_quickSearch([string $output_method = 'echo' ]) : string|null
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.
ssi_news()
Show a random forum news item
ssi_news([string $output_method = 'echo' ]) : string|null
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.
ssi_todaysBirthdays()
Show today's birthdays.
ssi_todaysBirthdays([string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_todaysHolidays()
Shows today's holidays.
ssi_todaysHolidays([string $output_method = 'echo' ]) : array<string|int, mixed>|null
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
ssi_todaysEvents()
Shows today's events.
ssi_todaysEvents([string $output_method = 'echo' ]) : array<string|int, mixed>|null
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
ssi_todaysCalendar()
Shows today's calendar items (events, birthdays and holidays)
ssi_todaysCalendar([string $output_method = 'echo' ]) : array<string|int, mixed>|string|null
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
ssi_boardNews()
Show the latest news, with a template... by board.
ssi_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
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.
ssi_recentEvents()
Show the most recent events
ssi_recentEvents([int $max_events = 7 ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
ssi_checkPassword()
Checks whether the specified password is correct for the specified user.
ssi_checkPassword([int|string $id = null ][, string $password = null ][, bool $is_username = false ]) : bool
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.
ssi_recentAttachments()
Shows the most recent attachments that the user can see
ssi_recentAttachments([int $num_attachments = 10 ][, array<string|int, mixed> $attachment_ext = [] ][, string $output_method = 'echo' ]) : array<string|int, mixed>|null
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.
loadSession()
Attempt to start the session, unless it already has been.
loadSession() : void
CalculateNextTrigger()
Calculate the next time the passed tasks should be triggered.
CalculateNextTrigger([string|array<string|int, mixed> $tasks = [] ][, bool $force_update = false ]) : void
Parameters
- $tasks : string|array<string|int, mixed> = []
-
The ID of a single task or an array of tasks
- $force_update : bool = false
loadTheme()
Load a theme, by ID.
loadTheme([int $id = 0 ][, bool $initialize = true ]) : mixed
Parameters
- $id : int = 0
-
The ID of the theme to load
- $initialize : bool = true
-
Whether or not to initialize a bunch of theme-related variables/settings
loadEssentialThemeData()
This loads the bare minimum data to allow us to load language files!
loadEssentialThemeData() : void
loadTemplate()
Load a template - if the theme doesn't include it, use the default.
loadTemplate(string $template_name[, array<string|int, mixed>|string $style_sheets = [] ][, bool $fatal = true ]) : bool
What this function does:
- loads a template file with the name template_name from the current, default, or base theme.
- detects a wrong default theme directory and tries to work around it.
Parameters
- $template_name : string
-
The name of the template to load
- $style_sheets : array<string|int, mixed>|string = []
-
The name of a single stylesheet or an array of names of stylesheets to load
- $fatal : bool = true
-
If true, dies with an error message if the template cannot be found
Tags
Return values
bool —Whether or not the template was loaded
loadSubTemplate()
Load a sub-template.
loadSubTemplate(string $sub_template_name[, bool $fatal = false ]) : mixed
What it does: - loads the sub template specified by sub_template_name, which must be in an already-loaded template.
- if ?debug is in the query string, shows administrators a marker after every sub template for debugging purposes.
Parameters
- $sub_template_name : string
-
The name of the sub-template to load
- $fatal : bool = false
-
Whether to die with an error if the sub-template can't be loaded
Tags
loadCSSFile()
Add a CSS file for output later
loadCSSFile(string $filename[, array<string|int, mixed> $params = [] ][, string $id = '' ]) : void
Parameters
- $filename : string
-
The name of the file to load
- $params : array<string|int, mixed> = []
-
An array of parameters Keys are the following: - ['external'] (true/false): define if the file is a externally located file. Needs to be set to true if you are loading an external file - ['default_theme'] (true/false): force use of default theme url - ['force_current'] (true/false): if this is false, we will attempt to load the file from the default theme if not found in the current theme
- ['validate'] (true/false): if true script will validate the local file exists
- ['rtl'] (string): additional file to load in RTL mode
- ['seed'] (true/false/string): if true or null, use cache stale, false do not, or used a supplied string
- ['minimize'] bool to add your file to the main minimized file. Useful when you have a file thats loaded everywhere and for everyone.
- ['order_pos'] int define the load order, when not define it's loaded in the middle, before index.css = -500, after index.css = 500, middle = 3000, end (i.e. after responsive.css) = 10000
- ['attributes'] array extra attributes to add to the element
- $id : string = ''
-
An ID to stick on the end of the filename for caching purposes
addInlineCss()
Add a block of inline css code to be executed later
addInlineCss(string $css) : bool|null
- only use this if you have to, generally external css files are better, but for very small changes or for scripts that require help from PHP/whatever, this can be useful.
- all code added with this function is added to the same <style> tag so do make sure your css is valid!
Parameters
- $css : string
-
Some css code
Return values
bool|null —Adds the CSS to the $context['css_header'] array or returns if no CSS is specified
loadJavaScriptFile()
Add a Javascript file for output later
loadJavaScriptFile(string $fileName[, array<string|int, mixed> $params = [] ][, string $id = '' ]) : void
Parameters
- $fileName : string
-
The name of the file to load
- $params : array<string|int, mixed> = []
-
An array of parameter info Keys are the following: - ['external'] (true/false): define if the file is a externally located file. Needs to be set to true if you are loading an external file - ['default_theme'] (true/false): force use of default theme url - ['defer'] (true/false): define if the file should load in
or before the closing tag - ['force_current'] (true/false): if this is false, we will attempt to load the file from the default theme if not found in the current theme- ['async'] (true/false): if the script should be loaded asynchronously (HTML5)
- ['validate'] (true/false): if true script will validate the local file exists
- ['seed'] (true/false/string): if true or null, use cache stale, false do not, or used a supplied string
- ['minimize'] bool to add your file to the main minimized file. Useful when you have a file thats loaded everywhere and for everyone.
- ['attributes'] array extra attributes to add to the element
- $id : string = ''
-
An ID to stick on the end of the filename
addJavaScriptVar()
Add a Javascript variable for output later (for feeding text strings and similar to JS) Cleaner and easier (for modders) than to use the function below.
addJavaScriptVar(string $key, string $value[, bool $escape = false ]) : mixed
Parameters
- $key : string
-
The key for this variable
- $value : string
-
The value
- $escape : bool = false
-
Whether or not to escape the value
addInlineJavaScript()
Add a block of inline Javascript code to be executed later
addInlineJavaScript(string $javascript[, bool $defer = false ]) : bool|null
- only use this if you have to, generally external JS files are better, but for very small scripts or for scripts that require help from PHP/whatever, this can be useful.
- all code added with this function is added to the same <script> tag so do make sure your JS is clean!
Parameters
- $javascript : string
-
Some JS code
- $defer : bool = false
-
Whether the script should load in
or before the closing tag
Return values
bool|null —Adds the code to one of the $context['javascript_inline'] arrays or returns if no JS was specified
setupThemeContext()
Sets up the basic theme context stuff.
setupThemeContext([bool $forceload = false ]) : mixed
Parameters
- $forceload : bool = false
-
Whether to load the theme even if it's already loaded
setupMenuContext()
Sets up all of the top menu buttons Saves them in the cache if it is available and on Places the results in $context
setupMenuContext() : void
template_header()
The header template
template_header() : void
theme_copyright()
Show the copyright.
theme_copyright() : void
template_footer()
The template footer
template_footer() : void
template_javascript()
Output the Javascript files - tabbing in this function is to make the HTML source look good and proper - if deferred is set function will output all JS set to load at page end
template_javascript([bool $do_deferred = false ]) : void
Parameters
- $do_deferred : bool = false
-
If true will only output the deferred JS (the stuff that goes right before the closing body tag)
template_css()
Output the CSS files
template_css() : void
custMinify()
Get an array of previously defined files and adds them to our main minified files.
custMinify(array<string|int, mixed> $data, string $type) : array<string|int, mixed>
Sets a one day cache to avoid re-creating a file on every request.
Parameters
- $data : array<string|int, mixed>
-
The files to minify.
- $type : string
-
either css or js.
Return values
array<string|int, mixed> —Info about the minified file, or about the original files if the minify process failed.
deleteAllMinified()
Clears out old minimized CSS and JavaScript files and ensures $modSettings['browser_cache'] is up to date
deleteAllMinified() : void
SetJavaScript()
Set an option via javascript.
SetJavaScript() : void
- sets a theme option without outputting anything.
- can be used with javascript, via a dummy image... (which doesn't require the page to reload.)
- requires someone who is logged in.
- accessed via ?action=jsoption;var=variable;val=value;session_var=sess_id.
- does not log access to the Who's Online log. (in index.php..)
WrapAction()
Possibly the simplest and best example of how to use the template system.
WrapAction() : void
- allows the theme to take care of actions.
- happens if $settings['catch_action'] is set and action isn't found in the action array.
- can use a template, layers, sub_template, filename, and/or function.
PickTheme()
Choose a theme from a list.
PickTheme() : void
allows a user to pick a new theme with an interface.
- uses the Themes template. (pick sub template.)
- accessed with ?action=theme;sa=pick.
smf_strftime()
Replacement for strftime() that is compatible with PHP 8.1+.
smf_strftime(string $format[, int|null $timestamp = null ][, string|null $tzid = null ]) : string
This does not use the system's strftime library or locale setting, so results may vary in a few cases from the results of strftime():
-
%a, %A, %b, %B, %p, %P: Output will use SMF's language strings to localize these values. If SMF's language strings have not been loaded, PHP's default English strings will be used.
-
%c, %x, %X: Output will always use ISO format.
Parameters
- $format : string
-
A strftime() format string.
- $timestamp : int|null = null
-
A Unix timestamp. If null, defaults to the current time.
- $tzid : string|null = null
-
Time zone identifier. If null, uses default time zone.
Return values
string —The formatted datetime string.
smf_gmstrftime()
Replacement for gmstrftime() that is compatible with PHP 8.1+.
smf_gmstrftime(string $format[, int|null $timestamp = null ]) : string
Calls smf_strftime() with the $tzid parameter set to 'UTC'.
Parameters
- $format : string
-
A strftime() format string.
- $timestamp : int|null = null
-
A Unix timestamp. If null, defaults to the current time.
Return values
string —The formatted datetime string.
get_date_or_time_format()
Gets a version of a strftime() format that only shows the date or time components
get_date_or_time_format([string $type = '' ][, string $format = '' ][, bool|null $strftime = null ]) : string
Parameters
- $type : string = ''
-
Either 'date' or 'time'.
- $format : string = ''
-
A strftime() format to process. Defaults to $user_info['time_format'].
- $strftime : bool|null = null
Return values
string —A strftime() format string
timeformat()
Format a time to make it look purdy.
timeformat(int $log_time[, bool|string $show_today = true ][, null|string $tzid = null ]) : string
- returns a pretty formatted version of time based on the user's format in $user_info['time_format'].
- applies all necessary time offsets to the timestamp, unless offset_type is set.
- if todayMod is set and show_today was not not specified or true, an alternate format string is used to show the date with something to show it is "today" or "yesterday".
- performs localization (more than just strftime would do alone.)
Parameters
- $log_time : int
-
A timestamp
- $show_today : bool|string = true
-
Whether to show "Today"/"Yesterday" or just a date. If a string is specified, that is used to temporarily override the date format.
- $tzid : null|string = null
-
Time zone to use when generating the formatted string. If empty, the user's time zone will be used. If set to 'forum', the value of $modSettings['default_timezone'] will be used. If set to a valid time zone identifier, that will be used. Otherwise, the value of date_default_timezone_get() will be used.
Return values
string —A formatted time string
convertDateToEnglish()
Helper function to convert date string to english so that date_parse can parse the date
convertDateToEnglish(string $date) : string
Parameters
- $date : string
-
A localized date string
Return values
string —English date string
forum_time()
Deprecated function that formerly applied manual offsets to Unix timestamps in order to provide a fake version of time zone support on ancient versions of PHP. It now simply returns an unaltered timestamp.
since 2.1
forum_time([bool $use_user_offset = true ][, int $timestamp = null ]) : int
Parameters
- $use_user_offset : bool = true
-
This parameter is deprecated and nonfunctional
- $timestamp : int = null
-
A timestamp (null to use current time)
Return values
int —Seconds since the Unix epoch
smf_list_timezones()
Get a list of time zones.
smf_list_timezones([string $when = 'now' ]) : array<string|int, mixed>
Parameters
- $when : string = 'now'
-
The date/time for which to calculate the time zone values. May be a Unix timestamp or any string that strtotime() can understand. Defaults to 'now'.
Return values
array<string|int, mixed> —An array of time zone identifiers and label text.
get_tzid_metazones()
Returns an array that instructs SMF how to map specific time zones (e.g. "America/Denver") onto the user-friendly "meta-zone" labels that most people think of as time zones (e.g. "Mountain Time").
get_tzid_metazones([string $when = 'now' ]) : array<string|int, mixed>
Parameters
- $when : string = 'now'
-
The date/time used to determine fallback values. May be a Unix timestamp or any string that strtotime() can understand. Defaults to 'now'.
Return values
array<string|int, mixed> —An array relating time zones to "meta-zones"
get_sorted_tzids_for_country()
Returns an array of all the time zones in a country, ranked according to population and/or political significance.
get_sorted_tzids_for_country(string $country_code[, string $when = 'now' ]) : array<string|int, mixed>
Parameters
- $country_code : string
-
The two-character ISO-3166 code for a country.
- $when : string = 'now'
-
The date/time used to determine fallback values. May be a Unix timestamp or any string that strtotime() can understand. Defaults to 'now'.
Return values
array<string|int, mixed> —An array relating time zones to "meta-zones"
get_tzid_fallbacks()
Checks a list of time zone identifiers to make sure they are all defined in the installed version of the time zone database, and returns an array of key-value substitution pairs.
get_tzid_fallbacks(array<string|int, mixed> $tzids[, string $when = 'now' ]) : array<string|int, mixed>
For defined time zone identifiers, the substitution value will be identical to the original value. For undefined ones, the substitute will be a time zone identifier that was equivalent to the missing one at the specified time, or an empty string if there was no equivalent at that time.
Note: These fallbacks do not need to include every new time zone ever. They only need to cover any that are used in $tzid_metazones.
To find the date & time when a new time zone comes into effect, check the TZDB changelog at https://data.iana.org/time-zones/tzdb/NEWS
Parameters
- $tzids : array<string|int, mixed>
-
The time zone identifiers to check.
- $when : string = 'now'
-
The date/time used to determine substitute values. May be a Unix timestamp or any string that strtotime() can understand. Defaults to 'now'.
Return values
array<string|int, mixed> —Substitute values for any missing time zone identifiers.
validate_iso_country_codes()
Validates a set of two-character ISO 3166-1 country codes.
validate_iso_country_codes(array<string|int, mixed>|string $country_codes[, bool $as_csv = false ]) : array<string|int, mixed>|string
Parameters
- $country_codes : array<string|int, mixed>|string
-
Array or CSV string of country codes.
- $as_csv : bool = false
-
If true, return CSV string instead of array.
Return values
array<string|int, mixed>|string —Array or CSV string of valid country codes.
LockTopic()
Locks a topic... either by way of a moderator or the topic starter.
LockTopic() : void
What this does:
- locks a topic, toggles between locked/unlocked/admin locked.
- only admins can unlock topics locked by other admins.
- requires the lock_own or lock_any permission.
- logs the action to the moderator log.
- returns to the topic after it is done.
- it is accessed via ?action=lock.
Sticky()
Sticky a topic.
Sticky() : void
Can't be done by topic starters - that would be annoying! What this does:
- stickies a topic - toggles between sticky and normal.
- requires the make_sticky permission.
- adds an entry to the moderator log.
- when done, sends the user back to the topic.
- accessed via ?action=sticky.
approveTopics()
Approve topics?
approveTopics(array<string|int, mixed> $topics[, bool $approve = true ]) : bool
Parameters
- $topics : array<string|int, mixed>
-
Array of topic ids
- $approve : bool = true
-
Whether to approve the topics. If false, unapproves them instead
Tags
Return values
bool —Whether the operation was successful
moveTopics()
Moves one or more topics to a specific board. (doesn't check permissions.) Determines the source boards for the supplied topics Handles the moving of mark_read data Updates the posts count of the affected boards
moveTopics(int|array<string|int, int> $topics, int $toBoard) : mixed
Parameters
- $topics : int|array<string|int, int>
-
The ID of a single topic to move or an array containing the IDs of multiple topics to move
- $toBoard : int
-
The ID of the board to move the topics to
removeTopics()
Removes the passed id_topic's. (permissions are NOT checked here!).
removeTopics(array<string|int, mixed>|int $topics[, bool $decreasePostCount = true ][, bool $ignoreRecycling = false ][, bool $updateBoardCount = true ]) : mixed
Parameters
- $topics : array<string|int, mixed>|int
-
The topics to remove (can be an id or an array of ids).
- $decreasePostCount : bool = true
-
Whether to decrease the users' post counts
- $ignoreRecycling : bool = false
-
Whether to ignore recycling board settings
- $updateBoardCount : bool = true
-
Whether to adjust topic counts for the boards
prepareLikesContext()
Prepares an array of "likes" info for the topic specified by $topic
prepareLikesContext(int $topic) : array<string|int, mixed>
Parameters
- $topic : int
-
The topic ID to fetch the info from.
Return values
array<string|int, mixed> —An array of IDs of messages in the specified topic that the current user likes
set_tld_regex()
Creates an optimized regex to match all known top level domains.
set_tld_regex([bool $update = false ]) : void
The optimized regex is stored in $modSettings['tld_regex'].
To update the stored version of the regex to use the latest list of valid TLDs from iana.org, set the $update parameter to true. Updating can take some time, based on network connectivity, so it should normally only be done by calling this function from a background or scheduled task.
If $update is not true, but the regex is missing or invalid, the regex will be regenerated from a hard-coded list of TLDs. This regenerated regex will be overwritten on the next scheduled update.
Parameters
- $update : bool = false
-
If true, fetch and process the latest official list of TLDs from iana.org.
parse_iri()
A wrapper for `parse_url($url)` that can handle URLs with international characters (a.k.a. IRIs)
parse_iri(string $iri[, int $component = -1 ]) : string|int|array<string|int, mixed>|null|bool
Parameters
- $iri : string
-
The IRI to parse.
- $component : int = -1
-
Optional flag for parse_url's second parameter.
Return values
string|int|array<string|int, mixed>|null|bool —Same as parse_url(), but with unmangled Unicode.
validate_iri()
A wrapper for `filter_var($url, FILTER_VALIDATE_URL)` that can handle URLs with international characters (a.k.a. IRIs)
validate_iri(string $iri[, int $flags = 0 ]) : string|bool
Parameters
- $iri : string
-
The IRI to test.
- $flags : int = 0
-
Optional flags to pass to filter_var()
Return values
string|bool —Either the original IRI, or false if the IRI was invalid.
sanitize_iri()
A wrapper for `filter_var($url, FILTER_SANITIZE_URL)` that can handle URLs with international characters (a.k.a. IRIs)
sanitize_iri(string $iri) : string|bool
Note: The returned value will still be an IRI, not a URL. To convert to URL, feed the result of this function to iri_to_url()
Parameters
- $iri : string
-
The IRI to sanitize.
Return values
string|bool —The sanitized version of the IRI
normalize_iri()
Performs Unicode normalization on IRIs.
normalize_iri(string $iri) : string|bool
Internally calls sanitize_iri(), then performs Unicode normalization on the IRI as a whole, using NFKC normalization for the domain name (see RFC 3491) and NFC normalization for the rest.
Parameters
- $iri : string
-
The IRI to normalize.
Return values
string|bool —The normalized version of the IRI.
iri_to_url()
Converts a URL with international characters (an IRI) into a pure ASCII URL
iri_to_url(string $iri) : string|bool
Uses Punycode to encode any non-ASCII characters in the domain name, and uses standard URL encoding on the rest.
Parameters
- $iri : string
-
A IRI that may or may not contain non-ASCII characters.
Return values
string|bool —The URL version of the IRI.
url_to_iri()
Decodes a URL containing encoded international characters to UTF-8
url_to_iri(string $url) : string|bool
Decodes any Punycode encoded characters in the domain name, then uses standard URL decoding on the rest.
Parameters
- $url : string
-
The pure ASCII version of a URL.
Return values
string|bool —The UTF-8 version of the URL.
get_proxied_url()
Gets the appropriate URL to use for images (or whatever) when using SSL
get_proxied_url(string $url) : string
The returned URL may or may not be a proxied URL, depending on the situation. Mods can implement alternative proxies using the 'integrate_proxy' hook.
Parameters
- $url : string
-
The original URL of the requested resource
Return values
string —The URL to use
ssl_cert_found()
Check if the passed url has an SSL certificate.
ssl_cert_found(string $url) : bool
Returns true if a cert was found & false if not.
Parameters
- $url : string
-
to check, in $boardurl format (no trailing slash).
Return values
boolhttps_redirect_active()
Check if the passed url has a redirect to https:// by querying headers.
https_redirect_active(string $url) : bool
Returns true if a redirect was found & false if not. Note that when force_ssl = 2, SMF issues its own redirect... So if this returns true, it may be caused by SMF, not necessarily an .htaccess redirect.
Parameters
- $url : string
-
to check, in $boardurl format (no trailing slash).
Return values
boolbuild_query_board()
Build query_wanna_see_board and query_see_board for a userid
build_query_board(int $id) : array<string|int, mixed>
Returns array with keys query_wanna_see_board and query_see_board
Parameters
- $id : int
Return values
array<string|int, mixed>set_avatar_data()
Helper function to set an array of data for an user's avatar.
set_avatar_data([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>
Makes assumptions based on the data provided, the following keys are required:
- avatar The raw "avatar" column in members table
- email The user's email. Used to get the gravatar info
- filename The attachment filename
Parameters
- $data : array<string|int, mixed> = []
-
An array of raw info
Return values
array<string|int, mixed> —An array of avatar data
updateMemberData()
Updates the columns in the members table.
updateMemberData(mixed $members, array<string|int, mixed> $data) : void
Assumes the data has been htmlspecialchar'd. this function should be used whenever member data needs to be updated in place of an UPDATE query.
id_member is either an int or an array of ints to be updated.
data is an associative array of the columns to be updated and their respective values. any string values updated should be quoted and slashed.
the value of any column can be '+' or '-', which mean 'increment' and decrement, respectively.
if the member's post number is updated, updates their post groups.
Parameters
- $members : mixed
-
An array of member IDs, the ID of a single member, or null to update this for all members
- $data : array<string|int, mixed>
-
The info to update for the members
getUserTimezone()
Gets a member's selected time zone identifier
getUserTimezone([int $id_member = null ]) : string
Parameters
- $id_member : int = null
-
The member id to look up. If not provided, the current user's id will be used.
Return values
string —The time zone identifier string for the user's time zone.
deleteMembers()
Delete one or more members.
deleteMembers(int|array<string|int, mixed> $users[, bool $check_not_admin = false ]) : void
Requires profile_remove_own or profile_remove_any permission for respectively removing your own account or any account. Non-admins cannot delete admins. The function:
- changes author of messages, topics and polls to guest authors.
- removes all log entries concerning the deleted members, except the error logs, ban logs and moderation logs.
- removes these members' personal messages (only the inbox), avatars, ban entries, theme settings, moderator positions, poll and votes.
- updates member statistics afterwards.
Parameters
- $users : int|array<string|int, mixed>
-
The ID of a user or an array of user IDs
- $check_not_admin : bool = false
-
Whether to verify that the users aren't admins
validateUsername()
Checks a username obeys a load of rules
validateUsername(int $memID, string $username[, bool $return_error = false ][, bool $check_reserved_name = true ]) : array<string|int, mixed>|null
Parameters
- $memID : int
-
The ID of the member
- $username : string
-
The username to validate
- $return_error : bool = false
-
Whether to return errors
- $check_reserved_name : bool = true
-
Whether to check this against the list of reserved names
Return values
array<string|int, mixed>|null —Null if there are no errors, otherwise an array of errors if return_error is true
isReservedName()
Check if a name is in the reserved words list.
isReservedName(string $name[, int $current_id_member = 0 ][, bool $is_name = true ][, bool $fatal = true ]) : bool|void
(name, current member id, name/username?.)
- checks if name is a reserved name or username.
- if is_name is false, the name is assumed to be a username.
- the id_member variable is used to ignore duplicate matches with the current member.
Parameters
- $name : string
-
The name to check
- $current_id_member : int = 0
-
The ID of the current member (to avoid false positives with the current member)
- $is_name : bool = true
-
Whether we're checking against reserved names or just usernames
- $fatal : bool = true
-
Whether to die with a fatal error if the name is reserved
Return values
bool|void —False if name is not reserved, otherwise true if $fatal is false or dies with a fatal_lang_error if $fatal is true
isBannedEmail()
Checks if a given email address might be banned.
isBannedEmail(string $email, string $restriction, string $error) : void
Check if a given email is banned. Performs an immediate ban if the turns turns out positive.
Parameters
- $email : string
-
The email to check
- $restriction : string
-
What type of restriction (cannot_post, cannot_register, etc.)
- $error : string
-
The error message to display if they are indeed banned
findMembers()
Finds members by email address, username, or real name.
findMembers(array<string|int, mixed> $names[, bool $use_wildcards = false ][, bool $buddies_only = false ][, int $max = 500 ]) : array<string|int, mixed>
- searches for members whose username, display name, or e-mail address match the given pattern of array names.
- searches only buddies if buddies_only is set.
Parameters
- $names : array<string|int, mixed>
-
The names of members to search for
- $use_wildcards : bool = false
-
Whether to use wildcards. Accepts wildcards ? and * in the pattern if true
- $buddies_only : bool = false
-
Whether to only search for the user's buddies
- $max : int = 500
-
The maximum number of results
Return values
array<string|int, mixed> —An array containing information about the matching members
membersAllowedTo()
Retrieves a list of members that have a given permission (on a given board).
membersAllowedTo(string $permission[, int $board_id = null ]) : array<string|int, mixed>
If board_id is not null, a board permission is assumed. Takes different permission settings into account. Takes possible moderators (on board 'board_id') into account.
Parameters
- $permission : string
-
The permission to check
- $board_id : int = null
-
If set, checks permission for that specific board
Return values
array<string|int, mixed> —An array containing the IDs of the members having that permission
groupsAllowedTo()
Retrieves a list of membergroups that have the given permission, either on a given board or in general.
groupsAllowedTo(string $permission[, int $board_id = null ][, bool $simple = true ][, int|null $profile_id = null ]) : array<string|int, mixed>
If board_id is not null, a board permission is assumed. The function takes different permission settings into account.
Parameters
- $permission : string
-
The permission to check
- $board_id : int = null
-
= null If set, checks permissions for the specified board
- $simple : bool = true
- $profile_id : int|null = null
Return values
array<string|int, mixed> —An array containing two arrays - 'allowed', which has which groups are allowed to do it and 'denied' which has the groups that are denied
getGroupsWithPermissions()
Retrieves a list of membergroups with the given permissions.
getGroupsWithPermissions([array<string|int, mixed> $general_permissions = [] ][, array<string|int, mixed> $board_permissions = [] ][, int $profile_id = 1 ]) : array<string|int, mixed>
Parameters
- $general_permissions : array<string|int, mixed> = []
- $board_permissions : array<string|int, mixed> = []
- $profile_id : int = 1
Return values
array<string|int, mixed> —An array containing two arrays - 'allowed', which has which groups are allowed to do it and 'denied' which has the groups that are denied
logSpider()
Log the spider presence online.
logSpider() : void
Tags
loadMemberData()
Loads an array of users' data by ID or member_name.
loadMemberData([array<string|int, mixed>|string $users = [] ][, int $type = SMFUser::LOAD_BY_ID ][, string|null $dataset = null ]) : array<string|int, mixed>
Parameters
- $users : array<string|int, mixed>|string = []
-
An array of users by id or name or a single username/id
- $type : int = SMFUser::LOAD_BY_ID
- $dataset : string|null = null
Return values
array<string|int, mixed> —The ids of the members loaded
loadUserSettings()
Load all the important user information.
loadUserSettings() : void
What it does:
- sets up the $user_info array
- assigns $user_info['query_wanna_see_board'] for what boards the user can see.
- first checks for cookie or integration validation.
- uses the current session if no integration function or cookie is found.
- checks password length, if member is activated and the login span isn't over.
- if validation fails for the user, $id_member is set to 0.
- updates the last visit time when needed.
loadPermissions()
Load this user's permissions.
loadPermissions() : void
loadMemberContext()
Loads the user's basic values... meant for template/theme usage.
loadMemberContext(int $id[, bool $display_custom_fields = false ]) : bool|array<string|int, mixed>
Parameters
- $id : int
-
- $display_custom_fields : bool = false
-
Whether or not to display custom profile fields
Tags
Return values
bool|array<string|int, mixed> —False if the data wasn't loaded or the loaded data.
is_not_guest()
Require a user who is logged in. (not a guest.) Checks if the user is currently a guest, and if so asks them to login with a message telling them why.
is_not_guest([string $message = '' ]) : void
Message is what to tell them when asking them to login.
Parameters
- $message : string = ''
-
The message to display to the guest
is_not_banned()
Do banning related stuff. (ie. disallow access....) Checks if the user is banned, and if so dies with an error.
is_not_banned([bool $force_check = false ]) : void
Caches this information for optimization purposes.
Parameters
- $force_check : bool = false
banPermissions()
Fix permissions according to ban status.
banPermissions() : void
Applies any states of banning by removing permissions the user cannot have.
log_ban()
Log a ban in the database.
log_ban([array<string|int, mixed> $ban_ids = [] ][, string $email = null ]) : void
Log the current user in the ban logs. Increment the hit counters for the specified ban ID's (if any.)
Parameters
- $ban_ids : array<string|int, mixed> = []
-
The IDs of the bans
- $email : string = null
-
The email address associated with the user that triggered this hit
validateSession()
Check if the user is who he/she says he is Makes sure the user is who they claim to be by requiring a password to be typed in every hour.
validateSession([string $type = 'admin' ][, string $force = false ]) : string|null
Is turned on and off by the securityDisable setting. Uses the adminLogin() function of Subs-Auth.php if they need to login, which saves all request (post and get) data.
Parameters
- $type : string = 'admin'
-
What type of session this is
- $force : string = false
-
When true, require a password even if we normally wouldn't
Return values
string|null —Returns 'session_verify_fail' if verification failed
checkSession()
Make sure the user's correct session was passed, and they came from here.
checkSession([string $type = 'post' ][, string $from_action = '' ][, bool $is_fatal = true ]) : string
Checks the current session, verifying that the person is who he or she should be. Also checks the referrer to make sure they didn't get sent here. Depends on the disableCheckUA setting, which is usually missing. Will check GET, POST, or REQUEST depending on the passed type. Also optionally checks the referring action if passed. (note that the referring action must be by GET.)
Parameters
- $type : string = 'post'
-
The type of check (post, get, request)
- $from_action : string = ''
-
The action this is coming from
- $is_fatal : bool = true
-
Whether to die with a fatal error if the check fails
Return values
string —The error message if is_fatal is false.
allowedTo()
Check the user's permissions.
allowedTo(string|array<string|int, mixed> $permission[, int|array<string|int, mixed> $boards = null ][, bool $any = false ]) : bool
checks whether the user is allowed to do permission. (ie. post_new.) If boards is specified, checks those boards instead of the current one. If any is true, will return true if the user has the permission on any of the specified boards Always returns true if the user is an administrator.
Parameters
- $permission : string|array<string|int, mixed>
-
A single permission to check or an array of permissions to check
- $boards : int|array<string|int, mixed> = null
-
The ID of a board or an array of board IDs if we want to check board-level permissions
- $any : bool = false
-
Whether to check for permission on at least one board instead of all boards
Return values
bool —Whether the user has the specified permission
isAllowedTo()
Fatal error if they cannot.
isAllowedTo(string|array<string|int, mixed> $permission[, int|array<string|int, mixed> $boards = null ][, bool $any = false ]) : bool
Uses allowedTo() to check if the user is allowed to do permission. Checks the passed boards or current board for the permission. If $any is true, the user only needs permission on at least one of the boards to pass If they are not, it loads the Errors language file and shows an error using $txt['cannot_' . $permission]. If they are a guest and cannot do it, this calls is_not_guest().
Parameters
- $permission : string|array<string|int, mixed>
-
A single permission to check or an array of permissions to check
- $boards : int|array<string|int, mixed> = null
-
The ID of a single board or an array of board IDs if we're checking board-level permissions (null otherwise)
- $any : bool = false
-
Whether to check for permission on at least one board instead of all boards
Return values
boolboardsAllowedTo()
Return the boards a user has a certain (board) permission on. (array(0) if all.) - returns a list of boards on which the user is allowed to do the specified permission.
boardsAllowedTo(string|array<string|int, mixed> $permissions[, bool $check_access = true ][, bool $simple = true ]) : array<string|int, mixed>
- returns an array with only a 0 in it if the user has permission to do this on every board.
- returns an empty array if he or she cannot do this on any board. If check_access is true will also make sure the group has proper access to that board.
Parameters
- $permissions : string|array<string|int, mixed>
-
A single permission to check or an array of permissions to check
- $check_access : bool = true
-
Whether to check only the boards the user has access to
- $simple : bool = true
-
Whether to return a simple array of board IDs or one with permissions as the keys
Return values
array<string|int, mixed> —An array of board IDs or an array containing 'permission' => 'board,board2,...' pairs
sanitize_chars()
Replaces invalid characters with a substitute.
sanitize_chars(string $string[, int $level = 0 ][, string|null $substitute = null ]) : string
!!! Warning !!! Setting $substitute to '' in order to delete invalid characters from the string can create unexpected security problems. See https://www.unicode.org/reports/tr36/#Deletion_of_Noncharacters for an explanation.
Parameters
- $string : string
-
The string to sanitize.
- $level : int = 0
-
Controls filtering of invisible formatting characters. 0: Allow valid formatting characters. Use for sanitizing text in posts. 1: Allow necessary formatting characters. Use for sanitizing usernames. 2: Disallow all formatting characters. Use for internal comparisions only, such as in the word censor, search contexts, etc. Default: 0.
- $substitute : string|null = null
-
Replacement string for the invalid characters. If not set, the Unicode replacement character (U+FFFD) will be used (or a fallback like "?" if necessary).
Return values
string —The sanitized string.
normalize_spaces()
Normalizes space characters and line breaks.
normalize_spaces(string $string[, bool $vspace = true ][, bool $hspace = false ][, array<string|int, mixed> $options = [] ]) : string
Parameters
- $string : string
-
The string to sanitize.
- $vspace : bool = true
-
If true, replaces all line breaks and vertical space characters with "\n". Default: true.
- $hspace : bool = false
-
If true, replaces horizontal space characters with a plain " " character. (Note: tabs are not replaced unless the 'replace_tabs' option is supplied.) Default: false.
- $options : array<string|int, mixed> = []
-
An array of bool options. Possible values are:
- no_breaks: Vertical spaces are replaced by " " instead of "\n".
- replace_tabs: If true, tabs are are replaced by " " chars.
- collapse_hspace: If true, removes extra horizontal spaces.
Return values
string —The sanitized string.
htmlspecialchars__recursive()
Adds html entities to the array/variable. Uses two underscores to guard against overloading.
htmlspecialchars__recursive(array<string|int, mixed>|string $var[, int $flags = ENT_COMPAT ][, mixed $encoding = 'UTF-8' ]) : array<string|int, mixed>|string
What it does:
- adds entities (", <, >) to the array or string var.
- importantly, does not effect keys, only values.
- calls itself recursively if necessary.
Parameters
- $var : array<string|int, mixed>|string
-
The string or array of strings to add entites to
- $flags : int = ENT_COMPAT
- $encoding : mixed = 'UTF-8'
Return values
array<string|int, mixed>|string —The string or array of strings with entities added
un_htmlspecialchars()
Replaces special entities in strings with the real characters.
un_htmlspecialchars(string $string[, int $flags = ENT_QUOTES ][, mixed $encoding = 'UTF-8' ]) : string
Functionally equivalent to htmlspecialchars_decode(), except that this also replaces 'Â ' with a simple space character.
Parameters
- $string : string
-
A string
- $flags : int = ENT_QUOTES
- $encoding : mixed = 'UTF-8'
Return values
string —The string without entities
htmltrim__recursive()
Trim a string including the HTML space, character 160. Uses two underscores to guard against overloading.
htmltrim__recursive(array<string|int, mixed>|string $var) : array<string|int, mixed>|string
What it does:
- trims a string or an the var array using html characters as well.
- does not effect keys, only values.
- may call itself recursively if needed.
Parameters
- $var : array<string|int, mixed>|string
-
The string or array of strings to trim
Return values
array<string|int, mixed>|string —The trimmed string or array of trimmed strings
shorten_subject()
Shorten a subject + internationalization concerns.
shorten_subject(string $subject, int $len) : string
- shortens a subject so that it is either shorter than length, or that length plus an ellipsis.
- respects internationalization characters and entities as one character.
- avoids trailing entities.
- returns the shortened string.
Parameters
- $subject : string
-
The subject
- $len : int
-
How many characters to limit it to
Return values
string —The shortened subject - either the entire subject (if it's <= $len) or the subject shortened to $len characters with "..." appended
text2words()
Chops a string into words and prepares them to be inserted into (or searched from) the database.
text2words(string $string[, int $max_length = 20 ][, bool $encrypt = false ]) : array<string|int, mixed>
Parameters
- $string : string
-
The text to split into words
- $max_length : int = 20
-
The maximum number of characters per word
- $encrypt : bool = false
-
Whether to encrypt the results
Return values
array<string|int, mixed> —An array of ints or words depending on $encrypt
build_regex()
Creates optimized regular expressions from arrays of strings.
build_regex(array<string|int, mixed> $strings[, string $delim = null ][, bool $return_array = false ]) : string|array<string|int, mixed>
An optimized regex built using this function will be much faster than a
simple regex built using implode('|', $strings)
--- anywhere from several
times to several orders of magnitude faster.
However, the time required to build the optimized regex is approximately equal to the time it takes to execute the simple regex. Therefore, it is only worth calling this function if the resulting regex will be used more than once.
Because PHP places an upper limit on the allowed length of a regex, very large arrays of $strings may not fit in a single regex. Normally, the excess strings will simply be dropped. However, if the $returnArray parameter is set to true, this function will build as many regexes as necessary to accommodate everything in $strings and return them in an array. You will need to iterate through all elements of the returned array in order to test all possible matches.
Parameters
- $strings : array<string|int, mixed>
-
An array of strings to make a regex for.
- $delim : string = null
-
An optional delimiter character to pass to preg_quote().
- $return_array : bool = false
Return values
string|array<string|int, mixed> —One or more regular expressions to match any of the input strings.
cleanXml()
Clean up the XML to make sure it doesn't contain invalid characters.
cleanXml(string $string) : string
See https://www.w3.org/TR/xml/#charsets
Parameters
- $string : string
-
The string to clean
Return values
string —The cleaned string
JavaScriptEscape()
Escapes (replaces) characters in strings to make them safe for use in JavaScript
JavaScriptEscape(string $string[, bool $as_json = false ]) : string
Parameters
- $string : string
-
The string to escape
- $as_json : bool = false
-
If true, escape as double-quoted string. Default false.
Return values
string —The escaped string
stripslashes__recursive()
Remove slashes recursively. Uses two underscores to guard against overloading.
stripslashes__recursive(array<string|int, mixed>|string $var[, int $level = 0 ]) : array<string|int, mixed>|string
What it does:
- removes slashes, recursively, from the array or string var.
- effects both keys and values of arrays.
- calls itself recursively to handle arrays of arrays.
Parameters
- $var : array<string|int, mixed>|string
-
The string or array of strings to strip slashes from
- $level : int = 0
-
= 0 What level we're at within the array (if called recursively)
Return values
array<string|int, mixed>|string —The string or array of strings with slashes stripped
urldecode__recursive()
Removes url stuff from the array/variable. Uses two underscores to guard against overloading.
urldecode__recursive(array<string|int, mixed>|string $var, int $level) : array<string|int, mixed>|string
What it does:
- takes off url encoding (%20, etc.) from the array or string var.
- importantly, does it to keys too!
- calls itself recursively if there are any sub arrays.
Parameters
- $var : array<string|int, mixed>|string
-
The string or array of strings to decode
- $level : int
-
Which level we're at within the array (if called recursively)
Return values
array<string|int, mixed>|string —The decoded string or array of decoded strings
escapestring__recursive()
Adds slashes to the array/variable.
escapestring__recursive(array<string|int, mixed>|string $var) : array<string|int, mixed>|string
What it does:
- returns the var, as an array or string, with escapes as required.
- importantly escapes all keys and values!
- calls itself recursively if necessary.
Parameters
- $var : array<string|int, mixed>|string
-
A string or array of strings to escape
Return values
array<string|int, mixed>|string —The escaped string or array of escaped strings
unescapestring__recursive()
Unescapes any array or variable. Uses two underscores to guard against overloading.
unescapestring__recursive(array<string|int, mixed>|string $var) : array<string|int, mixed>|string
What it does:
- unescapes, recursively, from the array or string var.
- effects both keys and values of arrays.
- calls itself recursively to handle arrays of arrays.
Parameters
- $var : array<string|int, mixed>|string
-
The string or array of strings to unescape
Return values
array<string|int, mixed>|string —The unescaped string or array of unescaped strings
truncate_array()
Truncate an array to a specified length
truncate_array(array<string|int, mixed> $array[, int $max_length = 1900 ]) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>
-
The array to truncate
- $max_length : int = 1900
-
The upperbound on the length
Return values
array<string|int, mixed> —The truncated array
array_length()
array_length Recursive
array_length(array<string|int, mixed> $array) : int
Parameters
- $array : array<string|int, mixed>
Return values
intsmf_json_decode()
Wrapper function for json_decode() with error handling.
smf_json_decode(string $json[, bool $associative = false ][, bool $should_log = true ]) : array<string|int, mixed>
Parameters
- $json : string
-
The string to decode.
- $associative : bool = false
- $should_log : bool = true
Return values
array<string|int, mixed> —Either an empty array or the decoded data as an array.
safe_serialize()
Wrapper for _safe_serialize() that handles exceptions and multibyte encoding issues.
safe_serialize(mixed $value) : string
Parameters
- $value : mixed
Return values
stringsafe_unserialize()
Wrapper for _safe_unserialize() that handles exceptions and multibyte encoding issue
safe_unserialize(string $str) : mixed
Parameters
- $str : string
get_mime_type()
Attempts to determine the MIME type of some data or a file.
get_mime_type(string $data[, string $is_path = false ]) : string|bool
Parameters
- $data : string
-
The data to check, or the path or URL of a file to check.
- $is_path : string = false
-
If true, $data is a path or URL to a file.
Return values
string|bool —A MIME type, or false if we cannot determine it.
check_mime_type()
Checks whether a file or data has the expected MIME type.
check_mime_type(string $data, string $type_pattern[, string $is_path = false ]) : int
Parameters
- $data : string
-
The data to check, or the path or URL of a file to check.
- $type_pattern : string
-
A regex pattern to match the acceptable MIME types.
- $is_path : string = false
-
If true, $data is a path or URL to a file.
Return values
int —1 if the detected MIME type matches the pattern, 0 if it doesn't, or 2 if we can't check.
smf_chmod()
Tries different modes to make file/dirs writable. Wrapper function for chmod()
smf_chmod(string $path) : bool
Parameters
- $path : string
Return values
bool —true if the file/dir is already writable or the function was able to make it writable, false if the function couldn't make the file/dir writable.
send_http_status()
Sends an appropriate HTTP status header based on a given status code
send_http_status(int $code[, string $status = '' ]) : void
Parameters
- $code : int
-
The status code
- $status : string = ''
-
The string for the status. Set automatically if not provided.
smf_serverResponse()
Outputs a response.
smf_serverResponse([string $data = '' ][, string $type = 'Content-Type: application/json' ]) : string
It assumes the data is already a string.
Parameters
- $data : string = ''
-
The data to print
- $type : string = 'Content-Type: application/json'
-
The content type. Defaults to Json.
Return values
stringredirectexit()
Make sure the browser doesn't come back and repost the form data.
redirectexit([string $setLocation = '' ][, bool $refresh = false ][, bool $permanent = false ]) : void
Should be used whenever anything is posted.
Parameters
- $setLocation : string = ''
-
The URL to redirect them to
- $refresh : bool = false
-
Whether to use a meta refresh instead
- $permanent : bool = false
-
Whether to send a 301 Moved Permanently instead of a 302 Moved Temporarily
obExit()
Ends execution. Takes care of template loading and remembering the previous URL.
obExit([bool $header = null ][, bool $do_footer = null ][, bool $from_index = false ][, bool $from_fatal_error = false ]) : void
Parameters
- $header : bool = null
-
Whether to do the header
- $do_footer : bool = null
-
Whether to do the footer
- $from_index : bool = false
-
Whether we're coming from the board index
- $from_fatal_error : bool = false
-
Whether we're coming from a fatal error
call_helper()
Receives a string and tries to figure it out if its a method or a function.
call_helper(mixed $input[, bool $return = false ]) : string|array<string|int, mixed>|bool
If a method is found, it looks for a "#" which indicates SMF should create a new instance of the given class. Checks the string/array for is_callable() and return false/fatal_lang_error is the given value results in a non callable string/array. Prepare and returns a callable depending on the type of method/function found.
Parameters
- $input : mixed
-
The string containing a function name or a static call. The function can also accept a closure, object or a callable array (object/class, valid_callable)
- $return : bool = false
-
If true, the function will not call the function/method but instead will return the formatted string.
Return values
string|array<string|int, mixed>|bool —Either a string or an array that contains a callable function name or an array with a class and method to call. False if the given string cannot produce a callable var.
replaceEntities__callback()
Decode numeric html entities to their ascii or UTF8 equivalent character.
replaceEntities__callback(array<string|int, mixed> $matches) : string
Callback function for preg_replace_callback in subs-members Does basic scan to ensure characters are inside a valid range
Parameters
- $matches : array<string|int, mixed>
-
An array of matches
Return values
string —A fixed string
fixchar__callback()
Converts html entities to utf8 equivalents
fixchar__callback(array<string|int, mixed> $matches) : string
Callback function for preg_replace_callback Does basic checks to keep characters inside a viewable range.
Parameters
- $matches : array<string|int, mixed>
-
An array of matches
Return values
string —The fixed string
entity_fix__callback()
Strips out invalid html entities, replaces others with html style { codes
entity_fix__callback(array<string|int, mixed> $matches) : string
Callback function used of preg_replace_callback in smcFunc $ent_checks, for example strpos, strlen, substr etc
Parameters
- $matches : array<string|int, mixed>
-
An array of matches
Return values
string —The fixed string
create_control_verification()
Create a anti-bot verification control?
create_control_verification(array<string|int, mixed> &$options[, bool $do_test = false ]) : bool|array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
-
Options for the verification control
- $do_test : bool = false
-
Whether to check to see if the user entered the code correctly
Return values
bool|array<string|int, mixed> —False if there's nothing to show, true if everything went well or an array containing error indicators if the test failed
sanitizeMSCutPaste()
Microsoft uses their own character set Code Page 1252 (CP1252), which is a superset of ISO 8859-1, defining several characters between DEC 128 and 159 that are not normally displayable. This converts the popular ones that appear from a cut and paste from Windows.
sanitizeMSCutPaste(string $string) : string
Parameters
- $string : string
-
The string.
Return values
string —The sanitized string.
smf_crc32()
Compatibility function.
smf_crc32(string $number) : string
crc32 doesn't work as expected on 64-bit functions - make our own. https://php.net/crc32#79567
Parameters
- $number : string
Return values
string —The crc32 polynomial of $number
idn_to_ascii()
Compatibility function.
idn_to_ascii(string $domain[, int $flags = 0 ][, int $variant = 1 ][, array<string|int, mixed>|null &$idna_info = null ]) : string|bool
This is not a complete polyfill:
- $flags only supports IDNA_DEFAULT, IDNA_NONTRANSITIONAL_TO_ASCII, and IDNA_USE_STD3_RULES.
- $variant is ignored, because INTL_IDNA_VARIANT_UTS46 is always used.
- $idna_info is ignored.
Parameters
- $domain : string
-
The domain to convert, which must be UTF-8 encoded.
- $flags : int = 0
-
A subset of possible IDNA_* flags.
- $variant : int = 1
-
Ignored in this compatibility function.
- $idna_info : array<string|int, mixed>|null = null
-
Ignored in this compatibility function.
Return values
string|bool —The domain name encoded in ASCII-compatible form, or false on failure.
idn_to_utf8()
Compatibility function.
idn_to_utf8(string $domain[, int $flags = 0 ][, int $variant = 1 ][, array<string|int, mixed>|null &$idna_info = null ]) : string|bool
This is not a complete polyfill:
- $flags only supports IDNA_DEFAULT, IDNA_NONTRANSITIONAL_TO_UNICODE, and IDNA_USE_STD3_RULES.
- $variant is ignored, because INTL_IDNA_VARIANT_UTS46 is always used.
- $idna_info is ignored.
Parameters
- $domain : string
-
Domain to convert, in an IDNA ASCII-compatible format.
- $flags : int = 0
-
Ignored in this compatibility function.
- $variant : int = 1
-
Ignored in this compatibility function.
- $idna_info : array<string|int, mixed>|null = null
-
Ignored in this compatibility function.
Return values
string|bool —The domain name in Unicode, encoded in UTF-8, or false on failure.
array_is_list()
array_is_list(array<string|int, mixed> $array) : bool
Parameters
- $array : array<string|int, mixed>
Return values
boolutf8_casefold_simple_maps()
Helper function for utf8_casefold.
utf8_casefold_simple_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Casefolding maps.
utf8_casefold_maps()
Helper function for utf8_casefold.
utf8_casefold_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Casefolding maps.
utf8_strtolower_simple_maps()
Helper function for utf8_strtolower.
utf8_strtolower_simple_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Uppercase to lowercase maps.
utf8_strtolower_maps()
Helper function for utf8_strtolower.
utf8_strtolower_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Uppercase to lowercase maps.
utf8_titlecase_simple_maps()
Helper function for utf8_convert_case.
utf8_titlecase_simple_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Simple title case maps.
utf8_titlecase_maps()
Helper function for utf8_convert_case.
utf8_titlecase_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Full title case maps.
utf8_strtoupper_simple_maps()
Helper function for utf8_strtoupper.
utf8_strtoupper_simple_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Lowercase to uppercase maps.
utf8_strtoupper_maps()
Helper function for utf8_strtoupper.
utf8_strtoupper_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Lowercase to uppercase maps.
utf8_combining_classes()
Helper function for utf8_normalize_d.
utf8_combining_classes() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Combining Class data for Unicode normalization.
utf8_compose_maps()
Helper function for utf8_compose.
utf8_compose_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Composition maps for Unicode normalization.
utf8_confusables()
Helper function for SMF\Unicode\SpoofDetector::getSkeletonString.
utf8_confusables() : array<string|int, mixed>
Returns an array of "confusables" maps that can be used for confusable string detection.
Data compiled from: https://www.unicode.org/Public/security/latest/confusables.txt
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —"Confusables" maps.
utf8_character_scripts()
Helper function for SpoofDetector::resolveScriptSet.
utf8_character_scripts() : array<string|int, mixed>
Each key in the returned array defines the END of a range of characters that all have the same script set. For example, the first key, "\x40", means the range of characters from "\x0" to "\x40". Then the second key, "\x5A", means the range from "\x41" to "\x5A".
The first entry in each value array indicates the primary script (i.e. the value of the Script property) for that set of characters. If those characters can also occur in a limited number of other scripts (i.e. the Script_Extensions property for those characters is not empty), those additional scripts are listed after the first.
See https://www.unicode.org/reports/tr24/ for more info.
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Script data for ranges of Unicode characters.
utf8_regex_identifier_status()
Helper function for SpoofDetector::checkHomographNames.
utf8_regex_identifier_status() : array<string|int, mixed>
Returns an array of regexes that can be used to check the "identifier status" of characters in a string.
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Character classes for identifier statuses.
currencies()
Helper function for SMF\Localization\MessageFormatter::formatMessage.
currencies() : array<string|int, mixed>
Rules compiled from: https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-core/supplemental/currencyData.json
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Information about different currencies
country_currencies()
Helper function for SMF\Localization\MessageFormatter::formatMessage.
country_currencies() : array<string|int, mixed>
Rules compiled from: https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-core/supplemental/currencyData.json
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Information about currencies used in different countries
utf8_normalize_d_maps()
Helper function for utf8_normalize_d.
utf8_normalize_d_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Canonical Decomposition maps for Unicode normalization.
utf8_normalize_kd_maps()
Helper function for utf8_normalize_kd.
utf8_normalize_kd_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Compatibility Decomposition maps for Unicode normalization.
utf8_default_ignorables()
Helper function for utf8_normalize_kc_casefold.
utf8_default_ignorables() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Characters with the 'Default_Ignorable_Code_Point' property.
idna_maps()
Helper function for idn_to_* polyfills.
idna_maps() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Character maps for IDNA processing.
idna_maps_deviation()
Helper function for idn_to_* polyfills.
idna_maps_deviation() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —"Deviation" character maps for IDNA processing.
idna_regex()
Helper function for idn_to_* polyfills.
idna_regex() : array<string|int, mixed>
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Regular expressions useful for IDNA processing.
plurals()
Helper function for SMF\Localization\MessageFormatter::formatMessage.
plurals() : array<string|int, mixed>
Rules compiled from: https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-core/supplemental/plurals.json https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-core/supplemental/ordinals.json
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Pluralization rules for different languages
utf8_regex_quick_check()
Helper function for utf8_is_normalized.
utf8_regex_quick_check() : array<string|int, mixed>
Character class lists compiled from: https://www.unicode.org/Public/UCD/latest/ucd/extracted/DerivedNormalizationProps.txt
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Character classes for disallowed characters in normalization forms.
utf8_regex_properties()
Helper function for utf8_sanitize_invisibles and utf8_convert_case.
utf8_regex_properties() : array<string|int, mixed>
Character class lists compiled from: https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt https://www.unicode.org/Public/UCD/latest/ucd/extracted/DerivedGeneralCategory.txt https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/WordBreakProperty.txt
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Character classes for various Unicode properties.
utf8_regex_variation_selectors()
Helper function for utf8_sanitize_invisibles.
utf8_regex_variation_selectors() : array<string|int, mixed>
Character class lists compiled from: https://www.unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-variation-sequences.txt
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Character classes for filtering variation selectors.
utf8_regex_joining_type()
Helper function for utf8_sanitize_invisibles.
utf8_regex_joining_type() : array<string|int, mixed>
Character class lists compiled from: https://www.unicode.org/Public/UCD/latest/ucd/extracted/DerivedJoiningType.txt
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Character classes for joining characters in certain scripts.
utf8_regex_indic()
Helper function for utf8_sanitize_invisibles.
utf8_regex_indic() : array<string|int, mixed>
Character class lists compiled from: https://www.unicode.org/Public/UCD/latest/ucd/extracted/DerivedCombiningClass.txt https://www.unicode.org/Public/UCD/latest/ucd/IndicSyllabicCategory.txt
Developers: Do not update the data in this function manually. Instead, run "php -f other/update_unicode_data.php" on the command line.
Return values
array<string|int, mixed> —Character classes for Indic scripts that use viramas.
template_ssi_above()
Displays the header for this file
template_ssi_above() : mixed
template_ssi_below()
Displays the footer for this file
template_ssi_below() : mixed
template_homepage_sample1()
Displays a sample homepage to give you an idea of what's possible using SSI functions
template_homepage_sample1([string $method = 'source' ]) : string|void
Parameters
- $method : string = 'source'
-
If 'source', simply returns the source code, otherwise displays it
Return values
string|void —Returns the HTML source if $method is 'source', otherwise displays it
template_homepage_sample1_php()
Generates the sample homepage. Used with template_homepage_sample1 if $method isn't 'source'.
template_homepage_sample1_php() : mixed
template_homepage_sample1_html()
Generates the HTML for the homepage sample. Used in conjunction with template_homepage_sample1 if method is 'source'
template_homepage_sample1_html() : string
Return values
string —The HTML code for the sample homepage
generateSubscriptionError()
Log an error then exit
generateSubscriptionError(string $text[, bool $debug = false ]) : mixed
Parameters
- $text : string
-
The error to log
- $debug : bool = false
-
If true, won't send an email if Config::$modSettings['paid_email'] isn't set
template_admin()
This is the administration center home.
template_admin() : mixed
template_credits()
Show some support information and credits to those who helped make this.
template_credits() : mixed
template_view_versions()
Displays information about file versions installed, and compares them to current version.
template_view_versions() : mixed
Tags
template_edit_censored()
Form for stopping people using naughty words, etc.
template_edit_censored() : mixed
template_not_done()
This is the page shown when we've temporarily paused things such as during maintenance tasks, sending newsletters, etc.
template_not_done() : mixed
Tags
template_show_settings()
Template for showing settings (Of any kind really!)
template_show_settings() : mixed
Tags
template_show_custom_profile()
Template for showing custom profile fields.
template_show_custom_profile() : mixed
template_edit_profile_field()
Template for editing a custom profile field
template_edit_profile_field() : mixed
template_admin_search_results()
Results page for an admin search.
template_admin_search_results() : mixed
template_callback_question_answer_list()
This little beauty shows questions and answer from the captcha type feature.
template_callback_question_answer_list() : mixed
template_repair_boards()
Repairing boards.
template_repair_boards() : mixed
Tags
template_php_info()
Retrieves info from the php_info function, scrubs and preps it for display
template_php_info() : mixed
template_clean_cache_button_above()
Content shown above the clean cache button
template_clean_cache_button_above() : mixed
template_clean_cache_button_below()
Content shown below the clean cache button?
template_clean_cache_button_below() : mixed
template_admin_quick_search()
This shows the admin search form
template_admin_quick_search() : mixed
template_main()
template_main() : mixed
template_boardindex_outer_above()
The top part of the outer layer of the boardindex
template_boardindex_outer_above() : mixed
template_newsfader()
This shows the newsfader
template_newsfader() : mixed
template_main()
This actually displays the board index
template_main() : mixed
template_bi_board_icon()
Outputs the board icon for a standard board.
template_bi_board_icon(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_redirect_icon()
Outputs the board icon for a redirect.
template_bi_redirect_icon(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_info()
Outputs the board info for a standard board or redirect.
template_bi_board_info(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_stats()
Outputs the board stats for a standard board.
template_bi_board_stats(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_redirect_stats()
Outputs the board stats for a redirect.
template_bi_redirect_stats(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_lastpost()
Outputs the board lastposts for a standard board or a redirect.
template_bi_board_lastpost(array<string|int, mixed> $board) : mixed
When on a mobile device, this may be hidden if no last post exists.
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_children()
Outputs the board children for a standard board.
template_bi_board_children(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_boardindex_outer_below()
The lower part of the outer layer of the board index
template_boardindex_outer_below() : mixed
template_info_center()
Displays the info center
template_info_center() : mixed
template_ic_block_recent()
The recent posts section of the info center
template_ic_block_recent() : mixed
template_ic_block_calendar()
The calendar section of the info center
template_ic_block_calendar() : mixed
template_ic_block_stats()
The stats section of the info center
template_ic_block_stats() : mixed
template_ic_block_online()
The who's online section of the info center
template_ic_block_online() : mixed
template_main()
Our main calendar template, which encapsulates weeks and months.
template_main() : mixed
template_show_upcoming_list()
Display a list of upcoming events, birthdays, and holidays.
template_show_upcoming_list(string $grid_name) : void|bool
Parameters
- $grid_name : string
-
The grid name
Return values
void|bool —Returns false if the grid doesn't exist.
template_show_month_grid()
Display a monthly calendar grid.
template_show_month_grid(string $grid_name[, bool $is_mini = false ]) : void|bool
Parameters
- $grid_name : string
-
The grid name
- $is_mini : bool = false
-
Is this a mini grid?
Return values
void|bool —Returns false if the grid doesn't exist.
template_show_week_grid()
Shows a weekly grid
template_show_week_grid(string $grid_name) : void|bool
Parameters
- $grid_name : string
-
The name of the grid
Return values
void|bool —Returns false if the grid doesn't exist
template_calendar_top()
Calendar controls under the title
template_calendar_top(array<string|int, mixed> $calendar_data) : mixed
Creates the view selector (list, month, week), the date selector (either a select menu or a date range chooser, depending on the circumstances), and the "Post Event" button.
Parameters
- $calendar_data : array<string|int, mixed>
-
The data for the calendar grid that this is for
template_event_post()
Template for posting a calendar event.
template_event_post() : mixed
template_bcd()
Displays a clock
template_bcd() : mixed
template_hms()
Displays the hours, minutes and seconds for our clock
template_hms() : mixed
template_omfg()
Displays a binary clock
template_omfg() : mixed
template_thetime()
Displays the time
template_thetime() : mixed
template_main()
This template handles displaying a topic
template_main() : mixed
template_single_post()
Template for displaying a single post.
template_single_post(array<string|int, mixed> $message) : mixed
Parameters
- $message : array<string|int, mixed>
-
An array of information about the message to display. Should have 'id' and 'member'. Can also have 'first_new', 'is_ignored' and 'css_class'.
template_quickreply()
The template for displaying the quick reply box.
template_quickreply() : mixed
template_fatal_error()
THis displays a fatal error message
template_fatal_error() : mixed
template_error_log()
This template handles the error log in the admin center.
template_error_log() : mixed
Tags
template_show_file()
This template shows a snippet of code from a file and highlights which line caused the error.
template_show_file() : mixed
template_attachment_errors()
This template handles showing attachment-related errors
template_attachment_errors() : mixed
template_show_backtrace()
This template shows a backtrace of the given error
template_show_backtrace() : mixed
template_event_options()
Template for the event options fieldset that is used when creating an event.
template_event_options() : mixed
Used by Calendar.template.php and Post.template.php
template_event_link_to()
Template for linking an existing topic to an event.
template_event_link_to() : mixed
template_event_unlink()
Template for unlinking a topic and an event.
template_event_unlink() : mixed
template_event_board()
Template for choosing a board to create a linked topic in.
template_event_board() : mixed
template_event_new()
Template for entering info about a new event.
template_event_new() : mixed
template_occurrence_options()
Template used when editing a single occurrence of an event.
template_occurrence_options() : mixed
template_rrule()
Template for the recurrence rule options for events.
template_rrule() : mixed
template_linked_events()
Template to show linked events.
template_linked_events() : mixed
template_control_richedit()
This function displays all the stuff you get with a richedit box - BBC, smileys, etc.
template_control_richedit(string $editor_id[, null|bool $smileyContainer = null ][, null|bool $bbcContainer = null ]) : mixed
Parameters
- $editor_id : string
-
The editor ID
- $smileyContainer : null|bool = null
-
If null, hides the smiley section regardless of settings
- $bbcContainer : null|bool = null
-
If null, hides the bbcode buttons regardless of settings
template_control_richedit_buttons()
This template shows the form buttons at the bottom of the editor
template_control_richedit_buttons(string $editor_id) : mixed
Parameters
- $editor_id : string
-
The editor ID
template_control_verification()
This template displays a verification form
template_control_verification(int|string $verify_id[, string $display_type = 'all' ][, bool $reset = false ]) : bool
Parameters
- $verify_id : int|string
-
The verification control ID
- $display_type : string = 'all'
-
What type to display. Can be 'single' to only show one verification option or 'all' to show all of them
- $reset : bool = false
-
Whether to reset the internal tracking counter
Return values
bool —False if there's nothing else to show, true if $display_type is 'single', nothing otherwise
template_show_list()
This template handles displaying a list
template_show_list([string $list_id = null ]) : mixed
Parameters
- $list_id : string = null
-
The list ID. If null, uses Utils::$context['default_list'].
template_additional_rows()
This template displays additional rows above or below the list.
template_additional_rows(string $row_position, array<string|int, mixed> $cur_list) : mixed
Parameters
- $row_position : string
-
The position ('top', 'bottom', etc.)
- $cur_list : array<string|int, mixed>
-
An array with the data for the current list
template_generic_menu_dropdown_above()
This contains the HTML for the menu bar at the top of the admin center.
template_generic_menu_dropdown_above() : mixed
template_generic_menu_dropdown_below()
Part of the admin layer - used with generic_menu_dropdown_above to close the admin content div.
template_generic_menu_dropdown_below() : mixed
template_generic_menu()
The template for displaying a menu
template_generic_menu(array<string|int, mixed> &$menu_context) : mixed
Parameters
- $menu_context : array<string|int, mixed>
-
An array of menu information
template_generic_menu_tabs()
The code for displaying the menu
template_generic_menu_tabs(array<string|int, mixed> &$menu_context) : mixed
Parameters
- $menu_context : array<string|int, mixed>
-
An array of menu context data
template_popup()
This displays a help popup thingy
template_popup() : mixed
template_manual()
The main help page
template_manual() : mixed
template_init()
Initialize the template... mainly little settings.
template_init() : mixed
template_html_above()
The main sub template above the content.
template_html_above() : mixed
template_body_above()
The upper part of the main template layer. This is the stuff that shows above the main forum content.
template_body_above() : mixed
template_body_below()
The stuff shown immediately below the main content, including the footer
template_body_below() : mixed
template_html_below()
This shows any deferred JavaScript and closes out the HTML
template_html_below() : mixed
theme_linktree()
Show a linktree. This is that thing that shows "My Community | General Category | General Discussion".
theme_linktree([bool $force_show = false ]) : mixed
.
Parameters
- $force_show : bool = false
-
Whether to force showing it even if settings say otherwise
template_menu()
Show the menu up top. Something like [home] [help] [profile] [logout].
template_menu() : mixed
..
template_button_strip()
Generate a strip of buttons.
template_button_strip(array<string|int, mixed> $button_strip[, string $direction = '' ][, array<string|int, mixed> $strip_options = array() ]) : mixed
Parameters
- $button_strip : array<string|int, mixed>
-
An array with info for displaying the strip
- $direction : string = ''
-
The direction
- $strip_options : array<string|int, mixed> = array()
-
Options for the button strip
template_quickbuttons()
Generate a list of quickbuttons.
template_quickbuttons(array<string|int, mixed> $list_items[, string $list_class = null ][, string $output_method = 'echo' ]) : void|string
Parameters
- $list_items : array<string|int, mixed>
-
An array with info for displaying the strip
- $list_class : string = null
-
Used for integration hooks and as a class name
- $output_method : string = 'echo'
-
The output method. If 'echo', simply displays the buttons, otherwise returns the HTML for them
Return values
void|string —Returns nothing unless output_method is something other than 'echo'
template_maint_warning_above()
The upper part of the maintenance warning box
template_maint_warning_above() : mixed
template_maint_warning_below()
The lower part of the maintenance warning box.
template_maint_warning_below() : mixed
template_security_warning_above()
The upper part of the security warning box
template_security_warning_above() : mixed
template_security_warning_below()
The lower part of the security warning box.
template_security_warning_below() : mixed
template_banned_warning_above()
The upper part of the ban warning box
template_banned_warning_above() : mixed
template_banned_warning_below()
The lower part of the ban warning box.
template_banned_warning_below() : mixed
template_popup()
This shows the popup that shows who likes a particular post.
template_popup() : mixed
Tags
template_like()
Display a like button and info about how many people liked something
template_like() : mixed
template_generic()
A generic template that outputs any data passed to it.
template_generic() : mixed
..
template_login()
This is just the basic "login" form.
template_login() : mixed
template_login_tfa()
TFA authentication form
template_login_tfa() : mixed
template_kick_guest()
Tell a guest to get lost or login!
template_kick_guest() : mixed
template_maintenance()
This is for maintenance mode.
template_maintenance() : mixed
template_admin_login()
This is for the security stuff - makes administrators login every so often.
template_admin_login() : mixed
template_retry_activate()
Activate your account manually?
template_retry_activate() : mixed
template_resend()
The form for resending the activation code.
template_resend() : mixed
template_logout()
Confirm a logout.
template_logout() : mixed
template_avatar_settings_above()
This template wraps around the simple settings page to add javascript functionality.
template_avatar_settings_above() : mixed
template_avatar_settings_below()
JavaScript to be output below the simple settings page
template_avatar_settings_below() : mixed
template_maintenance()
The attachment maintenance page
template_maintenance() : mixed
Tags
template_attachment_repair()
The file repair page
template_attachment_repair() : mixed
template_attachment_paths()
The page that handles managing attachment paths.
template_attachment_paths() : mixed
template_ban_edit()
Add or edit a ban
template_ban_edit() : mixed
template_ban_edit_trigger()
Add or edit a ban trigger
template_ban_edit_trigger() : mixed
template_main()
Template for listing all the current categories and boards.
template_main() : mixed
template_modify_category()
Template for editing/adding a category on the forum.
template_modify_category() : mixed
template_confirm_category_delete()
A template to confirm if a user wishes to delete a category - and whether they want to save the boards.
template_confirm_category_delete() : mixed
template_modify_board()
Below is the template for adding/editing a board on the forum.
template_modify_board() : mixed
template_confirm_board_delete()
A template used when a user is deleting a board with child boards in it - to see what they want to do with them.
template_confirm_board_delete() : mixed
template_edit_holiday()
Editing or adding holidays.
template_edit_holiday() : mixed
template_import()
Importing iCalendar data.
template_import() : mixed
template_download_language()
Download a new language file.
template_download_language() : mixed
Tags
template_modify_language_entries()
Edit language entries. Note that this doesn't always work because of PHP's max_post_vars setting.
template_modify_language_entries() : mixed
template_add_language()
Add a new language
template_add_language() : mixed
Tags
template_browse()
Template for browsing the mail queue.
template_browse() : mixed
template_mailtest()
Template for testing mail send.
template_mailtest() : mixed
template_maintain_database()
Template for the database maintenance tasks.
template_maintain_database() : mixed
template_maintain_routine()
Template for the routine maintenance tasks.
template_maintain_routine() : mixed
template_maintain_members()
Template for the member maintenance tasks.
template_maintain_members() : mixed
template_maintain_topics()
Template for the topic maintenance tasks.
template_maintain_topics() : mixed
template_optimize()
Simple template for showing results of our optimization.
template_optimize() : mixed
..
Tags
template_convert_entities()
Template for converting entities to UTF-8 characters
template_convert_entities() : mixed
Tags
template_convert_msgbody()
Template for converting posts to UTF-8.
template_convert_msgbody() : mixed
Tags
template_main()
The main page listing all the groups.
template_main() : mixed
template_new_group()
Add a new membergroup.
template_new_group() : mixed
Tags
template_edit_group()
Edit an existing membergroup.
template_edit_group() : mixed
Tags
template_add_edit_group_boards_list()
The template for determining which boards a group has access to.
template_add_edit_group_boards_list([bool $collapse = true ][, mixed $form_id = 'new_group' ]) : mixed
Parameters
- $collapse : bool = true
-
Whether to collapse the list by default
- $form_id : mixed = 'new_group'
template_group_members()
Template for viewing the members of a group.
template_group_members() : mixed
Tags
template_group_request_reason()
Allow the moderator to enter a reason to each user being rejected.
template_group_request_reason() : mixed
template_search_members()
The admin member search form
template_search_members() : mixed
Tags
template_admin_browse()
The admin member list.
template_admin_browse() : mixed
Tags
template_email_members()
The template for sending newsletters
template_email_members() : mixed
Tags
template_email_members_compose()
The form for composing a newsletter
template_email_members_compose() : mixed
Tags
template_email_members_send()
The page shown while the newsletter is being sent
template_email_members_send() : mixed
Tags
template_news_lists()
The settings page.
template_news_lists() : mixed
template_modify_subscription()
The template for adding or editing a subscription.
template_modify_subscription() : mixed
template_delete_subscription()
The page for deleting a subscription.
template_delete_subscription() : mixed
template_modify_user_subscription()
Add or edit an existing subscriber.
template_modify_user_subscription() : mixed
template_user_subscription()
Template for a user to edit/pick their subscriptions.
template_user_subscription() : mixed
template_choose_payment()
The "choose payment" dialog.
template_choose_payment() : mixed
template_paid_done()
The "thank you" bit.
template_paid_done() : mixed
..
template_permission_index()
The main manage permissions page
template_permission_index() : mixed
Tags
template_by_board()
THe page that shows which permissions profile applies to each board
template_by_board() : mixed
template_edit_profiles()
Edit permission profiles (predefined).
template_edit_profiles() : mixed
template_modify_group()
Modify a group's permissions
template_modify_group() : mixed
template_modify_group_display()
The way of looking at permissions.
template_modify_group_display(string $type) : mixed
Parameters
- $type : string
-
The permissions type
template_inline_permissions()
A form for displaying inline permissions, such as on a settings page.
template_inline_permissions() : mixed
template_postmod_permissions()
Edit post moderation permissions.
template_postmod_permissions() : mixed
template_view_scheduled_tasks()
Template for listing all scheduled tasks.
template_view_scheduled_tasks() : mixed
Tags
template_edit_scheduled_tasks()
A template for, you guessed it, editing a task!
template_edit_scheduled_tasks() : mixed
Tags
template_modify_weights()
Modify the search weights.
template_modify_weights() : mixed
Tags
template_select_search_method()
Select the search method.
template_select_search_method() : mixed
Tags
template_create_index()
Create a search index.
template_create_index() : mixed
Tags
template_create_index_progress()
Display a progress page while creating a search index.
template_create_index_progress() : mixed
Tags
template_create_index_done()
Done creating a search index.
template_create_index_done() : mixed
Tags
template_spider_edit()
Add or edit a search engine spider.
template_spider_edit() : mixed
template_show_spider_logs()
Show... spider... logs.
template_show_spider_logs() : mixed
..
template_show_spider_stats()
Show... spider... stats.
template_show_spider_stats() : mixed
..
template_editsets()
Shows a list of smiley sets so you can edit them.
template_editsets() : mixed
template_modifyset()
Modifying a smiley set.
template_modifyset() : mixed
template_modifysmiley()
Editing an individual smiley
template_modifysmiley() : mixed
template_addsmiley()
Adding a new smiley.
template_addsmiley() : mixed
template_setorder()
Ordering smileys.
template_setorder() : mixed
template_editicons()
Editing Message Icons
template_editicons() : mixed
template_editicon()
Editing an individual message icon
template_editicon() : mixed
template_main()
Displays a sortable listing of all members registered on the forum.
template_main() : mixed
template_search()
A page allowing people to search the member list.
template_search() : mixed
template_main()
The main messageindex.
template_main() : mixed
template_bi_board_icon()
Outputs the board icon for a standard board.
template_bi_board_icon(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_redirect_icon()
Outputs the board icon for a redirect.
template_bi_redirect_icon(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_info()
Outputs the board info for a standard board or redirect.
template_bi_board_info(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_stats()
Outputs the board stats for a standard board.
template_bi_board_stats(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_redirect_stats()
Outputs the board stats for a redirect.
template_bi_redirect_stats(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_lastpost()
Outputs the board lastposts for a standard board or a redirect.
template_bi_board_lastpost(array<string|int, mixed> $board) : mixed
When on a mobile device, this may be hidden if no last post exists.
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_bi_board_children()
Outputs the board children for a standard board.
template_bi_board_children(array<string|int, mixed> $board) : mixed
Parameters
- $board : array<string|int, mixed>
-
Current board information.
template_topic_legend()
Shows a legend for topic icons.
template_topic_legend() : mixed
template_moderation_center()
The main moderation center.
template_moderation_center() : mixed
template_group_requests_block()
Show all the group requests the user can see.
template_group_requests_block() : mixed
template_watched_users()
A list of watched users
template_watched_users() : mixed
template_reported_posts_block()
A list of reported posts
template_reported_posts_block() : mixed
template_reported_users_block()
A list of reported users
template_reported_users_block() : mixed
template_notes()
Little section for making... notes.
template_notes() : mixed
template_unapproved_posts()
Show a list of all the unapproved posts
template_unapproved_posts() : mixed
template_user_watch_post_callback()
Callback function for showing a watched users post in the table.
template_user_watch_post_callback(array<string|int, mixed> $post) : string
Parameters
- $post : array<string|int, mixed>
-
An array of data about the post.
Return values
string —An array of HTML for showing the post info.
template_moderation_settings()
The moderation settings page.
template_moderation_settings() : mixed
template_show_notice()
Show a notice sent to a user.
template_show_notice() : mixed
template_warn_template()
Add or edit a warning template.
template_warn_template() : mixed
template_move()
Show an interface for selecting which board to move a post to.
template_move() : mixed
template_redirect_options()
Redirection topic options
template_redirect_options(string $type) : mixed
Parameters
- $type : string
-
What type of topic this is for - currently 'merge' or 'move'. Used to display appropriate text strings...
template_merge_done()
Confirmation page shown when finished merging topics.
template_merge_done() : mixed
template_merge()
Merge topic page.
template_merge() : mixed
template_merge_extra_options()
Extra options related to merging topics.
template_merge_extra_options() : mixed
template_main()
The main notification bar.
template_main() : mixed
template_notify_board()
Board notification bar.
template_notify_board() : mixed
Tags
template_notify_announcements()
template_notify_announcements() : mixed
template_notify_pref_changed()
Displays a message indicating the user's notification preferences were successfully changed
template_notify_pref_changed() : mixed
template_main()
The main template
template_main() : mixed
template_view_package()
View package details when installing/uninstalling
template_view_package() : mixed
template_extract_package()
Extract package contents
template_extract_package() : mixed
template_list()
List files in a package
template_list() : mixed
template_examine()
Examine a single file within a package
template_examine() : mixed
template_browse()
List all packages
template_browse() : mixed
template_servers()
List package servers
template_servers() : mixed
template_package_confirm()
Confirm package operation
template_package_confirm() : mixed
template_package_list()
List packages.
template_package_list() : mixed
template_downloaded()
Confirmation page showing a package was uploaded/downloaded successfully.
template_downloaded() : mixed
template_install_options()
Installation options - FTP info and backup settings
template_install_options() : mixed
template_control_chmod()
CHMOD control form
template_control_chmod() : bool
Return values
bool —False if nothing to do.
template_ftp_required()
Wrapper for the above template function showing that FTP is required
template_ftp_required() : mixed
template_view_operations()
View operation details.
template_view_operations() : mixed
template_file_permissions()
The file permissions page.
template_file_permissions() : mixed
template_permission_show_contents()
Shows permissions for items within a directory (called from template_file_permissions)
template_permission_show_contents(string $ident, array<string|int, mixed> $contents, int $level[, bool $has_more = false ]) : mixed
Parameters
- $ident : string
-
A unique ID - typically the directory name
- $contents : array<string|int, mixed>
-
An array of items within the directory
- $level : int
-
How far to go inside the directory
- $has_more : bool = false
-
Whether there are more files to display besides what's in $contents
template_action_permissions()
A progress page showing what permissions changes are being applied
template_action_permissions() : mixed
template_pm_above()
This is for stuff above the menu in the personal messages section
template_pm_above() : mixed
template_pm_below()
Just the end of the index bar, nothing special.
template_pm_below() : mixed
template_pm_popup()
Displays a popup with information about your personal messages
template_pm_popup() : mixed
template_folder()
Shows a particular folder (eg inbox or outbox), all the PMs in it, etc.
template_folder() : mixed
template_single_pm()
Template for displaying a single personal message.
template_single_pm(array<string|int, mixed> $message) : mixed
Parameters
- $message : array<string|int, mixed>
-
An array of information about the message to display.
template_subject_list()
Just list all the personal message subjects - to make templates easier.
template_subject_list() : mixed
template_search()
The form for the PM search feature
template_search() : mixed
template_search_results()
Displays results from a PM search
template_search_results() : mixed
template_send()
The form for sending a new PM
template_send() : mixed
template_ask_delete()
This template asks the user whether they wish to empty out their folder/messages.
template_ask_delete() : mixed
template_prune()
This template asks the user what messages they want to prune.
template_prune() : mixed
template_labels()
Here we allow the user to setup labels, remove labels and change rules for labels (i.e, do quite a bit)
template_labels() : mixed
template_report_message()
Template for reporting a personal message.
template_report_message() : mixed
Tags
template_report_message_complete()
Little template just to say "Yep, it's been submitted"
template_report_message_complete() : mixed
template_rules()
Manage rules.
template_rules() : mixed
template_add_rule()
Template for adding/editing a rule.
template_add_rule() : mixed
template_showPMDrafts()
Template for showing all of a user's PM drafts.
template_showPMDrafts() : mixed
template_main()
A form for creating and/or editing a poll.
template_main() : mixed
template_main()
The main template for the post page.
template_main() : mixed
template_spellcheck()
The template for the spellchecker.
template_spellcheck() : mixed
template_quotefast()
The template for the AJAX quote feature
template_quotefast() : mixed
template_announce()
The form for sending out an announcement
template_announce() : mixed
template_announcement_send()
The confirmation/progress page, displayed after the admin has clicked the button to send the announcement.
template_announcement_send() : mixed
template_post_header()
Prints the input fields in the form's header (subject, message icon, guest name & email, etc.)
template_post_header() : mixed
Mod authors can use the 'integrate_post_end' hook to modify or add to these (see Post.php).
Theme authors can customize the output in a couple different ways:
- Change specific values in the Utils::$context['posting_fields'] array.
- Add an 'html' element to the 'label' and/or 'input' elements of the field they want to change. This should contain the literal HTML string to be printed.
See the documentation in Post.php for more info on the Utils::$context['posting_fields'] array.
template_print_above()
The header. Defines the look and layout of the page as well as a form for choosing print options.
template_print_above() : mixed
template_main()
The main page. This shows the relevant info in a printer-friendly format
template_main() : mixed
template_print_below()
The footer.
template_print_below() : mixed
template_print_options()
Displays the print page options
template_print_options() : mixed
template_profile_above()
Minor stuff shown above the main profile - mostly used for error messages and showing that the profile update was successful.
template_profile_above() : mixed
template_profile_below()
Template for any HTML needed below the profile (closing off divs/tables, etc.)
template_profile_below() : mixed
template_profile_popup()
Template for showing off the spiffy popup of the menu
template_profile_popup() : mixed
template_alerts_popup()
The "popup" showing the user's alerts
template_alerts_popup() : mixed
template_alerts_all_read()
A simple template to say "You don't have any unread alerts".
template_alerts_all_read() : mixed
template_summary()
This template displays a user's details without any option to edit them.
template_summary() : mixed
template_showPosts()
Template for showing all the posts of the user, in chronological order.
template_showPosts() : mixed
template_showAlerts()
Template for showing all alerts
template_showAlerts() : mixed
template_showDrafts()
Template for showing all of a user's drafts
template_showDrafts() : mixed
template_editBuddies()
Template for showing and managing the buddy list.
template_editBuddies() : mixed
template_editIgnoreList()
Template for showing the ignore list of the current user.
template_editIgnoreList() : mixed
template_trackActivity()
This template shows an admin information on a users IP addresses used and errors attributed to them.
template_trackActivity() : mixed
template_trackIP()
The template for trackIP, allowing the admin to see where/who a certain IP has been used.
template_trackIP() : mixed
template_showPermissions()
This template shows an admin which permissions a user have and which group(s) give them each permission.
template_showPermissions() : mixed
template_statPanel()
Template for user statistics, showing graphs and the like.
template_statPanel() : mixed
template_edit_options()
Template for editing profile options.
template_edit_options() : mixed
template_profile_pm_settings()
Personal Message settings.
template_profile_pm_settings() : mixed
template_profile_theme_settings()
Template for showing theme settings. Note: template_options() actually adds the theme specific options.
template_profile_theme_settings() : mixed
template_alert_configuration()
The template for configuring alerts
template_alert_configuration() : mixed
template_alert_notifications_topics()
Template for showing which topics you're subscribed to
template_alert_notifications_topics() : mixed
template_alert_notifications_boards()
Template for showing which boards you're subscribed to
template_alert_notifications_boards() : mixed
template_groupMembership()
Template for choosing group membership.
template_groupMembership() : mixed
template_ignoreboards()
Template for managing ignored boards
template_ignoreboards() : mixed
template_load_warning_variables()
Simply loads some theme variables common to several warning templates.
template_load_warning_variables() : mixed
template_viewWarning()
Template for viewing a user's warnings
template_viewWarning() : mixed
template_issueWarning()
Template for issuing warnings
template_issueWarning() : mixed
template_deleteAccount()
Template to show for deleting a user's account - now with added delete post capability!
template_deleteAccount() : mixed
template_profile_save()
Template for the password box/save button stuck at the bottom of every profile page.
template_profile_save() : mixed
template_error_message()
Small template for showing an error message upon a save problem in the profile.
template_error_message() : mixed
template_profile_group_manage()
Display a load of drop down selectors for allowing the user to change group.
template_profile_group_manage() : mixed
template_profile_birthdate()
Callback function for entering a birthdate!
template_profile_birthdate() : mixed
template_profile_signature_modify()
Show the signature editing box?
template_profile_signature_modify() : mixed
template_profile_avatar_select()
Template for selecting an avatar
template_profile_avatar_select() : mixed
template_max_size()
This is just a really little helper to avoid duplicating code unnecessarily
template_max_size(string $type) : mixed
Parameters
- $type : string
-
The type of avatar
template_profile_timeformat_modify()
Select the time format!
template_profile_timeformat_modify() : mixed
template_profile_theme_pick()
Template for picking a theme
template_profile_theme_pick() : mixed
template_profile_smiley_pick()
Smiley set picker.
template_profile_smiley_pick() : mixed
template_tfasetup()
Template for setting up and managing Two-Factor Authentication.
template_tfasetup() : mixed
template_tfadisable()
Template for disabling two-factor authentication.
template_tfadisable() : mixed
template_tfasetup_backup()
Template for setting up 2FA backup code
template_tfasetup_backup() : mixed
template_profile_tfa()
Simple template for showing the 2FA area when editing a profile.
template_profile_tfa() : mixed
template_export_profile_data()
Template for initiating and retrieving profile data exports
template_export_profile_data() : mixed
template_recent()
Template for showing recent posts
template_recent() : mixed
template_unread()
Template for showing unread posts
template_unread() : mixed
template_replies()
Template for showing unread replies (eg new replies to topics you've posted in)
template_replies() : mixed
template_registration_agreement()
Before showing users a registration form, show them the registration agreement.
template_registration_agreement() : mixed
template_registration_form()
Before registering - get their information.
template_registration_form() : mixed
template_after()
After registration... all done ;).
template_after() : mixed
template_coppa()
Template for giving instructions about COPPA activation.
template_coppa() : mixed
template_coppa_form()
An easily printable form for giving permission to access the forum for a minor.
template_coppa_form() : mixed
template_verification_sound()
Show a window containing the spoken verification code.
template_verification_sound() : mixed
template_admin_register()
The template for the form allowing an admin to register a user from the admin center.
template_admin_register() : mixed
Tags
template_edit_agreement()
Form for editing the agreement shown for people registering to the forum.
template_edit_agreement() : mixed
Tags
template_edit_reserved_words()
Template for editing reserved words.
template_edit_reserved_words() : mixed
Tags
template_edit_privacy_policy()
template_edit_privacy_policy() : mixed
template_main()
The main "Here's how you can reset your password" page
template_main() : mixed
template_reminder_pick()
The page to pick an option - secret question/answer (if set) or email
template_reminder_pick() : mixed
template_sent()
Just a simple "We sent you an email. Click the link in it to continue." message
template_sent() : mixed
template_set_password()
Template for setting the new password
template_set_password() : mixed
template_ask()
The page that asks a user to answer their secret question
template_ask() : mixed
template_reported_posts()
Displays all reported posts.
template_reported_posts() : mixed
template_reported_posts_block()
A block to show the current top reported posts.
template_reported_posts_block() : mixed
template_viewmodreport()
Handles viewing details of and managing a specific report
template_viewmodreport() : mixed
template_edit_comment()
Template for editing a mod comment.
template_edit_comment() : mixed
template_reported_members_block()
A block to show the current top reported member profiles.
template_reported_members_block() : mixed
template_reported_members()
Lists all reported members
template_reported_members() : mixed
template_viewmemberreport()
Template for viewing and managing a specific report about a user's profile
template_viewmemberreport() : mixed
template_report_type()
Choose which type of report to run?
template_report_type() : mixed
template_main()
This is the standard template for showing reports.
template_main() : mixed
template_print_above()
Header of the print page!
template_print_above() : mixed
template_print()
The main print page
template_print() : mixed
template_print_below()
Footer of the print page.
template_print_below() : mixed
template_main()
The main "report this to the moderator" page
template_main() : mixed
template_main()
The main search form
template_main() : mixed
template_results()
The search results page.
template_results() : mixed
template_options()
This pseudo-template defines all the theme options
template_options() : mixed
template_settings()
This pseudo-template defines all the available theme settings (but not their actual values)
template_settings() : mixed
template_ask()
The form that asks how you want to split things
template_ask() : mixed
template_main()
A simple confirmation that things were split as expected, with links to the current board and the old and new topics.
template_main() : mixed
template_select()
The form for selecting which posts to split.
template_select() : mixed
template_main()
The stats page.
template_main() : mixed
template_main()
The main sub template - for theme administration.
template_main() : mixed
template_list_themes()
This lists all themes
template_list_themes() : mixed
template_reset_list()
This lets you reset themes
template_reset_list() : mixed
template_set_options()
This displays the form for setting theme options
template_set_options() : mixed
template_set_settings()
The page for setting and managing theme settings.
template_set_settings() : mixed
template_pick()
This template allows for the selection of different themes ;)
template_pick() : mixed
template_installed()
Okay, that theme was installed/updated successfully!
template_installed() : mixed
template_edit_list()
The page for editing themes.
template_edit_list() : mixed
template_copy_template()
The page allowing you to copy a template from one theme to another.
template_copy_template() : mixed
Tags
template_edit_browse()
This lets you browse a list of files in a theme so you can choose which one to edit.
template_edit_browse() : mixed
template_edit_style()
Wanna edit the stylesheet?
template_edit_style() : mixed
template_edit_template()
This edits the template.
template_edit_template() : mixed
..
template_edit_file()
This allows you to edit a file
template_edit_file() : mixed
template_main()
This handles the Who's Online page
template_main() : mixed
template_credits()
This displays a nice credits page
template_credits() : mixed
template_sendbody()
This defines the XML for sending the body of a message
template_sendbody() : mixed
template_quotefast()
This defines the XML for the AJAX quote feature
template_quotefast() : mixed
template_modifyfast()
This defines the XML for the inline edit feature
template_modifyfast() : mixed
template_modifydone()
The XML for handling things when you're done editing a post inline
template_modifydone() : mixed
template_modifytopicdone()
This handles things when editing a topic's subject from the messageindex.
template_modifytopicdone() : mixed
template_post()
The massive XML for previewing posts.
template_post() : mixed
template_pm()
All the XML for previewing a PM
template_pm() : mixed
template_warning()
The XML for previewing a warning
template_warning() : mixed
template_stats()
The XML for hiding/showing stats sections via AJAX
template_stats() : mixed
template_split()
The XML for selecting items to split
template_split() : mixed
template_button_strip()
template_button_strip(mixed $button_strip[, mixed $direction = 'top' ][, mixed $strip_options = array() ]) : mixed
Parameters
- $button_strip : mixed
- $direction : mixed = 'top'
- $strip_options : mixed = array()
template_menu()
template_menu() : mixed
theme_linktree()
theme_linktree() : mixed
template_results()
XML for search results
template_results() : mixed
template_jump_to()
The XML for the Jump To box
template_jump_to() : mixed
template_message_icons()
The XML for displaying a column of message icons and selecting one via AJAX
template_message_icons() : mixed
template_check_username()
The XML for instantly showing whether a username is valid on the registration page
template_check_username() : mixed
template_generic_xml()
This prints XML in its most generic form.
template_generic_xml() : mixed
template_generic_xml_recursive()
Recursive function for displaying generic XML data.
template_generic_xml_recursive(array<string|int, mixed> $xml_data, string $parent_ident, string $child_ident, int $level) : mixed
Parameters
- $xml_data : array<string|int, mixed>
-
An array of XML data
- $parent_ident : string
-
The parent tag
- $child_ident : string
-
The child tag
- $level : int
-
How many levels to indent the code
find_signed_off()
find_signed_off([mixed $commit = 'HEAD' ][, mixed $childs = array() ][, mixed $level = 0 ]) : mixed
Parameters
- $commit : mixed = 'HEAD'
- $childs : mixed = array()
- $level : mixed = 0
find_gpg()
find_gpg([mixed $commit = 'HEAD' ][, mixed $childs = array() ]) : mixed
Parameters
- $commit : mixed = 'HEAD'
- $childs : mixed = array()
find_signed_off_parents()
find_signed_off_parents([mixed $commit = 'HEAD' ]) : mixed
Parameters
- $commit : mixed = 'HEAD'
debugPrint()
debugPrint(mixed $msg) : mixed
Parameters
- $msg : mixed
checkLanguageDirectory()
checkLanguageDirectory(mixed $language_dir, mixed $search) : mixed
Parameters
- $language_dir : mixed
- $search : mixed
prepareCLIhandler()
prepareCLIhandler() : mixed