actual_add_theme (line 185)
Add a theme.
void
actual_add_theme
(ID_TEXT $name)
-
ID_TEXT
$name: The theme name
actual_add_theme_image (line 342)
Add a theme image.
void
actual_add_theme_image
(ID_TEXT $theme, LANGUAGE_NAME $lang, SHORT_TEXT $id, URLPATH $path, [boolean $fail_ok = false])
-
ID_TEXT
$theme: The theme the theme image is in
-
LANGUAGE_NAME
$lang: The language the theme image is for
-
SHORT_TEXT
$id: The theme image ID
-
URLPATH
$path: The URL to the theme image
-
boolean
$fail_ok: Whether to allow failure without bombing out
actual_copy_theme (line 280)
Copy a theme.
void
actual_copy_theme
(ID_TEXT $theme, ID_TEXT $to)
-
ID_TEXT
$theme: The original theme name
-
ID_TEXT
$to: The copy's theme name
actual_delete_theme (line 318)
Delete a theme.
void
actual_delete_theme
(ID_TEXT $theme)
-
ID_TEXT
$theme: The theme name
actual_delete_theme_image (line 428)
Delete a theme image.
void
actual_delete_theme_image
(SHORT_TEXT $id, [?ID_TEXT $theme = NULL], [?LANGUAGE_NAME $lang = NULL])
-
SHORT_TEXT
$id: The theme image ID
-
?ID_TEXT
$theme: The theme to delete in (NULL: all themes)
-
?LANGUAGE_NAME
$lang: The language to delete in (NULL: all languages)
actual_edit_theme_image (line 393)
Edit a theme image.
void
actual_edit_theme_image
(SHORT_TEXT $old_id, ID_TEXT $theme, LANGUAGE_NAME $lang, SHORT_TEXT $id, URLPATH $path, [boolean $quick = false])
-
SHORT_TEXT
$old_id: The current theme image ID
-
ID_TEXT
$theme: The theme the theme image is in
-
LANGUAGE_NAME
$lang: The language the theme image is for
-
SHORT_TEXT
$id: The new theme image ID
-
URLPATH
$path: The URL to the theme image
-
boolean
$quick: Whether to avoid cleanup, etc
actual_rename_theme (line 247)
Rename a theme.
void
actual_rename_theme
(ID_TEXT $theme, ID_TEXT $to)
-
ID_TEXT
$theme: The original theme name
-
ID_TEXT
$to: The new theme name
cleanup_theme_images (line 361)
Delete uploaded theme image if not tied into anything.
void
cleanup_theme_images
(URLPATH $old_url)
-
URLPATH
$old_url: The URL to the theme image being deleted
combo_get_image_paths (line 683)
Get tempcode for a radio list to choose an image from the image FILES in the theme.
tempcode
combo_get_image_paths
(string $selected_path, URLPATH $base_url, PATH $base_path)
-
string
$selected_path: The currently selected image path (blank for none)
-
URLPATH
$base_url: The base-URL to where we are searching for images
-
PATH
$base_path: The base-path to where we are searching for images
css_preg (line 63)
Replace colour codes with references (helper callback function)
string
css_preg
(array $matches)
-
array
$matches: List of found regular expression matches (only index 0 relevant).
find_all_themes (line 27)
Get an array listing all the themes present.
array
find_all_themes
([boolean $full_details = false])
-
boolean
$full_details: Whether to gather full details for each theme
find_images_do_dir (line 542)
Recursively find theme images under the specified details. Does not find custom theme images, as it doesn't check the DB.
array
find_images_do_dir
(ID_TEXT $theme, string $subdir, array $langs)
-
ID_TEXT
$theme: The theme
-
string
$subdir: The subdirectory to search under
-
array
$langs: A map (lang=>1) of the languages in the system, so the codes may be filtered out of the image codes in our result list
foxy_utf8_to_nce (line 78)
Convert text to an entity format via unicode, compatible with the GD TTF functions. Originally taken from php manual but heavily modified. Passed text is assumed to be in the get_charset() character set.
string
foxy_utf8_to_nce
([string $data = ''])
-
string
$data: Input text.
get_all_image_codes (line 748)
Get all the themes image codes. THIS DOES NOT SEARCH THE DB - DO NOT USE UNLESS IT'S ON A PURE PACKAGED THEME
array
get_all_image_codes
(PATH $base_path, PATH $search_under, [boolean $recurse = true])
-
PATH
$base_path: The base-path to where we are searching for images
-
PATH
$search_under: The path to search under, relative to the base-path. This is not the same as the base-path, as we are cropping paths to the base-path
-
boolean
$recurse: Whether to search recursively from the given directory
get_all_image_ids_type (line 590)
Get all the image IDs (both already known, and those uncached) of a certain type (i.e. under a subdirectory).
array
get_all_image_ids_type
(ID_TEXT $type, [boolean $recurse = false], [?object $db = NULL], [?ID_TEXT $theme = NULL])
-
ID_TEXT
$type: The type of image (e.g. 'ocf_emoticons')
-
boolean
$recurse: Whether to search recursively; i.e. in subdirectories of the type subdirectory
-
?object
$db: The database connection to work over (NULL: site db)
-
?ID_TEXT
$theme: The theme to search in, in addition to the default theme (NULL: current theme)
get_image_paths (line 706)
Search under a base path for image FILE URLs (not actually paths as function name would suggest).
array
get_image_paths
(URLPATH $base_url, PATH $base_path)
-
URLPATH
$base_url: The base-URL to where we are searching for images
-
PATH
$base_path: The base-path to where we are searching for images
get_theme_img_code (line 504)
A theme image has been passed through by POST, either as a file (a new theme image), or as a reference to an existing one. Get the image code from the POST data.
ID_TEXT
get_theme_img_code
([ID_TEXT $type = 'ocf_emoticons'], [boolean $allow_skip = false], [ID_TEXT $field_file = 'file'], [ID_TEXT $field_choose = 'theme_img_code'])
-
ID_TEXT
$type: The type of theme image
-
boolean
$allow_skip: Allow no code to be given
-
ID_TEXT
$field_file: Form field for uploading
-
ID_TEXT
$field_choose: Form field for choosing
nice_get_themes (line 837)
Get a UI list for choosing a theme.
tempcode
nice_get_themes
([?ID_TEXT $theme = NULL], [boolean $no_rely = false], [boolean $show_everything = false], [ID_TEXT $default_message_string = 'RELY_FORUMS'])
-
?ID_TEXT
$theme: The theme to select by default (NULL: no specific default)
-
boolean
$no_rely: Whether to skip the 'rely on forums' entry
-
boolean
$show_everything: Whether to forget about permissions for this list
-
ID_TEXT
$default_message_string: The language string to use for the default answer
nice_get_theme_images (line 796)
Get tempcode for a dropdown to choose a theme from the themes present.
tempcode
nice_get_theme_images
([?ID_TEXT $it = NULL], [?string $filter = NULL], [boolean $do_id = false], [boolean $include_all = false], [string $under = ''])
-
?ID_TEXT
$it: The currently selected image ID (NULL: none selected)
-
?string
$filter: An SQL where clause (including the WHERE), that filters the query somehow (NULL: none)
-
boolean
$do_id: Whether to show IDs as the list entry captions, rather than paths
-
boolean
$include_all: Whether to include images not yet used (i.e not in theme_images map yet)
-
string
$under: Only include images under this path. Including a trailing slash unless you specifically want to filter allowing filename stubs as well as paths (blank: no limitation)
regen_theme_images (line 458)
Regenerate all the theme image paths in the database.
void
regen_theme_images
(ID_TEXT $theme, [?array $langs = NULL], [?ID_TEXT $target_theme = NULL])
-
ID_TEXT
$theme: The theme we're searching in.
-
?array
$langs: A map of languages (lang=>1) (NULL: find it in-function).
-
?ID_TEXT
$target_theme: The theme we're storing in (NULL: same as $theme).
tidy_theme_img_code (line 865)
Delete a theme image used for a resource that was added, but only if the theme image is now unused.
void
tidy_theme_img_code
(?ID_TEXT $new, ID_TEXT $old, ID_TEXT $table, ID_TEXT $field, [?object $db = NULL])
-
?ID_TEXT
$new: The new theme image (NULL: no new one)
-
ID_TEXT
$old: The old theme image we might be tidying up
-
ID_TEXT
$table: Table to check against
-
ID_TEXT
$field: Field in table
-
?object
$db: Database connection to check against (NULL: site database)
_get_all_image_ids_type (line 648)
Get all the image IDs (both already known, and those uncached) of a certain type (i.e. under a subdirectory).
void
_get_all_image_ids_type
(array &$ids, ID_TEXT $dir, ID_TEXT $type, boolean $recurse)
-
array
&$ids: The list of image IDs found so far. This list will be appended as we proceed
-
ID_TEXT
$dir: The specific theme image subdirectory we are currently looking under
-
ID_TEXT
$type: The type of image (e.g. 'ocf_emoticons')
-
boolean
$recurse: Whether to search recursively; i.e. in subdirectories of the type subdirectory