phpBB3


acp\acp_styles
includes/acp/acp_styles.php at line 22

Class acp_styles

acp_styles

public class acp_styles


Field Summary
mixed

$imageset_cfg

mixed

$imageset_keys

mixed

$style_cfg

mixed

$template_cfg

mixed

$theme_cfg

mixed

$u_action

Method Summary
void

add(mixed mode)

Add new style

void

check_inheritance(string mode, int id)

Checks downwards dependencies

void

clear_template_cache(array template_row, mixed file_ary)

Destroys cached versions of template files

void

component_in_use(mixed component, mixed component_id, bool style_id)

Check whether the component is still used by another style or component

string

db_theme_data(array theme_row, mixed stylesheet, string root_path)

Returns a string containing the value that should be used for the theme_data column in the theme database table.

void

details(mixed mode, mixed style_id)

Display details

void

display_component_options(mixed component, mixed component_id, bool style_row, bool style_id)

Display the options which can be used to replace a style/template/theme/imageset

void

edit_imageset(int imageset_id)

Edit imagesets

void

edit_template(int template_id)

Provides a template editor which allows saving changes to template files on the filesystem or in the database.

void

edit_theme(int theme_id)

Provides a css editor and a basic easier to use stylesheet editing tool for less experienced (or lazy) users

void

export(mixed mode, mixed style_id)

Export style or style elements

void

frontend(mixed mode, mixed options, mixed actions)

Build Frontend with supplied options

void

get_super(string mode, int id)

Checks upwards dependencies

void

install(mixed mode)

Install Style/Template/Theme/Imageset

void

install_element(mixed mode, mixed error, mixed action, mixed root_path, mixed id, mixed name, mixed path, mixed copyright, int store_db)

Install/add an element, doing various checks as we go

void

install_style(mixed error, mixed action, mixed root_path, mixed id, mixed name, mixed path, mixed copyright, mixed active, mixed default, mixed style_row, bool template_root_path, bool template_path, bool theme_root_path, bool theme_path, bool imageset_root_path, bool imageset_path)

Install/Add style

void

load_css_file(mixed path, mixed filename)

Load css file contents

void

main(mixed id, mixed mode)

void

remove(mixed mode, mixed style_id)

Remove style/template/theme/imageset

void

remove_component(mixed component, mixed component_id, mixed new_id, bool style_id)

Remove template/theme/imageset entry from the database

void

store_in_db(string mode, int id)

Moves a template set and its subtemplates to the database

void

store_in_fs(string mode, int id)

Moves a template set and its subtemplates to the filesystem

void

store_templates(mixed mode, mixed style_id, mixed template_path, mixed filelist)

Store template files into db

void

template_cache(int template_id)

Allows the admin to view cached versions of template files and clear single template cache files

array

template_cache_filelist(string template_path)

Returns an array containing all template filenames for one template that are currently cached.

void

test_installed(mixed element, mixed error, mixed root_path, mixed reqd_name, mixed id, mixed name, mixed copyright)

