Documentation

SearchEngines
in package
implements ActionInterface uses ActionTrait, BackwardCompatibility

Manages the settings related to search engines.

Table of Contents

Interfaces

ActionInterface
Interface for all action classes.

Properties

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

Methods

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.
consolidateSpiderStats()  : void
This function takes any unprocessed hits and turns them into stats.
edit()  : void
Here we can add, and edit, spider info!
execute()  : void
Dispatcher to whichever sub-action method is necessary.
getConfigVars()  : array<string|int, mixed>
Gets the configuration variables for this admin area.
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.
list_getNumSpiderLogs()  : int
Callback function for SMF\ItemList()
list_getNumSpiders()  : int
Callback function for SMF\ItemList()
list_getNumSpiderStats()  : int
Callback function for SMF\ItemList() Get the number of spider stat rows from the log spider stats table
list_getSpiderLogs()  : array<string|int, mixed>
Callback function for SMF\ItemList()
list_getSpiders()  : array<string|int, mixed>
Callback function for SMF\ItemList()
list_getSpiderStats()  : array<string|int, mixed>
Callback function for SMF\ItemList() Get a list of spider stats from the log_spider table
load()  : static
Static wrapper for constructor.
logs()  : void
See what spiders have been up to.
recacheSpiderNames()  : void
Recache spider names?
settings()  : void
The settings page.
stats()  : void
Show the spider statistics.
subActionProvider()  : null|array<string|int, mixed>
Called by Subs-Compat.php BackwardCompatibility wrapper functions to provide subaction execution for existing mods
view()  : void
View a list of all the spiders we know about.
__construct()  : mixed
Constructor. Protected to force instantiation via self::load().
addRobotsTxtRules()  : void
Checks whether robots.txt is writable and, if so, adds some rules to it for SMF purposes.
detectRobotsTxt()  : string
Finds and returns the file path to robots.txt, or else the file path where it should be created if it doesn't already exist.

Properties

$subaction

public string $subaction = 'stats'

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

$subactions

public static array<string|int, mixed> $subactions = ['stats' => 'stats', 'logs' => 'logs', 'spiders' => 'view', 'settings' => 'settings', 'editspiders' => 'edit']

Available sub-actions.

$javascript_function

protected static string $javascript_function

JavaScript to use on the settings page.

$obj

protected static static $obj

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

Methods

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.

consolidateSpiderStats()

This function takes any unprocessed hits and turns them into stats.

public static consolidateSpiderStats() : void

edit()

Here we can add, and edit, spider info!

public edit() : void

execute()

Dispatcher to whichever sub-action method is necessary.

public execute() : void

getConfigVars()

Gets the configuration variables for this admin area.

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

$config_vars for the news area.

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

list_getNumSpiderLogs()

Callback function for SMF\ItemList()

public static list_getNumSpiderLogs() : int
Return values
int

The number of spider log entries

list_getNumSpiders()

Callback function for SMF\ItemList()

public static list_getNumSpiders() : int
Return values
int

The number of known spiders

list_getNumSpiderStats()

Callback function for SMF\ItemList() Get the number of spider stat rows from the log spider stats table

public static list_getNumSpiderStats() : int
Return values
int

The number of rows in the log_spider_stats table

list_getSpiderLogs()

Callback function for SMF\ItemList()

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

The item to start with (for pagination purposes)

$items_per_page : int

How many items to show per page

$sort : string

A string indicating how to sort the results

Return values
array<string|int, mixed>

An array of spider log data

list_getSpiders()

Callback function for SMF\ItemList()

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

The item to start with (for pagination purposes)

$items_per_page : int

The number of items to show per page

$sort : string

A string indicating how to sort the results

Return values
array<string|int, mixed>

An array of information about known spiders

list_getSpiderStats()

Callback function for SMF\ItemList() Get a list of spider stats from the log_spider table

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

The item to start with (for pagination purposes)

$items_per_page : int

The number of items to show per page

$sort : string

A string indicating how to sort the results

Return values
array<string|int, mixed>

An array of spider statistics info

load()

Static wrapper for constructor.

public static load() : static
Return values
static

An instance of this class.

logs()

See what spiders have been up to.

public logs() : void

recacheSpiderNames()

Recache spider names?

public static recacheSpiderNames() : void

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>

view()

View a list of all the spiders we know about.

public view() : void

__construct()

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

protected __construct() : mixed

addRobotsTxtRules()

Checks whether robots.txt is writable and, if so, adds some rules to it for SMF purposes.

protected static addRobotsTxtRules() : void

detectRobotsTxt()

Finds and returns the file path to robots.txt, or else the file path where it should be created if it doesn't already exist.

protected static detectRobotsTxt() : string
Return values
string

The path to robots.txt.


        
On this page

Search results