Documentation

Features
in package
implements ActionInterface uses ActionTrait, BackwardCompatibility

Class to manage various core features.

Table of Contents

Interfaces

ActionInterface
Interface for all action classes.

Properties

$subaction  : string
$subactions  : array<string|int, mixed>
$obj  : static

Methods

alerts()  : void
Handles modifying the alerts settings.
basic()  : void
Config array for changing the basic forum settings
basicConfigVars()  : array<string|int, mixed>
Gets the configuration variables for the basic sub-action.
bbc()  : void
Set a few Bulletin Board Code settings.
bbcConfigVars()  : array<string|int, mixed>
Gets the configuration variables for the bbc sub-action.
call()  : void
Convenience method to load() and execute() an instance of this class.
canBeLogged()  : bool
Determines whether this action can be logged in the online log.
canShowDebuggingInfo()  : bool
Determines whether debugging info should be shown.
canShowInMaintenanceMode()  : bool
Determines whether this action allows access in maintenance mode.
execute()  : void
Dispatcher to whichever sub-action method is necessary.
getOutputType()  : OutputTypeInterface
Gets the output type for this action.
isAgreementAction()  : bool
Determines whether this action can be accessed without accepting the registration agreement and privacy policy.
isRestrictedGuestAccessAllowed()  : bool
Determines whether this action allows access if guest access is restricted.
isSimpleAction()  : bool
Determines whether this is a simple action.
layout()  : void
Allows modifying the global layout settings in the forum.
layoutConfigVars()  : array<string|int, mixed>
Gets the configuration variables for the layout sub-action.
likes()  : void
Handles modifying the likes settings.
likesConfigVars()  : array<string|int, mixed>
Gets the configuration variables for the likes sub-action.
list_getProfileFields()  : array<string|int, mixed>
Callback for SMF\ItemList().
list_getProfileFieldSize()  : int
Callback for SMF\ItemList().
load()  : static
Static wrapper for constructor.
mentions()  : void
Handles modifying the mentions settings.
mentionsConfigVars()  : array<string|int, mixed>
Gets the configuration variables for the mentions sub-action.
profile()  : void
Show all the custom profile fields available to the user.
profileEdit()  : void
Edit some profile fields?
sigConfigVars()  : array<string|int, mixed>
Gets the configuration variables for the sig sub-action.
signature()  : void
Handles signature settings.
subActionProvider()  : null|array<string|int, mixed>
Called by Subs-Compat.php BackwardCompatibility wrapper functions to provide subaction execution for existing mods
__construct()  : mixed
Constructor. Protected to force instantiation via self::load().
addRewriteRule()  : bool
Adds a rewrite rule to .htaccess to support queryless URLs that don't include the index.php component of the path.
custFieldsMaxOrder()  : int
Returns the maximum field_order value for the custom fields
init()  : mixed
Does some initial setup.
pauseSignatureApplySettings()  : void
Just pause the signature applying thing.

Properties

$subaction

public string $subaction = 'basic'

The requested sub-action. This should be set by the constructor.

$subactions

public static array<string|int, mixed> $subactions = ['basic' => 'basic', 'bbc' => 'bbc', 'layout' => 'layout', 'sig' => 'signature', 'profile' => 'profile', 'profileedit' => 'profileEdit', 'likes' => 'likes', 'mentions' => 'mentions', 'alerts' => 'alerts']

Available sub-actions.

$obj

protected static static $obj

An instance of this class. This is used by the load() method to prevent multiple instantiations.

Methods

alerts()

Handles modifying the alerts settings.

public alerts() : void

basic()

Config array for changing the basic forum settings

public basic() : void

Accessed via ?action=admin;area=featuresettings;sa=basic

basicConfigVars()

Gets the configuration variables for the basic sub-action.

public static basicConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

$config_vars for the basic sub-action.

bbc()

Set a few Bulletin Board Code settings.

public bbc() : void

It loads a list of Bulletin Board Code tags to allow disabling tags.

Requires the admin_forum permission. Accessed via ?action=admin;area=featuresettings;sa=bbc.

Tags
uses
template_show_settings()

bbcConfigVars()

Gets the configuration variables for the bbc sub-action.

public static bbcConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

$config_vars for the bbc sub-action.

call()

Convenience method to load() and execute() an instance of this class.

