class acp_styles

Properties

$u_action
protected $u_base_action
protected $s_hidden_fields
protected $mode
protected $styles_path
protected $styles_path_absolute
protected $default_style
protected $styles_list_cols
protected $reserved_style_names
protected config $config
protected driver_interface $db
protected user $user
protected template $template
protected request_interface $request
protected driver_interface $cache
protected auth $auth
protected cache_interface $text_formatter_cache
protected string $phpbb_root_path
protected string $php_ext
protected dispatcher_interface $dispatcher

Methods

main($id, $mode)

No description

frontend()

Main page

action_install()

Install style(s)

action_uninstall()

Confirm styles removal

action_uninstall_confirmed(array $ids, bool $delete_files)

Uninstall styles(s)

action_activate()

Activate styles

action_deactivate()

Deactivate styles

action_details()

Show style details

show_installed()

List installed styles

show_available()

Show list of styles that can be installed

array
find_available(bool $all)

Find styles available for installation

show_styles_list(array $styles, int $parent, int $level)

Show styles list

show_available_child_styles(array $styles, string $name, int $level)

Show available styles tree

bool
update_styles_tree(array $styles, array|false $style = false)

Update styles tree

array
find_possible_parents(array $styles, int $id = -1, int $parent = 0, int $level = 0)

Find all possible parent styles for style

list_style(array $style, int $level)

Show item in styles list

welcome_message(string $title, string $description)

Show welcome message

array
find_style_dirs()

Find all directories that have styles

sort_styles($style1, $style2)

Sort styles

array|bool
read_style_cfg(string $dir)

Read style configuration file

int
install_style(array $style)

Install style

array
get_styles()

Lists all styles

array
get_users()

Count users for each style

bool|string
uninstall_style(array $style)

Uninstall style

bool
delete_style_files(string $path, string $dir = '')

Delete all files in style directory

array
request_vars(string $name, string|int $default, bool $error = false)

Get list of items from posted data

string
default_bitfield()

Generates default bitfield

Details

at line 68
main($id, $mode)

No description

Parameters

$id
$mode

at line 170
protected frontend()

Main page

at line 192
protected action_install()

Install style(s)

at line 257
protected action_uninstall()

Confirm styles removal

at line 301
protected action_uninstall_confirmed(array $ids, bool $delete_files)

Uninstall styles(s)

Parameters

array $ids

List of style IDs

bool $delete_files

If true, script will attempt to remove files for selected styles

at line 377
protected action_activate()

Activate styles

at line 398
protected action_deactivate()

Deactivate styles

at line 434
protected action_details()

Show style details

at line 626
protected show_installed()

List installed styles

at line 691
protected show_available()

Show list of styles that can be installed

at line 760
protected array find_available(bool $all)

Find styles available for installation

Parameters

bool $all

if true, function will return all installable styles. if false, function will return only styles that can be installed

Return Value

array

List of styles

at line 849
protected show_styles_list(array $styles, int $parent, int $level)

Show styles list

Parameters

array $styles

styles list

int $parent

parent style id

int $level

style inheritance level

at line 868
protected show_available_child_styles(array $styles, string $name, int $level)

Show available styles tree

Parameters

array $styles

Styles list, passed as reference

string $name

Name of parent style

int $level

Styles tree level

at line 887
protected bool update_styles_tree(array $styles, array|false $style = false)

Update styles tree

Parameters

array $styles

Styles list, passed as reference

array|false $style

Current style, false if root

Return Value

bool

True if something was updated, false if not

at line 925
protected array find_possible_parents(array $styles, int $id = -1, int $parent = 0, int $level = 0)

Find all possible parent styles for style

Parameters

array $styles

list of styles

int $id

id of style

int $parent

current parent style id

int $level

current tree level

Return Value

array

Style ids, names and levels

at line 952
protected list_style(array $style, int $level)

Show item in styles list

Parameters

array $style

style row

int $level

style inheritance level

at line 1081
protected welcome_message(string $title, string $description)

Show welcome message

Parameters

string $title

main title

string $description

page description

at line 1095
protected array find_style_dirs()

Find all directories that have styles

Return Value

array

Directory names

at line 1124
sort_styles($style1, $style2)

Sort styles

Parameters

$style1
$style2

at line 1143
protected array|bool read_style_cfg(string $dir)

Read style configuration file

Parameters

string $dir

style directory

Return Value

array|bool

Style data, false on error

at line 1183
protected int install_style(array $style)

Install style

Parameters

array $style

style data

Return Value

int

Style id

at line 1218
protected array get_styles()

Lists all styles

Return Value

array

Rows with styles data

at line 1235
protected array get_users()

Count users for each style

Return Value

array

Styles in following format: [style_id] = number of users

at line 1258
protected bool|string uninstall_style(array $style)

Uninstall style

Parameters

array $style

Style data

Return Value

bool|string

True on success, error message on error

at line 1297
protected bool delete_style_files(string $path, string $dir = '')

Delete all files in style directory

Parameters

string $path

Style directory

string $dir

Directory to remove inside style's directory

Return Value

bool

True on success, false on error

at line 1346
protected array request_vars(string $name, string|int $default, bool $error = false)

Get list of items from posted data

Parameters

string $name

Variable name

string|int $default

Default value for array

bool $error

If true, error will be triggered if list is empty

Return Value

array Items

at line 1376
protected string default_bitfield()

Generates default bitfield

This bitfield decides which bbcodes are defined in a template.

Return Value

string Bitfield