access_denied
actionlog_linkage
actual_add_zone
actual_delete_zone
actual_delete_zone_lite
actual_edit_zone
actual_metadata_get_fields
actual_metadata_get_fields__special
actual_rename_zone_lite
add_ip_ban
add_privilege
addon_installed
adjust_pic_orientation
adminzone_extended_breadcrumbs
adminzone_special_cases
afm_copy
afm_delete_directory
afm_delete_file
afm_make_directory
afm_make_file
afm_move
afm_read_file
afm_set_perms
append_content_select_for_id
appengine_general_guard
appengine_is_live
appengine_live_guard
apply_comcode_page_substitutions
apply_forum_driver_md5_variant
apply_tempcode_escaping
apply_tempcode_escaping_inline
array_count_recursive
array_peek
assign_refresh
attach_message
attach_message_memory_usage
attach_message_site_closed
attach_message_su
attach_to_javascript
attach_to_screen_footer
attach_to_screen_header
auto_decache
autogenerate_new_url_moniker
ban_ip
better_parse_ini_file
block_cache_default
block_helper_script
block_installed
block_params_arr_to_str
block_params_str_to_arr
brand_name
breadcrumb_segments_to_tempcode
breadcrumb_set_parents
breadcrumb_set_self
breadcrumbs
breadcrumbs_get_default_stub
browser_matches
build_closure_function
build_closure_tempcode
build_content_where
build_keep_form_fields
build_keep_post_fields
build_page_link
build_search_results_interface
build_search_submitter_clauses
build_sitemap_cache_table
build_url
bump_member_group_timeout
cache_and_carry
cache_module_installed_status
call_user_func_array__long_task
can_arbitrary_groupby
can_email_member
can_static_cache
can_try_mod_rewrite
cdn_filter
check_delete_permission
check_edit_permission
check_extension
check_has_page_access
check_input_field_string
check_master_password
check_memory_limit_for
check_page_name
check_posted_field
check_privilege
check_rbl
check_rbls
check_shared_bandwidth_usage
check_shared_space_usage
check_some_edit_permission
check_stopforumspam
check_submit_permission
check_word_filter
check_xhtml_webstandards
check_zone_name
choose_language
clean_file_size
clean_html_title
cleanup_block_name
cleanup_date
cleanup_exif
cleanup_member_timeouts
clear_cms_autosave
clear_old_uploads
clear_permissions_runtime_cache
closed_site
closure_eval
closure_loop
closure_while_loop
cms_admirecookie
cms_eatcookie
cms_get_temp_dir
cms_mb_chunk_split
cms_mb_str_split
cms_mb_strlen
cms_mb_strtolower
cms_mb_strtoupper
cms_mb_substr
cms_mb_ucwords
cms_profile_end_for
cms_profile_is_enabled
cms_profile_start_for
cms_setcookie
cms_srv
cms_strftime
cms_tempnam
cms_trim
cms_url_decode_post_process
cms_url_encode
cms_url_encode_mini
cms_verify_parameters_phpdoc
cms_version
cms_version_minor
cms_version_number
cms_version_pretty
cms_version_time
cms_version_time_major
cns_require_all_forum_stuff
collapse_1d_complexity
collapse_2d_complexity
comcode_breadcrumbs
comcode_lang_string
comcode_to_clean_text
compare_ip_address
compare_ip_address_ip4
compare_ip_address_ip6
compile_template
composr_cleanup
compress_cms_stub_file
config_option_url
config_update_value_ref
content_get_details
content_get_row
content_validated
convert_bad_entities
convert_composr_type_codes
convert_composr_type_codes_multiple
convert_data_encodings
convert_guids_to_ids
convert_image
convert_timezone_offset_to_formal_timezone
convert_to_internal_encoding
convert_url_to_path
crc32_file
create_selection_list
create_selection_list_lang_files
create_selection_list_langs
create_selection_list_zones
create_session
create_zip_file
critical_error
cron_installed
css_compile
css_enforce
css_inherit
css_minify
css_tempcode
current_script
current_share_user
db_encode_like
db_escape_string
db_full_text_assemble
db_get_first_id
db_has_expression_ordering
db_has_full_text
db_has_subqueries
db_like_assemble
db_map_restrict
db_string_equal_to
db_string_not_equal_to
decache
decrypt_data
deldir_contents
delete_attachments
delete_cms_page
delete_config_option
delete_expired_sessions_or_recover
delete_lang
delete_privilege
delete_session
delete_upload
delete_value
dependencies_are_good
deshout_callback
destrictify
dev_mode_aftertests
die_html_trace
directive_tempcode
disable_php_memory_limit
display_seconds_period
display_time_period
display_webstandards_results
div
do_block
do_block_get_cache_identifier
do_block_hunt_file
do_environment_utf8_conversion
do_image_thumb
do_lang
do_lang_tempcode
do_simple_environment_utf8_conversion
do_site
do_template
does_lang_exist
ecv
either_param_integer
either_param_string
encrypt_data
enforce_personal_access
enforce_sessioned_url
enforce_temporary_passwords
ensure_thumbnail
entity_utf8_decode
erase_block_cache
erase_cached_language
erase_cached_templates
erase_comcode_cache
erase_comcode_page_cache
erase_persistent_cache
erase_theme_images_cache
erase_thumb_cache
escape_html
escapeshellarg_wrap
exact_match_sql
execute_task_background
export_to_xml
extract_content_str_id_from_data
extract_html_body
extract_module_functions
extract_module_functions_page
extract_module_info
extract_plain_links
fallback_lang
fast_uniqid
fatal_exit
file_size_to_tar_block_size
filter_css
filter_form_field_default
filter_group_permissivity
filter_naughty
filter_naughty_harsh
filtercode_to_sql
find_all_blocks
find_all_hooks
find_all_langs
find_all_modules
find_all_pages
find_all_pages_wrap
find_all_xml_tables
find_all_zones
find_cache_on
find_id_moniker
find_id_via_url_moniker
find_lang_content_names
find_mail_bounces
find_mail_folders
find_php_path
find_script
find_sitemap_object
find_template_place
find_template_tree_nice
find_theme_image
fix_bad_unicode
fix_id
fix_permissions
fixup_protocolless_urls
flatten_slashed_array
float_format
float_to_raw_string
force_have_afm_details
force_httpauth
form_for_filtercode
form_input_hidden
form_input_list_entry
form_input_list_group
form_to_email
form_to_email_entry_script
foxy_utf8_to_nce
fractional_edit
generate_filtercode_join_key_from_string
generate_guid
generate_text_summary
geolocate_ip
get_afm_form
get_afm_form_fields
get_allowed_audio_file_types
get_allowed_image_file_types
get_allowed_partner_sites
get_allowed_video_file_types
get_base_url
get_block_id
get_block_info_row
get_block_parameters
get_bot_type
get_brand_base_url
get_brand_page_url
get_browser_string
get_cache_entry
get_category_permissions_for_environment
get_category_permissions_hidden_on
get_charset
get_chmod_array
get_cms_cpf
get_comcode_page_editability_per_zone
get_comcode_zone
get_complex_base_url
get_content_object
get_content_where_for_str_id
get_cookie_days
get_cookie_domain
get_cookie_path
get_custom_base_url
get_custom_file_base
get_db_forums
get_db_forums_host
get_db_forums_password
get_db_forums_user
get_db_keywords
get_db_site
get_db_site_host
get_db_site_password
get_db_site_user
get_db_type
get_default_option
get_default_theme_name
get_directory_contents
get_directory_size
get_displayname
get_domain
get_exif_data
get_exif_image_caption
get_false_permissions
get_file_base
get_file_extension
get_file_size
get_first_admin_user
get_forum_base_url
get_forum_type
get_function_hash
get_future_version_information
get_gd_version
get_html_trace
get_input_date
get_input_date_components
get_ip_address
get_lang
get_lang_browser
get_lang_file_descriptions
get_lang_file_map
get_lang_files
get_lang_member
get_loaded_tags
get_logo_url
get_mass_import_mode
get_max_file_size
get_max_image_size
get_member
get_member_cookie
get_members_viewing
get_members_viewing_wrap
get_mime_type
get_modal_user
get_module_zone
get_num_users_peak
get_num_users_site
get_option
get_ordinal_suffix
get_os_string
get_page_grouping_links
get_page_name
get_page_permissions_for_environment
get_page_warning_details
get_page_zone
get_param_integer
get_param_string
get_pass_cookie
get_permissions_matrix
get_rand_password
get_remappings
get_root_comcode_pages
get_screen_title
get_search_rows
get_secure_random_number
get_self_url
get_self_url_easy
get_server_timezone
get_session_cookie
get_session_id
get_site_default_lang
get_site_name
get_site_salt
get_site_timezone
get_staff_actions_list
get_stopwords_list
get_syndication_option_fields
get_table_prefix
get_template_contents
get_templates_list
get_timezone_list
get_timezoned_date
get_timezoned_time
get_translated_tempcode
get_translated_tempcode__and_simplify
get_translated_text
get_translated_text_xml
get_true_permissions
get_tutorial_url
get_upload_filearray
get_upload_limit_config_url
get_upload_syndication_json
get_url
get_use_persistent
get_users_online
get_users_timezone
get_value
get_value_newer_than
get_version_branch
get_version_components__from_dotted
get_version_dotted
get_version_dotted__from_anything
get_version_pretty__from_dotted
get_webpage_meta_details
get_webservice_result
get_xml_entities
get_zone_chooser
get_zone_default_page
get_zone_name
give_submit_points
globalise
handle_active_login
handle_active_logout
handle_has_checked_recently
handle_logins
handle_perceived_spammer_by_confidence
handle_permission_check_logging
handle_symbol_preprocessing
handle_upload_syndication
hard_filter_input_data__filesystem
hard_filter_input_data__html
has_actual_page_access
has_add_comcode_page_permission
has_bypass_validation_comcode_page_permission
has_caching_for
has_category_access
has_cookies
has_delete_permission
has_edit_comcode_page_permission
has_edit_permission
has_escaped_dynamic_sql
has_external_site_wide_syndication
has_js
has_no_forum
has_page_access
has_privilege
has_privilege_group
has_solemnly_declared
has_some_cat_privilege
has_some_edit_comcode_page_permission
has_submit_permission
has_zone_access
hhvm_include
hide_the_evidence
http_download_file
hyperlink
i_solemnly_declare
import_from_xml
improperly_filled_in
improperly_filled_in_post
in_memory_search_match
in_safe_mode
incoming_uploads_script
inform_exit
inform_non_canonical_parameter
inform_screen
initialise_special_page_types
inject_action_spamcheck
inline_language_editing
insert_code_after__by_command
insert_code_after__by_linenum
insert_code_before__by_command
insert_code_before__by_linenum
insert_lang
insert_lang_comcode
insert_lang_xml
inspect
inspect_plain
integer_format
intelligent_write_error
intelligent_write_error_inline
invert_value
ip_banned
ip_cidr_check
is_alphanumeric
is_ascii_string
is_audio
is_browser_decaching
is_cns_satellite_site
is_data_encrypted
is_email_address
is_encryption_available
is_encryption_enabled
is_forum_db
is_guest
is_httpauth_login
is_image
is_invisible
is_mail_bounced
is_media
is_mobile
is_on_multi_site_network
is_page_https
is_plupload
is_saveable_image
is_simple_query
is_suexec_like
is_valid_ip
is_video
is_wide
is_wide_high
is_writable_wrap
javascript_enforce
javascript_tempcode
js_compile
js_minify
keep_symbol
kid_gloves_html_escaping
kid_gloves_html_escaping_singular
lang_code_to_default_content
lang_remap
lang_remap_comcode
list_to_map
load_comcode_page
load_comcode_page_from_cache
load_config_options
load_field_restrictions
load_html_page
load_minimodule_page
load_module_page
load_moniker_hooks
load_redirect_cache
load_theme_image_cache
load_up_all_module_category_permissions
load_user_stuff
load_value_options
load_zone_data
locale_filter
log_hack_attack_and_exit
log_it
log_stats
looks_like_url
lookup_language_full_name
m_deldir
mail_wrap
mailto_obfuscated
make_csv
make_fractionable_editable
make_locale_filter
make_map_nice
make_missing_directory
make_nice_timezone_name
make_sentence_case_callback
make_string_tempcode
make_xhtml_strict
manualproc_mail
mass_delete_lang
match_key_match
may_see_stack_dumps
may_view_content_behind
me_debug
member_blocked
member_is_online
member_personal_links_and_details
member_tracking_update
memory_limit_for_max_param
memory_trace_point
memory_tracking
merge_sort
metadata_get_fields
missing_template_parameter
mixed
module_installed
monitor_slow_urls
multi_lang
multi_lang_content
nl_delim_match_sql
normalise_ip_address
notify_sitemap_node_add
notify_sitemap_node_delete
notify_sitemap_node_edit
obfuscate_email_address
obfuscate_entities
object_factory
opensearch_script
optimise_tempcode
otp
page_link_as_url
page_link_decode
page_not_found
page_path_to_page_link
paragraph
parse_filtercode
parse_raw_http_request
parse_translated_text
password_hash
password_verify
permission_exists
persistent_cache_delete
persistent_cache_get
persistent_cache_set
php_addslashes
php_addslashes_twice
php_function_allowed
php_return_bytes
ping_sitemap_xml
png_compress
post_param_integer
post_param_multi_source_upload
post_param_string
preload_block_internal_caching
prepare_filtercode_merger_link
prepare_for_known_ajax_response
prevent_double_submit
process_url_monikers
produce_salt
propagate_filtercode
propagate_filtercode_page_link
protect_from_escaping
push_output_state
put_in_standard_box
put_into_cache
put_value_in_stack_trace
qualify_url
ratchet_hash
ratchet_hash_verify
rbl_resolve
read_filtercode_parameter_from_env
read_text_file
rebuild_sitemap_index
rebuild_sitemap_set
redirect_screen
reinstall_block
reinstall_module
relay_error_notification
reload_lang_fields
remove_code
remove_duplicate_rows
remove_ip_ban
remove_magic_encryption_marker
remove_url_mistakes
rename_config_option
rename_privilege
render_comcode_page_box
reprocess_url
request_page
request_via_cron
require_all_lang
require_all_open_lang_files
require_code
require_code_no_override
require_css
require_javascript
require_lang
require_lang_compile
rescue_shortened_post_request
restore_output_state
restricted_manually_enabled_backdoor
restrictify
retrieve_sitemap_node
running_locally
running_script
safe_ini_set
save_comcode_page
save_static_caching
save_zone_base_url
secure_serialized_data
selectcode_to_idlist_using_callback
selectcode_to_idlist_using_db
selectcode_to_idlist_using_memory
selectcode_to_sqlfragment
semi_dev_mode_startup
send_content_validated_notification
send_validation_request
seo_get_fields
seo_meta_clear_caching
seo_meta_erase_storage
seo_meta_get_for
seo_meta_load_for
seo_meta_set_for_explicit
seo_meta_set_for_implicit
set_category_permissions_from_environment
set_execution_context
set_extra_request_metadata
set_feed_url
set_helper_panel_text
set_helper_panel_tutorial
set_http_status_code
set_invisibility
set_mass_import_mode
set_member_group_timeout
set_option
set_page_permissions_from_environment
set_privilege
set_session_id
set_short_title
set_throw_errors
set_url_moniker
set_value
should_ignore_file
show_memory_points
simulated_wildcard_match
sitemap_do_next_manager
sitemap_script
sitemap_script_loading
sitemap_script_saving
sitemap_xml_build
skippable_keep
smart_redirect
sort_maps_by
sort_maps_by__strlen
sort_search_results
special_page_types
static_cache
static_cache__get_self_url_easy
static_cache_current_url
static_evaluate_tempcode
store_exif
strip_html
substitute_comment_encapsulated_tempcode
suggest_fatalistic
suggest_new_idmoniker_for
symbol_tempcode
symbol_truncator
sync_file
sync_file_move
sync_htaccess_with_zones
syndicate_described_activity
syndicate_spammer_report
tacit_https
tar_add_file
tar_add_folder
tar_add_folder_incremental
tar_close
tar_crc
tar_extract_to_folder
tar_get_directory
tar_get_file
tar_open
tasks_script
template_to_tempcode
test_password
throwing_errors
titleify
try_cookie_login
try_httpauth_login
try_su_login
tz_time
unban_ip
unichr
unichrm
unichrm_hex
uninstall_block
uninstall_module
unixify_line_format
unparse_filtercode
update_bounce_storage
update_catalogue_content_ref
update_stat
upgrade_block
upgrade_module
upload_syndication_auth_script
upload_will_syndicate
url_is_local
url_monikers_enabled
url_to_filename
url_to_page_link
urlise_lang
user_lang
usertime_to_utctime
utctime_to_usertime
utf8tohtml
warn_exit
warn_exit_wordfilter
warn_screen
will_be_unicode_neutered
with_whitespace
wordfilter_text
wrap_probe_ip
write_static_cache_file
write_text_file
xhtml_substr
xhtmlise_html
xml_rpc
xmlentities
zip_close
zip_entry_close
zip_entry_filesize
zip_entry_name
zip_entry_open
zip_entry_read
zip_error
zip_open
zip_read
zip_scan_folder
zone_black_magic_filterer
ANTISPAM_RESPONSE_ACTIVE
ANTISPAM_RESPONSE_ACTIVE_UNKNOWN_STALE
ANTISPAM_RESPONSE_ERROR
ANTISPAM_RESPONSE_SKIP
ANTISPAM_RESPONSE_STALE
ANTISPAM_RESPONSE_UNLISTED
A_DAILY_EMAIL_DIGEST
A_INSTANT_EMAIL
A_INSTANT_PT
A_INSTANT_SMS
A_MONTHLY_EMAIL_DIGEST
A_NA
A_WEB_NOTIFICATION
A_WEEKLY_EMAIL_DIGEST
A__ALL
A__CHOICE
A__STATISTICAL
BREADCRUMB_CROP_LENGTH
CACHE_AGAINST_BOT_STATUS
CACHE_AGAINST_DEFAULT
CACHE_AGAINST_MEMBER
CACHE_AGAINST_NOTHING_SPECIAL
CACHE_AGAINST_PERMISSIVE_GROUPS
CACHE_AGAINST_STAFF_STATUS
CACHE_AGAINST_TIMEZONE
CC_ESCAPED
CMS_UPLOAD_ANYTHING
CMS_UPLOAD_AUDIO
CMS_UPLOAD_IMAGE
CMS_UPLOAD_SWF
CMS_UPLOAD_VIDEO
COMCODE_EDIT_ANY
COMCODE_EDIT_NONE
COMCODE_EDIT_OWN
CSL_PERMISSION_ADD
CSL_PERMISSION_DELETE
CSL_PERMISSION_EDIT
CSL_PERMISSION_VIEW
CSS_ESCAPED
DB_MAX_FIELD_IDENTIFIER_SIZE
DB_MAX_IDENTIFIER_SIZE
DB_MAX_KEY_SIZE
DB_MAX_KEY_SIZE_UNICODE
DB_MAX_PRIMARY_KEY_SIZE
DB_MAX_ROW_SIZE
DB_MAX_ROW_SIZE_UNICODE
DQ_ESCAPED
ENTITY_ESCAPED
E_RECOVERABLE_ERROR
FIND_ALL_PAGES__ALL
FIND_ALL_PAGES__NEWEST
FIND_ALL_PAGES__PERFORMANT
FORCIBLY_ENTITY_ESCAPED
GOOGLE_APPENGINE
HHVM
ID_ESCAPED
IGNORE_ACCESS_CONTROLLERS
IGNORE_BUNDLED_UNSHIPPED_VOLATILE
IGNORE_BUNDLED_VOLATILE
IGNORE_CUSTOM_DIR_CONTENTS
IGNORE_CUSTOM_THEMES
IGNORE_CUSTOM_ZONES
IGNORE_DEFAULTS
IGNORE_EDITFROM_FILES
IGNORE_HIDDEN_FILES
IGNORE_NONBUNDLED_SCATTERED
IGNORE_NON_EN_SCATTERED_LANGS
IGNORE_NON_REGISTERED
IGNORE_REVISION_FILES
IGNORE_UPLOADS
IGNORE_USER_CUSTOMISE
INTEGER_MAGIC_NULL
I_UNDERSTAND_PATH_INJECTION
I_UNDERSTAND_SQL_INJECTION
I_UNDERSTAND_XSS
JSHTML_ESCAPED
MAXIMUM_RESULT_COUNT_POINT
MAX_STACK_TRACE_VALUE_LENGTH
METADATA_HEADER_FORCE
METADATA_HEADER_NO
METADATA_HEADER_YES
NAUGHTY_ESCAPED
NL2_ESCAPED
NL_ESCAPED
NULL_ESCAPED
PARSE_DIRECTIVE
PARSE_DIRECTIVE_INNER
PARSE_LANGUAGE_REFERENCE
PARSE_NO_MANS_LAND
PARSE_PARAMETER
PARSE_SYMBOL
PASSWORD_BCRYPT
PASSWORD_DEFAULT
PASSWORD_SALT
PURE_STRING
SALT_MD5PASSWORD
SELF_REDIRECT
SITEMAP_GATHER_AUTHOR
SITEMAP_GATHER_CATEGORIES
SITEMAP_GATHER_DB_ROW
SITEMAP_GATHER_DESCRIPTION
SITEMAP_GATHER_IMAGE
SITEMAP_GATHER_META
SITEMAP_GATHER_NUM_COMMENTS
SITEMAP_GATHER_RATING
SITEMAP_GATHER_SUBMITTER
SITEMAP_GATHER_TIMES
SITEMAP_GATHER_VALIDATED
SITEMAP_GATHER_VIEWS
SITEMAP_GATHER__ALL
SITEMAP_GEN_COLLAPSE_ZONES
SITEMAP_GEN_CONSIDER_SECONDARY_CATEGORIES
SITEMAP_GEN_CONSIDER_VALIDATION
SITEMAP_GEN_KEEP_FULL_STRUCTURE
SITEMAP_GEN_LABEL_CONTENT_TYPES
SITEMAP_GEN_NONE
SITEMAP_GEN_NO_EMPTY_PAGE_LINKS
SITEMAP_GEN_REQUIRE_PERMISSION_SUPPORT
SITEMAP_GEN_USE_PAGE_GROUPINGS
SITEMAP_IMPORTANCE_HIGH
SITEMAP_IMPORTANCE_LOW
SITEMAP_IMPORTANCE_MEDIUM
SITEMAP_IMPORTANCE_NONE
SITEMAP_IMPORTANCE_ULTRA
SITEMAP_MAX_ROWS_PER_LOOP
SITEMAP_NODE_HANDLED
SITEMAP_NODE_HANDLED_VIRTUALLY
SITEMAP_NODE_NOT_HANDLED
SQ_ESCAPED
STATIC_CACHE__FAILOVER_MODE
STATIC_CACHE__FAILOVER_MODE
STATIC_CACHE__FAST_SPIDER
STATIC_CACHE__FAST_SPIDER
STATIC_CACHE__GUEST
STATIC_CACHE__GUEST
STRING_MAGIC_NULL
TC_DIRECTIVE
TC_KNOWN
TC_LANGUAGE_REFERENCE
TC_PARAMETER
TC_SYMBOL
TEMPCODE_VARIABLE_ESCAPED
UL2_ESCAPED
UL_ESCAPED
UNZIP_CMD
UNZIP_DIR
UPLOAD_PRECEDENCE_HIGH
UPLOAD_PRECEDENCE_LOW
UPLOAD_PRECEDENCE_MEDIUM
UPLOAD_PRECEDENCE_NO
UPLOAD_PRECEDENCE_REGARDLESS
URLS_PER_SITEMAP_SET
access_denied(\ID_TEXT $class= 'ACCESS_DENIED'
, string $param= ''
, boolean $force_login= false
)
package | core |
---|
\ID_TEXT
The class of error (e.g. PRIVILEGE). This is a language string.
string
The parameteter given to the error message
boolean
Force the user to login (even if perhaps they are logged in already)
actionlog_linkage(\ID_TEXT $type, string $a, string $b, \Tempcode $_a, \Tempcode $_b) : \?array
package | core |
---|
\ID_TEXT
Action type
string
First parameter
string
Second parameter
\Tempcode
First parameter (cropped)
\Tempcode
Second parameter (cropped)
\?array
Pair: first parameter as possible link, second parameter as possible link (null: could not construct a nice link)actual_add_zone(\ID_TEXT $zone, \SHORT_TEXT $title, \ID_TEXT $default_page= 'start'
, \SHORT_TEXT $header_text= ''
, \ID_TEXT $theme= 'default'
, \BINARY $require_session= 0
, boolean $uniqify= false
, string $base_url= ''
) : \ID_TEXT
package | core |
---|
\ID_TEXT
Name of the zone
\SHORT_TEXT
The zone title
\ID_TEXT
The zones default page
\SHORT_TEXT
The header text
\ID_TEXT
The theme
\BINARY
Whether the zone requires a session for pages to be used
boolean
Whether to force the name as unique, if there's a conflict
string
The base URL (blank: natural)
\ID_TEXT
The nameactual_delete_zone(\ID_TEXT $zone, boolean $force= false
, boolean $skip_afm= false
)
package | core |
---|
\ID_TEXT
The name of the zone
boolean
Force, even if it contains pages
boolean
Whether to skip the AFM because we know it's not needed (or can't be loaded)
actual_delete_zone_lite(\ID_TEXT $zone)
actual_edit_zone(\ID_TEXT $zone, \SHORT_TEXT $title, \ID_TEXT $default_page, \SHORT_TEXT $header_text, \ID_TEXT $theme, \BINARY $require_session, \ID_TEXT $new_zone, boolean $uniqify= false
, boolean $skip_afm= false
, string $base_url= ''
) : \ID_TEXT
package | core |
---|
\ID_TEXT
The current name of the zone
\SHORT_TEXT
The zone title
\ID_TEXT
The zones default page
\SHORT_TEXT
The header text
\ID_TEXT
The theme
\BINARY
Whether the zone requires a session for pages to be used
\ID_TEXT
The new name of the zone
boolean
Whether to force the name as unique, if there's a conflict
boolean
Whether to skip the AFM because we know it's not needed (or can't be loaded)
string
The base URL (blank: natural)
\ID_TEXT
The nameactual_rename_zone_lite(\ID_TEXT $zone, \ID_TEXT $new_zone, boolean $dont_bother_with_main_row = false
)
package | core |
---|
\ID_TEXT
The old name of the zone
\ID_TEXT
The new name of the zone
boolean
Whether to assume the main zone row has already been renamed as part of a wider editing operation
add_ip_ban(\IP $ip, \LONG_TEXT $descrip= ''
, \?TIME $ban_until= null
, boolean $ban_positive= true
) : boolean
package | core |
---|
\IP
The IP address to ban
\LONG_TEXT
Explanation for ban
\?TIME
When to ban until (null: no limit)
boolean
Whether this is a positive ban (as opposed to a cached negative)
boolean
Whether a change actually happenedadd_privilege(\ID_TEXT $section, \ID_TEXT $name, boolean $default= false
, boolean $not_even_mods= false
)
package | core |
---|
\ID_TEXT
The section the privilege is filled under
\ID_TEXT
The codename for the privilege
boolean
Whether this permission is granted to all usergroups by default
boolean
Whether this permission is not granted to supermoderators by default (something very sensitive)
addon_installed(\ID_TEXT $addon, boolean $non_bundled_too = false
) : boolean
package | core |
---|
\ID_TEXT
The module name
boolean
Whether to check non-bundled addons (ones without an addon_registry hook)
boolean
Whether it isadjust_pic_orientation(resource $img, \~array $exif) : array
Based on a comment in: http://stackoverflow.com/questions/3657023/how-to-detect-shot-angle-of-photo-and-auto-rotate-for-website-display-like-desk
package | core |
---|
resource
GD image resource
\~array
EXIF details (false: could not load)
array
A pair: Adjusted GD image resource, Whether a change was madeadminzone_special_cases(\ID_TEXT $codename)
afm_copy(\PATH $old_path, \PATH $new_path, boolean $world_access)
package | core |
---|
\PATH
The path to the file we are copying.
\PATH
The target path.
boolean
Whether world access is required for the copy.
afm_delete_directory(\PATH $basic_path, boolean $recursive = false
)
package | core |
---|
\PATH
The path to and of the directory we are deleting.
boolean
Whether we should recursively delete any child files and directories.
afm_delete_file(\PATH $basic_path)
afm_make_directory(\PATH $basic_path, boolean $world_access, boolean $recursive = false
)
package | core |
---|
\PATH
The path to and of the directory we are making.
boolean
Whether world access is required.
boolean
Whether we should recursively make any directories that are missing in the given path, until we can make the final directory.
afm_make_file(\PATH $basic_path, string $contents, boolean $world_access)
package | core |
---|
\PATH
The path to the file we are making.
string
The desired file contents.
boolean
Whether world access is required.
afm_move(\PATH $basic_old_path, \PATH $basic_new_path)
package | core |
---|
\PATH
The path to the file we are moving from.
\PATH
The target path.
afm_read_file(\PATH $path) : string
package | core |
---|
\PATH
The path to the file we are reading.
string
The contents of the file.afm_set_perms(\PATH $basic_path, boolean $world_access)
package | core |
---|
\PATH
The path of the file/directory we are setting permissions of.
boolean
Whether world access is required.
append_content_select_for_id(array $select, array $cma_info, \?string $table_alias = null
)
package | core |
---|
array
The ID
array
The info array for the content type
\?string
The table alias (null: none)
appengine_general_guard()
package | core |
---|
appengine_is_live() : boolean
apply_comcode_page_substitutions(string $comcode)
apply_forum_driver_md5_variant(string $data, string $key) : string
This function will pass through the parameters to an equivalent forum_md5 function if it is defined.
package | core |
---|
string
The data to hash (the password in actuality)
string
The string converted member-ID in actuality, although this function is more general
string
The hashed dataapply_tempcode_escaping(array $escaped, string $value) : string
package | core |
---|
array
A list of escaping to do
string
The string to apply the escapings to
string
Output string (you do not need to collect this, as $value is pass-by-reference -- but this is useful for chaining)apply_tempcode_escaping_inline(array $escaped, string $value) : string
package | core |
---|
array
A list of escaping to do
string
The string to apply the escapings to
string
Output stringarray_count_recursive(array $arr) : integer
array_peek(array $array, integer $depth_down = 1
) : mixed
package | core |
---|
array
The stack to peek in
integer
The depth into the stack we are peaking
mixed
The result of the peekingassign_refresh(mixed $url, float $multiplier = 0.0
)
This is almost always used before calling the redirect_screen function. It assumes Composr will output a full screen.
package | core |
---|---|
sets_output_state |
mixed
Refresh to this URL (URLPATH or Tempcode URL)
float
Take this many times longer than a 'standard Composr refresh'
attach_to_javascript(mixed $data)
attach_to_screen_header(mixed $data)
auto_decache(boolean $changed_base_url)
autogenerate_new_url_moniker(array $ob_info, array $url_parts, \ID_TEXT $zone) : \?string
package | core |
---|
array
The hooks info profile.
array
The URL component map (must contain 'page', 'type', and 'id' if this function is to do anything).
\ID_TEXT
The URL zone name (only used for Comcode Page URL monikers).
\?string
The moniker ID (null: error generating it somehow, can not do it)ban_ip(\IP $ip, \LONG_TEXT $descrip = ''
)
better_parse_ini_file(\?PATH $filename, \?string $file = null
) : array
package | core |
---|
\?PATH
The path to the ini file to open (null: given contents in $file instead)
\?string
The contents of the file (null: the file needs opening)
array
A map of the contents of the ini filesblock_cache_default(\ID_TEXT $codename) : \ID_TEXT
package | core |
---|
\ID_TEXT
The block name
\ID_TEXT
The default caching settingblock_installed(\ID_TEXT $block) : boolean
block_params_arr_to_str(array $map) : string
package | core |
---|
array
The parameters / acceptable parameter pattern
string
The parameters / acceptable parameter pattern, as template safe parameterblock_params_str_to_arr(string $_map, boolean $block_symbol_style = false
) : array
package | core |
---|
string
The parameters / acceptable parameter pattern, as template safe parameter
boolean
Whether to leave in block symbol style (i.e. like {$BLOCK} would take, a list not a map)
array
The parameters / acceptable parameter patternbrowser_matches(string $code) : boolean
package | core |
---|---|
set | android ios wysiwyg windows mac linux odd_os mobile ie ie8 ie8+ ie9 ie9+ gecko safari odd_browser chrome bot simplified_attachments_ui itunes |
string
The property code
boolean
Whether there is a matchbuild_closure_function(string $myfunc, array $parts) : string
package | core |
---|
string
The function name
array
An array of lines to be output, each one in PHP format
string
Finished PHP codebuild_closure_tempcode(integer $type, \ID_TEXT $name, \?array $parameters, \?array $escaping = null
) : \Tempcode
package | core |
---|---|
set | 0 2 |
integer
The type of symbol this is (TC_SYMBOL, TC_LANGUAGE_REFERENCE)
\ID_TEXT
The name of the symbol
\?array
Parameters to the symbol (null: none). In same format as expected by ecv.
\?array
Escaping for the symbol (null: none)
\Tempcode
Tempcode object.build_content_where(string $content, boolean $boolean_search, string $boolean_operator, boolean $full_coverage = false
) : array
package | core |
---|---|
set | AND OR |
string
The search content
boolean
Whether it's a boolean search
string
Boolean operation to use
boolean
Whether we can assume we require full coverage (i.e. not substring matches)
array
A tuple (any SQL component may be blank): The combined where clause SQL, the boolean operator, body where clause SQL, positive where clause SQL, negative where clause SQLbuild_keep_form_fields(\ID_TEXT $page= ''
, boolean $keep_all= false
, \?array $exclude= null
) : \Tempcode
package | core |
---|
\ID_TEXT
The page for the form to go to (blank: don't attach)
boolean
Whether to keep all elements of the current URL represented in this form (rather than just the keep_ fields, and page)
\?array
A list of parameters to exclude (null: don't exclude any)
\Tempcode
The builtup hidden form fieldsbuild_keep_post_fields(\?array $exclude = null
) : \Tempcode
package | core |
---|
\?array
A list of parameters to exclude (null: exclude none)
\Tempcode
The builtup hidden form fieldsbuild_page_link(array $vars, \ID_TEXT $zone_name= ''
, \?array $skip= null
, string $hash= ''
) : string
Note: URL parameters should always be in lower case (one of the coding standards)
package | core |
---|
array
A map of parameter names to parameter values. E.g. array('page'=>'example','type'=>'foo','id'=>2). Values may be strings or integers, or Tempcode, or NULL. NULL indicates "skip this". 'page' cannot be NULL.
\ID_TEXT
The zone the URL is pointing to. YOU SHOULD NEVER HARD CODE THIS- USE '_SEARCH', '_SELF' (if you're self-referencing your own page) or the output of get_module_zone.
\?array
Variables to explicitly not put in the URL (perhaps because we have $keepall set, or we are blocking certain keep values). The format is of a map where the keys are the names, and the values are 1. (null: don't skip any)
string
Hash portion of the URL (blank: none). May or may not start '#' - code will put it on if needed
string
The page-link.build_search_results_interface(array $results, integer $start, integer $max, string $direction, boolean $general_search = false
) : \Tempcode
package | core |
---|---|
set | ASC DESC |
array
Search results
integer
Start index
integer
Maximum index
string
Sort direction
boolean
Whether this is a general search, rather than a search for a specific result-type (such as all members)
\Tempcode
Interfacebuild_search_submitter_clauses(\?ID_TEXT $member_field_name, \?MEMBER $member_id, \ID_TEXT $author, \?ID_TEXT $author_field_name = null
) : \?string
package | core |
---|
\?ID_TEXT
The field name for member IDs (null: Cannot match against member IDs)
\?MEMBER
Member ID (null: Unknown, so cannot search)
\ID_TEXT
Author
\?ID_TEXT
The field name for authors (null: Cannot match against member IDs)
\?string
An SQL fragment (null: block query)build_sitemap_cache_table()
Normally we build it iteratively.
package | core |
---|
build_url(array $vars, \ID_TEXT $zone_name= ''
, \?array $skip= null
, boolean $keep_all= false
, boolean $avoid_remap= false
, boolean $skip_keep= false
, string $hash= ''
) : \Tempcode
Note: URL parameters should always be in lower case (one of the coding standards)
package | core |
---|
array
A map of parameter names to parameter values. E.g. array('page'=>'example','type'=>'foo','id'=>2). Values may be strings or integers, or Tempcode, or NULL. NULL indicates "skip this". 'page' cannot be NULL.
\ID_TEXT
The zone the URL is pointing to. YOU SHOULD NEVER HARD CODE THIS- USE '_SEARCH', '_SELF' (if you're self-referencing your own page) or the output of get_module_zone.
\?array
Variables to explicitly not put in the URL (perhaps because we have $keepall set, or we are blocking certain keep values). The format is of a map where the keys are the names, and the values are 1. (null: don't skip any)
boolean
Whether to keep all non-skipped parameters that were in the current URL, in this URL
boolean
Whether to avoid mod_rewrite (sometimes essential so we can assume the standard URL parameter addition scheme in templates)
boolean
Whether to skip actually putting on keep_ parameters (rarely will this skipping be desirable)
string
Hash portion of the URL (blank: none). May or may not start '#' - code will put it on if needed
\Tempcode
The URL in Tempcode format.bump_member_group_timeout(\MEMBER $member_id, \GROUP $group_id, integer $num_minutes, boolean $prefer_for_primary_group = false
)
package | core |
---|
\MEMBER
The member going in the usergroup.
\GROUP
The usergroup.
integer
The number of minutes (may be negative to take time away).
boolean
Whether to put the member into as a primary group if this is a new temporary membership (it is recommended to NOT use this, since we don't track the source group and hence on expiry the member is put back to the first default group - but also generally you probably don't want to box yourself in with moving people's primary group, it ties your future flexibility down a lot).
cache_and_carry(string $func, array $args) : mixed
package | core |
---|
string
Function to call
array
Arguments to call with
mixed
The function resultcall_user_func_array__long_task(string $plain_title, \?Tempcode $title, \ID_TEXT $hook, \?array $args= null
, boolean $run_at_end_of_script= false
, boolean $force_immediate= false
, boolean $send_notification= true
) : \Tempcode
package | core |
---|
string
Title to use for completion notification subject lines
\?Tempcode
Title to use if there is no queueing or a queue message (null: don't return a full screen)
\ID_TEXT
The task hook
\?array
Arguments for the task (null: no arguments)
boolean
Whether to run the task at the end of the script (if it's not going to be put into the task queue)
boolean
Whether to forcibly bypass the task queue (because we've determined somehow it will be a quick task)
boolean
Whether to send a notification of the task having come out of the queue
\Tempcode
UI (function may not return if the task is immediate and doesn't have a text/html result)can_arbitrary_groupby() : boolean
can_email_member(\MEMBER $member_id, \?string $server= null
, \?integer $port= null
, \?string $folder= null
, \?string $username= null
, \?string $password= null
) : \?TIME
package | core |
---|
\MEMBER
The member ID.
\?string
The IMAP server hostname (null: use configured).
\?integer
The IMAP port (null: use configured).
\?string
The IMAP inbox identifier (null: use configured).
\?string
The IMAP username (null: use configured).
\?string
The IMAP password (null: use configured).
\?TIME
Last bounce time (null: not bounced).can_static_cache() : boolean
can_try_mod_rewrite(boolean $avoid_remap = false
) : boolean
package | core |
---|
boolean
Whether to explicitly avoid using mod_rewrite. Whilst it might seem weird to put this in as a function parameter, it removes duplicated logic checks in the code.
boolean
Whether mod_rewrite is in usecdn_filter(\URLPATH $path) : \URLPATH
check_extension(string $name, boolean $skip_server_side_security_check= false
, \?string $file_to_delete= null
, boolean $accept_errors= false
) : boolean
package | core |
---|
string
The filename
boolean
Whether to skip the server side security check
\?string
Delete this file if we have to exit (null: no file to delete)
boolean
Whether to allow errors without dying
boolean
Success statuscheck_input_field_string(string $name, string $val, \?boolean $posted = false
)
package | core |
---|
string
The name of the parameter
string
The value retrieved
\?boolean
Whether the parameter is a POST parameter (null: undetermined)
check_master_password(\SHORT_TEXT $password_given) : boolean
package | core |
---|
\SHORT_TEXT
Given master password
boolean
Whether it is validcheck_memory_limit_for(\PATH $file_path, boolean $exit_on_error = true
) : boolean
package | core |
---|
\PATH
The file path we are trying to load
boolean
Whether to exit Composr if an error occurs
boolean
Success statuscheck_page_name(\ID_TEXT $zone, \ID_TEXT $page)
check_posted_field(string $name, string $val)
check_privilege(\ID_TEXT $permission, \?array $cats= null
, \?MEMBER $member_id= null
, \?ID_TEXT $page_name= null
)
package | core |
---|
\ID_TEXT
The permission to require
\?array
A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
\?MEMBER
Member to check for (null: current user)
\?ID_TEXT
Page name to check for (null: current page)
check_rbl(\ID_TEXT $rbl, \IP $user_ip, boolean $we_have_a_result_already= false
, boolean $page_level= false
) : array
package | core |
---|
\ID_TEXT
The RBL domain name/IP (HTTP:BL has a special syntax)
\IP
The IP address to lookup
boolean
If true, then no RBL check will happen if the RBL has no scoring, because it can't provide a superior result to what is already known (performance)
boolean
Whether this is a page level check (i.e. we won't consider blocks or approval, just ban setting)
array
Pair: Listed for potential blocking as a ANTISPAM_RESPONSE_* constant, confidence level if attainable (0.0 to 1.0) (else NULL)check_rbls(boolean $page_level= false
, \?IP $user_ip= null
)
package | core |
---|
boolean
Whether this is a page level check (i.e. we won't consider blocks or approval, just ban setting)
\?IP
IP address (null: current user's)
check_shared_bandwidth_usage(integer $extra)
check_shared_space_usage(integer $extra)
check_stopforumspam(\?string $username= null
, \?string $email= null
)
package | core |
---|
\?string
Check this particular username that has just been supplied (null: none)
\?string
Check this particular email address that has just been supplied (null: none)
check_word_filter(string $a, \?ID_TEXT $name= null
, boolean $no_die= false
, boolean $try_patterns= false
, boolean $perm_check= true
) : string
If any are found, and the member cannot bypass the word filter, an error message is displayed.
package | core |
---|
string
The sentence to check
\?ID_TEXT
The name of the parameter this is coming from. Certain parameters are not checked, for reasons of efficiency (avoiding loading whole word check list if not needed) (null: don't know param, do not check to avoid)
boolean
Whether to avoid dying on fully blocked words (useful if importing, for instance)
boolean
Whether to try pattern matching (this takes more resources)
boolean
Whether to allow permission-based skipping, and length-based skipping
string
"Fixed" versioncheck_xhtml_webstandards(string $out, boolean $display_regardless= false
, integer $preview_mode= 0
, boolean $ret= false
) : string
package | core |
---|---|
set | 0 1 2 |
string
The XHTML to check
boolean
Display XHTML output regardless of whether there was an error or not
integer
Whether we are opening up an XHTML-fragment in a preview box (0 means no, 1 means yes, 2 means we are asking for additional manual check information)
boolean
Whether to return Tempcode
string
Returned result (won't return it $ret is false)check_zone_name(\ID_TEXT $zone)
choose_language(\Tempcode $title, boolean $tip= false
, boolean $allow_all_selection= false
) : mixed
package | core |
---|
\Tempcode
Title for the form
boolean
Whether to give a tip about edit order
boolean
Whether to add an 'all' entry to the list
mixed
The UI (Tempcode) or the language to use (string/LANGUAGE_NAME)clean_file_size(integer $bytes) : string
package | core |
---|
integer
The number of bytes the file has
string
The formatted-string file sizeclean_html_title(string $title) : string
package | core |
---|
string
The relative (to Composr's base directory) path to the page (e.g. pages/comcode/EN/start.txt)
string
Fixedcleanup_block_name(\ID_TEXT $block) : string
package | core |
---|
\ID_TEXT
The raw block codename
string
A nice human readable version of the namecleanup_date(string $date) : array
package | core |
---|
string
The ISO date
array
If only one element, it contains the timestamp. Otherwise it is a pair: (string format, timestamp)cleanup_exif(array $metadata) : array
clear_cms_autosave()
package | core |
---|
closure_eval(string $code, array $parameters) : string
package | core |
---|
string
The code
array
Template parameters
string
Resultclosure_loop(array $param, array $args, string $main_function) : string
package | core |
---|
array
The template bound parameters
array
The loop directive parameters
string
The loop execution function
string
Resultclosure_while_loop(array $args, array $control_function, array $main_function) : string
package | core |
---|
array
The template bound parameters
array
The loop control function
array
The loop execution function
string
Resultcms_get_temp_dir() : array
package | core |
---|
array
A tuple: preferred temporary path to save to, whether there's a problem saving in the system path, the system path to save to, the local path to save to.cms_mb_chunk_split(string $str, integer $len= 76
, string $glue= "\r\n"
, boolean $force= false
) : string
package | core |
---|
string
The input string.
integer
The maximum chunking length.
string
Split character.
boolean
Whether to force unicode as on.
string
The chunked version of the input string.cms_mb_str_split(string $str, boolean $force = false
) : array
package | core |
---|
string
Input.
boolean
Whether to force unicode as on.
array
Output.cms_mb_strlen(string $in, boolean $force = false
) : integer
package | core |
---|
string
The string to get the length of.
boolean
Whether to force unicode as on.
integer
The string length.cms_mb_strtolower(string $in) : string
cms_mb_strtoupper(string $in) : string
cms_mb_substr(string $in, integer $from, \?integer $amount= null
, boolean $force= false
) : \~string
package | core |
---|
string
The subject.
integer
The start position.
\?integer
The length to extract (null: all remaining).
boolean
Whether to force unicode as on.
\~string
String part (false: $start was over the end of the string).cms_mb_ucwords(string $in) : string
cms_profile_end_for(\ID_TEXT $identifier, \?string $specifics = null
)
package | core |
---|
\ID_TEXT
Identifier
\?string
Longer details of what happened (e.g. a specific SQL query that ran) (null: none provided)
cms_profile_is_enabled() : boolean
cms_profile_start_for(\ID_TEXT $identifier)
cms_srv(string $key) : string
package | core |
---|
string
The variable name
string
The variable value ('' means unknown)cms_strftime(string $format, \?TIME $timestamp = null
) : string
package | core |
---|
string
The formatting string.
\?TIME
The timestamp (null: now). Assumed to already be timezone-shifted as required
string
The formatted string.cms_tempnam(string $prefix) : \~string
package | core |
---|
string
The prefix of the temporary file name.
\~string
The name of the temporary file (false: error).cms_trim(string $text, boolean $try_hard = true
) : string
package | core |
---|
string
Input text.
boolean
Whether to keep doing it, while it changes (if complex mixtures are on the end).
string
The result text.cms_url_decode_post_process(\URLPATH $url_part) : \URLPATH
cms_url_encode(\URLPATH $url_part, \?boolean $consider_rewrite = null
) : \URLPATH
package | core |
---|
\URLPATH
The URL to encode
\?boolean
Whether we have to consider mod_rewrite (null: don't know, look up)
\URLPATH
The encoded resultcms_url_encode_mini(\URLPATH $url_part, \?boolean $consider_rewrite = null
) : \URLPATH
package | core |
---|
\URLPATH
The URL to encode
\?boolean
Whether we have to consider mod_rewrite (null: don't know, look up)
\URLPATH
The encoded resultcms_verify_parameters_phpdoc(boolean $dev_only = false
)
Useful when testing robustness of APIs where the CQC and ocProducts PHP are not suitable. For example, when web APIs are plumbed into ocPortal APIs and you need to ensure the types are coming in correctly.
package | core |
---|
boolean
Whether to only run the checks in dev-mode
cms_version() : integer
cms_version_minor() : string
package | core |
---|
string
The minor/patch version number of your installation (e.g. 0.1 or 1.1 or RC1 or 1.RC1)cms_version_number() : float
cms_version_pretty() : string
This is (and must be kept) equivalent to get_version_pretty__from_dotted(get_version_dotted())
package | core |
---|
string
The string saying the full Composr version numbercms_version_time() : integer
cms_version_time_major() : integer
collapse_1d_complexity(string $key, array $list) : array
package | core |
---|
string
The key of our maps that reside in our map
array
The map of maps
array
The collapsed mapcollapse_2d_complexity(string $key, string $value, array $list) : array
package | core |
---|
string
The key key of our maps that reside in our map
string
The value key of our maps that reside in our map
array
The map of maps
array
The collapsed mapcomcode_lang_string(\ID_TEXT $lang_code) : \Tempcode
package | core |
---|
\ID_TEXT
The language string ID
\Tempcode
The parsed Comcodecomcode_to_clean_text(string $message_plain, boolean $for_extract= false
, \?array $tags_to_preserve= null
) : string
package | core |
---|
string
Comcode text to change
boolean
Whether this is for generating an extract that does not need to be fully comprehended (i.e. favour brevity)
\?array
List of tags to preserve (null: none)
string
Clean textcompare_ip_address(string $wild, \IP $full) : boolean
package | core |
---|
string
The general IP address that is potentially wildcarded
\IP
The specific IP address we are checking
boolean
Whether the IP addresses correlatecompare_ip_address_ip4(string $wild, array $full_parts) : boolean
package | core |
---|
string
The general IP address that is potentially wildcarded
array
The exploded parts of the specific IP address we are checking
boolean
Whether the IP addresses correlatecompare_ip_address_ip6(string $wild, array $full_parts) : boolean
package | core |
---|
string
The general IP address that is potentially wildcarded
array
The exploded parts of the specific IP address we are checking
boolean
Whether the IP addresses correlatecompile_template(string $data, \ID_TEXT $template_name, \ID_TEXT $theme, \ID_TEXT $lang, boolean $tolerate_errors = false
) : array
package | core |
---|
string
The template file contents
\ID_TEXT
The name of the template
\ID_TEXT
The name of the theme
\ID_TEXT
The language it is for
boolean
Whether to tolerate errors
array
A pair: array Compiled result structure, array preprocessable bits (special stuff needing attention that is referenced within the template)composr_cleanup(\?array $caches = null
) : \Tempcode
package | core |
---|
\?array
The caches to rebuild (null: all)
\Tempcode
Any messages returnedcompress_cms_stub_file(\PATH $stub_file)
config_option_url(\ID_TEXT $name) : \?URLPATH
package | core |
---|
\ID_TEXT
The config option name
\?URLPATH
URL to set the config option (null: no such option exists)config_update_value_ref(\SHORT_TEXT $old_setting, \SHORT_TEXT $setting, \ID_TEXT $type)
package | core |
---|
\SHORT_TEXT
The old value
\SHORT_TEXT
The name value
\ID_TEXT
The type
content_get_details(\ID_TEXT $content_type, \ID_TEXT $content_id, boolean $resourcefs_style = false
) : array
package | core |
---|
\ID_TEXT
Content type
\ID_TEXT
Content ID
boolean
Whether to use the content API as resource-fs requires (may be slightly different)
array
Tuple: title, submitter, content hook info, the content row, URL (for use within current browser session), URL (for use in emails / sharing)content_get_row(\ID_TEXT $content_id, array $cma_info) : \?array
package | core |
---|
\ID_TEXT
The content ID
array
The info array for the content type
\?array
The row (null: not found)content_validated(\ID_TEXT $content_type, \ID_TEXT $content_id) : boolean
package | core |
---|
\ID_TEXT
Content type
\ID_TEXT
Content ID
boolean
Whether it is validatedconvert_bad_entities(string $data, string $charset = 'ISO-8859-1'
) : string
package | core |
---|
string
HTML to convert entities from
string
The character set we are using for $data (both in and out)
string
Valid XHTMLconvert_composr_type_codes(\ID_TEXT $type_has, \ID_TEXT $type_id, \ID_TEXT $type_wanted) : \ID_TEXT
package | core |
---|---|
set | addon content_type meta_hook search_hook seo_type_code feedback_type_code permissions_type_code module table |
set | addon content_type meta_hook search_hook seo_type_code feedback_type_code permissions_type_code module table |
\ID_TEXT
Content type type we know
\ID_TEXT
Content type ID we know
\ID_TEXT
Desired content type
\ID_TEXT
Corrected content type type (blank: could not find)convert_composr_type_codes_multiple(\ID_TEXT $type_has, \ID_TEXT $type_id) : array
package | core |
---|---|
set | addon content_type meta_hook search_hook seo_type_code feedback_type_code permissions_type_code module table |
\ID_TEXT
Content type type we know
\ID_TEXT
Content type ID we know
array
Content type info list (blank: could not find)convert_data_encodings(boolean $known_utf8 = false
)
Roll on PHP6 that has a true internal UTF string model. For now, anyone who uses UTF will get some (albeit minor) imperfections from PHP's manipulations of the strings.
package | core |
---|
boolean
Whether we know we are working in UTF-8. This is the case for AJAX calls.
convert_guids_to_ids(string $text) : string
convert_image(\URLPATH $from, \PATH $to, integer $width, integer $height, integer $box_width= -1
, boolean $exit_on_error= true
, \?string $ext2= null
, boolean $using_path= false
, boolean $only_make_smaller= true
, \?array $thumb_options= null
) : boolean
package | core |
---|
\URLPATH
The URL to the image to resize
\PATH
The file path (including filename) to where the resized image will be saved
integer
The maximum width we want our new image to be (-1 means "don't factor this in")
integer
The maximum height we want our new image to be (-1 means "don't factor this in")
integer
This is only considered if both $width and $height are -1. If set, it will fit the image to a box of this dimension (suited for resizing both landscape and portraits fairly)
boolean
Whether to exit Composr if an error occurs
\?string
The file extension to save with (null: same as our input file)
boolean
Whether $from was in fact a path, not a URL
boolean
Whether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\?array
This optional parameter allows us to specify cropping or padding for the image. See comments in the function. (null: no details passed)
boolean
Successconvert_timezone_offset_to_formal_timezone(float $offset) : string
package | core |
---|
float
Timezone offset.
string
Users timezone in "boring" format.convert_to_internal_encoding(string $data, \?string $input_charset= null
, \?string $internal_charset= null
) : string
package | core |
---|
string
Data to convert.
\?string
Charset to convert from (null: that read by the last http_download_file call).
\?string
Charset to convert to (null: current encoding).
string
Converted data.convert_url_to_path(\URLPATH $url) : \?PATH
package | core |
---|
\URLPATH
The value to convert
\?PATH
File path (null: is not local)crc32_file(\PATH $filename) : \?integer
create_selection_list(\ID_TEXT $root_page_link, boolean $under_only= false
, \?ID_TEXT $default= null
, \?array $valid_node_types= null
, \?array $valid_selectable_content_types= null
, integer $check_permissions_against= 0
, \?MEMBER $check_permissions_for= null
, boolean $consider_validation= false
, \?MEMBER $only_owned= null
, boolean $use_compound_list= false
, \?mixed $filter_func= null
) : \Tempcode
package | core |
---|
\ID_TEXT
The page-link we are starting from.
boolean
Create from under this node, rather than at it.
\?ID_TEXT
Default selection (null: none).
\?array
List of node types we will return/recurse-through (null: no limit)
\?array
List of node types we will allow to be selectable (null: no limit)
integer
Check permissions according to this bitmask of possibilities (requiring all in the bitmask to be matched)
\?MEMBER
The member we are checking permissions for (null: current member)
boolean
Whether to filter out non-validated entries if the $check_permissions_for user doesn't have the privilege to see them AND doesn't own them
\?MEMBER
The member we are only finding owned content of (null: no such limit); nodes leading up to owned content will be shown, but not as selectable
boolean
Whether to produce selection IDs as a comma-separated list of all selectable sub-nodes.
\?mixed
Filter function for limiting what rows will be included (null: none).
\Tempcode
List.create_selection_list_lang_files(\?LANGUAGE_NAME $lang = null
) : \Tempcode
package | core |
---|
\?LANGUAGE_NAME
The language (null: uses the current language)
\Tempcode
The language file selectorcreate_selection_list_langs(\?LANGUAGE_NAME $select_lang= null
, boolean $show_unset= false
) : \Tempcode
package | core |
---|
\?LANGUAGE_NAME
The language to have selected by default (null: uses the current language)
boolean
Whether to show languages that have no language details currently defined for them
\Tempcode
The language selectorcreate_selection_list_zones(\?ID_TEXT $sel= null
, \?array $no_go= null
, \?array $reorder= null
, \?TIME $updated_since= null
) : \Tempcode
package | core |
---|
\?ID_TEXT
The zone in the list to select by default (null: use first)
\?array
A list of zone to not put into the list (null: none to skip)
\?array
A reordering (null: no reordering)
\?TIME
Time from which content must be updated (null: no limit).
\Tempcode
The listcreate_session(\MEMBER $member, \BINARY $session_confirmed= 0
, boolean $invisible= false
) : \ID_TEXT
package | core |
---|---|
sets_output_state |
\MEMBER
Logged in member
\BINARY
Whether the session should be considered confirmed
boolean
Whether the session should be invisible
\ID_TEXT
New session IDcreate_zip_file(array $file_array, boolean $stream= false
, boolean $get_offsets= false
, \?PATH $outfile_path= null
) : mixed
package | core |
---|
array
A list of maps (time,data/full_path,name) covering everything to zip up
boolean
Whether to stream the output direct to the browser
boolean
Whether to return the tuple
\?PATH
File to spool into (null: none). $stream will be forced to false
mixed
The data for the zip file OR a tuple: data, offsets, sizes; will be blank if $stream is true or $outfile_path is not NULLcritical_error(string $code, \?string $relay= null
, boolean $exit= true
)
package | core |
---|
string
The error message code
\?string
Relayed additional details (null: nothing relayed)
boolean
Whether to actually exit
cron_installed() : boolean
css_compile(\ID_TEXT $active_theme, \ID_TEXT $theme, \ID_TEXT $c, \PATH $fullpath, \PATH $css_cache_path, boolean $minify = true
)
package | core |
---|
\ID_TEXT
The theme the file is being loaded for
\ID_TEXT
The theme the file is in
\ID_TEXT
Name of the CSS file
\PATH
Full path to the CSS file
\PATH
Full path to where the cached CSS file will go
boolean
Whether to also do minification
css_enforce(string $c, \?ID_TEXT $theme= null
, \?boolean $minify= null
) : string
package | core |
---|
string
The CSS file required
\?ID_TEXT
The name of the theme (null: current theme)
\?boolean
Whether to minify (null: read from environment)
string
The path to the CSS file in the cache (blank: no file)css_inherit(\ID_TEXT $css_file, \ID_TEXT $theme, \ID_TEXT $destination_theme, \?ID_TEXT $seed, boolean $dark, \ID_TEXT $algorithm) : string
package | core |
---|---|
set | equations hsv |
\ID_TEXT
Source CSS file
\ID_TEXT
Source theme
\ID_TEXT
Destination theme
\?ID_TEXT
Seed (null: do not re-seed)
boolean
Whether it is a dark theme
\ID_TEXT
The algorithm to use
string
The sheetcss_minify(string $v) : string
package | core |
---|
string
Stylesheet definitions as string
string
Minified stylesheet definitionscss_tempcode(boolean $inline= false
, boolean $only_global= false
, \?string $context= null
, \?ID_TEXT $theme= null
) : \Tempcode
package | core |
---|
boolean
Force inline CSS
boolean
Only do global CSS
\?string
HTML context for which we filter (minimise) any CSS we spit out as inline (null: none)
\?ID_TEXT
The name of the theme (null: current theme)
\Tempcode
The Tempcode to tie in the CSS filescurrent_script() : \ID_TEXT
current_share_user() : \?ID_TEXT
db_encode_like(string $pattern) : string
db_escape_string(string $string) : string
db_full_text_assemble(string $content, boolean $boolean) : string
package | core |
---|
string
Our match string (assumes "?" has been stripped already)
boolean
Whether to do a boolean full text search
string
Part of a WHERE clause for doing full-text searchdb_get_first_id() : integer
db_has_expression_ordering(array $db) : boolean
db_has_full_text(array $db) : boolean
db_has_subqueries(array $db) : boolean
db_like_assemble(string $content, string $boolean_operator= 'AND'
, boolean $full_coverage= false
) : array
package | core |
---|---|
set | AND OR |
string
Boolean search string
string
Boolean operator to use
boolean
Whether we can assume we require full coverage
array
A tuple (any SQL component may be blank): The combined where clause SQL, the boolean operator, body where clause SQL, positive where clause SQL, negative where clause SQLdb_map_restrict(array $row, array $fields) : array
package | core |
---|
array
DB table row.
array
List of fields to copy through.
array
Map of fields.db_string_equal_to(\ID_TEXT $attribute, string $compare) : string
package | core |
---|
\ID_TEXT
The attribute
string
The comparison
string
The SQLdb_string_not_equal_to(\ID_TEXT $attribute, string $compare) : string
package | core |
---|
\ID_TEXT
The attribute
string
The comparison
string
The SQLdecache(mixed $cached_for, \?array $identifier= null
, \?MEMBER $member= null
)
package | core |
---|
mixed
The type of what we are caching (e.g. block name) (ID_TEXT or an array of ID_TEXT, the array may be pairs re-specifying $identifier)
\?array
A map of identifiying characteristics (null: no identifying characteristics, decache all)
\?MEMBER
Member to only decache for (null: no limit)
decrypt_data(string $data, string $passphrase) : string
A fatal error will occur if the passphrase is empty, the key cannot be found, or if decryption fails for whatever reason.
package | core |
---|
string
Data to be decrypted
string
Passphrase to unlock the site's private key
string
Decrypted datadeldir_contents(\PATH $dir, boolean $default_preserve= false
, boolean $just_files= false
)
package | core |
---|
\PATH
The pathname to the directory to delete
boolean
Whether to preserve files there by default
boolean
Whether to just delete files
delete_cms_page(\ID_TEXT $zone, \ID_TEXT $page, \?ID_TEXT $type= null
, boolean $use_afm= false
)
package | core |
---|
\ID_TEXT
The zone
\ID_TEXT
The page
\?ID_TEXT
The page type (null: Comcode page in Composr's fallback language) [NB: page is deleted in all languages regardless of which is given]
boolean
Whether to use the AFM
delete_config_option(\ID_TEXT $name)
delete_expired_sessions_or_recover(\?MEMBER $member = null
) : \?AUTO_LINK
package | core |
---|
\?MEMBER
User to get a current session for (null: do not try, which guarantees a return result of NULL also)
\?AUTO_LINK
The session ID we rebound to (null: did not rebind)delete_lang(integer $id, \?object $connection = null
)
package | core |
---|
integer
The ID
\?object
The database connection to use (null: standard site connection)
delete_privilege(\ID_TEXT $name)
delete_session(\ID_TEXT $session)
delete_upload(string $upload_path, \ID_TEXT $table, \ID_TEXT $field, mixed $id_field, mixed $id, \?string $new_url = null
)
This MUST be run before the edit/delete operation, as it scans for the existing value to know what is changing.
package | core |
---|
string
The path to the upload directory
\ID_TEXT
The table name
\ID_TEXT
The table field name
mixed
The table ID field name, or a map array
mixed
The table ID
\?string
The new URL to use (null: deleting without replacing: no change check)
delete_value(\ID_TEXT $name)
dependencies_are_good(array $dep, \TIME $tcp_time) : boolean
package | core |
---|
array
Dependent files (full file paths)
\TIME
Time of cache file
boolean
Whether decache is NOT neededdeshout_callback(array $matches) : string
destrictify(boolean $change_content_type= true
, boolean $mysql_too= false
)
package | core |
---|
boolean
Whether to also set the content type to plain-HTML
boolean
Whether to destrictify MySQL commands over the Composr database driver
dev_mode_aftertests()
package | core |
---|
die_html_trace(string $message)
directive_tempcode(\ID_TEXT $directive, mixed $content, \?array $parameters = null
) : \Tempcode
package | core |
---|
\ID_TEXT
The ID of the directive to use
mixed
The contents (Tempcode or string)
\?array
Directive parameters (null: none)
\Tempcode
A directive Tempcode objectdisable_php_memory_limit()
package | core |
---|
display_seconds_period(integer $seconds) : string
display_time_period(integer $seconds) : string
display_webstandards_results(string $out, array $error, boolean $preview_mode= false
, boolean $ret= false
) : string
package | core |
---|
string
The data that was checked
array
Error information
boolean
Whether we are opening up an XHTML-fragment in a preview box
boolean
Whether to return Tempcode
string
Returned result (won't return it $ret is false)div(\Tempcode $tempcode, string $guid = ''
) : \Tempcode
package | core |
---|
\Tempcode
The Tempcode to put into a div
string
GUID for call
\Tempcode
The generated div with contentsdo_block(\ID_TEXT $codename, \?array $map= null
, \?integer $ttl= null
) : \Tempcode
package | core |
---|
\ID_TEXT
The block name
\?array
The block parameter map (null: no parameters)
\?integer
The TTL to use in minutes (null: block default)
\Tempcode
The generated Tempcodedo_block_get_cache_identifier(mixed $cache_on, \?array $map) : \?LONG_TEXT
We see if we have something cached by looking for a matching identifier.
package | core |
---|
mixed
PHP expression over $map (the parameter map of the block) OR a call_user_func specifier that will return a result (which will be used if caching is really very important, even for Hip Hop PHP)
\?array
The block parameter map (null: no parameters)
\?LONG_TEXT
The derived cache identifier (null: the identifier is CURRENTLY null meaning cannot be cached)do_block_hunt_file(\ID_TEXT $codename, \?array $map = null
) : array
package | core |
---|
\ID_TEXT
The block name
\?array
The block parameter map (null: no parameters)
array
A pair: Either the block object, or the string output of a miniblock ; and whether we entered a new security scopedo_environment_utf8_conversion(string $from_charset)
do_image_thumb(\URLPATH $url, mixed $caption, boolean $js_tooltip= false
, boolean $is_thumbnail_already= true
, \?integer $width= null
, \?integer $height= null
, boolean $only_make_smaller= false
) : \Tempcode
package | core |
---|
\URLPATH
The URL to the image thumbnail
mixed
The caption for the thumbnail (string or Tempcode)
boolean
Whether to use a JS tooltip. Forcibly set to true if you pass Tempcode
boolean
Whether already a thumbnail (if not, function will make one)
\?integer
Thumbnail width to use (null: default)
\?integer
Thumbnail height to use (null: default)
boolean
Whether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\Tempcode
The thumbnaildo_lang(\ID_TEXT $codename, \?mixed $token1= null
, \?mixed $token2= null
, \?mixed $token3= null
, \?LANGUAGE_NAME $lang= null
, boolean $require_result= true
) : \?mixed
Further documentation: https://www.youtube.com/watch?v=rinz9Avvq6A
package | core |
---|
\ID_TEXT
The language ID
\?mixed
The first token [string or Tempcode] (replaces {1}) (null: none)
\?mixed
The second token [string or Tempcode] (replaces {2}) (null: none)
\?mixed
The third token (replaces {3}). May be an array of [of string], to allow any number of additional args (null: none)
\?LANGUAGE_NAME
The language to use (null: users language)
boolean
Whether to cause Composr to exit if the lookup does not succeed
\?mixed
The human-readable content (null: not found). String normally. Tempcode if Tempcode parameters.do_lang_tempcode(\ID_TEXT $lang_string, \?mixed $token1= null
, \?mixed $token2= null
, \?mixed $token3= null
) : \Tempcode
package | core |
---|
\ID_TEXT
The ID of the language string to use
\?mixed
The first token [string or Tempcode] (replaces {1}) (null: none)
\?mixed
The second token [string or Tempcode] (replaces {2}) (null: none)
\?mixed
The third token (replaces {3}). May be an array of [of string], to allow any number of additional args (null: none)
\Tempcode
A language Tempcode objectdo_simple_environment_utf8_conversion()
package | core |
---|
do_site()
Take in all inputs, sends them to the correct functions to process, gathers up all the outputs, sticks them together and echoes them.
package | core |
---|
do_template(\ID_TEXT $codename, \?array $parameters= null
, \?LANGUAGE_NAME $lang= null
, boolean $light_error= false
, \?ID_TEXT $fallback= null
, string $suffix= '.tpl'
, string $directory= 'templates'
, \?ID_TEXT $theme= null
) : \Tempcode
package | core |
---|---|
set | .tpl .js .xml .txt .css |
set | templates javascript xml text css |
\ID_TEXT
The codename of the template being loaded
\?array
A map of parameters for the template (key to value) (null: no parameters)
\?LANGUAGE_NAME
The language to load the template in (templates can embed language references) (null: users own language)
boolean
Whether to not produce a stack dump if the template is missing
\?ID_TEXT
Alternate template to use if the primary one does not exist (null: none)
string
File type suffix of template file (e.g. .tpl)
string
Subdirectory type to look in
\?ID_TEXT
Theme to use (null: current theme)
\Tempcode
The Tempcode for this templatedoes_lang_exist(\LANGUAGE_NAME $lang) : boolean
ecv(string $lang, array $escaped, integer $type, \ID_TEXT $name, array $param) : mixed
package | core |
---|---|
set | 0 2 |
string
The language to evaluate this symbol in (some symbols refer to language elements).
array
Array of escaping operations.
integer
The type of symbol this is (TC_SYMBOL, TC_LANGUAGE_REFERENCE)
\ID_TEXT
The name of the symbol
array
Parameters to the symbol. For all but directive it is an array of strings. For directives it is an array of Tempcode objects. Actually there may be template-style parameters in here, as an influence of singular_bind and these may be Tempcode, but we ignore them.
mixed
The result. Either Tempcode, or a string.either_param_integer(\ID_TEXT $name, \?mixed $default = false
) : \?integer
You should always use integer specified versions when inputting integers, for the added security that type validation allows. If the value is of the wrong type, it indicates a hack attempt and will be logged.
package | core |
---|
\ID_TEXT
The name of the parameter to get
\?mixed
The default value to give the parameter if the parameter value is not defined or the empty string (null: allow missing parameter) (false: give error on missing parameter)
\?integer
The parameter value (null: not set, and NULL given as default)either_param_string(\ID_TEXT $name, \?mixed $default = false
) : \?string
Implements additional security over the direct PHP access mechanism which should not be used.
package | core |
---|
\ID_TEXT
The name of the parameter to get
\?mixed
The default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
\?string
The parameter value (null: missing)encrypt_data(string $data) : string
A fatal error will occur if the public key cannot be found, or if encryption fails for whatever reason. Note that this will blindly re-encrypt data which has already been encrypted. You should check data with is_data_encrypted() first.
package | core |
---|
string
Data to be encrypted
string
Encrypted data, with magic markerenforce_personal_access(\MEMBER $member_id, \?ID_TEXT $permission= null
, \?ID_TEXT $permission2= null
, \?MEMBER $member_viewing= null
)
package | core |
---|
\MEMBER
The member who typically (i.e. when it's not an administrative override) we want the current member to be.
\?ID_TEXT
The override permission the current member must have (null: no general override).
\?ID_TEXT
An alternative permission to the 'assume_any_member' permission (null: no override).
\?MEMBER
The member who is doing the viewing (null: current member).
enforce_sessioned_url(\URLPATH $url) : \URLPATH
NB: This is used for login redirection. It had to add the session ID into the redirect url.
package | core |
---|
\URLPATH
The URL to enforce results in session persistence for the user
\URLPATH
The fixed URL (potentially nothing was done, depending on cookies)enforce_temporary_passwords(\MEMBER $member)
ensure_thumbnail(\URLPATH $full_url, \URLPATH $thumb_url, \ID_TEXT $thumb_dir, \ID_TEXT $table, \AUTO_LINK $id, \ID_TEXT $thumb_field_name= 'thumb_url'
, \?integer $thumb_width= null
, boolean $only_make_smaller= false
) : \URLPATH
package | core |
---|
\URLPATH
The full URL to the image which will-be/is thumbnailed
\URLPATH
The URL to the thumbnail (blank: no thumbnail yet)
\ID_TEXT
The directory, relative to the Composr install's uploads directory, where the thumbnails are stored. MINUS "_thumbs"
\ID_TEXT
The name of the table that is storing what we are doing the thumbnail for
\AUTO_LINK
The ID of the table record that is storing what we are doing the thumbnail for
\ID_TEXT
The name of the table field where thumbnails are saved
\?integer
The thumbnail width to use (null: default)
boolean
Whether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\URLPATH
The URL to the thumbnailentity_utf8_decode(string $data, string $internal_charset) : \~string
package | core |
---|
string
Data to convert.
string
Charset to convert to.
\~string
Converted data (false: could not convert).erase_cached_templates(boolean $preserve_some = false
)
package | core |
---|
boolean
Whether to preserve CSS and JS files that might be linked to between requests
erase_comcode_cache()
package | core |
---|
escape_html(mixed $string) : string
escapeshellarg_wrap(string $arg) : string
exact_match_sql(array $field, integer $i, \ID_TEXT $type= 'short'
, \?string $param= null
) : \?array
package | core |
---|---|
set | short long |
array
The field details
integer
We're processing for the ith row
\ID_TEXT
Table type
\?string
Search term (null: lookup from environment)
\?array
Tuple of SQL details (array: extra trans fields to search, array: extra plain fields to search, string: an extra table segment for a join, string: the name of the field to use as a title, if this is the title, extra WHERE clause stuff) (null: nothing special)execute_task_background(array $task_row)
export_to_xml(\?array $tables = null
) : string
package | core |
---|
\?array
List of tables to export (null: all tables except those skippable)
string
Exported data in XML formatextract_content_str_id_from_data(array $data, array $cma_info) : \ID_TEXT
package | core |
---|
array
The data row
array
The info array for the content type
\ID_TEXT
The IDextract_html_body(string $html) : string
extract_module_functions(\PATH $path, array $functions, \?array $params= null
, boolean $prefer_direct_code_call= false
, \?string $class_name= null
) : array
We used to actually load up the module, but it ate all our RAM when we did!
package | core |
---|
\PATH
The path to the module (or any PHP file with a class)
array
Array of functions to be executing
\?array
A list of parameters to pass to our functions (null: none)
boolean
Whether to do this "properly" (via proper OOP), which will consume more memory
\?string
Class name to use (null: autodetect, which is a little slower)
array
A list of pieces of code to do the equivalent of executing the requested functions with the requested parametersextract_module_functions_page(\ID_TEXT $zone, \ID_TEXT $page, array $functions, \?array $params = null
) : array
If it's not a module, returns an empty array.
package | core |
---|
\ID_TEXT
The zone it is in
\ID_TEXT
The page name
array
Array of functions to be executing
\?array
A list of parameters to pass to our functions (null: none)
array
A list of pieces of code to do the equivalent of executing the requested functions with the requested parametersextract_module_info(\PATH $path) : \?array
package | core |
---|
\PATH
The path to the module
\?array
A module information map (null: module contains no info method)extract_plain_links(array $matches) : string
fallback_lang() : \LANGUAGE_NAME
In theory, this is the only hook to English that there is.
package | core |
---|
\LANGUAGE_NAME
The fallback languagefatal_exit(mixed $text) : mixed
It also adds an entry to the error log, for reference.
package | core |
---|
mixed
The error message (string or Tempcode)
mixed
Never returns (i.e. exits)file_size_to_tar_block_size(integer $size) : integer
package | core |
---|
integer
The file size of a file that would be inside the TAR archive
integer
The block size TAR would use to store this filefilter_css(\ID_TEXT $c, \?ID_TEXT $theme, string $context) : string
Whilst this is a clever algorithm, it isn't so clever as to actually try and match each selector against a DOM tree. If any segment of a compound selector matches, match is assumed.
package | core |
---|
\ID_TEXT
CSS file
\?ID_TEXT
Theme (null: default)
string
(X) HTML context under which CSS is filtered
string
Filtered CSSfilter_form_field_default(string $name, \?string $val) : string
package | core |
---|
string
The name of the parameter
\?string
The current value of the parameter (null: none)
string
The filtered value of the parameterfilter_group_permissivity(array $groups) : array
package | core |
---|
array
List of groups to filter
array
List of permissive groups, filtered from those givenfilter_naughty(string $in, boolean $preg = false
) : string
This function is designed to be called on parameters that will be embedded in a path, and defines malicious as trying to reach a parent directory using '..'. All file paths in Composr should be absolute
package | core |
---|
string
String to test
boolean
Whether to just filter out the naughtyness
string
Same as input stringfilter_naughty_harsh(string $in, boolean $preg = false
) : string
package | core |
---|
string
String to test
boolean
Whether to just filter out the naughtyness
string
Same as input stringfiltercode_to_sql(object $db, array $filters, \ID_TEXT $content_type= ''
, string $context= ''
, string $table_join_code= 'r'
) : array
package | core |
---|
object
Database object to use
array
Parsed Filtercode structure
\ID_TEXT
The content type (blank: no function needed, direct in-table mapping always works)
string
First parameter to send to the conversion function, may mean whatever that function wants it to. If we have no conversion function, this is the name of a table to read field metadata from
string
What MySQL will join the table with
array
Tuple: array of extra select, array of extra join, string of extra wherefind_all_blocks() : array
find_all_hooks(\ID_TEXT $type, \ID_TEXT $entry) : array
package | core |
---|---|
set | blocks modules systems |
\ID_TEXT
The type of hook
\ID_TEXT
The hook class to find hook implementations for (e.g. the name of a module)
array
A map of hook implementation name to [sources|sources_custom]find_all_langs(boolean $even_empty_langs = false
) : array
package | core |
---|
boolean
Whether to even find empty languages
array
The installed languages (map, lang=>type)find_all_modules(\ID_TEXT $zone) : array
package | core |
---|
\ID_TEXT
The zone name
array
A map of page name to type (modules_custom, etc)find_all_pages(\ID_TEXT $zone, \ID_TEXT $type, string $ext= 'php'
, boolean $keep_ext_on= false
, \?TIME $cutoff_time= null
, integer $show_method= 0
) : array
package | core |
---|---|
set | modules comcode html |
set | 0 1 2 |
\ID_TEXT
The zone name
\ID_TEXT
The page type
string
The file extension to limit us to (without a dot)
boolean
Whether to leave file extensions on the page name
\?TIME
Only show pages newer than (null: no restriction)
integer
Selection algorithm constant
array
A map of page name to type (modules_custom, etc)find_all_pages_wrap(\ID_TEXT $zone, boolean $keep_ext_on= false
, boolean $consider_redirects= false
, integer $show_method= 0
, \?ID_TEXT $page_type= null
) : array
package | core |
---|---|
set | 0 1 2 |
set | modules comcode html |
\ID_TEXT
The zone name
boolean
Whether to leave file extensions on the page name
boolean
Whether to take transparent redirects into account
integer
Selection algorithm constant
\?ID_TEXT
Page type to show (null: all)
array
A map of page name to type (modules_custom, etc)find_all_xml_tables() : array
find_all_zones(boolean $search= false
, boolean $get_titles= false
, boolean $force_all= false
, integer $start= 0
, integer $max= 50
) : array
package | core |
---|
boolean
Whether to search the file system and return zones that might not be fully in the system (otherwise will just use the database)
boolean
Whether to get titles for the zones as well. Only if !$search
boolean
Whether to insist on getting all zones without $start/$max parameters (there could be thousands in theory...)
integer
Start position to get results from (ignored if $force_all is on)
integer
Maximum zones to get
array
A list of zone names / a list of quartets (name, title, default page, zone row)find_cache_on(\ID_TEXT $codename) : \?array
package | core |
---|
\ID_TEXT
The codename of what will be checked for caching
\?array
The cached result (null: no cached result)find_id_moniker(array $url_parts, \ID_TEXT $zone) : \?string
package | core |
---|
array
The URL component map (must contain 'page', 'type', and 'id' if this function is to do anything).
\ID_TEXT
The URL zone name (only used for Comcode Page URL monikers).
\?string
The moniker ID (null: could not find)find_id_via_url_moniker(\ID_TEXT $content_type, \SHORT_TEXT $url_moniker) : \?ID_TEXT
package | core |
---|
\ID_TEXT
The content type.
\SHORT_TEXT
The URL moniker.
\?ID_TEXT
The ID (null: not found).find_lang_content_names(array $ids) : array
package | core |
---|
array
The language IDs (array of AUTO_LINK)
array
Human readable names (List of string against same IDs in input array or null for orphan strings)find_mail_bounces(string $server, integer $port, string $folder, string $username, string $password, \?TIME $since = null
) : array
package | core |
---|
string
The IMAP server hostname.
integer
The IMAP port.
string
The IMAP inbox identifier.
string
The IMAP username.
string
The IMAP password.
\?TIME
Only find bounces since this date (null: 8 weeks ago). This is approximate, we will actually look from a bit further back to compensate for possible timezone differences.
array
Bounces (a map between email address and details of the bounce).find_mail_folders(string $server, integer $port, string $username, string $password) : array
package | core |
---|
string
The IMAP server hostname.
integer
The IMAP port.
string
The IMAP username.
string
The IMAP password.
array
Map of folders (codenames to display labels).find_php_path(boolean $cgi = false
) : \PATH
find_script(string $name, boolean $append_keep= false
, integer $base_url_code= 0
) : \URLPATH
Why this function? Because Composr allows these to be moved around between zone directories, to suit site .htaccess requirements).
package | core |
---|---|
set | 0 1 2 |
string
The codename of the needed script
boolean
Whether to append keep variables
integer
Code representing what base URL type to use (0=guess, 1=http, 2=https)
\URLPATH
The URL to the scriptfind_sitemap_object(\ID_TEXT $page_link) : \?array
package | core |
---|
\ID_TEXT
The page-link we are finding a Sitemap object for (blank: root).
\?array
A pair: the Sitemap object, and whether you need to make a virtual call (null: cannot find one).find_template_place(\ID_TEXT $codename, \?LANGUAGE_NAME $lang, \ID_TEXT $theme, string $suffix, string $directory, boolean $non_custom_only = false
) : \?array
package | core |
---|---|
set | templates css |
\ID_TEXT
The codename of the template being loaded
\?LANGUAGE_NAME
The language to load the template in (templates can embed language references) (null: users own language)
\ID_TEXT
The theme to use
string
File type suffix of template file (e.g. .tpl)
string
Subdirectory type to look in
boolean
Whether to only search in the default templates
\?array
List of parameters needed for the _do_template function to be able to load the template (null: could not find the template)find_template_tree_nice(\ID_TEXT $codename, array $children, boolean $fresh, boolean $cache_started = false
) : string
package | core |
---|
\ID_TEXT
The codename of the current template item in the recursion
array
The template tree structure for children
boolean
Whether the template tree came from a cache (if so, we can take some liberties with it's presentation)
boolean
As $fresh, except something underneath at any unknown point did come from the cache, so this must have by extension
string
HTML representationfind_theme_image(\ID_TEXT $id, boolean $silent_fail= false
, boolean $leave_local= false
, \?ID_TEXT $theme= null
, \?LANGUAGE_NAME $lang= null
, \?object $db= null
, boolean $pure_only= false
) : \URLPATH
package | core |
---|
\ID_TEXT
The theme image ID
boolean
Whether to silently fail (i.e. not give out an error message when a theme image cannot be found)
boolean
Whether to leave URLs as relative local URLs
\?ID_TEXT
The theme to search in (null: users current theme)
\?LANGUAGE_NAME
The language to search for (null: users current language)
\?object
The database to use (null: site database)
boolean
Whether to only search the default 'images' filesystem
\URLPATH
The URL found (blank: not found)fix_bad_unicode(string $input, boolean $definitely_unicode = false
) : string
The fix is imperfect, it will actually treat the input as ISO-8859-1 if not valid utf-8, then reconvert. Some limited scrambling is considered better than a stack trace. This function does nothing if we are not using utf-8.
package | core |
---|
string
Input string
boolean
If we know the input is meant to be unicode
string
Guaranteed valid utf-8, if we're using it, otherwise the same as the input stringfix_id(string $param) : string
fixup_protocolless_urls(\URLPATH $in) : \URLPATH
package | core |
---|
\URLPATH
The URL to fix
\URLPATH
The fixed URL (or original one if no fix was needed)flatten_slashed_array(array $array, boolean $already_stripped = false
) : string
package | core |
---|
array
Array to convert
boolean
Whether PHP magic-quotes have already been cleaned out for the array
string
A humanely readable version of the array.float_format(float $val, integer $decs_wanted= 2
, boolean $only_needed_decs= false
) : string
package | core |
---|
float
The value to format
integer
The number of fractional digits
boolean
Whether to trim trailing zeros
string
Nicely formatted stringfloat_to_raw_string(float $num, integer $decs_wanted= 2
, boolean $only_needed_decs= false
) : string
package | core |
---|
float
The number
integer
The number of decimals to keep
boolean
Whether to trim trailing zeros
string
The string convertedforce_have_afm_details()
package | core |
---|
force_httpauth()
package | core |
---|
form_for_filtercode(string $filter, \?array $labels= null
, \?ID_TEXT $content_type= null
, \?array $types= null
) : array
package | core |
---|
string
String-based search filter (blank: make one up to cover everything, but only works if $table is known)
\?array
Labels for field names (null: none, use auto-generated)
\?ID_TEXT
Content-type to auto-probe from (null: none, use string inputs)
\?array
Field types (null: none, use string inputs / defaults for table)
array
The form fields, The modded filter, Merger linksform_input_hidden(\ID_TEXT $name, string $value) : \Tempcode
package | core |
---|
\ID_TEXT
The name which this input field is for
string
The value for this input field
\Tempcode
The input fieldform_input_list_entry(string $value, boolean $selected= false
, mixed $text= ''
, boolean $red= false
, boolean $disabled= false
) : \Tempcode
package | core |
---|
string
The value for this entry
boolean
Whether this entry is selected by default or not (Note: if nothing else is selected and this is the first, it will be selected by default anyway)
mixed
The text associated with this choice (blank: just use name for text)
boolean
Whether this entry will be put as red (marking it as important somehow)
boolean
Whether this list entry is disabled (like a header in a list)
\Tempcode
The input fieldform_input_list_group(mixed $title, \Tempcode $entries) : \Tempcode
package | core |
---|
mixed
The title for the group
\Tempcode
List entries for group
\Tempcode
The groupform_to_email(\?string $subject= null
, string $intro= ''
, \?array $fields= null
, \?string $to_email= null
, string $outro= ''
, boolean $is_via_post= true
)
package | core |
---|
\?string
The subject of the email (null: from posted subject parameter).
string
The intro text to the mail (blank: none).
\?array
A map of fields to field titles to transmit. (null: all posted fields, except subject and email)
\?string
Email address to send to (null: look from post environment / staff address).
string
The outro text to the mail (blank: none).
boolean
Whether $fields refers to some POSTed fields, as opposed to a direct field->value map.
foxy_utf8_to_nce(string $data = ''
) : string
package | core |
---|
string
Input text.
string
Output 7-bit unicode-entity-encoded ASCII text.fractional_edit() : boolean
generate_filtercode_join_key_from_string(string $str) : string
generate_text_summary(string $_temp_summary, array $words_searched) : string
package | core |
---|
string
What was searched
array
List of words searched
string
Highlighted portiongeolocate_ip(\?IP $ip = null
) : \?string
package | core |
---|
\?IP
The IP to geolocate (null: current user's IP)
\?string
The country initials (null: unknown)get_afm_form_fields() : \Tempcode
get_allowed_audio_file_types() : string
get_allowed_image_file_types() : string
get_allowed_partner_sites() : array
get_allowed_video_file_types() : string
get_base_url(\?boolean $https= null
, \?ID_TEXT $zone_for= null
) : \URLPATH
package | core |
---|
\?boolean
Whether to get the HTTPS base URL (null: do so only if the current page uses the HTTPS base URL)
\?ID_TEXT
The zone the link is for (null: root zone)
\URLPATH
The base-urlget_block_id(array $map) : \ID_TEXT
get_block_info_row(\ID_TEXT $codename, array $map) : \?array
package | core |
---|
\ID_TEXT
The block name
array
The block parameter map
\?array
The block info (null: cannot cache for some reason)get_block_parameters(\ID_TEXT $block) : array
package | core |
---|
\ID_TEXT
The name of the block to get parameters for
array
A list of parameters the block takesget_bot_type() : \?string
get_brand_base_url() : \URLPATH
get_brand_page_url(array $params, \ID_TEXT $zone) : \URLPATH
get_browser_string() : string
get_cache_entry(\ID_TEXT $codename, \LONG_TEXT $cache_identifier, integer $special_cache_flags, integer $ttl= 10000
, boolean $tempcode= false
, boolean $caching_via_cron= false
, \?array $map= null
) : \?mixed
package | core |
---|
\ID_TEXT
The codename to check for caching
\LONG_TEXT
The further restraints (a serialized map)
integer
Special cache flags
integer
The TTL for the cache entry. Defaults to a very big ttl
boolean
Whether we are caching Tempcode (needs special care)
boolean
Whether to defer caching to CRON. Note that this option only works if the block's defined cache signature depends only on $map (timezone and bot-type are automatically considered)
\?array
Parameters to call up block with if we have to defer caching (null: none)
\?mixed
The cached result (null: no cached result)get_charset() : string
get_chmod_array(\ID_TEXT $lang) : array
get_cms_cpf(\ID_TEXT $cpf, \?MEMBER $member = null
) : string
package | core |
---|
\ID_TEXT
The CPF name stem
\?MEMBER
Member to lookup for (null: current member)
string
The value (blank: has a blank value, or does not exist)get_comcode_page_editability_per_zone(\?MEMBER $member = null
) : array
package | core |
---|
\?MEMBER
The member being checked for access (null: current member)
array
A list of pairs: The zone name, and a bitmask of COMCODE_EDIT_* constants identifying the level of editing permission presentget_comcode_zone(\ID_TEXT $page_name, boolean $error = true
) : \?ID_TEXT
package | core |
---|
\ID_TEXT
The Comcode page name to find
boolean
Whether Composr should bomb out if the page was not found
\?ID_TEXT
The zone the Comcode page is in (null: missing)get_complex_base_url(\URLPATH $at) : \URLPATH
package | core |
---|
\URLPATH
Short base URL we need to probe
\URLPATH
The appropriate base-urlget_content_object(\ID_TEXT $content_type) : \?object
package | core |
---|
\ID_TEXT
The content type
\?object
The object (null: could not get one)get_content_where_for_str_id(\ID_TEXT $str_id, array $cma_info, \?string $table_alias = null
) : array
package | core |
---|
\ID_TEXT
The ID
array
The info array for the content type
\?string
The table alias (null: none)
array
The mappingget_custom_base_url(\?boolean $https = null
) : \URLPATH
package | core |
---|
\?boolean
Whether to get the HTTPS base URL (null: do so only if the current page uses the HTTPS base URL)
\URLPATH
The base-urlget_custom_file_base() : \PATH
get_db_forums() : string
get_db_forums_host() : string
get_db_forums_password() : string
get_db_forums_user() : string
get_db_keywords() : array
get_db_site_host() : string
get_db_site_password() : string
get_db_site_user() : string
get_db_type() : string
get_default_option(\ID_TEXT $name) : \?SHORT_TEXT
package | core |
---|
\ID_TEXT
The name of the option
\?SHORT_TEXT
The value (null: disabled)get_default_theme_name() : string
get_directory_contents(\PATH $path, \PATH $rel_path= ''
, boolean $special_too= false
, boolean $recurse= true
, boolean $files_wanted= true
) : array
package | core |
---|
\PATH
The path to search
\PATH
The path we prepend to everything we find (intended to be used inside the recursion)
boolean
Whether to also get special files
boolean
Whether to recurse (if not, will return directories as files)
boolean
Whether to get files (if not, will return directories as files)
array
The contents of the directoryget_directory_size(\PATH $path, boolean $recurse = true
) : integer
package | core |
---|
\PATH
The path to search
boolean
Whether to recurse (if not, will return directories as files)
integer
The extra space requestedget_displayname(\ID_TEXT $username) : \SHORT_TEXT
If no display name generator is configured, this will be the same as the username.
package | core |
---|
\ID_TEXT
The username
\SHORT_TEXT
The display nameget_domain() : string
get_exif_data(\PATH $path, \?string $filename = null
) : array
Also gets GPS data and canonicalises in decimal as Latitude and Longitude.
package | core |
---|
\PATH
This is the path of the photo which may contain metadata
\?string
This is the original filename of the photo which may contain metadata (null: derive from path)
array
Map of metadata, using standard EXIF namingget_exif_image_caption(\PATH $path, string $filename) : string
Check this file is a valid image file before passing to this function as an empty string often annoys.
package | core |
---|
\PATH
This is the path of the photo which may contain metadata
string
This is the original filename of the photo which may contain metadata
string
Whichever caption is foundget_file_base() : \PATH
get_file_extension(string $name) : string
get_file_size(\URLPATH $url) : string
package | core |
---|
\URLPATH
The URL that the file size of is being worked out for. Should be local.
string
The formatted-string file sizeget_forum_base_url(boolean $forum_base = false
) : \URLPATH
package | core |
---|
boolean
Whether to get the base directory of the forum. Unless running Conversr, this makes no difference - if possibly running Conversr, you need to think about this parameter: are you trying to reach the MSN-central-site or just a link to the forums?
\URLPATH
The installed forum base URLget_forum_type() : string
get_function_hash(string $code, string $function) : \SHORT_TEXT
package | core |
---|
string
The code.
string
Name of the function.
\SHORT_TEXT
The MD5 hash (blank: no such function).get_future_version_information() : \Tempcode
get_gd_version() : float
get_html_trace() : \Tempcode
get_input_date(\ID_TEXT $stub, boolean $get_also= false
, boolean $do_timezone_conversion= true
) : \?TIME
package | core |
---|
\ID_TEXT
The stub of the parameter name (stub_year, stub_month, stub_day, stub_hour, stub_minute)
boolean
Whether to allow over get parameters also
boolean
Whether to do timezone conversion
\?TIME
The timestamp of the date (null: no input date was chosen)get_input_date_components(\ID_TEXT $stub, \?integer $year= null
, \?integer $month= null
, \?integer $day= null
, boolean $get_also= false
) : array
package | core |
---|
\ID_TEXT
The stub of the parameter name (stub_year, stub_month, stub_day, stub_hour, stub_minute)
\?integer
Default year (null: none)
\?integer
Default month (null: none)
\?integer
Default day (null: none)
boolean
Whether to allow over get parameters also
array
The date/time componentsget_ip_address(integer $amount= 4
, \?IP $ip= null
) : \IP
package | core |
---|---|
set | 1 2 3 4 |
integer
The number of groups to include in the IP address (rest will be replaced with *'s). For IP6, this is doubled.
\?IP
IP address to use, normally left NULL (null: current user's)
\IP
The users IP address (blank: could not find a valid one)get_lang(\?MEMBER $member = null
) : \LANGUAGE_NAME
First it tries to get the GET or POST language values, then it tries the user's language, then site default, then it resorts to EN.
package | core |
---|
\?MEMBER
The member ID (null: site default language, although better just to call get_site_default_lang directly)
\LANGUAGE_NAME
The current languageget_lang_browser() : \?LANGUAGE_NAME
package | core |
---|
\?LANGUAGE_NAME
The closest-fit language to what the browser wants (null: browser doesn't ask)get_lang_file_descriptions(\LANGUAGE_NAME $lang, \?ID_TEXT $file = null
) : array
package | core |
---|
\LANGUAGE_NAME
The language
\?ID_TEXT
The language file (null: all non-custom language files)
array
The language descriptionsget_lang_file_map(\LANGUAGE_NAME $lang, \ID_TEXT $file, boolean $non_custom = false
) : array
package | core |
---|
\LANGUAGE_NAME
The language
\ID_TEXT
The language file
boolean
Force usage of original file
array
The language entriesget_lang_files(\?LANGUAGE_NAME $lang = null
) : array
package | core |
---|
\?LANGUAGE_NAME
The language (null: uses the current language)
array
The language filesget_lang_member(\MEMBER $member) : \?LANGUAGE_NAME
package | core |
---|
\MEMBER
The member ID
\?LANGUAGE_NAME
The language used by the member (null: the language will not map)get_logo_url(\?ID_TEXT $zone_name = null
) : \URLPATH
package | core |
---|
\?ID_TEXT
The zone being operated within (null: auto-detect)
\URLPATH
The relative URL to the logo for the current zoneget_mass_import_mode() : boolean
get_max_file_size(\?MEMBER $source_member= null
, \?object $connection= null
) : integer
package | core |
---|
\?MEMBER
Member we consider quota for (null: do not consider quota)
\?object
Database connection to get quota from (null: site DB)
integer
The maximum allowed upload filesize, in bytesget_max_image_size() : integer
get_member(boolean $quick_only = false
) : \MEMBER
It see's if the session exists / cookie is valid -- and gets the member ID accordingly
package | core |
---|
boolean
Whether to just do a quick check, don't establish new sessions
\MEMBER
The member requesting this web page (possibly the guest member - which strictly speaking, is not a member)get_members_viewing(\?ID_TEXT $page= null
, \?ID_TEXT $type= null
, \?SHORT_TEXT $id= null
, boolean $forum_layer= false
) : \?array
package | core |
---|
\?ID_TEXT
The page they need to be viewing (null: environment current) (blank: blank't care)
\?ID_TEXT
The page-type they need to be viewing (null: environment current) (blank: don't care)
\?SHORT_TEXT
The type-id they need to be viewing (null: environment current) (blank: don't care)
boolean
Whether this has to be done over the forum driver (multi site network)
\?array
A map of member-IDs to rows about them (except for guest, which is a count) (null: Too many / disabled)get_members_viewing_wrap(\?ID_TEXT $page= null
, \?ID_TEXT $type= null
, \?SHORT_TEXT $id= null
, boolean $forum_layer= false
) : \?array
package | core |
---|
\?ID_TEXT
The page they need to be viewing (null: don't care)
\?ID_TEXT
The page-type they need to be viewing (null: don't care)
\?SHORT_TEXT
The type-id they need to be viewing (null: don't care)
boolean
Whether this has to be done over the forum driver (multi site network)
\?array
A map of member-IDs to rows about them (null: Too many)get_mime_type(string $extension, boolean $as_admin) : string
package | core |
---|
string
The file extension (no dot)
boolean
Whether there are admin privileges, to render dangerous media types (client-side risk only)
string
The MIME typeget_modal_user() : \MEMBER
get_module_zone(\ID_TEXT $module_name, \ID_TEXT $type= 'modules'
, \?string $dir2= null
, string $ftype= 'php'
, boolean $error= true
) : \?ID_TEXT
package | core |
---|
\ID_TEXT
The page name to find
\ID_TEXT
The type of the page we are looking for
\?string
The special subcategorisation of page we are looking for (e.g. 'EN' for a Comcode page) (null: none)
string
The file extension for the page type
boolean
Whether Composr should bomb out if the page was not found
\?ID_TEXT
The zone the page is in (null: not found)get_num_users_peak() : integer
get_num_users_site() : integer
get_option(\ID_TEXT $name, boolean $missing_ok = false
) : \?SHORT_TEXT
package | core |
---|
\ID_TEXT
The name of the option
boolean
Where to accept a missing option (and return NULL)
\?SHORT_TEXT
The value (null: either null value, or no option found whilst $missing_ok set)get_ordinal_suffix(integer $index) : string
get_os_string() : string
get_page_grouping_links() : array
package | core |
---|
array
List of link tuples (one of the elements of which defines the page grouping -- see the page grouping hooks to see the structure).get_page_name() : \ID_TEXT
get_page_warning_details(\ID_TEXT $zone, \ID_TEXT $codename, \Tempcode $edit_url) : \Tempcode
package | core |
---|
\ID_TEXT
The zone the page is being loaded from
\ID_TEXT
The codename of the page
\Tempcode
The edit URL (blank if no edit access)
\Tempcode
The warningget_page_zone(\ID_TEXT $page_name, boolean $error = true
) : \?ID_TEXT
package | core |
---|
\ID_TEXT
The page name to find
boolean
Whether Composr should bomb out if the page was not found
\?ID_TEXT
The zone the page is in (null: missing)get_param_integer(\ID_TEXT $name, \?mixed $default= false
, boolean $not_string_ok= false
) : \?integer
package | core |
---|
\ID_TEXT
The name of the parameter to get
\?mixed
The default value to give the parameter if the parameter value is not defined or the empty string (null: allow missing parameter) (false: give error on missing parameter)
boolean
If a string is given, use the default parameter rather than giving an error (only use this if you are suffering from a parameter conflict situation between different parts of Composr)
\?integer
The parameter value (null: not set, and NULL given as default)get_param_string(\ID_TEXT $name, \?mixed $default= false
, boolean $no_security= false
) : \?string
Implements additional security over the direct PHP access mechanism which should not be used.
package | core |
---|
\ID_TEXT
The name of the parameter to get
\?mixed
The default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
boolean
Whether to skip the security check
\?string
The parameter value (null: missing)get_rand_password() : string
get_remappings(\ID_TEXT $url_scheme) : array
package | core |
---|
\ID_TEXT
The URL scheme to use
array
The list of URL remappingsget_root_comcode_pages(\ID_TEXT $zone, boolean $include_zone = false
) : array
package | core |
---|
\ID_TEXT
The zone to get for.
boolean
Use page-links in the mapping rather than just page names.
array
Root Comcode pages, mapping page name to validation status.get_screen_title(mixed $title, boolean $dereference_lang= true
, \?array $params= null
, \?Tempcode $user_online_title= null
, \?array $awards= null
, boolean $save_as_metadata= true
) : \Tempcode
package | core |
---|---|
sets_output_state |
mixed
The title to use (usually, a language string code, see below)
boolean
Whether the given title is actually a language string code, and hence gets dereferenced
\?array
Parameters sent to the language string (null: none)
\?Tempcode
Separate title to put into the 'currently viewing' data (null: use $title)
\?array
Awards to say this has won (null: none)
boolean
Whether to use this as metadata for the screen
\Tempcode
The title Tempcodeget_search_rows(\?ID_TEXT $meta_type, \?ID_TEXT $meta_id_field, string $content, boolean $boolean_search, \ID_TEXT $boolean_operator, boolean $only_search_meta, \ID_TEXT $direction, integer $max, integer $start, boolean $only_titles, \ID_TEXT $table, array $fields, string $where_clause, string $content_where, \ID_TEXT $order, string $select= '*'
, \?array $raw_fields= null
, \?string $permissions_module= null
, \?string $permissions_field= null
, boolean $permissions_field_is_string= false
) : array
package | core |
---|---|
set | OR AND |
\?ID_TEXT
The META type used by our content (null: Cannot support META search)
\?ID_TEXT
The name of the field that retrieved META IDs will relate to (null: Cannot support META search)
string
Search string
boolean
Whether to do a boolean search.
\ID_TEXT
Boolean operator
boolean
Whether to only do a META (tags) search
\ID_TEXT
Order direction
integer
Start position in total results
integer
Maximum results to return in total
boolean
Whether to only search titles (as opposed to both titles and content)
\ID_TEXT
The table name
array
The translateable fields to search over (or an ! which is skipped). The first of these must be the title field or an '!'; if it is '!' then the title field will be the first raw-field
string
The WHERE clause
string
The WHERE clause that applies specifically for content (this will be duplicated to check against multiple fields). ? refers to the yet-unknown field name
\ID_TEXT
What to order by
string
What to select
\?array
The non-translateable fields to search over (null: there are none)
\?string
The permission module to check category access for (null: none)
\?string
The field that specifies the permissions ID to check category access for (null: none)
boolean
Whether the permissions field is a string
array
The rows foundget_secure_random_number() : integer
get_self_url(boolean $evaluate= false
, boolean $root_if_posted= false
, \?array $extra_params= null
, boolean $posted_too= false
, boolean $avoid_remap= false
) : mixed
package | core |
---|
boolean
Whether to evaluate the URL (so as we don't return Tempcode)
boolean
Whether to direct to the default page if there was a POST request leading to where we are now (i.e. to avoid missing post fields when we go to this URL)
\?array
A map of extra parameters for the URL (null: none)
boolean
Whether to also keep POSTed data, in the GET request (useful if either_param_string is used to get the data instead of post_param_string - of course the POST data must be of the not--persistent-state-changing variety)
boolean
Whether to avoid mod_rewrite (sometimes essential so we can assume the standard URL parameter addition scheme in templates)
mixed
The URL (Tempcode or string)get_self_url_easy() : \URLPATH
get_server_timezone() : string
get_session_id() : \ID_TEXT
get_site_default_lang() : \LANGUAGE_NAME
get_site_salt() : \ID_TEXT
get_site_timezone() : string
get_staff_actions_list() : string
get_stopwords_list() : array
get_table_prefix() : string
get_template_contents(string $name) : string
package | core |
---|
string
The name of the template (based on the filename)
string
The contents of the file (blank if it does not exist)get_templates_list() : array
package | core |
---|
array
The names and titles of all available templates (title refers to the text within the first [title] tag in the template file)get_timezone_list() : array
package | core |
---|
array
Timezone (map between boring-style and human-readable name). Sorted in offset order then likelihood orde.get_timezoned_date(\TIME $timestamp, boolean $include_time= true
, boolean $verbose= false
, boolean $utc_time= false
, boolean $avoid_contextual_dates= false
, \?MEMBER $member= null
) : string
package | core |
---|
\TIME
Input timestamp
boolean
Whether to include the time in the output
boolean
Whether to make this a verbose date (longer than usual)
boolean
Whether to work in UTC time
boolean
Whether contextual dates will be avoided
\?MEMBER
Member for which the date is being rendered (null: current member)
string
Formatted timeget_timezoned_time(\TIME $timestamp, boolean $avoid_contextual_dates= false
, \?MEMBER $member= null
, boolean $utc_time= false
) : string
package | core |
---|
\TIME
Input timestamp
boolean
Whether contextual times will be avoided. Note that we don't currently use contextual (relative) times. This parameter may be used in the future.
\?MEMBER
Member for which the time is being rendered (null: current member)
boolean
Whether to work in UTC time
string
Formatted timeget_translated_tempcode(\ID_TEXT $table, array $row, \ID_TEXT $field_name, \?object $connection= null
, \?LANGUAGE_NAME $lang= null
, boolean $force= false
, boolean $as_admin= false
, boolean $clear_away_from_cache= false
) : \?Tempcode
package | core |
---|
\ID_TEXT
The table name
array
The table row. Must not have aspects of other tables in it (i.e. joins). Pre-filter using 'db_map_restrict' if required
\ID_TEXT
The field name
\?object
The database connection to use (null: standard site connection)
\?LANGUAGE_NAME
The language (null: uses the current language)
boolean
Whether to force it to the specified language
boolean
Whether to force as_admin, even if the lang string isn't stored against an admin (designed for Comcode page caching)
boolean
Whether to remove from the Tempcode cache when we're done, for performance reasons (normally don't bother with this, but some code knows it won't be needed again -- esp Comcode cache layer -- and saves RAM by removing it)
\?Tempcode
The parsed Comcode (null: the text couldn't be looked up)get_translated_tempcode__and_simplify(\ID_TEXT $table, array $row, \ID_TEXT $field_name, \?object $connection= null
, \?LANGUAGE_NAME $lang= null
, boolean $force= false
, boolean $as_admin= false
, boolean $clear_away_from_cache= false
) : \?Tempcode
We won't normally call this as it breaks our architecture, but webmaster may request it if they are okay with it.
package | core |
---|
\ID_TEXT
The table name
array
The table row. Must not have aspects of other tables in it (i.e. joins). Pre-filter using 'db_map_restrict' if required
\ID_TEXT
The field name
\?object
The database connection to use (null: standard site connection)
\?LANGUAGE_NAME
The language (null: uses the current language)
boolean
Whether to force it to the specified language
boolean
Whether to force as_admin, even if the lang string isn't stored against an admin (designed for Comcode page caching)
boolean
Whether to remove from the Tempcode cache when we're done, for performance reasons (normally don't bother with this, but some code knows it won't be needed again -- esp Comcode cache layer -- and saves RAM by removing it)
\?Tempcode
The parsed Comcode (null: the text couldn't be looked up)get_translated_text(mixed $entry, \?object $connection= null
, \?LANGUAGE_NAME $lang= null
, boolean $force= false
) : \?string
package | core |
---|
mixed
The ID (if multi-lang-content on), or the string itself
\?object
The database connection to use (null: standard site connection)
\?LANGUAGE_NAME
The language (null: uses the current language)
boolean
Whether to force it to the specified language
\?string
The human-readable version (null: could not look up when $force was on)get_translated_text_xml(\AUTO_LINK $id, \ID_TEXT $name, object $db) : string
package | core |
---|
\AUTO_LINK
Language ID
\ID_TEXT
The element name
object
Database connection
string
XML (no root tag)get_tutorial_url(\ID_TEXT $tutorial) : \URLPATH
get_upload_filearray(\ID_TEXT $name, array $filearrays)
package | core |
---|
\ID_TEXT
The name of the HTTP file parameter storing the upload.
array
Where we are storing our file arrays.
get_upload_limit_config_url() : \?URLPATH
package | core |
---|
\?URLPATH
The URL to the config option group for editing limits (null: no access)get_url(\ID_TEXT $specify_name, \ID_TEXT $attach_name, \ID_TEXT $upload_folder, integer $obfuscate= 0
, integer $enforce_type= 15
, boolean $make_thumbnail= false
, \ID_TEXT $thumb_specify_name= ''
, \ID_TEXT $thumb_attach_name= ''
, boolean $copy_to_server= false
, boolean $accept_errors= false
, boolean $should_get_something= false
, boolean $only_make_smaller= false
, \?MEMBER $member_id= null
, \?PATH $upload_folder_full= null
, \?PATH $thumb_folder_full= null
, \?string $filename= null
) : array
package | core |
---|---|
set | 0 1 2 3 |
\ID_TEXT
The name of the POST parameter storing the URL (if '', then no POST parameter). Parameter value may be blank.
\ID_TEXT
The name of the HTTP file parameter storing the upload (if '', then no HTTP file parameter). No file necessarily is uploaded under this.
\ID_TEXT
The folder name where we will put this upload
integer
Whether to obfuscate file names so the URLs can not be guessed/derived (0=do not, 1=do, 2=make extension .dat as well, 3=only obfuscate if we need to)
integer
The type of upload it is (bitmask, from CMSUPLOAD* constants)
boolean
Make a thumbnail (this only makes sense, if it is an image)
\ID_TEXT
The name of the POST parameter storing the thumb URL. As before
\ID_TEXT
The name of the HTTP file parameter storing the thumb upload. As before
boolean
Whether to copy a URL (if a URL) to the server, and return a local reference
boolean
Whether to accept upload errors
boolean
Whether to give a (deferred?) error if no file was given at all
boolean
Whether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\?MEMBER
Member ID to run permissions with (null: current member)
\?PATH
Full path to upload folder, in case it is not relative to the base directory (null: work out)
\?PATH
Full path to thumb folder, in case it is not relative to the base directory (null: work out)
\?string
Filename to use (null: choose one)
array
An array of 4 URL bits (URL, thumb URL, URL original filename, thumb original filename)get_use_persistent() : boolean
get_users_online(boolean $longer_time, \?MEMBER $filter, integer $count) : \?array
package | core |
---|
boolean
Whether to use a longer online-time -- the session expiry-time
\?MEMBER
We really only need to make sure we get the status for this user, although at this functions discretion more may be returned and the row won't be there if the user is not online (null: no filter). May not be the guest ID
integer
The total online members, returned by reference
\?array
Database rows (null: too many)get_users_timezone(\?MEMBER $member = null
) : string
package | core |
---|
\?MEMBER
Member for which the date is being rendered (null: current user)
string
Users timezone in "boring" format.get_value(\ID_TEXT $name, \?ID_TEXT $default= null
, boolean $elective_or_lengthy= false
, boolean $env_also= false
) : \?SHORT_TEXT
package | core |
---|
\ID_TEXT
The name of the value
\?ID_TEXT
Value to return if value not found (null: return NULL)
boolean
Whether this value is an elective/lengthy one. Use this for getting & setting if you don't want it to be loaded up in advance for every page view (in bulk alongside other values), or if the value may be more than 255 characters. Performance tradeoff: frequently used values should not be elective, infrequently used values should be elective.
boolean
Whether to also check server environmental variables. Only use if $elective_or_lengthy is set to false
\?SHORT_TEXT
The value (null: value not found and default is NULL)get_value_newer_than(\ID_TEXT $name, \TIME $cutoff, boolean $elective_or_lengthy = false
) : \?SHORT_TEXT
package | core |
---|
\ID_TEXT
The name of the value
\TIME
The cutoff time (an absolute time, not a relative "time ago")
boolean
Whether this value is an elective/lengthy one. Use this for getting & setting if you don't want it to be loaded up in advance for every page view (in bulk alongside other values), or if the value may be more than 255 characters. Performance tradeoff: frequently used values should not be elective, infrequently used values should be elective.
\?SHORT_TEXT
The value (null: value newer than not found)get_version_branch(\?float $general = null
) : string
package | core |
---|
\?float
General version number (null: on disk version)
string
Branch version number (null: on disk version)get_version_components__from_dotted(string $dotted) : array
package | core |
---|
string
Dotted version number
array
Tuple of components: dotted basis version (i.e. with no alpha/beta/RC component and no trailing zeros), qualifier (blank, or alpha, or beta, or RC), qualifier number (NULL if not an alpha/beta/RC), dotted version number with trailing zeros to always cover 3 componentsget_version_dotted(\?integer $main= null
, \?string $minor= null
) : string
package | core |
---|
\?integer
Main version number (null: on disk version)
\?string
Minor version number (null: on disk version)
string
Dotted version numberget_version_dotted__from_anything(string $any_format) : string
Note that the dotted format is compatible with PHP's version_compare function.
package | core |
---|
string
Any reasonable input
string
Pretty version numberget_version_pretty__from_dotted(string $pretty) : string
This pretty style is not used in Composr code per se, but is shown to users and hence Composr may need to recognise it when searching news posts, download databases, etc.
package | core |
---|
string
Pretty version number
string
Dotted version numberget_webservice_result(mixed $error_message) : \?string
package | core |
---|
mixed
The error message (string or Tempcode)
\?string
The result from the web service (null: no result)get_xml_entities() : string
get_zone_chooser(boolean $inline= false
, \?array $no_go= null
, \?array $reorder= null
) : \Tempcode
package | core |
---|
boolean
Whether the zone chooser will be shown inline to something else (as opposed to providing it's own borderings)
\?array
A list of zone to not put into the list (null: none to skip)
\?array
A reordering (null: no reordering)
\Tempcode
The zone chooserget_zone_default_page(\ID_TEXT $zone_name) : \ID_TEXT
get_zone_name() : \ID_TEXT
give_submit_points(\ID_TEXT $type, \?MEMBER $member = null
) : \?string
package | core |
---|
\ID_TEXT
One of this type has been submitted. By convention it is the language code of what was done, e.g. ADD_DOWNLOAD
\?MEMBER
The member to give the points to (null: give to current member)
\?string
A message about the member being given these submit points (null: no message)globalise(\?Tempcode $middle, \?mixed $message= null
, string $type= ''
, boolean $include_header_and_footer= false
) : \Tempcode
package | core |
---|---|
set | inform warn "" |
\?Tempcode
The Tempcode to put into a nice frame (null: support output streaming mode)
\?mixed
'Additional' message (null: none)
string
The type of special message
boolean
Whether to include the header/footer/panels
\Tempcode
Standalone pagehandle_active_login(\ID_TEXT $username)
handle_has_checked_recently(\ID_TEXT $id_code) : boolean
package | core |
---|
\ID_TEXT
Special check code (often a URL but does not need to be).
boolean
Whether the check has happened recently.handle_logins()
package | core |
---|
handle_perceived_spammer_by_confidence(\IP $user_ip, float $confidence_level, \ID_TEXT $blocked_by, boolean $page_level)
package | core |
---|
\IP
IP address
float
Confidence level (0.0 to 1.0)
\ID_TEXT
Identifier for whatever did the blocking
boolean
Whether this is a page level check (i.e. we won't consider blocks or approval, just ban setting)
handle_symbol_preprocessing(array $seq_part, array $children)
hard_filter_input_data__filesystem(string $val)
Only called for non-privileged users, filters/alters rather than blocks, due to false-positive likelihood.
package | core |
---|
string
The data
hard_filter_input_data__html(string $val)
Only called for non-privileged users, filters/alters rather than blocks, due to false-positive likelihood.
package | core |
---|
string
The data
has_actual_page_access(\?MEMBER $member= null
, \?ID_TEXT $page= null
, \?ID_TEXT $zone= null
, \?array $cats= null
, \?mixed $privilege= null
) : boolean
package | core |
---|
\?MEMBER
The member being checked whether to have the access (null: current member)
\?ID_TEXT
The ID code for the page being checked (null: current page)
\?ID_TEXT
The ID code for the zone being checked (null: search)
\?array
A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
\?mixed
Either the ID code of a privilege, an array of alternatives that are acceptable (null: none required)
boolean
Whether the member has zone and page accesshas_caching_for(string $type) : boolean
package | core |
---|---|
set | block lang comcode_page template |
string
Cache type
boolean
Whether it has the cachinghas_category_access(\MEMBER $member, \ID_TEXT $module, \ID_TEXT $category) : boolean
package | core |
---|
\MEMBER
The member being checked whether to have the access
\ID_TEXT
The ID code for the module being checked for category access
\ID_TEXT
The ID code for the category being checked for access (often, a number cast to a string)
boolean
Whether the member has category accesshas_escaped_dynamic_sql(string $query) : boolean
has_js() : boolean
Unfortunately this function will only return true once a user has been to the site more than once... JavaScript will set a cookie, indicating it works.
package | core |
---|
boolean
Whether the user has definitely got JavaScripthas_no_forum() : boolean
has_page_access(\MEMBER $member, \ID_TEXT $page, \ID_TEXT $zone, boolean $at_now = false
) : boolean
package | core |
---|
\MEMBER
The member being checked whether to have the access
\ID_TEXT
The ID code for the page being checked
\ID_TEXT
The ID code for the zone being checked
boolean
Whether we want to check we have access to the CURRENT page, using any match-key permissions
boolean
Whether the member has page accesshas_privilege(\MEMBER $member, \ID_TEXT $permission, \?ID_TEXT $page= null
, \?mixed $cats= null
) : boolean
package | core |
---|
\MEMBER
The member being checked whether to have the permission
\ID_TEXT
The ID code for the permission being checked for
\?ID_TEXT
The ID code for the page being checked (null: current page)
\?mixed
A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...), or a string of the cat type if you will accept overrides in any matching cat (null: N/A)
boolean
Whether the member has the permissionhas_privilege_group(\GROUP $group_id, \ID_TEXT $permission, \?ID_TEXT $page= null
, \?array $cats= null
) : boolean
package | core |
---|
\GROUP
The being checked whether to have the permission
\ID_TEXT
The ID code for the permission being checked for
\?ID_TEXT
The ID code for the page being checked (null: current page)
\?array
A list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
boolean
Whether the member has the permissionhas_solemnly_declared(integer $declaration) : boolean
has_some_cat_privilege(\MEMBER $member, \ID_TEXT $permission, \?ID_TEXT $page, \ID_TEXT $permission_module) : boolean
package | core |
---|
\MEMBER
The member being checked whether to have the permission
\ID_TEXT
The ID code for the permission being checked for
\?ID_TEXT
The ID code for the page being checked (null: current page)
\ID_TEXT
The ID code for the permission module being checked for
boolean
Whether the member has the permissionhas_zone_access(\MEMBER $member, \ID_TEXT $zone) : boolean
package | core |
---|
\MEMBER
The member being checked whether to have the access
\ID_TEXT
The ID code for the zone being checked
boolean
Whether the member has zone accesshhvm_include(\PATH $path) : \?mixed
hide_the_evidence(\Tempcode $html) : \Tempcode
http_download_file(\URLPATH $url, \?integer $byte_limit= null
, boolean $trigger_error= true
, boolean $no_redirect= false
, string $ua= 'Composr'
, \?array $post_params= null
, \?array $cookies= null
, \?string $accept= null
, \?string $accept_charset= null
, \?string $accept_language= null
, \?resource $write_to_file= null
, \?string $referer= null
, \?array $auth= null
, float $timeout= 6.0
, boolean $raw_post= false
, \?array $files= null
, \?array $extra_headers= null
, \?string $http_verb= null
, string $raw_content_type= 'application/xml'
) : \?string
package | core |
---|---|
range | 1 max |
\URLPATH
The URL to download
\?integer
The number of bytes to download. This is not a guarantee, it is a minimum (null: all bytes)
boolean
Whether to throw a Composr error, on error
boolean
Whether to block redirects (returns NULL when found)
string
The user-agent to identify as
\?array
An optional array of POST parameters to send; if this is NULL, a GET request is used (null: none)
\?array
An optional array of cookies to send (null: none)
\?string
'accept' header value (null: don't pass one)
\?string
'accept-charset' header value (null: don't pass one)
\?string
'accept-language' header value (null: don't pass one)
\?resource
File handle to write to (null: do not do that)
\?string
The HTTP referer (null: none)
\?array
A pair: authentication username and password (null: none)
float
The timeout
boolean
Whether to treat the POST parameters as a raw POST (rather than using MIME)
\?array
Files to send. Map between field to file path (null: none)
\?array
Extra headers to send (null: none)
\?string
HTTP verb (null: auto-decide based on other parameters)
string
The content type to use if a raw HTTP post
\?string
The data downloaded (null: error)hyperlink(mixed $url, mixed $caption, boolean $external, boolean $escape, mixed $title= ''
, \?string $accesskey= null
, \?Tempcode $post_data= null
, \?string $rel= null
, \?ID_TEXT $overlay= null
) : \Tempcode
package | core |
---|
mixed
The URL to put in the hyperlink (URLPATH or Tempcode)
mixed
The hyperlinks caption (either Tempcode or string)
boolean
Whether the link is an external one (by default, the external template makes it open in a new window)
boolean
Whether to escape the hyperlink caption (only applies if it is not passed as Tempcode)
mixed
Link title (either Tempcode or string) (blank: none)
\?string
The access key to use (null: none)
\?Tempcode
Data to post (null: an ordinary link)
\?string
Rel (link type) (null: no special type)
\?ID_TEXT
Open in overlay with the default link/form target being as follows (e.g. _top or _self) (null: an ordinary link)
\Tempcode
The generated hyperlinki_solemnly_declare(integer $declarations)
A good programmer will understand the correct data conversions to undergo in order to write secure/correct/reliable code. A newbie programmer likely will not, sloppiness or a lack of understanding could lead to critical mistakes. If declarations aren't made then extra security precautions are taken, which may interfere with normal processing in limited cases. Declarations should be made whenever entering a custom block or module.
package | core |
---|
integer
Bitmask of declarations (IUNDERSTAND* constants).
import_from_xml(string $xml_data, boolean $delete_missing_rows = false
) : array
package | core |
---|
string
Data in XML format
boolean
Synchronise deletes as well as inserts/updates
array
List of operations performedimproperly_filled_in(string $name, \?boolean $posted, array $array)
package | core |
---|
string
The name of the parameter
\?boolean
Whether the parameter is a POST parameter (null: undetermined)
array
The array we're extracting parameters from
improperly_filled_in_post(string $name)
in_memory_search_match(array $filter, string $title, \?string $post = null
) : boolean
package | core |
---|
array
A map of POST data in search-form style. May contain 'only_titles', 'content' (the critical one!) and 'conjunctive_operator'
string
The title to try and match
\?string
The post to try and match (null: not used)
boolean
Whether we have a matchin_safe_mode() : boolean
inform_exit(mixed $text, \?boolean $support_match_key_messages = null
) : mixed
package | core |
---|
mixed
The error message (string or Tempcode)
\?boolean
Whether match key messages / redirects should be supported (null: detect)
mixed
Never returns (i.e. exits)inform_non_canonical_parameter(\ID_TEXT $param)
inform_screen(\Tempcode $title, mixed $text, boolean $support_match_key_messages= false
, \?Tempcode $back_url= null
, \?Tempcode $fields= null
) : \Tempcode
package | core |
---|
\Tempcode
The title of the info page
mixed
The text to put on the info page (string, or language-Tempcode)
boolean
Whether match key messages / redirects should be supported
\?Tempcode
URL to have back button to (null: none)
\?Tempcode
Fields to carry with on back button (null: none)
\Tempcode
The info pageinitialise_special_page_types(\ID_TEXT $special_page_type)
package | core |
---|---|
set | query templates tree lang |
\ID_TEXT
The special page type.
inject_action_spamcheck(\?string $username= null
, \?string $email= null
)
package | core |
---|
\?string
Check this particular username that has just been supplied (null: none)
\?string
Check this particular email address that has just been supplied (null: none)
inline_language_editing(\ID_TEXT $codename, \?LANGUAGE_NAME $lang)
package | core |
---|
\ID_TEXT
The language ID
\?LANGUAGE_NAME
The language to use (null: users language)
insert_code_after__by_command(string $code, string $function, string $command, string $newcode, integer $instance_of_command = 1
) : boolean
package | core |
---|
string
The code.
string
Name of the function.
string
The command we're searching to insert by.
string
Code to insert.
integer
We are inserting at this instance of the line (i.e. takes into account a literal line of code may exist in other places in a function).
boolean
Success status.insert_code_after__by_linenum(string $code, string $function, integer $linenum, string $newcode) : boolean
package | core |
---|
string
The code.
string
Name of the function.
integer
Line number relative to start of function.
string
Code to insert.
boolean
Success status.insert_code_before__by_command(string $code, string $function, string $command, string $newcode, integer $instance_of_command = 1
) : boolean
package | core |
---|
string
The code.
string
Name of the function.
string
The command we're searching to insert by.
string
Code to insert.
integer
We are inserting at this instance of the line (i.e. takes into account a literal line of code may exist in other places in a function).
boolean
Success status.insert_code_before__by_linenum(string $code, string $function, integer $linenum, string $newcode) : boolean
package | core |
---|
string
The code.
string
Name of the function.
integer
Line number relative to start of function.
string
Code to insert.
boolean
Success status.insert_lang(\ID_TEXT $field_name, string $text, integer $level, \?object $connection= null
, boolean $comcode= false
, \?integer $id= null
, \?LANGUAGE_NAME $lang= null
, boolean $insert_as_admin= false
, \?string $pass_id= null
, \?string $text_parsed= null
, \?integer $wrap_pos= null
, boolean $preparse_mode= true
, boolean $save_as_volatile= false
) : array
package | core |
---|---|
set | 1 2 3 4 |
\ID_TEXT
The field name
string
The text
integer
The level of importance this language string holds
\?object
The database connection to use (null: standard site connection)
boolean
Whether it is to be parsed as Comcode
\?integer
The ID to use for the language entry (null: work out next available)
\?LANGUAGE_NAME
The language (null: uses the current language)
boolean
Whether to insert it as an admin (any Comcode parsing will be carried out with admin privileges)
\?string
The special identifier for this lang code on the page it will be displayed on; this is used to provide an explicit binding between languaged elements and greater templated areas (null: none)
\?string
Assembled Tempcode portion (null: work it out)
\?integer
Comcode parser wrap position (null: no wrapping)
boolean
Whether to generate a fatal error if there is invalid Comcode
boolean
Whether we are saving as a 'volatile' file extension (used in the XML DB driver, to mark things as being non-syndicated to subversion)
array
The language ID save fieldsinsert_lang_comcode(\ID_TEXT $field_name, string $text, integer $level, \?object $connection= null
, boolean $insert_as_admin= false
, \?string $pass_id= null
, \?integer $wrap_pos= null
, boolean $preparse_mode= true
, boolean $save_as_volatile= false
) : array
package | core |
---|---|
set | 1 2 3 4 |
\ID_TEXT
The field name
string
The text
integer
The level of importance this language string holds
\?object
The database connection to use (null: standard site connection)
boolean
Whether to insert it as an admin (any Comcode parsing will be carried out with admin privileges)
\?string
The special identifier for this lang code on the page it will be displayed on; this is used to provide an explicit binding between languaged elements and greater templated areas (null: none)
\?integer
Comcode parser wrap position (null: no wrapping)
boolean
Whether to generate a fatal error if there is invalid Comcode
boolean
Whether we are saving as a 'volatile' file extension (used in the XML DB driver, to mark things as being non-syndicated to subversion)
array
The language ID save fieldsinsert_lang_xml(\ID_TEXT $field_name, string $xml_data) : array
package | core |
---|
\ID_TEXT
The field name
string
XML (with root tag), or just flat text if multi-lang-content is not on
array
The language ID save fieldsinspect()
package | core |
---|
inspect_plain()
package | core |
---|
integer_format(integer $val) : string
intelligent_write_error(\PATH $path)
intelligent_write_error_inline(\PATH $path) : \Tempcode
invert_value(\ID_TEXT $old) : \ID_TEXT
ip_banned(string $ip, boolean $force_db= false
, boolean $handle_uncertainties= false
) : \?boolean
package | core |
---|
string
The IP address to check for banning (potentially encoded with *'s)
boolean
Force check via database
boolean
Handle uncertainities (used for the external bans - if true, we may return NULL, showing we need to do an external check). Only works with $force_db.
\?boolean
Whether the IP address is banned (null: unknown)ip_cidr_check(\IP $ip, \SHORT_TEXT $cidr) : boolean
package | core |
---|
\IP
IP address
\SHORT_TEXT
CIDR range (e.g. 204.93.240.0/24)
boolean
Whether it isis_alphanumeric(string $string, boolean $strict = false
) : boolean
package | core |
---|
string
The string to test
boolean
Whether to do stricter sanitisation
boolean
Whether the string is alphanumeric or notis_ascii_string(string $x) : boolean
is_audio(string $name, boolean $as_admin) : boolean
package | core |
---|
string
A URL or file path to the video
boolean
Whether there are admin privileges, to render dangerous media types (client-side risk only)
boolean
Whether the string pointed to a file appeared to be an audio fileis_browser_decaching() : boolean
package | core |
---|
boolean
Whether the browser session is set to be doing a hard cache-empty refreshis_cns_satellite_site() : boolean
is_data_encrypted(string $data) : boolean
is_email_address(string $string) : boolean
package | core |
---|
string
The string to test (Note: This is typed string, not e-mail, because it has to function on failure + we could make an infinite loop)
boolean
Whether the string is an email address or notis_encryption_available() : boolean
is_encryption_enabled() : boolean
is_forum_db(object $db) : boolean
is_guest(\?MEMBER $member_id= null
, boolean $quick_only= false
) : boolean
package | core |
---|
\?MEMBER
Member ID to check (null: current user)
boolean
Whether to just do a quick check, don't establish new sessions
boolean
Whether the current member is a guestis_httpauth_login() : boolean
is_image(string $name, boolean $mime_too = false
) : boolean
package | core |
---|
string
A URL or file path to the image
boolean
Whether to check mime too
boolean
Whether the string pointed to a file appeared to be an imageis_invisible() : boolean
is_mail_bounced(\EMAIL $email, \?string $server= null
, \?integer $port= null
, \?string $folder= null
, \?string $username= null
, \?string $password= null
) : \?TIME
package | core |
---|
\EMAIL
The email address.
\?string
The IMAP server hostname (null: use configured).
\?integer
The IMAP port (null: use configured).
\?string
The IMAP inbox identifier (null: use configured).
\?string
The IMAP username (null: use configured).
\?string
The IMAP password (null: use configured).
\?TIME
Last bounce time (null: not bounced).is_media(string $name, boolean $as_admin) : boolean
package | core |
---|
string
A URL or file path to the video
boolean
Whether there are admin privileges, to render dangerous media types (client-side risk only)
boolean
Whether the string pointed to a file appeared to be an audio fileis_mobile(\?string $user_agent= null
, boolean $truth= false
) : boolean
package | core |
---|
\?string
The user agent (null: get from environment, current user's browser)
boolean
Whether to always tell the truth (even if the current page does not have mobile support)
boolean
Whether the user is using a mobile deviceis_on_multi_site_network(\?object $db = null
) : boolean
package | core |
---|
\?object
The DB connection to check against (null: main active site database)
boolean
Whether we areis_page_https(\ID_TEXT $zone, \ID_TEXT $page) : boolean
All images (etc) on a HTTPS page should use HTTPS to avoid mixed-content browser notices.
package | core |
---|
\ID_TEXT
The zone the page is in
\ID_TEXT
The page codename
boolean
Whether the page is to run across an HTTPS connectionis_plupload(boolean $fake_prepopulation = false
) : boolean
package | core |
---|
boolean
Simulate population of the $_FILES array.
boolean
Whether an plupload upload has just happened.is_saveable_image(string $name) : boolean
package | core |
---|
string
A URL or file path to the image
boolean
Whether the string pointed to a file that appeared to be a saveable imageis_simple_query(string $query) : boolean
is_suexec_like() : boolean
is_valid_ip(\IP $ip) : boolean
is_video(string $name, boolean $as_admin, boolean $must_be_true_video = false
) : boolean
package | core |
---|
string
A URL or file path to the video
boolean
Whether there are admin privileges, to render dangerous media types (client-side risk only)
boolean
Whether it really must be an actual video/audio, not some other kind of rich media which we may render in a video spot
boolean
Whether the string pointed to a file appeared to be a videois_wide_high() : \BINARY
is_writable_wrap(\PATH $path) : boolean
javascript_enforce(string $j, \?ID_TEXT $theme= null
, \?boolean $minify= null
) : string
package | core |
---|
string
The javascript file required
\?ID_TEXT
The name of the theme (null: current theme)
\?boolean
Whether to minify (null: read from environment)
string
The path to the javascript file in the cache (blank: no file)javascript_tempcode(\?string $position = null
) : \Tempcode
package | core |
---|---|
set | NULL header footer |
\?string
Position to get JavaScript for (null: all positions)
\Tempcode
The Tempcode to tie in the JavaScript filesjs_compile(\ID_TEXT $j, \PATH $js_cache_path, boolean $minify = true
)
package | core |
---|
\ID_TEXT
Name of the JS file
\PATH
Full path to the JS file
boolean
Whether to also do minification
js_minify(string $js) : string
keep_symbol(array $param) : string
package | core |
---|
array
Parameters passed to the symbol (0=whether this starts off the query string, 1=force session append even if it's also available a session cookie e.g. when put into download manager)
string
The result.kid_gloves_html_escaping(array $parameters)
kid_gloves_html_escaping_singular(string $param)
lang_code_to_default_content(\ID_TEXT $field_name, \ID_TEXT $code, boolean $comcode= false
, integer $level= 2
) : array
package | core |
---|
\ID_TEXT
The field name
\ID_TEXT
The language codename
boolean
Whether the given codes value is to be parsed as Comcode
integer
The level of importance this language string holds
array
The language ID save fieldslang_remap(\ID_TEXT $field_name, mixed $id, string $text, \?object $connection= null
, boolean $comcode= false
, \?string $pass_id= null
, \?MEMBER $source_user= null
, boolean $as_admin= false
, boolean $backup_string= false
) : array
package | core |
---|
\ID_TEXT
The field name
mixed
The ID (if multi-lang-content on), or the string itself
string
The text to remap to
\?object
The database connection to use (null: standard site connection)
boolean
Whether it is to be parsed as Comcode
\?string
The special identifier for this lang code on the page it will be displayed on; this is used to provide an explicit binding between languaged elements and greater templated areas (null: none)
\?MEMBER
The member that owns the content this is for (null: current member)
boolean
Whether to generate Comcode as arbitrary admin
boolean
Whether to backup the language string before changing it
array
The language ID save fieldslang_remap_comcode(\ID_TEXT $field_name, mixed $id, string $text, \?object $connection= null
, \?string $pass_id= null
, \?MEMBER $source_user= null
, boolean $as_admin= false
) : array
package | core |
---|
\ID_TEXT
The field name
mixed
The ID (if multi-lang-content on), or the string itself
string
The text to remap to
\?object
The database connection to use (null: standard site connection)
\?string
The special identifier for this lang code on the page it will be displayed on; this is used to provide an explicit binding between languaged elements and greater templated areas (null: none)
\?MEMBER
The member that owns the content this is for (null: current member)
boolean
Whether to generate Comcode as arbitrary admin
array
The language ID save fieldslist_to_map(string $map_value, array $list) : array
package | core |
---|
string
The key key of our maps that reside in our map
array
The list of maps
array
The collapsed mapload_comcode_page(\PATH $string, \ID_TEXT $zone, \ID_TEXT $codename, \?PATH $file_base= null
, boolean $being_included= false
, \?object $out= null
) : \Tempcode
package | core |
---|
\PATH
The relative (to Composr's base directory) path to the page (e.g. pages/comcode/EN/start.txt)
\ID_TEXT
The zone the page is being loaded from
\ID_TEXT
The codename of the page
\?PATH
The file base to load from (null: standard)
boolean
Whether the page is being included from another
\?object
Semi-filled output template (null: definitely not doing output streaming)
\Tempcode
The pageload_comcode_page_from_cache(\ID_TEXT $codename, \ID_TEXT $zone, \ID_TEXT $theme) : array
package | core |
---|
\ID_TEXT
The codename of the page
\ID_TEXT
The zone the page is being loaded from
\ID_TEXT
The theme
array
The page rowload_field_restrictions(\?string $this_page= null
, \?string $this_type= null
) : array
package | core |
---|
\?string
The page name scoped for (null: current page)
\?string
The page type scoped for (null: current type)
array
List of fields, each of which is a map (restriction => attributes)load_html_page(\PATH $string, \?PATH $file_base= null
, \?object $out= null
) : string
HTML isn't great... no dynamicness/reconfigurability at all. We prefer Comcode with [html]HTML goes here[/html] usage
package | core |
---|
\PATH
The relative (to Composrs base directory) path to the HTML page
\?PATH
The file base to load from (null: standard)
\?object
Semi-filled output template (null: definitely not doing output streaming)
string
The pageload_minimodule_page(\PATH $string, \?object $out = null
) : \Tempcode
The module result is returned.
package | core |
---|
\PATH
The relative path to the module file
\?object
Semi-filled output template (null: definitely not doing output streaming)
\Tempcode
The result of executing the moduleload_module_page(\PATH $string, \ID_TEXT $codename, \?object $out = null
) : \Tempcode
The module result is returned.
package | core |
---|
\PATH
The relative path to the module file
\ID_TEXT
The page name to load
\?object
Semi-filled output template (null: definitely not doing output streaming)
\Tempcode
The result of executing the moduleload_theme_image_cache(object $db, \ID_TEXT $site, \ID_TEXT $true_theme, \LANGUAGE_NAME $true_lang)
package | core |
---|
object
The database to load from (used for theme images running across multi-site-networks)
\ID_TEXT
The internal name of the database to load from (used for theme images running across multi-site-networks)
\ID_TEXT
Theme0
\LANGUAGE_NAME
Language
load_zone_data() : \ID_TEXT
package | core |
---|
\ID_TEXT
The "real" zone name (not actually the zone name, but the zone name wants details to load for).locale_filter(string $ret) : string
Let's pretend a user's operating system doesn't fully support they're locale. They have a nice language pack, but whenever the O.S. is asked for dates in the chosen locale, it puts month names in English instead. The locale_filter function is used to cleanup these problems. It does a simple set of string replaces, as defined by the 'locale_subst' language string.
package | core |
---|
string
Tainted string
string
Filtered stringlog_hack_attack_and_exit(\ID_TEXT $reason, \SHORT_TEXT $reason_param_a= ''
, \SHORT_TEXT $reason_param_b= ''
, boolean $silent= false
, boolean $instant_ban= false
) : mixed
package | core |
---|
\ID_TEXT
The reason for the hack attack. This has to be a language string codename
\SHORT_TEXT
A parameter for the hack attack language string (this should be based on a unique ID, preferably)
\SHORT_TEXT
A more illustrative parameter, which may be anything (e.g. a title)
boolean
Whether to silently log the hack rather than also exiting
boolean
Whether a ban should be immediate
mixed
Never returns (i.e. exits)log_it(\ID_TEXT $type, \?SHORT_TEXT $a= null
, \?SHORT_TEXT $b= null
)
package | core |
---|
\ID_TEXT
The type of activity just carried out (a lang string)
\?SHORT_TEXT
The most important parameter of the activity (e.g. id) (null: none)
\?SHORT_TEXT
A secondary (perhaps, human readable) parameter of the activity (e.g. caption) (null: none)
log_stats(string $string, integer $pg_time)
package | core |
---|
string
The string to the page file
integer
The time taken for page loading in milliseconds
looks_like_url(string $value, boolean $lax = false
) : boolean
package | core |
---|
string
The value to check
boolean
Whether to be a bit lax in the check
boolean
Whether the value appears to be a URLlookup_language_full_name(\LANGUAGE_NAME $code) : string
package | core |
---|
\LANGUAGE_NAME
The language
string
The full name of the languagem_deldir(\PATH $a_dir)
From "User Contributed Notes" at http://it.php.net/manual/en/function.rmdir.php. Thanks flexer at cutephp dot com
package | core |
---|
\PATH
The path to the directory
mail_wrap(string $subject_line, \LONG_TEXT $message_raw, \?array $to_email= null
, \?mixed $to_name= null
, \EMAIL $from_email= ''
, string $from_name= ''
, integer $priority= 3
, \?array $attachments= null
, boolean $no_cc= false
, \?MEMBER $as= null
, boolean $as_admin= false
, boolean $in_html= false
, boolean $coming_out_of_queue= false
, \ID_TEXT $mail_template= 'MAIL'
, \?boolean $bypass_queue= null
, \?array $extra_cc_addresses= null
, \?array $extra_bcc_addresses= null
, \?TIME $require_recipient_valid_since= null
) : \?Tempcode
The mail will be sent in dual HTML/text format, where the text is the unconverted Comcode source: if a member does not read HTML mail, they may wish to fallback to reading that.
package | core |
---|---|
range | 1 5 |
string
The subject of the mail in plain text
\LONG_TEXT
The message, as Comcode
\?array
The destination (recipient) e-mail addresses [array of strings] (null: site staff address)
\?mixed
The recipient name. Array or string. (null: site name)
\EMAIL
The from address (blank: site staff address)
string
The from name (blank: site name)
integer
The message priority (1=urgent, 3=normal, 5=low)
\?array
An list of attachments (each attachment being a map, path=>filename) (null: none)
boolean
Whether to NOT CC to the CC address
\?MEMBER
Convert Comcode->tempcode as this member (a privilege thing: we don't want people being able to use admin rights by default!) (null: guest)
boolean
Replace above with arbitrary admin
boolean
HTML-only
boolean
Whether to bypass queueing, because this code is running as a part of the queue management tools
\ID_TEXT
The template used to show the email
\?boolean
Whether to bypass queueing (null: auto-decide)
\?array
Extra CC addresses to use (null: none)
\?array
Extra BCC addresses to use (null: none)
\?TIME
Implement the Require-Recipient-Valid-Since header (null: no restriction)
\?Tempcode
A full page (not complete XHTML) piece of Tempcode to output (null: it worked so no Tempcode message)make_csv(array $data, \ID_TEXT $filename= 'data.csv'
, boolean $headers= true
, boolean $output_and_exit= true
, \?PATH $outfile_path= null
) : string
package | core |
---|
array
List of maps, each map representing a row
\ID_TEXT
Filename to output
boolean
Whether to output CSV headers
boolean
Whether to output/exit when we're done instead of return
\?PATH
File to spool into (null: none)
string
CSV data (we might not return though, depending on $exit; if $outfile_path is not NULL, this will be blank)make_fractionable_editable(\ID_TEXT $content_type, mixed $id, mixed $title) : \Tempcode
package | core |
---|
\ID_TEXT
Content type
mixed
Content ID
mixed
Content title (either unescaped string, or Compiled Comcode [i.e. Tempcode])
\Tempcode
Inline editable HTML to put into outputmake_locale_filter()
package | core |
---|
make_map_nice(array $map) : string
make_missing_directory(\PATH $dir)
make_nice_timezone_name(string $in) : string
make_sentence_case_callback(array $matches) : string
make_string_tempcode(string $string) : \Tempcode
make_xhtml_strict(object $global) : object
package | core |
---|
object
Tempcode object
object
Tempcode object (no longer cache safe)manualproc_mail(string $to, string $subject, string $message, string $additional_headers, string $additional_flags = ''
) : boolean
package | core |
---|
string
The TO address.
string
The subject.
string
The message.
string
Additional headers.
string
Additional stuff to send to sendmail executable (if appropriate, only works when safe mode is off).
boolean
Success status.mass_delete_lang(\ID_TEXT $table, array $attrs, \?object $connection)
package | core |
---|
\ID_TEXT
The table
array
The attributes
\?object
The database connection to use (null: standard site connection)
match_key_match(mixed $match_keys, boolean $support_post= false
, \?array $current_params= null
, \?ID_TEXT $current_zone_name= null
, \?ID_TEXT $current_page_name= null
) : boolean
package | core |
---|
mixed
Match keys (comma-separated list of match-keys, or array of)
boolean
Check against POSTed data too
\?array
Parameters to check against (null: get from environment GET/POST) - if set, $support_post is ignored)
\?ID_TEXT
Current zone name (null: get from environment)
\?ID_TEXT
Current page name (null: get from environment)
boolean
Whether there is a matchmay_see_stack_dumps() : boolean
may_view_content_behind(\MEMBER $member_id, \ID_TEXT $content_type, \ID_TEXT $content_id, \ID_TEXT $type_has = 'content_type'
) : boolean
package | core |
---|
\MEMBER
User to check
\ID_TEXT
Content type
\ID_TEXT
Content ID
\ID_TEXT
Content type type
boolean
Whether there is permissionme_debug(\IP $ip, mixed $data)
member_blocked(\MEMBER $member_id, \?MEMBER $member_blocker = null
) : boolean
package | core |
---|
\MEMBER
The member being checked
\?MEMBER
The member who may be blocking (null: current member)
boolean
Whether the member is blockedmember_is_online(\MEMBER $member_id) : boolean
package | core |
---|
\MEMBER
The member to check
boolean
Whether they are onlinemember_personal_links_and_details(\MEMBER $member_id) : array
package | core |
---|
\MEMBER
A member ID
array
A tuple: links (Tempcode), details (Tempcode), number of unread inline personal posts or private topicsmember_tracking_update(\ID_TEXT $page, \ID_TEXT $type, \ID_TEXT $id)
memory_limit_for_max_param(\ID_TEXT $max_param)
memory_trace_point(\?string $name = null
)
merge_sort(array $array, mixed $cmp_function = 'strcmp'
)
missing_template_parameter(\ID_TEXT $origin) : string
package | core |
---|
\ID_TEXT
Where this parameter is referenced, in a slash-combined reference form
string
Always ""mixed() : \?mixed
module_installed(\ID_TEXT $module) : boolean
multi_lang() : boolean
multi_lang_content() : boolean
nl_delim_match_sql(array $field, integer $i, \ID_TEXT $type= 'short'
, \?string $param= null
) : \?array
package | core |
---|---|
set | short long |
array
The field details
integer
We're processing for the ith row
\ID_TEXT
Table type
\?string
Search term (null: lookup from environment)
\?array
Tuple of SQL details (array: extra trans fields to search, array: extra plain fields to search, string: an extra table segment for a join, string: the name of the field to use as a title, if this is the title, extra WHERE clause stuff) (null: nothing special)normalise_ip_address(\IP $ip, \?integer $amount = null
) : \IP
package | core |
---|
\IP
The IP address to normalise
\?integer
Amount to mask out (null: do not)
\IP
The normalised IP addressnotify_sitemap_node_add(\SHORT_TEXT $page_link, \?TIME $add_date, \?TIME $edit_date, float $priority, \ID_TEXT $refreshfreq, boolean $guest_access)
package | core |
---|---|
set | always hourly daily weekly monthly yearly never |
\SHORT_TEXT
The page-link
\?TIME
The add time (null: unknown)
\?TIME
The edit time (null: same as add time)
float
The sitemap priority, a SITEMAPIMPORTANCE* constant
\ID_TEXT
The refresh frequency
boolean
Whether guests may access this resource in terms of category permissions not zone/page permissions (if not set to 1 then it will not end up in an XML sitemap, but we'll keep tabs of it for other possible uses)
notify_sitemap_node_delete(\SHORT_TEXT $page_link)
It won't be immediately deleted, as we use this as a signal that the XML sitemap will need updating too. Updates are done in batch, via CRON.
package | core |
---|
\SHORT_TEXT
The page-link
notify_sitemap_node_edit(\SHORT_TEXT $page_link, boolean $guest_access)
package | core |
---|
\SHORT_TEXT
The page-link
boolean
Whether guests may access this resource in terms of category permissions not zone/page permissions (if not set to 1 then it will not end up in an XML sitemap, but we'll keep tabs of it for other possible uses)
obfuscate_email_address(string $email) : string
This function may want to be modified on a per-site basis, to stop spammers triggering onto Composr's default method (possible some already do, although I think it unlikely they would go to this much effort/computation unless it was more widespread to do this).
package | core |
---|
string
The e-mail address to obfuscate
string
The obfuscated versionobfuscate_entities(string $val) : string
object_factory(string $class, boolean $failure_ok = false
) : \?object
package | core |
---|
string
The class name
boolean
Whether to return NULL if there is no such class
\?object
The object (null: no such class)optimise_tempcode(object $ob)
otp(mixed $var, \ID_TEXT $origin = ''
) : string
package | core |
---|
mixed
Variable (or NULL if not set)
\ID_TEXT
Where this parameter is referenced, in a compressed reference form
string
Valuepage_link_as_url(string $url) : \URLPATH
page_link_decode(\SHORT_TEXT $page_link) : array
package | core |
---|
\SHORT_TEXT
The page-link
array
Triple: zone, attribute-array, hash part of a URL including the hash (or blank)page_not_found(\ID_TEXT $codename, \ID_TEXT $zone) : \Tempcode
package | core |
---|
\ID_TEXT
The codename of the page to load
\ID_TEXT
The zone the page is being loaded in
\Tempcode
Messagepage_path_to_page_link(string $page) : string
package | core |
---|
string
The path.
string
The page-link (blank: could not convert).paragraph(mixed $text, string $guid= ''
, \?string $class= null
) : \Tempcode
package | core |
---|
mixed
The text to put into the paragraph (string or Tempcode)
string
GUID for call
\?string
CSS classname (null: none)
\Tempcode
The generated paragraphparse_filtercode(string $filter) : array
parse_raw_http_request() : \?array
parse_translated_text(\ID_TEXT $table, array $row, \ID_TEXT $field_name, \?object $connection, \?LANGUAGE_NAME $lang, boolean $force, boolean $as_admin) : \?Tempcode
package | core |
---|
\ID_TEXT
The table name
array
The database row
\ID_TEXT
The field name
\?object
The database connection to use (null: standard site connection)
\?LANGUAGE_NAME
The language (null: uses the current language)
boolean
Whether to force it to the specified language
boolean
Whether to force as_admin, even if the lang string isn't stored against an admin (designed for Comcode page caching)
\?Tempcode
The parsed Comcode (null: the text couldn't be looked up)password_hash(string $password, integer $algo, array $options) : \~string
package | core |
---|
string
The password to hash
integer
The algorithm to use (Defined by PASSWORD_* constants)
array
The options for the algorithm to use
\~string
The hashed password (false: error)password_verify(string $password, string $hash) : boolean
package | core |
---|
string
The password to verify
string
The hash to verify against
boolean
If the password matches the hashpersistent_cache_delete(mixed $key, boolean $substring = false
)
persistent_cache_get(mixed $key, \?TIME $min_cache_date = null
) : \?mixed
package | core |
---|
mixed
Key
\?TIME
Minimum timestamp that entries from the cache may hold (null: don't care)
\?mixed
The data (null: not found / NULL entry)persistent_cache_set(mixed $key, mixed $data, boolean $server_wide= false
, \?integer $expire_secs= null
)
package | core |
---|
mixed
Key
mixed
The data
boolean
Whether it is server-wide data
\?integer
The expiration time in seconds. (null: Default expiry in 60 minutes, or never if it is server-wide).
php_addslashes(string $in) : string
php_addslashes_twice(string $in) : string
php_function_allowed(string $function) : boolean
php_return_bytes(string $val) : integer
ping_sitemap_xml(\URLPATH $url) : string
png_compress(\PATH $path, boolean $lossy = false
)
post_param_integer(\ID_TEXT $name, \?mixed $default = false
) : \?integer
package | core |
---|
\ID_TEXT
The name of the parameter to get
\?mixed
The default value to give the parameter if the parameter value is not defined or the empty string (null: allow missing parameter) (false: give error on missing parameter)
\?integer
The parameter value (null: not set, and NULL given as default)post_param_multi_source_upload(\ID_TEXT $name, \?PATH $upload_to, boolean $required= true
, boolean $is_edit= false
, \?string $filename= null
, \?string $thumb_url= null
, integer $upload_type= 15
, boolean $copy_to_server= false
) : \?URLPATH
For images use post_param_image instead. Used with form_input_upload_multi_source. Get the file URL from the POST data.
package | core |
---|
\ID_TEXT
Form field prefix (input type suffixes will be added automatically)
\?PATH
Where to upload to (null: the correct place for $theme_image_type)
boolean
Whether an image is required
boolean
Whether this is an edit operation
\?string
Pass the filename back by reference (null: do not pass)
\?string
Pass the thumbnail back by reference (null: do not pass & do not collect a thumbnail)
integer
A CMSUPLOAD* constant
boolean
Whether to copy a URL (if a URL) to the server, and return a local reference
\?URLPATH
The URL (either to an independent upload, or the theme image, or a filedump URL) (null: leave alone, when doing an edit operation)post_param_string(\ID_TEXT $name, \?mixed $default= false
, boolean $html= false
, boolean $conv_from_wysiwyg= true
) : \?string
Implements additional security over the direct PHP access mechanism which should not be used.
package | core |
---|
\ID_TEXT
The name of the parameter to get
\?mixed
The default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
boolean
Whether we are cleaning for HTML rather than Comcode/plain-text
boolean
Whether to convert WYSIWYG contents to Comcode automatically
\?string
The parameter value (null: missing)prepare_filtercode_merger_link(string $_link_filter) : array
prevent_double_submit(\ID_TEXT $type, \?SHORT_TEXT $a= null
, \?SHORT_TEXT $b= null
)
package | core |
---|
\ID_TEXT
The type of activity just carried out (a lang string)
\?SHORT_TEXT
The most important parameter of the activity (e.g. id) (null: none / cannot match against)
\?SHORT_TEXT
A secondary (perhaps, human readable) parameter of the activity (e.g. caption) (null: none / cannot match against)
process_url_monikers(\ID_TEXT $page, boolean $redirect_if_non_canonical = true
)
package | core |
---|
\ID_TEXT
The page name to do it for
boolean
Do a redirect if we're not on the canonical URL
propagate_filtercode(\ID_TEXT $prefix = ''
) : array
package | core |
---|
\ID_TEXT
Prefix for main filter environment variable
array
Extra URL mappingspropagate_filtercode_page_link() : string
protect_from_escaping(mixed $in) : \Tempcode
push_output_state(boolean $just_tempcode= false
, boolean $true_blank= false
)
package | core |
---|---|
sets_output_state |
boolean
Whether to only restore the Tempcode execution part of the state.
boolean
Whether to go for a completely blank state (no defaults!), not just a default fresh state.
put_in_standard_box(\Tempcode $content, mixed $title= ''
, \ID_TEXT $type= 'default'
, string $width= ''
, string $options= ''
, string $meta= ''
, string $links= ''
, string $top_links= ''
) : \Tempcode
.. use templates instead
package | core |
---|
\Tempcode
The content being put inside the box
mixed
The title of the standard box, string or Tempcode (blank: titleless standard box)
\ID_TEXT
The type of the box. Refers to a template (STANDARDBOX_type)
string
The CSS width
string
'|' separated list of options (meaning dependant upon templates interpretation)
string
'|' separated list of meta information (key|value|key|value|...)
string
'|' separated list of link information (linkhtml|...)
string
Link to be added to the header of the box
\Tempcode
The contents, put inside a standard box, according to the other parametersput_into_cache(\MINIID_TEXT $codename, integer $ttl, \LONG_TEXT $cache_identifier, \?BINARY $staff_status, \?MEMBER $member, \SHORT_TEXT $groups, \?BINARY $is_bot, \MINIID_TEXT $timezone, mixed $cache, \?array $_langs_required= null
, \?array $_javascripts_required= null
, \?array $_csss_required= null
, boolean $tempcode= false
, \?ID_TEXT $theme= null
, \?LANGUAGE_NAME $lang= null
)
package | core |
---|
\MINIID_TEXT
The codename to check for caching
integer
The TTL of what is being cached in minutes
\LONG_TEXT
The requisite situational information (a serialized map) [-> further restraints when reading]
\?BINARY
Staff status to limit to (null: Not limiting by this)
\?MEMBER
Member to limit to (null: Not limiting by this)
\SHORT_TEXT
Sorted permissive usergroup list to limit to (blank: Not limiting by this)
\?BINARY
Bot status to limit to (null: Not limiting by this)
\MINIID_TEXT
Timezone to limit to (blank: Not limiting by this)
mixed
The result we are caching
\?array
A list of the language files that need loading to use Tempcode embedded in the cache (null: none required)
\?array
A list of the javascript files that need loading to use Tempcode embedded in the cache (null: none required)
\?array
A list of the css files that need loading to use Tempcode embedded in the cache (null: none required)
boolean
Whether we are caching Tempcode (needs special care)
\?ID_TEXT
The theme this is being cached for (null: current theme)
\?LANGUAGE_NAME
The language this is being cached for (null: current language)
put_value_in_stack_trace(mixed $value) : string
qualify_url(\URLPATH $url, \URLPATH $url_base) : \URLPATH
package | core |
---|
\URLPATH
The URL to fully qualified
\URLPATH
The base-URL
\URLPATH
Fully qualified URLratchet_hash(\SHORT_TEXT $password, \SHORT_TEXT $salt, integer $legacy_style = 0
) : \SHORT_TEXT
package | core |
---|
\SHORT_TEXT
The password in plain text
\SHORT_TEXT
The salt
integer
Legacy hashing style to fallback to
\SHORT_TEXT
The salted&hashed passwordratchet_hash_verify(\SHORT_TEXT $password, \SHORT_TEXT $salt, \SHORT_TEXT $pass_hash_salted, integer $legacy_style = 0
) : boolean
package | core |
---|
\SHORT_TEXT
The password in plain text
\SHORT_TEXT
The salt
\SHORT_TEXT
The prior salted&hashed password, which will also include the algorithm/ratcheting level (unless it's old style, in which case we use non-ratcheted md5)
integer
Legacy hashing style to fallback to
boolean
Whether the password if verifiedrbl_resolve(\IP $ip, \ID_TEXT $rbl_domain, boolean $page_level) : \?array
package | core |
---|
\IP
The IP address to lookup
\ID_TEXT
The RBL domain
boolean
Whether this is a page level check (i.e. we won't consider blocks or approval, just ban setting)
\?array
Return result (null: error)read_filtercode_parameter_from_env(\ID_TEXT $field_name, \?ID_TEXT $field_type = null
) : string
package | core |
---|
\ID_TEXT
The field name
\?ID_TEXT
The field type (null: work out what is there to read automatically)
string
The parameter valueread_text_file(string $codename, \?LANGUAGE_NAME $lang= null
, boolean $missing_blank= false
) : string
package | core |
---|
string
The file name (without .txt)
\?LANGUAGE_NAME
The language to load from (null: none) (blank: search)
boolean
Whether to tolerate missing files
string
The file contentsrebuild_sitemap_set(integer $set_number, \TIME $last_time)
redirect_screen(\Tempcode $title, mixed $url, \?mixed $text= null
, boolean $intermediary_hop= false
, \ID_TEXT $msg_type= 'inform'
) : \Tempcode
package | core |
---|---|
set | warn inform fatal |
\Tempcode
Title to display on redirect page
mixed
Destination URL (may be Tempcode)
\?mixed
Message to show (may be Tempcode) (null: standard redirection message)
boolean
For intermediary hops, don't mark so as to read status messages - save them up for the next hop (which will not be intermediary)
\ID_TEXT
Code of message type to show
\Tempcode
Redirection message (likely to not actually be seen due to instant redirection)reinstall_block(\ID_TEXT $block) : boolean
Again, you should not need to use this function.
package | core |
---|
\ID_TEXT
The name of the block to reinstall
boolean
Whether installation was requiredreinstall_module(\ID_TEXT $zone, \ID_TEXT $module) : boolean
package | core |
---|
\ID_TEXT
The zone name
\ID_TEXT
The module name
boolean
Whether a module installer had to be runrelay_error_notification(string $text, boolean $ocproducts= true
, \ID_TEXT $notification_type= 'error_occurred'
)
package | core |
---|
string
A error message (in HTML)
boolean
Also send to ocProducts
\ID_TEXT
The notification type
reload_lang_fields(boolean $full = false
)
remove_code(string $code, string $function, string $command, integer $instance_of_command = 1
) : boolean
package | core |
---|
string
The code.
string
Name of the function.
string
The command we're searching to insert by.
integer
We remove the nth instance of this command.
boolean
Success status.remove_duplicate_rows(array $rows, string $id_field = 'id'
) : array
package | core |
---|
array
The rows to remove duplication of
string
The ID field
array
The filtered rowsremove_magic_encryption_marker(string $data) : string
If the data does not have a magic encryption marker, the original string will be returned.
package | core |
---|
string
Data
string
Data, without the magic markerremove_url_mistakes(\URLPATH $url) : \URLPATH
rename_config_option(\ID_TEXT $old, \ID_TEXT $new)
rename_privilege(\ID_TEXT $old, \ID_TEXT $new)
render_comcode_page_box(array $row, boolean $give_context= true
, boolean $include_breadcrumbs= true
, \?ID_TEXT $root= null
, \ID_TEXT $guid= ''
) : \Tempcode
package | core |
---|
array
Row to render
boolean
Whether to include context (i.e. say WHAT this is, not just show the actual content)
boolean
Whether to include breadcrumbs (if there are any)
\?ID_TEXT
Virtual root to use (null: none)
\ID_TEXT
Overridden GUID to send to templates (blank: none)
\Tempcode
Rendered boxreprocess_url(\URLPATH $url, \URLPATH $operation_base_url) : string
package | core |
---|
\URLPATH
The URL that we're operating on.
\URLPATH
We open up linked URLs under this recursively.
string
The cleaned up contents at the URL, set up for the recursive integrator usage.request_page(\ID_TEXT $codename, boolean $required, \?ID_TEXT $zone= null
, \?ID_TEXT $page_type= null
, boolean $being_included= false
, boolean $no_redirect_check= false
, \?object $out= null
) : \?Tempcode
package | core |
---|
\ID_TEXT
The codename of the page to load
boolean
Whether it is required for this page to exist (shows an error if it doesn't) -- otherwise, it will just return NULL
\?ID_TEXT
The zone the page is being loaded in (null: as shown by access URL)
\?ID_TEXT
The type of page - for if you know it (null: don't know it)
boolean
Whether the page is being included from another
boolean
Whether to not check for redirects (normally you would)
\?object
Semi-filled output template (null: definitely not doing output streaming)
\?Tempcode
The page (null: no page)request_via_cron(\ID_TEXT $codename, \?array $map, integer $special_cache_flags, boolean $tempcode)
package | core |
---|
\ID_TEXT
The codename of the block
\?array
Parameters to call up block with if we have to defer caching (null: none)
integer
Flags representing how we should cache
boolean
Whether we are caching Tempcode (needs special care)
require_all_lang(\?LANGUAGE_NAME $lang= null
, boolean $only_if_for_lang= false
)
NOTE: This may reduce performance, so you should only use it if you really have to.
package | core |
---|
\?LANGUAGE_NAME
The language to include files from (null: use current users language).
boolean
Only load it up if it is specifically defined for our language.
require_all_open_lang_files(\?LANGUAGE_NAME $lang = null
)
package | core |
---|
\?LANGUAGE_NAME
The language to require open files from (null: uses the current language)
require_code(string $codename, boolean $light_exit = false
)
You should remember this function, and not substitute anything else for it, as that will likely make your code unstable. It is key to source code modularity in Composr.
package | core |
---|
string
The codename for the source module to load (or a full relative path, ending with .php; if custom checking is needed, this must be the custom version)
boolean
Whether to cleanly fail when a source file is missing
require_code_no_override(string $codename)
require_css(\ID_TEXT $css)
require_javascript(\ID_TEXT $javascript)
require_lang(\ID_TEXT $codename, \?LANGUAGE_NAME $lang= null
, \?string $type= null
, boolean $ignore_errors= false
)
If $type is not null, then this specifies whether to use 'lang_custom' or 'custom' (otherwise, normal priorities occur).
package | core |
---|---|
set | lang_custom custom |
\ID_TEXT
The language file name
\?LANGUAGE_NAME
The language (null: uses the current language)
\?string
The language type (lang_custom, or custom) (null: normal priorities are used)
boolean
Whether to just return if there was a loading error
require_lang_compile(\ID_TEXT $codename, \?LANGUAGE_NAME $lang, \?string $type, \PATH $cache_path, boolean $ignore_errors = false
) : boolean
package | core |
---|---|
set | lang_custom custom |
\ID_TEXT
The language file name
\?LANGUAGE_NAME
The language (null: uses the current language)
\?string
The language type (lang_custom, or custom) (null: normal priorities are used)
\PATH
Where we are caching too
boolean
Whether to just return if there was a loading error
boolean
Whether we FAILED to loadrescue_shortened_post_request()
If we're staff, try and fix it. If we're not staff, warn about it (as fixing it would subvert the reason for the restriction).
package | core |
---|
restore_output_state(boolean $just_tempcode= false
, boolean $merge_current= false
, \?array $keep= null
)
package | core |
---|---|
sets_output_state |
boolean
Whether to only restore the Tempcode execution part of the state.
boolean
Whether to merge the current output state in.
\?array
Settings to keep / merge if possible (null: none).
restricted_manually_enabled_backdoor() : \MEMBER
restrictify()
package | core |
---|
retrieve_sitemap_node(\ID_TEXT $page_link= ''
, \?mixed $callback= null
, \?array $valid_node_types= null
, \?integer $child_cutoff= null
, \?integer $max_recurse_depth= null
, integer $options= 0
, \ID_TEXT $zone= '_SEARCH'
, integer $meta_gather= 0
) : \?array
package | core |
---|
\ID_TEXT
The page-link we are finding (blank: root).
\?mixed
Callback function to send discovered page-links to (null: return).
\?array
List of node types we will return/recurse-through (null: no limit)
\?integer
Maximum number of children before we cut off all children (null: no limit).
\?integer
How deep to go from the Sitemap root (null: no limit).
integer
A bitmask of SITEMAPGEN* options.
\ID_TEXT
The zone we will consider ourselves to be operating in (needed due to transparent redirects feature)
integer
A bitmask of SITEMAPGATHER* constants, of extra data to include.
\?array
Node structure (null: working via callback / error).running_locally() : boolean
running_script(string $is_this_running) : boolean
package | core |
---|
string
Script filename (canonically we want NO .php file type suffix)
boolean
Whether the script is runningsafe_ini_set(string $var, string $value) : \~string
package | core |
---|
string
Config option.
string
New value of option.
\~string
Old value of option (false: error).save_comcode_page(\ID_TEXT $zone, \ID_TEXT $new_file, \LANGUAGE_NAME $lang, \ID_TEXT $text, \BINARY $validated, \?ID_TEXT $parent_page= null
, integer $order= 0
, \?TIME $add_time= null
, \?TIME $edit_time= null
, \BINARY $show_as_edit= 0
, \?MEMBER $submitter= null
, \?ID_TEXT $file= null
, \SHORT_TEXT $meta_keywords= ''
, \LONG_TEXT $meta_description= ''
) : \PATH
package | core |
---|
\ID_TEXT
The zone
\ID_TEXT
The page
\LANGUAGE_NAME
The language
\ID_TEXT
The page text
\BINARY
The validated status
\?ID_TEXT
The page parent (null: none)
integer
The page order
\?TIME
Add time (null: now)
\?TIME
Edit time (null: not edited)
\BINARY
Whether to show as edited
\?MEMBER
The submitter (null: current member)
\?ID_TEXT
The old page name (null: not being renamed)
\SHORT_TEXT
Meta keywords for this resource (blank: implicit)
\LONG_TEXT
Meta description for this resource (blank: implicit)
\PATH
The save pathsave_static_caching(mixed $out, string $mime_type = 'text/html'
)
package | core |
---|
mixed
Output to cache (Tempcode or string)
string
Mime type to use
save_zone_base_url(\ID_TEXT $zone, string $base_url)
secure_serialized_data(string $data, \?mixed $safe_replacement = null
)
package | core |
---|
string
&$data Serialized data
\?mixed
What to substitute if objects are contained (null: substitute null)
selectcode_to_idlist_using_callback(string $filter, string $ids_and_parents_callback, \?string $parent_spec__table_name= null
, \?string $parent_spec__parent_name= null
, \?string $parent_field_name= null
, \?string $parent_spec__field_name= null
, boolean $numeric_record_set_ids= true
, boolean $numeric_category_set_ids= true
, \?object $db= null
) : array
package | core |
---|
string
The filter
string
A call_user_func_array specifier to a function that will give a map between record-set IDs and record-set parent-category-IDs. We pass a call_user_func_array specifier because we don't want to have to generate it unless we need to (if we need to do 'avoiding' matches or 'subtree' matches)
\?string
The database's table that contains parent/child relationships in the record-set's category-set (the category-set is equal to the record-set if we're matching categories, but not if we're matching entries) (null: don't support subtree [*-style] searches)
\?string
The database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base)
\?string
The database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
\?string
The database's field name for the category-set's category-ID (null: don't support subtree [*-style] searches beyond the tree base)
boolean
Whether the record-set IDs are numeric
boolean
Whether the category-set IDs are numeric
\?object
Database connection to use (null: website)
array
A list of ID numbersselectcode_to_idlist_using_db(string $filter, string $field_name, string $table_name, \?string $parent_spec__table_name= null
, \?string $parent_spec__parent_name= null
, \?string $parent_field_name= null
, \?string $parent_spec__field_name= null
, boolean $numeric_record_set_ids= true
, boolean $numeric_category_set_ids= true
, \?object $db= null
) : array
package | core |
---|
string
The filter
string
The database's ID field for the record-set we're matching
string
The database's table for the record-set we're matching
\?string
The database's table that contains parent/child relationships in the record-set's category-set (the category-set is equal to the record-set if we're matching categories, but not if we're matching entries) (null: don't support subtree [*-style] searches)
\?string
The database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base)
\?string
The database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
\?string
The database's field name for the category-set's category-ID (null: don't support subtree [*-style] searches beyond the tree base)
boolean
Whether the record-set IDs are numeric
boolean
Whether the category-set IDs are numeric
\?object
Database connection to use (null: website)
array
A list of ID numbersselectcode_to_idlist_using_memory(string $filter, array $ids_and_parents, \?string $parent_spec__table_name= null
, \?string $parent_spec__parent_name= null
, \?string $parent_field_name= null
, \?string $parent_spec__field_name= null
, boolean $numeric_record_set_ids= true
, boolean $numeric_category_set_ids= true
, \?object $db= null
) : array
package | core |
---|
string
The filter
array
A map between record-set IDs and record-set parent-category-IDs
\?string
The database's table that contains parent/child relationships in the record-set's category-set (the category-set is equal to the record-set if we're matching categories, but not if we're matching entries) (null: don't support subtree [*-style] searches)
\?string
The database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base)
\?string
The database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
\?string
The database's field name for the category-set's category-ID (null: don't support subtree [*-style] searches beyond the tree base)
boolean
Whether the record-set IDs are numeric
boolean
Whether the category-set IDs are numeric
\?object
Database connection to use (null: website)
array
A list of ID numbersselectcode_to_sqlfragment(string $filter, string $field_name, \?string $parent_spec__table_name= null
, \?string $parent_spec__parent_name= null
, \?string $parent_field_name= null
, \?string $parent_spec__field_name= null
, boolean $numeric_record_set_ids= true
, boolean $numeric_category_set_ids= true
, \?object $db= null
) : string
package | core |
---|
string
The filter
string
The database's ID field for the record-set we're matching. E.g. 'id'.
\?string
The database's table that contains parent/child relationships in the record-set's category-set (the category-set is equal to the record-set if we're matching categories, but not if we're matching entries) (null: don't support subtree [*-style] searches). E.g. 'categories'.
\?string
The database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base). E.g. 'parent_id'.
\?string
The database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches). E.g. 'cat'.
\?string
The database's field name for the category-set's category-ID (null: don't support subtree [*-style] searches beyond the tree base). E.g. 'id'.
boolean
Whether the record-set IDs are numeric
boolean
Whether the category-set IDs are numeric
\?object
Database connection to use (null: website)
string
SQL query fragment. Note that brackets will be put around this automatically if required, so there's no need to do this yourself.send_content_validated_notification(\ID_TEXT $content_type, \ID_TEXT $content_id)
send_validation_request(\ID_TEXT $type, \?ID_TEXT $table, boolean $non_integer_id, \ID_TEXT $id, \Tempcode $url, \?MEMBER $member_id = null
)
package | core |
---|
\ID_TEXT
The validation request will say one of this type has been submitted. By convention it is the language code of what was done, e.g. ADD_DOWNLOAD
\?ID_TEXT
The table saved into (null: unknown)
boolean
Whether the ID field is not an integer
\ID_TEXT
The validation request will say this ID has been submitted
\Tempcode
The validation request will link to this URL
\?MEMBER
Member doing the submitting (null: current member)
seo_get_fields(\ID_TEXT $type, \?ID_TEXT $id= null
, boolean $show_header= true
) : \Tempcode
package | core |
---|
\ID_TEXT
The type of resource (e.g. download)
\?ID_TEXT
The ID of the resource (null: adding)
boolean
Whether to show a header
\Tempcode
Form page Tempcode fragmentset_execution_context(array $new_get, \ID_TEXT $new_zone= '_SEARCH'
, \ID_TEXT $new_current_script= 'index'
, boolean $erase_keep_also= false
) : array
package | core |
---|---|
sets_input_state |
array
The URL component map (must contain 'page').
\ID_TEXT
The zone.
\ID_TEXT
The running script.
boolean
Whether to get rid of keep_ variables in current URL.
array
A list of parameters that would be required to be passed back to reset the state.set_feed_url(\URLPATH $url)
set_helper_panel_text(\Tempcode $text, boolean $append= true
, boolean $put_in_box= true
)
package | core |
---|---|
sets_output_state |
\Tempcode
The text
boolean
Whether to append
boolean
Whether to add a box around the parameter
set_helper_panel_tutorial(\ID_TEXT $tutorial)
package | core |
---|---|
sets_output_state |
\ID_TEXT
The page name of the tutorial (must be an existing one on the brand site, i.e. compo.sr)
set_http_status_code(string $code)
set_invisibility(boolean $make_invisible = true
)
package | core |
---|
boolean
Whether to make the current user invisible (true=make invisible, false=make visible)
set_mass_import_mode(boolean $doing_mass_import = true
)
set_member_group_timeout(\MEMBER $member_id, \GROUP $group_id, \TIME $timestamp, boolean $prefer_for_primary_group = false
)
package | core |
---|
\MEMBER
The member going in the usergroup.
\GROUP
The usergroup.
\TIME
The expiry timestamp.
boolean
Whether to put the member into as a primary group if this is a new temporary membership (it is recommended to NOT use this, since we don't track the source group and hence on expiry the member is put back to the first default group - but also generally you probably don't want to box yourself in with moving people's primary group, it ties your future flexibility down a lot).
set_option(\ID_TEXT $name, \LONG_TEXT $value, \BINARY $will_be_formally_set = 1
)
Note that you may wish to also empty the template cache after running this function. Config options may have been set into template(s).
package | core |
---|
\ID_TEXT
The name of the value
\LONG_TEXT
The value
\BINARY
Whether this was a human-set value
set_privilege(\GROUP $group_id, \ID_TEXT $permission, boolean $value, \?ID_TEXT $page= null
, \?ID_TEXT $category_type= null
, \?ID_TEXT $category_name= null
)
package | core |
---|
\GROUP
The usergroup having the permission set
\ID_TEXT
The codename of the permission
boolean
Whether the usergroup has the permission
\?ID_TEXT
The ID code for the page being checked (null: current page)
\?ID_TEXT
The category-type for the permission (null: none required)
\?ID_TEXT
The category-name/value for the permission (null: none required)
set_session_id(\ID_TEXT $id, boolean $guest_session = false
)
package | core |
---|---|
sets_output_state |
\ID_TEXT
The session ID
boolean
Whether this is a guest session (guest sessions will use persistent cookies)
set_short_title(string $title)
Does not do anything if output streaming is on and already started.
package | core |
---|---|
sets_output_state |
string
The short title
set_throw_errors(boolean $_throwing_errors = true
)
set_url_moniker(\ID_TEXT $content_type, \ID_TEXT $content_id, \?array $fields_to_skip= null
, \?ID_TEXT $new_content_id= null
)
package | core |
---|
\ID_TEXT
The type of resource (e.g. download)
\ID_TEXT
The old ID of the resource
\?array
List of fields to NOT take in (null: empty list)
\?ID_TEXT
The new ID of the resource (null: not being renamed)
set_value(\ID_TEXT $name, \?SHORT_TEXT $value, boolean $elective_or_lengthy = false
) : \SHORT_TEXT
package | core |
---|
\ID_TEXT
The name of the value
\?SHORT_TEXT
The value (null: delete)
boolean
Whether this value is an elective/lengthy one. Use this for getting & setting if you don't want it to be loaded up in advance for every page view (in bulk alongside other values), or if the value may be more than 255 characters. Performance tradeoff: frequently used values should not be elective, infrequently used values should be elective.
\SHORT_TEXT
The value just set, same as $value (just as a niceity so that Commandr users can see something "happen")should_ignore_file(string $filepath, integer $bitmask= 0
, integer $bitmask_defaults= 0
) : boolean
package | core |
---|
string
File path (relative to Composr base directory)
integer
Bitmask of extra stuff to ignore (see IGNORE_* constants)
integer
Set this to 0 if you don't want the default IGNORE_* constants to carry through
boolean
Whether it should be ignoredsimulated_wildcard_match(string $context, string $word, boolean $full_cover = false
) : boolean
package | core |
---|
string
The haystack
string
The needle (a wildcard expression)
boolean
Whether full-coverance is required
boolean
Whether we have a matchsitemap_do_next_manager(\Tempcode $title, \?ID_TEXT $page, \ID_TEXT $zone, \Tempcode $completion_text) : \Tempcode
package | core |
---|
\Tempcode
The title (output of get_screen_title)
\?ID_TEXT
The name of the page just handled (null: none)
\ID_TEXT
The name of the zone just handled (blank: none/welcome-zone)
\Tempcode
The text to show (blank: default)
\Tempcode
The UIsitemap_xml_build()
package | core |
---|
skippable_keep(string $key, string $val) : boolean
package | core |
---|
string
Parameter name
string
Parameter value
boolean
Whether we can skip itsmart_redirect(mixed $url)
If possible, use an HTTP header; but if output has already started, use a meta tag.
package | core |
---|---|
sets_output_state |
mixed
Refresh to this URL (URLPATH or Tempcode URL)
sort_maps_by(array $rows, mixed $sort_keys)
package | core |
---|
array
List of maps to sort
mixed
Either an integer sort key (to sort by integer key ID of contained arrays) or a Comma-separated list of sort keys (to sort by string key ID of contained arrays; prefix '!' a key to reverse the sort order for it).
sort_maps_by__strlen(array $rows, mixed $sort_key)
package | core |
---|
array
List of maps to sort
mixed
Either an integer sort key (to sort by integer key ID of contained arrays) or a String sort key (to sort by string key ID of contained arrays).
sort_search_results(array $hook_results, array $results, string $direction) : array
package | core |
---|---|
set | ASC DESC |
array
Search results from the search hook, assumed already sorted
array
Existing array of results (originally starts blank)
string
Sort direction
array
Sorted resultsspecial_page_types(\ID_TEXT $special_page_type, \Tempcode $out, string $out_evaluated)
package | core |
---|---|
set | query templates tree lang |
\ID_TEXT
The special page type.
\Tempcode
The normal script Tempcode output
string
The normal script evaluated output
static_cache(integer $mode)
static_cache__get_self_url_easy() : \URLPATH
static_cache_current_url() : \URLPATH
static_evaluate_tempcode(\Tempcode $ob) : string
store_exif(\ID_TEXT $content_type, \ID_TEXT $content_id, array $exif, \?array $map = null
)
Spaces may be added to the names to make them prettier, but otherwise they must be the same. Designed to be used by headless-importers, e.g. bulk importing of media files, to make the process a bit smarter.
package | core |
---|
\ID_TEXT
The content type
\ID_TEXT
The content ID
array
The EXIF data
\?array
Extra metadata to store, against explicit field IDs (null: none)
strip_html(string $in) : string
suggest_fatalistic()
package | core |
---|
suggest_new_idmoniker_for(\ID_TEXT $page, \ID_TEXT $type, \ID_TEXT $id, \ID_TEXT $zone, string $moniker_src, boolean $is_new = false
) : string
package | core |
---|
\ID_TEXT
Page name.
\ID_TEXT
Screen type code.
\ID_TEXT
Resource ID.
\ID_TEXT
The URL zone name (only used for Comcode Page URL monikers).
string
String from which a moniker will be chosen (may not be blank).
boolean
Whether we are sure this is a new moniker (makes things more efficient, saves a query).
string
The chosen moniker.symbol_tempcode(\ID_TEXT $symbol, \?array $parameters= null
, \?array $escape= null
) : \Tempcode
package | core |
---|
\ID_TEXT
The ID of the symbol to use
\?array
Symbol parameters (null: none)
\?array
Escaping (null: none)
\Tempcode
A symbol Tempcode objectsymbol_truncator(array $param, string $type, \?mixed $tooltip_if_truncated = null
) : string
package | core |
---|---|
set | left right spread |
array
Parameters passed to the symbol (0=text, 1=amount, 2=tooltip?, 3=is_html?, 4=use as grammatical length rather than HTML byte length, 5=fractional-deviation-tolerance for grammar-preservation)
string
The type of truncation to do
\?mixed
Tooltip to add on, but only if we end up creating our own tooltip (null: none)
string
The result.sync_file(\PATH $filename)
sync_file_move(\PATH $old, \PATH $new)
package | core |
---|
\PATH
File/directory name to move from (may be full or relative path)
\PATH
File/directory name to move to (may be full or relative path)
syndicate_described_activity(string $a_language_string_code= ''
, string $a_label_1= ''
, string $a_label_2= ''
, string $a_label_3= ''
, string $a_page_link_1= ''
, string $a_page_link_2= ''
, string $a_page_link_3= ''
, string $a_addon= ''
, \BINARY $a_is_public= 1
, \?MEMBER $a_member_id= null
, boolean $sitewide_too= false
, \?MEMBER $a_also_involving= null
)
package | core |
---|
string
Language string code
string
Label 1 (given as a parameter to the language string code)
string
Label 2 (given as a parameter to the language string code)
string
Label 3 (given as a parameter to the language string code)
string
Page-link 1
string
Page-link 2
string
Page-link 3
string
Addon that caused the event
\BINARY
Whether this post should be public or friends-only
\?MEMBER
Member being written for (null: current member)
boolean
Whether to push this out as a site event if user requested
\?MEMBER
Member also 'intimately' involved, such as a content submitter who is a friend (null: none)
syndicate_spammer_report(\IP $ip_addr, \ID_TEXT $username, \EMAIL $email, string $reason, boolean $trigger_error = false
)
package | core |
---|
\IP
IP address to report
\ID_TEXT
Username address to report
\EMAIL
Email address to report
string
The reason for the report (blank: none)
boolean
Whether to emit a Composr error, on error. Should not be 'true' for automatic spammer reports, as the spammer should not see the submission process in action!
tar_add_file(array $resource, \PATH $target_path, string $data, integer $_mode= 420
, \?TIME $_mtime= null
, boolean $data_is_path= false
, boolean $return_on_errors= false
) : integer
package | core |
---|
array
The TAR file handle
\PATH
The relative path to where we wish to add the file to the archive (including filename)
string
The data of the file to add
integer
The file mode (permissions)
\?TIME
The modification time we wish for our file (null: now)
boolean
Whether the $data variable is actually a full file path
boolean
Whether to return on errors
integer
Offset of the file in the TARtar_add_folder(array $resource, \?resource $logfile, \PATH $path, \?integer $max_size= null
, \PATH $subpath= ''
, \?array $avoid_backing_up= null
, \?array $root_only_dirs= null
, boolean $tick= false
, boolean $all_files= false
)
package | core |
---|
array
The TAR file handle
\?resource
The logfile to write to (null: no logging)
\PATH
The full path to the folder to add
\?integer
The maximum file size to add (null: no limit)
\PATH
The subpath relative to the path (should be left as the default '', as this is used for the recursion to distinguish the adding base path from where it's currently looking)
\?array
A map (filename=>true) of files to not back up (null: none)
\?array
A list of directories ONLY to back up from the root (null: no restriction)
boolean
Whether to output spaces as we go to keep the connection alive
boolean
Whether to not skip "special files" (ones not normally archive)
tar_add_folder_incremental(array $resource, \?resource $logfile, \PATH $path, \TIME $threshold, \?integer $max_size, \PATH $subpath= ''
, boolean $all_files= false
) : array
package | core |
---|
array
The TAR file handle
\?resource
The logfile to write to (null: no logging)
\PATH
The full path to the folder to add
\TIME
The threshold time
\?integer
The maximum file size to add (null: no limit)
\PATH
The subpath relative to the path (should be left as the default '', as this is used for the recursion to distinguish the adding base path from where it's currently looking)
boolean
Whether to not skip "special files" (ones not normally archive)
array
A list of maps that stores 'path', 'mode' and 'size', for each newly added file in the archivetar_close(array $resource)
tar_crc(string $header) : integer
tar_extract_to_folder(array $resource, \PATH $path, boolean $use_afm= false
, \?array $files= null
, boolean $comcode_backups= false
)
package | core |
---|
array
The TAR file handle
\PATH
The path to the folder to extract to, relative to the base directory
boolean
Whether to extract via the AFM (assumes AFM has been set up prior to this function call)
\?array
The files to extract (null: all)
boolean
Whether to take backups of Comcode pages
tar_get_directory(array $resource, boolean $tolerate_errors = false
) : \?array
package | core |
---|
array
The TAR file handle
boolean
Whether to tolerate errors (returns NULL if error)
\?array
A list of maps that stores 'path', 'mode', 'size' and 'mtime', for each file in the archive (null: error)tar_get_file(array $resource, \PATH $path, boolean $tolerate_errors= false
, \?PATH $write_data_to= null
) : \?array
package | core |
---|
array
The TAR file handle
\PATH
The full path to the file we want to get
boolean
Whether to tolerate errors (returns NULL if error)
\?PATH
Write data to here (null: return within array)
\?array
A map, containing 'data' (the file), 'size' (the filesize), 'mtime' (the modification timestamp), and 'mode' (the permissions) (null: not found / TAR possibly corrupt if we turned tolerate errors on)tar_open(\?PATH $path, string $mode) : array
package | core |
---|---|
set | rb wb w+b |
\?PATH
The path to the TAR archive (null: write out directly to stdout)
string
The mode to open the TAR archive (rb=read, wb=write)
array
The TAR file handletemplate_to_tempcode(string $text, integer $symbol_pos= 0
, boolean $inside_directive= false
, \ID_TEXT $codename= ''
, \?ID_TEXT $theme= null
, \?ID_TEXT $lang= null
, boolean $tolerate_errors= false
) : mixed
package | core |
---|
string
The template text
integer
The position we are looking at in the text
boolean
Whether this text is infact a directive, about to be put in the context of a wider template
\ID_TEXT
The codename of the template (e.g. foo)
\?ID_TEXT
The theme it is for (null: current theme)
\?ID_TEXT
The language it is for (null: current language)
boolean
Whether to tolerate errors
mixed
The converted/compiled template as Tempcode, OR if a directive, encoded directive informationtest_password(string $password, string $username = ''
) : integer
package | core |
---|
string
The password to check
string
The username that will go with the password
integer
Password strength (1-10)throwing_errors() : boolean
titleify(\ID_TEXT $boring) : string
try_httpauth_login() : \?MEMBER
try_su_login(\MEMBER $member) : \MEMBER
tz_time(\TIME $time, string $zone) : \TIME
package | core |
---|
\TIME
UTC time
string
Timezone (boring style)
\TIME
Virtualised local timeunban_ip(\IP $ip)
unichr(integer $c) : \~string
package | core |
---|
integer
Character number.
\~string
Converted data (false: could not convert).unichrm(array $matches) : \~string
package | core |
---|
array
Regular expression match array.
\~string
Converted data (false: could not convert).unichrm_hex(array $matches) : \~string
package | core |
---|
array
Regular expression match array.
\~string
Converted data (false: could not convert).uninstall_block(\ID_TEXT $block)
uninstall_module(\ID_TEXT $zone, \ID_TEXT $module)
unixify_line_format(string $in, \?ID_TEXT $desired_charset= null
, boolean $html= false
, boolean $from_disk= false
) : string
package | core |
---|
string
The data to clean
\?ID_TEXT
The character set it should be in. We don't do any real conversions using this, only make sure that common problems with fed ISO-8859-1 data are resolved (null: output character set)
boolean
Whether we are cleaning for HTML rather than Comcode/plain-text
boolean
Whether the file is loaded from disk (less conversion needed)
string
The cleaned dataunparse_filtercode(array $parsed) : string
update_bounce_storage(string $server, integer $port, string $folder, string $username, string $password, \?TIME $since = null
)
package | core |
---|
string
The IMAP server hostname.
integer
The IMAP port.
string
The IMAP inbox identifier.
string
The IMAP username.
string
The IMAP password.
\?TIME
Only find bounces since this date (null: 8 weeks ago). This is approximate, we will actually look from a bit further back to compensate for possible timezone differences.
update_catalogue_content_ref(\ID_TEXT $type, \ID_TEXT $from, \ID_TEXT $to)
update_stat(\ID_TEXT $stat, integer $increment)
package | core |
---|
\ID_TEXT
The codename for the stat
integer
What to increment the statistic by
upgrade_block(\ID_TEXT $block) : integer
package | core |
---|
\ID_TEXT
The name of the block to upgrade
integer
0=No upgrade. -2=Not installed, 1=Upgradeupgrade_module(\ID_TEXT $zone, \ID_TEXT $module) : integer
package | core |
---|
\ID_TEXT
The zone name
\ID_TEXT
The module name
integer
0=No upgrade. -2=Not installed, 1=Upgradeupload_will_syndicate(\ID_TEXT $name) : boolean
url_is_local(\URLPATH $url) : boolean
url_monikers_enabled() : boolean
url_to_filename(\URLPATH $url_full) : string
package | core |
---|
\URLPATH
The URL to convert to an encoded filename
string
A usable filename based on the URLurl_to_page_link(\URLPATH $url, boolean $abs_only= false
, boolean $perfect_only= true
) : string
package | core |
---|
\URLPATH
The URL to convert. Note it may not be a short URL, and it must be based on the local base URL (else failure WILL occur).
boolean
Whether to only convert absolute URLs. Turn this on if you're not sure what you're passing is a URL not and you want to be extra safe.
boolean
Whether to only allow perfect conversions.
string
The page-link (blank: could not convert).urlise_lang(string $string, mixed $url, string $title= ''
, boolean $new_window= false
) : \Tempcode
package | core |
---|
string
The language string
mixed
The URL (either Tempcode or string)
string
The title of the hyperlink
boolean
Whether to use a new window
\Tempcode
The encoded versionuser_lang() : \LANGUAGE_NAME
usertime_to_utctime(\?TIME $timestamp= null
, \?MEMBER $member= null
) : \TIME
What complicate understanding of matters is that "user time" is not the timestamp that would exist on a user's PC, as all timestamps are meant to be stored in UTC. "user time" is offsetted to compensate, a virtual construct.
package | core |
---|
\?TIME
Input timestamp (null: now)
\?MEMBER
Member for which the date is being rendered (null: current member)
\TIME
Output timestamputctime_to_usertime(\?TIME $timestamp= null
, \?MEMBER $member= null
) : \TIME
What complicate understanding of matters is that "user time" is not the timestamp that would exist on a user's PC, as all timestamps are meant to be stored in UTC. "user time" is offsetted to compensate, a virtual construct.
package | core |
---|
\?TIME
Input timestamp (null: now)
\?MEMBER
Member for which the date is being rendered (null: current member)
\TIME
Output timestamputf8tohtml(string $utf8) : string
warn_exit(mixed $text, boolean $support_match_key_messages = false
) : mixed
package | core |
---|
mixed
The error message (string or Tempcode)
boolean
Whether match key messages / redirects should be supported
mixed
Never returns (i.e. exits)warn_exit_wordfilter(\?ID_TEXT $name, \Tempcode $message) : mixed
package | core |
---|
\?ID_TEXT
The name of the parameter this is coming from. Certain parameters are not checked, for reasons of efficiency (avoiding loading whole word check list if not needed) (null: don't know param, do not check to avoid)
\Tempcode
Error message
mixed
Never returns (i.e. exits)warn_screen(\Tempcode $title, mixed $text, boolean $provide_back= true
, boolean $support_match_key_messages= false
) : \Tempcode
package | core |
---|
\Tempcode
The title of the warn page
mixed
The text to put on the warn page (either Tempcode or string)
boolean
Whether to provide a back button
boolean
Whether match key messages / redirects should be supported
\Tempcode
The warn pagewill_be_unicode_neutered(string $data) : boolean
PHP's utf-8 support may not be great. For example, we have seen emoji characters not converting.
package | core |
---|
string
Data to check.
boolean
Whether we are good to execute entity_utf8_decode.with_whitespace(string $in) : \Tempcode
wordfilter_text(string $text) : string
wrap_probe_ip(\IP $ip) : array
write_static_cache_file(\PATH $fast_cache_path, string $out_evaluated, boolean $support_gzip)
package | core |
---|
\PATH
Cache file path
string
Cache contents
boolean
Whether to allow gzipping
write_text_file(string $codename, \?LANGUAGE_NAME $lang, string $out)
package | core |
---|
string
The file name (without .txt)
\?LANGUAGE_NAME
The language to write for (null: none) (blank: search)
string
The data to write
xhtml_substr(string $html, integer $from, \?integer $length= null
, boolean $literal_pos= false
, boolean $ellipses= false
, float $grammar_completeness_tolerance= 0.0
) : string
package | core |
---|
string
The text to perform on.
integer
The start position of the cut (HTML tags will be taken from before this though).
\?integer
The length you want the concatenated text to be (null: go to end).
boolean
Whether to do a substr based on literal position in XHTML, rather than based on number of visible characters.
boolean
Whether to add ellipses.
float
A fraction of the length we may exceed by in order to maintain grammar tolerance (finish sentences, finish paragraphs, finish the whole thing).
string
The result.xhtmlise_html(string $html, boolean $definitely_want= false
, boolean $snippet= false
) : string
package | core |
---|
string
The XHTML string to convert to XHTML
boolean
Whether to force a repair even if we aren't enforcing XHTML strictness
boolean
Whether this is a partial snippet of HTML, embeddable in some unknown context
string
The converted stringxml_rpc(\URLPATH $url, string $method, array $params, boolean $accept_failure = false
) : \?string
package | core |
---|
\URLPATH
The XML-RPC call URL
string
The method name to call.
array
An array of parameters.
boolean
Whether to accept failure.
\?string
The result (null: failed).xmlentities(string $string, integer $quote_style = ENT_COMPAT
) : string
package | core |
---|
string
Input string
integer
Quote style
string
Escaped version of input stringzip_close(array $open_zip_file) : boolean
package | core |
---|
array
The zip file resource
boolean
Whether the file closed correctlyzip_entry_close(array $zip_entry) : boolean
package | core |
---|
array
Directory entry resource returned by m_zip_read()
boolean
Whether the operation was succesfulzip_entry_filesize(array $zip_entry) : integer
package | core |
---|
array
Directory entry resource returned by m_zip_read()
integer
The file sizezip_entry_name(array $zip_entry) : string
package | core |
---|
array
Directory entry resource returned by m_zip_read()
string
The entry namezip_entry_open(array $zip, array $zip_entry, string $mode = 'rb'
) : boolean
package | core |
---|---|
set | rb |
array
The zip file resource
array
Directory entry resource returned by m_zip_read()
string
The file access mode
boolean
Whether the operation was succesfulzip_entry_read(array $zip_entry, integer $zip_entry_file_size = 1024
) : \~string
package | core |
---|
array
Directory entry resource returned by m_zip_read()
integer
The maximum returned data size
\~string
The data (false: failure)zip_error(integer $errno, boolean $mzip = false
) : \Tempcode
package | core |
---|
integer
The zip error number.
boolean
Whether mzip was used.
\Tempcode
Error message.zip_open(\PATH $zip_file) : mixed
package | core |
---|
\PATH
The zip file path
mixed
The zip file resource (number if error)zip_read(array $open_zip_file) : \~array
package | core |
---|
array
The zip file resource
\~array
A directory entry resource for later use with the m_zip_entry_...() functions (false: if there's no more entries to read).zip_scan_folder(\PATH $path, \PATH $subpath = ''
) : array
package | core |
---|
\PATH
The full path to the folder to add
\PATH
The subpath relative to the path (should be left as the default '', as this is used for the recursion to distinguish the adding base path from where it's currently looking)
array
A list of maps that stores time,full_path,name, for each filezone_black_magic_filterer(\PATH $path, boolean $relative = false
) : \PATH
package | core |
---|
\PATH
The path, assuming in the obvious place.
boolean
Where the passed path is relative.
\PATH
The fixed path.The self-learning cache is an adaptive per-page/script cache, which loads from disk in a single efficient operation.
« More »PHP5 Implementation of the Porter Stemmer algorithm. Certain elements were borrowed from the (broken) implementation by Jon Abernathy.
« More »CACHE_AGAINST_DEFAULT = CACHE_AGAINST_BOT_STATUS | CACHE_AGAINST_TIMEZONE
package | core |
---|
MAXIMUM_RESULT_COUNT_POINT = intval($maximum_result_count_point)
package | core |
---|
SITEMAP_GEN_CONSIDER_SECONDARY_CATEGORIES = 4
package | core |
---|
Take some Tempcode and pre-process it for Tempcode portions encapsulated within comments (or similar).
This is done so syntax-highlighters don't break, and WYSIWYG-editors don't corrupt the Tempcode.
Parameters
$data
string
Input Tempcode
Returns
string
Output Tempcode