public static call() : void

canBeLogged()

Determines whether this action can be logged in the online log.

public canBeLogged() : bool
Return values
bool

canShowDebuggingInfo()

Determines whether debugging info should be shown.

public canShowDebuggingInfo() : bool
Return values
bool

canShowInMaintenanceMode()

Determines whether this action allows access in maintenance mode.

public canShowInMaintenanceMode() : bool
Return values
bool

True if access is allowed, false otherwise.

execute()

Dispatcher to whichever sub-action method is necessary.

public execute() : void

isAgreementAction()

Determines whether this action can be accessed without accepting the registration agreement and privacy policy.

public isAgreementAction() : bool
Return values
bool

isRestrictedGuestAccessAllowed()

Determines whether this action allows access if guest access is restricted.

public isRestrictedGuestAccessAllowed() : bool
Return values
bool

True if access is allowed, false otherwise.

isSimpleAction()

Determines whether this is a simple action.

public isSimpleAction() : bool
Return values
bool

layout()

Allows modifying the global layout settings in the forum.

public layout() : void

Accessed via ?action=admin;area=featuresettings;sa=layout

layoutConfigVars()

Gets the configuration variables for the layout sub-action.

public static layoutConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

$config_vars for the layout sub-action.

likes()

Handles modifying the likes settings.

public likes() : void

Accessed from ?action=admin;area=featuresettings;sa=likes

likesConfigVars()

Gets the configuration variables for the likes sub-action.

public static likesConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

$config_vars for the likes sub-action.

list_getProfileFields()

Callback for SMF\ItemList().

public static list_getProfileFields(int $start, int $items_per_page, string $sort, bool $standardFields) : array<string|int, mixed>
Parameters
$start : int

The item to start with (used for pagination purposes)

$items_per_page : int

The number of items to display per page

$sort : string

A string indicating how to sort the results

$standardFields : bool

Whether or not to include standard fields as well

Return values
array<string|int, mixed>

An array of info about the various profile fields

list_getProfileFieldSize()

Callback for SMF\ItemList().

public static list_getProfileFieldSize() : int
Return values
int

The total number of custom profile fields

load()

Static wrapper for constructor.

public static load() : static
Return values
static

An instance of this class.

mentions()

Handles modifying the mentions settings.

public mentions() : void

Accessed via ?action=admin;area=featuresettings;sa=mentions

mentionsConfigVars()

Gets the configuration variables for the mentions sub-action.

public static mentionsConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

$config_vars for the mentions sub-action.

profile()

Show all the custom profile fields available to the user.

public profile() : void

profileEdit()

Edit some profile fields?

public profileEdit() : void

sigConfigVars()

Gets the configuration variables for the sig sub-action.

public static sigConfigVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

$config_vars for the sig sub-action.

signature()

Handles signature settings.

public signature() : void

Optionally allows the admin to impose those settings on existing members.

subActionProvider()

Called by Subs-Compat.php BackwardCompatibility wrapper functions to provide subaction execution for existing mods

public static subActionProvider([null|string $sa = null ][, bool $return_config = false ][, string|null $activity = null ]) : null|array<string|int, mixed>
Parameters
$sa : null|string = null
$return_config : bool = false
$activity : string|null = null
Return values
null|array<string|int, mixed>

__construct()

Constructor. Protected to force instantiation via self::load().

protected __construct() : mixed

addRewriteRule()

Adds a rewrite rule to .htaccess to support queryless URLs that don't include the index.php component of the path.

protected addRewriteRule() : bool

Includes safety checks to see whether the rule is aleady present or not and whether we can successfully add the rule.

Note that the rule will be added the first time the admin enables both the queryless_urls setting and the hide_index_php setting, but will not be removed if the admin later disables either of those settings. This ensures that external links pointing to queryless URLs without the index.php component will still resolve after either setting is disabled.

Return values
bool

Whether the rewrite rule is now enabled.

custFieldsMaxOrder()

Returns the maximum field_order value for the custom fields

protected custFieldsMaxOrder() : int
Return values
int

The maximum value of field_order from the custom_fields table

init()

Does some initial setup.

protected init() : mixed

pauseSignatureApplySettings()

Just pause the signature applying thing.

protected pauseSignatureApplySettings() : void

        
On this page

Search results