class vB_Bootstrap_Forum extends vB_Bootstrap

Bootstrapping for forum-specific actions.

Properties

protected int $force_styleid A particular style ID to force. If specified, it will be used even if disabled. from vB_Bootstrap
protected array $called Determines the called actions from vB_Bootstrap
array $datastore_entries A list of datastore entries to cache. from vB_Bootstrap
array $cache_templates A list of templates (names) that should be cached. Does not include globally cached templates. from vB_Bootstrap

Methods

bootstrap()

General bootstrap wrapper. This can be used to do virtually all of the work that you'd usually want to do at the beginning. Style and template setup are deferred until first usage.

init()

Basic initialization of things like DB, session, etc.

read_input_context()

Reads some context based on general input information

load_permissions()

Loads permissions for the currently logged-in user.

load_language()

Loads the language information for the logged-in user.

load_style()

Loads style information (selected style and style vars)

check_state()

Checks the state of the request to make sure that it's valid and that we have the necessary permissions to continue. Checks things like CSRF and banning.

bool
called(string $step)

Determines whether a particular step of the bootstrapping has been called.

array
fetch_style_record(integer $force_styleid = 0)

Determines the style that should be used either by parameter or permissions and then fetches that information

static array
fetch_required_template_list(string $action, array $action_templates, array $global_templates = array())

Resolves the required templates for a particular action.

static array
build_vbcollapse(string $collapse_string)

Builds the collapse array based on a string representing collapse sections.

bool
server_overloaded()

Determines if the server is over the defined load limits

bool
has_global_view_permission()

Determines if the user has global viewing permissions. There are exceptions for certain scripts (like login) and actions that will always return true.

force_styleid($styleid)

No description

Details

in vB_Bootstrap at line 60
bootstrap()

General bootstrap wrapper. This can be used to do virtually all of the work that you'd usually want to do at the beginning. Style and template setup are deferred until first usage.

in vB_Bootstrap at line 82
init()

Basic initialization of things like DB, session, etc.

at line 568
read_input_context()

Reads some context based on general input information

in vB_Bootstrap at line 146
load_permissions()

Loads permissions for the currently logged-in user.

in vB_Bootstrap at line 155
load_language()

Loads the language information for the logged-in user.

in vB_Bootstrap at line 196
load_style()

Loads style information (selected style and style vars)

in vB_Bootstrap at line 218
check_state()

Checks the state of the request to make sure that it's valid and that we have the necessary permissions to continue. Checks things like CSRF and banning.

in vB_Bootstrap at line 368
bool called(string $step)

Determines whether a particular step of the bootstrapping has been called.

Parameters

string $step Name of the step

Return Value

bool True if called

in vB_Bootstrap at line 381
protected array fetch_style_record(integer $force_styleid = 0)

Determines the style that should be used either by parameter or permissions and then fetches that information

Parameters

integer $force_styleid A style ID to force (ignoring permissions). 0 to not force any.

Return Value

array Array of style information

in vB_Bootstrap at line 436
static array fetch_required_template_list(string $action, array $action_templates, array $global_templates = array())

Resolves the required templates for a particular action.

Parameters

string $action The action chosen
array $action_templates Array of action-specific templates (for empty action, key 'none')
array $global_templates List of global templates (always needed)

Return Value

array Array of required templates

in vB_Bootstrap at line 460
static array build_vbcollapse(string $collapse_string)

Builds the collapse array based on a string representing collapse sections.

Parameters

string $collapse_string List of collapsed sections

Return Value

array Array with 3 values set for each collapsed section

in vB_Bootstrap at line 483
protected bool server_overloaded()

Determines if the server is over the defined load limits

Return Value

bool

in vB_Bootstrap at line 509
protected bool has_global_view_permission()

Determines if the user has global viewing permissions. There are exceptions for certain scripts (like login) and actions that will always return true.

Return Value

bool

in vB_Bootstrap at line 555
force_styleid($styleid)

Parameters

$styleid