$reqd_template = (isset($installcfg['required_template'])) ? $installcfg['required_template'] : false; $reqd_theme = (isset($installcfg['required_theme'])) ? $installcfg['required_theme'] : false; $reqd_imageset = (isset($installcfg['required_imageset'])) ? $installcfg['required_imageset'] : false;Check to see if each element is already installed, if it is grab the id foreach ($element_ary as $element => $table) { $style_row = array_merge($style_row, array( $element .

Field Detail

includes/acp/acp_styles.php at line 29

imageset_cfg

public mixed $imageset_cfg

includes/acp/acp_styles.php at line 30

imageset_keys

public mixed $imageset_keys

includes/acp/acp_styles.php at line 26

style_cfg

public mixed $style_cfg

includes/acp/acp_styles.php at line 27

template_cfg

public mixed $template_cfg

includes/acp/acp_styles.php at line 28

theme_cfg

public mixed $theme_cfg

includes/acp/acp_styles.php at line 24

u_action

public mixed $u_action

Method Detail

includes/acp/acp_styles.php at line 2997

add

public void add(mixed mode)

Add new style


includes/acp/acp_styles.php at line 3592

check_inheritance

public void check_inheritance(string mode, int id)

Checks downwards dependencies

Parameters:
mode - The element type to check - only template is supported
id - The template id
Returns:
false if no component inherits, array with name, path and id for each subtemplate otherwise

includes/acp/acp_styles.php at line 2786

clear_template_cache

public void clear_template_cache(array template_row, mixed file_ary)

Destroys cached versions of template files

Parameters:
template_row - contains the template's row in the STYLES_TEMPLATE_TABLE database table
file_ary - is optional and may contain an array of template file names which should be refreshed in the cache. The file names should be the original template file names and not the cache file names.

includes/acp/acp_styles.php at line 1824

component_in_use

public void component_in_use(mixed component, mixed component_id, bool style_id)

Check whether the component is still used by another style or component


includes/acp/acp_styles.php at line 2625

db_theme_data

public string db_theme_data(array theme_row, mixed stylesheet, string root_path)

Returns a string containing the value that should be used for the theme_data column in the theme database table. Includes contents of files loaded via @import

Parameters:
theme_row - is an associative array containing the theme's current database entry
stylesheet - can either be the new content for the stylesheet or false to load from the standard file
root_path - should only be used in case you want to use a different root path than "{$phpbb_root_path}styles/{$theme_row['theme_path']}"
Returns:
Stylesheet data for theme_data column in the theme table

includes/acp/acp_styles.php at line 2281

details

public void details(mixed mode, mixed style_id)

Display details


includes/acp/acp_styles.php at line 1739

display_component_options

public void display_component_options(mixed component, mixed component_id, bool style_row, bool style_id)

Display the options which can be used to replace a style/template/theme/imageset


includes/acp/acp_styles.php at line 1289

edit_imageset

public void edit_imageset(int imageset_id)

Edit imagesets

Parameters:
imageset_id - specifies which imageset is being edited

includes/acp/acp_styles.php at line 692

edit_template

public void edit_template(int template_id)

Provides a template editor which allows saving changes to template files on the filesystem or in the database.

Parameters:
template_id - specifies which template set is being edited

includes/acp/acp_styles.php at line 1107

edit_theme

public void edit_theme(int theme_id)

Provides a css editor and a basic easier to use stylesheet editing tool for less experienced (or lazy) users

Parameters:
theme_id - specifies which theme is being edited

includes/acp/acp_styles.php at line 1861

export

public void export(mixed mode, mixed style_id)

Export style or style elements


includes/acp/acp_styles.php at line 531

frontend

public void frontend(mixed mode, mixed options, mixed actions)

Build Frontend with supplied options


includes/acp/acp_styles.php at line 3646

get_super

public void get_super(string mode, int id)

Checks upwards dependencies

Parameters:
mode - The element type to check - only template is supported
id - The template id
Returns:
false if the component does not inherit, array with name, path and id otherwise

includes/acp/acp_styles.php at line 2820

install

public void install(mixed mode)

Install Style/Template/Theme/Imageset


includes/acp/acp_styles.php at line 3308

install_element

public void install_element(mixed mode, mixed error, mixed action, mixed root_path, mixed id, mixed name, mixed path, mixed copyright, int store_db)

Install/add an element, doing various checks as we go


includes/acp/acp_styles.php at line 3215

install_style

public void install_style(mixed error, mixed action, mixed root_path, mixed id, mixed name, mixed path, mixed copyright, mixed active, mixed default, mixed style_row, bool template_root_path, bool template_path, bool theme_root_path, bool theme_path, bool imageset_root_path, bool imageset_path)

Install/Add style


includes/acp/acp_styles.php at line 2593

load_css_file

public void load_css_file(mixed path, mixed filename)

Load css file contents


includes/acp/acp_styles.php at line 32

main

public void main(mixed id, mixed mode)

includes/acp/acp_styles.php at line 1560

remove

public void remove(mixed mode, mixed style_id)

Remove style/template/theme/imageset


includes/acp/acp_styles.php at line 1686

remove_component

public void remove_component(mixed component, mixed component_id, mixed new_id, bool style_id)

Remove template/theme/imageset entry from the database


includes/acp/acp_styles.php at line 3700

store_in_db

public void store_in_db(string mode, int id)

Moves a template set and its subtemplates to the database

Parameters:
mode - The component to move - only template is supported
id - The template id

includes/acp/acp_styles.php at line 3770

store_in_fs

public void store_in_fs(string mode, int id)

Moves a template set and its subtemplates to the filesystem

Parameters:
mode - The component to move - only template is supported
id - The template id

includes/acp/acp_styles.php at line 2670

store_templates

public void store_templates(mixed mode, mixed style_id, mixed template_path, mixed filelist)

Store template files into db


includes/acp/acp_styles.php at line 930

template_cache

public void template_cache(int template_id)

Allows the admin to view cached versions of template files and clear single template cache files

Parameters:
template_id - specifies which template's cache is shown

includes/acp/acp_styles.php at line 2750

template_cache_filelist

public array template_cache_filelist(string template_path)

Returns an array containing all template filenames for one template that are currently cached.

Parameters:
template_path - contains the name of the template's folder in /styles/
Returns:
of filenames that exist in /styles/$template_path/template/ (without extension!)

includes/acp/acp_styles.php at line 3162

test_installed

public void test_installed(mixed element, mixed error, mixed root_path, mixed reqd_name, mixed id, mixed name, mixed copyright)

$reqd_template = (isset($installcfg['required_template'])) ? $installcfg['required_template'] : false; $reqd_theme = (isset($installcfg['required_theme'])) ? $installcfg['required_theme'] : false; $reqd_imageset = (isset($installcfg['required_imageset'])) ? $installcfg['required_imageset'] : false;

Check to see if each element is already installed, if it is grab the id foreach ($element_ary as $element => $table) { $style_row = array_merge($style_row, array( $element . '_id' => 0, $element . '_name' => '', $element . '_copyright' => '') );

$this->test_installed($element, $error, $root_path, ${'reqd_' . $element}, $style_row[$element . '_id'], $style_row[$element . '_name'], $style_row[$element . '_copyright']); Is this element installed? If not, grab its cfg details


phpBB3