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_TEXTThe class of error (e.g. PRIVILEGE). This is a language string.
stringThe parameteter given to the error message
booleanForce 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_TEXTAction type
stringFirst parameter
stringSecond parameter
\TempcodeFirst parameter (cropped)
\TempcodeSecond parameter (cropped)
\?arrayPair: 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_TEXTName of the zone
\SHORT_TEXTThe zone title
\ID_TEXTThe zones default page
\SHORT_TEXTThe header text
\ID_TEXTThe theme
\BINARYWhether the zone requires a session for pages to be used
booleanWhether to force the name as unique, if there's a conflict
stringThe base URL (blank: natural)
\ID_TEXTThe nameactual_delete_zone(\ID_TEXT $zone, boolean $force= false, boolean $skip_afm= false)
| package | core |
|---|
\ID_TEXTThe name of the zone
booleanForce, even if it contains pages
booleanWhether 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_TEXTThe current name of the zone
\SHORT_TEXTThe zone title
\ID_TEXTThe zones default page
\SHORT_TEXTThe header text
\ID_TEXTThe theme
\BINARYWhether the zone requires a session for pages to be used
\ID_TEXTThe new name of the zone
booleanWhether to force the name as unique, if there's a conflict
booleanWhether to skip the AFM because we know it's not needed (or can't be loaded)
stringThe base URL (blank: natural)
\ID_TEXTThe nameactual_rename_zone_lite(\ID_TEXT $zone, \ID_TEXT $new_zone, boolean $dont_bother_with_main_row = false)
| package | core |
|---|
\ID_TEXTThe old name of the zone
\ID_TEXTThe new name of the zone
booleanWhether 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 |
|---|
\IPThe IP address to ban
\LONG_TEXTExplanation for ban
\?TIMEWhen to ban until (null: no limit)
booleanWhether this is a positive ban (as opposed to a cached negative)
booleanWhether a change actually happenedadd_privilege(\ID_TEXT $section, \ID_TEXT $name, boolean $default= false, boolean $not_even_mods= false)
| package | core |
|---|
\ID_TEXTThe section the privilege is filled under
\ID_TEXTThe codename for the privilege
booleanWhether this permission is granted to all usergroups by default
booleanWhether 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_TEXTThe module name
booleanWhether to check non-bundled addons (ones without an addon_registry hook)
booleanWhether 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 |
|---|
resourceGD image resource
\~arrayEXIF details (false: could not load)
arrayA 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 |
|---|
\PATHThe path to the file we are copying.
\PATHThe target path.
booleanWhether world access is required for the copy.
afm_delete_directory(\PATH $basic_path, boolean $recursive = false)
| package | core |
|---|
\PATHThe path to and of the directory we are deleting.
booleanWhether 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 |
|---|
\PATHThe path to and of the directory we are making.
booleanWhether world access is required.
booleanWhether 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 |
|---|
\PATHThe path to the file we are making.
stringThe desired file contents.
booleanWhether world access is required.
afm_move(\PATH $basic_old_path, \PATH $basic_new_path)
| package | core |
|---|
\PATHThe path to the file we are moving from.
\PATHThe target path.
afm_read_file(\PATH $path) : string
| package | core |
|---|
\PATHThe path to the file we are reading.
stringThe contents of the file.afm_set_perms(\PATH $basic_path, boolean $world_access)
| package | core |
|---|
\PATHThe path of the file/directory we are setting permissions of.
booleanWhether world access is required.
append_content_select_for_id(array $select, array $cma_info, \?string $table_alias = null)
| package | core |
|---|
arrayThe ID
arrayThe info array for the content type
\?stringThe 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 |
|---|
stringThe data to hash (the password in actuality)
stringThe string converted member-ID in actuality, although this function is more general
stringThe hashed dataapply_tempcode_escaping(array $escaped, string $value) : string
| package | core |
|---|
arrayA list of escaping to do
stringThe string to apply the escapings to
stringOutput 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 |
|---|
arrayA list of escaping to do
stringThe string to apply the escapings to
stringOutput stringarray_count_recursive(array $arr) : integer
array_peek(array $array, integer $depth_down = 1) : mixed
| package | core |
|---|
arrayThe stack to peek in
integerThe depth into the stack we are peaking
mixedThe 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 |
mixedRefresh to this URL (URLPATH or Tempcode URL)
floatTake 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 |
|---|
arrayThe hooks info profile.
arrayThe URL component map (must contain 'page', 'type', and 'id' if this function is to do anything).
\ID_TEXTThe URL zone name (only used for Comcode Page URL monikers).
\?stringThe 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 |
|---|
\?PATHThe path to the ini file to open (null: given contents in $file instead)
\?stringThe contents of the file (null: the file needs opening)
arrayA map of the contents of the ini filesblock_cache_default(\ID_TEXT $codename) : \ID_TEXT
| package | core |
|---|
\ID_TEXTThe block name
\ID_TEXTThe default caching settingblock_installed(\ID_TEXT $block) : boolean
block_params_arr_to_str(array $map) : string
| package | core |
|---|
arrayThe parameters / acceptable parameter pattern
stringThe parameters / acceptable parameter pattern, as template safe parameterblock_params_str_to_arr(string $_map, boolean $block_symbol_style = false) : array
| package | core |
|---|
stringThe parameters / acceptable parameter pattern, as template safe parameter
booleanWhether to leave in block symbol style (i.e. like {$BLOCK} would take, a list not a map)
arrayThe 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 |
stringThe property code
booleanWhether there is a matchbuild_closure_function(string $myfunc, array $parts) : string
| package | core |
|---|
stringThe function name
arrayAn array of lines to be output, each one in PHP format
stringFinished PHP codebuild_closure_tempcode(integer $type, \ID_TEXT $name, \?array $parameters, \?array $escaping = null) : \Tempcode
| package | core |
|---|---|
| set | 0 2 |
integerThe type of symbol this is (TC_SYMBOL, TC_LANGUAGE_REFERENCE)
\ID_TEXTThe name of the symbol
\?arrayParameters to the symbol (null: none). In same format as expected by ecv.
\?arrayEscaping for the symbol (null: none)
\TempcodeTempcode object.build_content_where(string $content, boolean $boolean_search, string $boolean_operator, boolean $full_coverage = false) : array
| package | core |
|---|---|
| set | AND OR |
stringThe search content
booleanWhether it's a boolean search
stringBoolean operation to use
booleanWhether we can assume we require full coverage (i.e. not substring matches)
arrayA 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_TEXTThe page for the form to go to (blank: don't attach)
booleanWhether to keep all elements of the current URL represented in this form (rather than just the keep_ fields, and page)
\?arrayA list of parameters to exclude (null: don't exclude any)
\TempcodeThe builtup hidden form fieldsbuild_keep_post_fields(\?array $exclude = null) : \Tempcode
| package | core |
|---|
\?arrayA list of parameters to exclude (null: exclude none)
\TempcodeThe 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 |
|---|
arrayA 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_TEXTThe 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.
\?arrayVariables 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)
stringHash portion of the URL (blank: none). May or may not start '#' - code will put it on if needed
stringThe page-link.build_search_results_interface(array $results, integer $start, integer $max, string $direction, boolean $general_search = false) : \Tempcode
| package | core |
|---|---|
| set | ASC DESC |
arraySearch results
integerStart index
integerMaximum index
stringSort direction
booleanWhether this is a general search, rather than a search for a specific result-type (such as all members)
\TempcodeInterfacebuild_search_submitter_clauses(\?ID_TEXT $member_field_name, \?MEMBER $member_id, \ID_TEXT $author, \?ID_TEXT $author_field_name = null) : \?string
| package | core |
|---|
\?ID_TEXTThe field name for member IDs (null: Cannot match against member IDs)
\?MEMBERMember ID (null: Unknown, so cannot search)
\ID_TEXTAuthor
\?ID_TEXTThe field name for authors (null: Cannot match against member IDs)
\?stringAn 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 |
|---|
arrayA 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_TEXTThe 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.
\?arrayVariables 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)
booleanWhether to keep all non-skipped parameters that were in the current URL, in this URL
booleanWhether to avoid mod_rewrite (sometimes essential so we can assume the standard URL parameter addition scheme in templates)
booleanWhether to skip actually putting on keep_ parameters (rarely will this skipping be desirable)
stringHash portion of the URL (blank: none). May or may not start '#' - code will put it on if needed
\TempcodeThe 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 |
|---|
\MEMBERThe member going in the usergroup.
\GROUPThe usergroup.
integerThe number of minutes (may be negative to take time away).
booleanWhether 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 |
|---|
stringFunction to call
arrayArguments to call with
mixedThe 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 |
|---|
stringTitle to use for completion notification subject lines
\?TempcodeTitle to use if there is no queueing or a queue message (null: don't return a full screen)
\ID_TEXTThe task hook
\?arrayArguments for the task (null: no arguments)
booleanWhether to run the task at the end of the script (if it's not going to be put into the task queue)
booleanWhether to forcibly bypass the task queue (because we've determined somehow it will be a quick task)
booleanWhether to send a notification of the task having come out of the queue
\TempcodeUI (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 |
|---|
\MEMBERThe member ID.
\?stringThe IMAP server hostname (null: use configured).
\?integerThe IMAP port (null: use configured).
\?stringThe IMAP inbox identifier (null: use configured).
\?stringThe IMAP username (null: use configured).
\?stringThe IMAP password (null: use configured).
\?TIMELast bounce time (null: not bounced).can_static_cache() : boolean
can_try_mod_rewrite(boolean $avoid_remap = false) : boolean
| package | core |
|---|
booleanWhether 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.
booleanWhether 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 |
|---|
stringThe filename
booleanWhether to skip the server side security check
\?stringDelete this file if we have to exit (null: no file to delete)
booleanWhether to allow errors without dying
booleanSuccess statuscheck_input_field_string(string $name, string $val, \?boolean $posted = false)
| package | core |
|---|
stringThe name of the parameter
stringThe value retrieved
\?booleanWhether the parameter is a POST parameter (null: undetermined)
check_master_password(\SHORT_TEXT $password_given) : boolean
| package | core |
|---|
\SHORT_TEXTGiven master password
booleanWhether it is validcheck_memory_limit_for(\PATH $file_path, boolean $exit_on_error = true) : boolean
| package | core |
|---|
\PATHThe file path we are trying to load
booleanWhether to exit Composr if an error occurs
booleanSuccess 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_TEXTThe permission to require
\?arrayA list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
\?MEMBERMember to check for (null: current user)
\?ID_TEXTPage 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_TEXTThe RBL domain name/IP (HTTP:BL has a special syntax)
\IPThe IP address to lookup
booleanIf 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)
booleanWhether this is a page level check (i.e. we won't consider blocks or approval, just ban setting)
arrayPair: 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 |
|---|
booleanWhether this is a page level check (i.e. we won't consider blocks or approval, just ban setting)
\?IPIP 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 |
|---|
\?stringCheck this particular username that has just been supplied (null: none)
\?stringCheck 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 |
|---|
stringThe sentence to check
\?ID_TEXTThe 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)
booleanWhether to avoid dying on fully blocked words (useful if importing, for instance)
booleanWhether to try pattern matching (this takes more resources)
booleanWhether 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 |
stringThe XHTML to check
booleanDisplay XHTML output regardless of whether there was an error or not
integerWhether 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)
booleanWhether to return Tempcode
stringReturned 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 |
|---|
\TempcodeTitle for the form
booleanWhether to give a tip about edit order
booleanWhether to add an 'all' entry to the list
mixedThe UI (Tempcode) or the language to use (string/LANGUAGE_NAME)clean_file_size(integer $bytes) : string
| package | core |
|---|
integerThe number of bytes the file has
stringThe formatted-string file sizeclean_html_title(string $title) : string
| package | core |
|---|
stringThe relative (to Composr's base directory) path to the page (e.g. pages/comcode/EN/start.txt)
stringFixedcleanup_block_name(\ID_TEXT $block) : string
| package | core |
|---|
\ID_TEXTThe raw block codename
stringA nice human readable version of the namecleanup_date(string $date) : array
| package | core |
|---|
stringThe ISO date
arrayIf 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 |
|---|
stringThe code
arrayTemplate parameters
stringResultclosure_loop(array $param, array $args, string $main_function) : string
| package | core |
|---|
arrayThe template bound parameters
arrayThe loop directive parameters
stringThe loop execution function
stringResultclosure_while_loop(array $args, array $control_function, array $main_function) : string
| package | core |
|---|
arrayThe template bound parameters
arrayThe loop control function
arrayThe loop execution function
stringResultcms_get_temp_dir() : array
| package | core |
|---|
arrayA 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 |
|---|
stringThe input string.
integerThe maximum chunking length.
stringSplit character.
booleanWhether to force unicode as on.
stringThe chunked version of the input string.cms_mb_str_split(string $str, boolean $force = false) : array
| package | core |
|---|
stringInput.
booleanWhether to force unicode as on.
arrayOutput.cms_mb_strlen(string $in, boolean $force = false) : integer
| package | core |
|---|
stringThe string to get the length of.
booleanWhether to force unicode as on.
integerThe 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 |
|---|
stringThe subject.
integerThe start position.
\?integerThe length to extract (null: all remaining).
booleanWhether to force unicode as on.
\~stringString 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_TEXTIdentifier
\?stringLonger 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 |
|---|
stringThe variable name
stringThe variable value ('' means unknown)cms_strftime(string $format, \?TIME $timestamp = null) : string
| package | core |
|---|
stringThe formatting string.
\?TIMEThe timestamp (null: now). Assumed to already be timezone-shifted as required
stringThe formatted string.cms_tempnam(string $prefix) : \~string
| package | core |
|---|
stringThe prefix of the temporary file name.
\~stringThe name of the temporary file (false: error).cms_trim(string $text, boolean $try_hard = true) : string
| package | core |
|---|
stringInput text.
booleanWhether to keep doing it, while it changes (if complex mixtures are on the end).
stringThe result text.cms_url_decode_post_process(\URLPATH $url_part) : \URLPATH
cms_url_encode(\URLPATH $url_part, \?boolean $consider_rewrite = null) : \URLPATH
| package | core |
|---|
\URLPATHThe URL to encode
\?booleanWhether we have to consider mod_rewrite (null: don't know, look up)
\URLPATHThe encoded resultcms_url_encode_mini(\URLPATH $url_part, \?boolean $consider_rewrite = null) : \URLPATH
| package | core |
|---|
\URLPATHThe URL to encode
\?booleanWhether we have to consider mod_rewrite (null: don't know, look up)
\URLPATHThe 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 |
|---|
booleanWhether to only run the checks in dev-mode
cms_version() : integer
cms_version_minor() : string
| package | core |
|---|
stringThe 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 |
|---|
stringThe 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 |
|---|
stringThe key of our maps that reside in our map
arrayThe map of maps
arrayThe collapsed mapcollapse_2d_complexity(string $key, string $value, array $list) : array
| package | core |
|---|
stringThe key key of our maps that reside in our map
stringThe value key of our maps that reside in our map
arrayThe map of maps
arrayThe collapsed mapcomcode_lang_string(\ID_TEXT $lang_code) : \Tempcode
| package | core |
|---|
\ID_TEXTThe language string ID
\TempcodeThe parsed Comcodecomcode_to_clean_text(string $message_plain, boolean $for_extract= false, \?array $tags_to_preserve= null) : string
| package | core |
|---|
stringComcode text to change
booleanWhether this is for generating an extract that does not need to be fully comprehended (i.e. favour brevity)
\?arrayList of tags to preserve (null: none)
stringClean textcompare_ip_address(string $wild, \IP $full) : boolean
| package | core |
|---|
stringThe general IP address that is potentially wildcarded
\IPThe specific IP address we are checking
booleanWhether the IP addresses correlatecompare_ip_address_ip4(string $wild, array $full_parts) : boolean
| package | core |
|---|
stringThe general IP address that is potentially wildcarded
arrayThe exploded parts of the specific IP address we are checking
booleanWhether the IP addresses correlatecompare_ip_address_ip6(string $wild, array $full_parts) : boolean
| package | core |
|---|
stringThe general IP address that is potentially wildcarded
arrayThe exploded parts of the specific IP address we are checking
booleanWhether the IP addresses correlatecompile_template(string $data, \ID_TEXT $template_name, \ID_TEXT $theme, \ID_TEXT $lang, boolean $tolerate_errors = false) : array
| package | core |
|---|
stringThe template file contents
\ID_TEXTThe name of the template
\ID_TEXTThe name of the theme
\ID_TEXTThe language it is for
booleanWhether to tolerate errors
arrayA 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 |
|---|
\?arrayThe caches to rebuild (null: all)
\TempcodeAny messages returnedcompress_cms_stub_file(\PATH $stub_file)
config_option_url(\ID_TEXT $name) : \?URLPATH
| package | core |
|---|
\ID_TEXTThe config option name
\?URLPATHURL 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_TEXTThe old value
\SHORT_TEXTThe name value
\ID_TEXTThe type
content_get_details(\ID_TEXT $content_type, \ID_TEXT $content_id, boolean $resourcefs_style = false) : array
| package | core |
|---|
\ID_TEXTContent type
\ID_TEXTContent ID
booleanWhether to use the content API as resource-fs requires (may be slightly different)
arrayTuple: 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_TEXTThe content ID
arrayThe info array for the content type
\?arrayThe row (null: not found)content_validated(\ID_TEXT $content_type, \ID_TEXT $content_id) : boolean
| package | core |
|---|
\ID_TEXTContent type
\ID_TEXTContent ID
booleanWhether it is validatedconvert_bad_entities(string $data, string $charset = 'ISO-8859-1') : string
| package | core |
|---|
stringHTML to convert entities from
stringThe character set we are using for $data (both in and out)
stringValid 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_TEXTContent type type we know
\ID_TEXTContent type ID we know
\ID_TEXTDesired content type
\ID_TEXTCorrected 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_TEXTContent type type we know
\ID_TEXTContent type ID we know
arrayContent 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 |
|---|
booleanWhether 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 |
|---|
\URLPATHThe URL to the image to resize
\PATHThe file path (including filename) to where the resized image will be saved
integerThe maximum width we want our new image to be (-1 means "don't factor this in")
integerThe maximum height we want our new image to be (-1 means "don't factor this in")
integerThis 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)
booleanWhether to exit Composr if an error occurs
\?stringThe file extension to save with (null: same as our input file)
booleanWhether $from was in fact a path, not a URL
booleanWhether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\?arrayThis optional parameter allows us to specify cropping or padding for the image. See comments in the function. (null: no details passed)
booleanSuccessconvert_timezone_offset_to_formal_timezone(float $offset) : string
| package | core |
|---|
floatTimezone offset.
stringUsers timezone in "boring" format.convert_to_internal_encoding(string $data, \?string $input_charset= null, \?string $internal_charset= null) : string
| package | core |
|---|
stringData to convert.
\?stringCharset to convert from (null: that read by the last http_download_file call).
\?stringCharset to convert to (null: current encoding).
stringConverted data.convert_url_to_path(\URLPATH $url) : \?PATH
| package | core |
|---|
\URLPATHThe value to convert
\?PATHFile 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_TEXTThe page-link we are starting from.
booleanCreate from under this node, rather than at it.
\?ID_TEXTDefault selection (null: none).
\?arrayList of node types we will return/recurse-through (null: no limit)
\?arrayList of node types we will allow to be selectable (null: no limit)
integerCheck permissions according to this bitmask of possibilities (requiring all in the bitmask to be matched)
\?MEMBERThe member we are checking permissions for (null: current member)
booleanWhether 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
\?MEMBERThe 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
booleanWhether to produce selection IDs as a comma-separated list of all selectable sub-nodes.
\?mixedFilter function for limiting what rows will be included (null: none).
\TempcodeList.create_selection_list_lang_files(\?LANGUAGE_NAME $lang = null) : \Tempcode
| package | core |
|---|
\?LANGUAGE_NAMEThe language (null: uses the current language)
\TempcodeThe language file selectorcreate_selection_list_langs(\?LANGUAGE_NAME $select_lang= null, boolean $show_unset= false) : \Tempcode
| package | core |
|---|
\?LANGUAGE_NAMEThe language to have selected by default (null: uses the current language)
booleanWhether to show languages that have no language details currently defined for them
\TempcodeThe language selectorcreate_selection_list_zones(\?ID_TEXT $sel= null, \?array $no_go= null, \?array $reorder= null, \?TIME $updated_since= null) : \Tempcode
| package | core |
|---|
\?ID_TEXTThe zone in the list to select by default (null: use first)
\?arrayA list of zone to not put into the list (null: none to skip)
\?arrayA reordering (null: no reordering)
\?TIMETime from which content must be updated (null: no limit).
\TempcodeThe listcreate_session(\MEMBER $member, \BINARY $session_confirmed= 0, boolean $invisible= false) : \ID_TEXT
| package | core |
|---|---|
| sets_output_state |
\MEMBERLogged in member
\BINARYWhether the session should be considered confirmed
booleanWhether the session should be invisible
\ID_TEXTNew session IDcreate_zip_file(array $file_array, boolean $stream= false, boolean $get_offsets= false, \?PATH $outfile_path= null) : mixed
| package | core |
|---|
arrayA list of maps (time,data/full_path,name) covering everything to zip up
booleanWhether to stream the output direct to the browser
booleanWhether to return the tuple
\?PATHFile to spool into (null: none). $stream will be forced to false
mixedThe 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 |
|---|
stringThe error message code
\?stringRelayed additional details (null: nothing relayed)
booleanWhether 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_TEXTThe theme the file is being loaded for
\ID_TEXTThe theme the file is in
\ID_TEXTName of the CSS file
\PATHFull path to the CSS file
\PATHFull path to where the cached CSS file will go
booleanWhether to also do minification
css_enforce(string $c, \?ID_TEXT $theme= null, \?boolean $minify= null) : string
| package | core |
|---|
stringThe CSS file required
\?ID_TEXTThe name of the theme (null: current theme)
\?booleanWhether to minify (null: read from environment)
stringThe 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_TEXTSource CSS file
\ID_TEXTSource theme
\ID_TEXTDestination theme
\?ID_TEXTSeed (null: do not re-seed)
booleanWhether it is a dark theme
\ID_TEXTThe algorithm to use
stringThe sheetcss_minify(string $v) : string
| package | core |
|---|
stringStylesheet definitions as string
stringMinified stylesheet definitionscss_tempcode(boolean $inline= false, boolean $only_global= false, \?string $context= null, \?ID_TEXT $theme= null) : \Tempcode
| package | core |
|---|
booleanForce inline CSS
booleanOnly do global CSS
\?stringHTML context for which we filter (minimise) any CSS we spit out as inline (null: none)
\?ID_TEXTThe name of the theme (null: current theme)
\TempcodeThe 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 |
|---|
stringOur match string (assumes "?" has been stripped already)
booleanWhether to do a boolean full text search
stringPart 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 |
stringBoolean search string
stringBoolean operator to use
booleanWhether we can assume we require full coverage
arrayA 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 |
|---|
arrayDB table row.
arrayList of fields to copy through.
arrayMap of fields.db_string_equal_to(\ID_TEXT $attribute, string $compare) : string
| package | core |
|---|
\ID_TEXTThe attribute
stringThe comparison
stringThe SQLdb_string_not_equal_to(\ID_TEXT $attribute, string $compare) : string
| package | core |
|---|
\ID_TEXTThe attribute
stringThe comparison
stringThe SQLdecache(mixed $cached_for, \?array $identifier= null, \?MEMBER $member= null)
| package | core |
|---|
mixedThe 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)
\?arrayA map of identifiying characteristics (null: no identifying characteristics, decache all)
\?MEMBERMember 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 |
|---|
stringData to be decrypted
stringPassphrase to unlock the site's private key
stringDecrypted datadeldir_contents(\PATH $dir, boolean $default_preserve= false, boolean $just_files= false)
| package | core |
|---|
\PATHThe pathname to the directory to delete
booleanWhether to preserve files there by default
booleanWhether to just delete files
delete_cms_page(\ID_TEXT $zone, \ID_TEXT $page, \?ID_TEXT $type= null, boolean $use_afm= false)
| package | core |
|---|
\ID_TEXTThe zone
\ID_TEXTThe page
\?ID_TEXTThe page type (null: Comcode page in Composr's fallback language) [NB: page is deleted in all languages regardless of which is given]
booleanWhether to use the AFM
delete_config_option(\ID_TEXT $name)
delete_expired_sessions_or_recover(\?MEMBER $member = null) : \?AUTO_LINK
| package | core |
|---|
\?MEMBERUser to get a current session for (null: do not try, which guarantees a return result of NULL also)
\?AUTO_LINKThe session ID we rebound to (null: did not rebind)delete_lang(integer $id, \?object $connection = null)
| package | core |
|---|
integerThe ID
\?objectThe 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 |
|---|
stringThe path to the upload directory
\ID_TEXTThe table name
\ID_TEXTThe table field name
mixedThe table ID field name, or a map array
mixedThe table ID
\?stringThe 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 |
|---|
arrayDependent files (full file paths)
\TIMETime of cache file
booleanWhether decache is NOT neededdeshout_callback(array $matches) : string
destrictify(boolean $change_content_type= true, boolean $mysql_too= false)
| package | core |
|---|
booleanWhether to also set the content type to plain-HTML
booleanWhether 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_TEXTThe ID of the directive to use
mixedThe contents (Tempcode or string)
\?arrayDirective parameters (null: none)
\TempcodeA 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 |
|---|
stringThe data that was checked
arrayError information
booleanWhether we are opening up an XHTML-fragment in a preview box
booleanWhether to return Tempcode
stringReturned result (won't return it $ret is false)div(\Tempcode $tempcode, string $guid = '') : \Tempcode
| package | core |
|---|
\TempcodeThe Tempcode to put into a div
stringGUID for call
\TempcodeThe generated div with contentsdo_block(\ID_TEXT $codename, \?array $map= null, \?integer $ttl= null) : \Tempcode
| package | core |
|---|
\ID_TEXTThe block name
\?arrayThe block parameter map (null: no parameters)
\?integerThe TTL to use in minutes (null: block default)
\TempcodeThe 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 |
|---|
mixedPHP 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)
\?arrayThe block parameter map (null: no parameters)
\?LONG_TEXTThe 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_TEXTThe block name
\?arrayThe block parameter map (null: no parameters)
arrayA 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 |
|---|
\URLPATHThe URL to the image thumbnail
mixedThe caption for the thumbnail (string or Tempcode)
booleanWhether to use a JS tooltip. Forcibly set to true if you pass Tempcode
booleanWhether already a thumbnail (if not, function will make one)
\?integerThumbnail width to use (null: default)
\?integerThumbnail height to use (null: default)
booleanWhether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\TempcodeThe 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_TEXTThe language ID
\?mixedThe first token [string or Tempcode] (replaces {1}) (null: none)
\?mixedThe second token [string or Tempcode] (replaces {2}) (null: none)
\?mixedThe third token (replaces {3}). May be an array of [of string], to allow any number of additional args (null: none)
\?LANGUAGE_NAMEThe language to use (null: users language)
booleanWhether to cause Composr to exit if the lookup does not succeed
\?mixedThe 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_TEXTThe ID of the language string to use
\?mixedThe first token [string or Tempcode] (replaces {1}) (null: none)
\?mixedThe second token [string or Tempcode] (replaces {2}) (null: none)
\?mixedThe third token (replaces {3}). May be an array of [of string], to allow any number of additional args (null: none)
\TempcodeA 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_TEXTThe codename of the template being loaded
\?arrayA map of parameters for the template (key to value) (null: no parameters)
\?LANGUAGE_NAMEThe language to load the template in (templates can embed language references) (null: users own language)
booleanWhether to not produce a stack dump if the template is missing
\?ID_TEXTAlternate template to use if the primary one does not exist (null: none)
stringFile type suffix of template file (e.g. .tpl)
stringSubdirectory type to look in
\?ID_TEXTTheme to use (null: current theme)
\TempcodeThe 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 |
stringThe language to evaluate this symbol in (some symbols refer to language elements).
arrayArray of escaping operations.
integerThe type of symbol this is (TC_SYMBOL, TC_LANGUAGE_REFERENCE)
\ID_TEXTThe name of the symbol
arrayParameters 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.
mixedThe 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_TEXTThe name of the parameter to get
\?mixedThe 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)
\?integerThe 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_TEXTThe name of the parameter to get
\?mixedThe default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
\?stringThe 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 |
|---|
stringData to be encrypted
stringEncrypted data, with magic markerenforce_personal_access(\MEMBER $member_id, \?ID_TEXT $permission= null, \?ID_TEXT $permission2= null, \?MEMBER $member_viewing= null)
| package | core |
|---|
\MEMBERThe member who typically (i.e. when it's not an administrative override) we want the current member to be.
\?ID_TEXTThe override permission the current member must have (null: no general override).
\?ID_TEXTAn alternative permission to the 'assume_any_member' permission (null: no override).
\?MEMBERThe 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 |
|---|
\URLPATHThe URL to enforce results in session persistence for the user
\URLPATHThe 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 |
|---|
\URLPATHThe full URL to the image which will-be/is thumbnailed
\URLPATHThe URL to the thumbnail (blank: no thumbnail yet)
\ID_TEXTThe directory, relative to the Composr install's uploads directory, where the thumbnails are stored. MINUS "_thumbs"
\ID_TEXTThe name of the table that is storing what we are doing the thumbnail for
\AUTO_LINKThe ID of the table record that is storing what we are doing the thumbnail for
\ID_TEXTThe name of the table field where thumbnails are saved
\?integerThe thumbnail width to use (null: default)
booleanWhether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\URLPATHThe URL to the thumbnailentity_utf8_decode(string $data, string $internal_charset) : \~string
| package | core |
|---|
stringData to convert.
stringCharset to convert to.
\~stringConverted data (false: could not convert).erase_cached_templates(boolean $preserve_some = false)
| package | core |
|---|
booleanWhether 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 |
arrayThe field details
integerWe're processing for the ith row
\ID_TEXTTable type
\?stringSearch term (null: lookup from environment)
\?arrayTuple 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 |
|---|
\?arrayList of tables to export (null: all tables except those skippable)
stringExported data in XML formatextract_content_str_id_from_data(array $data, array $cma_info) : \ID_TEXT
| package | core |
|---|
arrayThe data row
arrayThe info array for the content type
\ID_TEXTThe 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 |
|---|
\PATHThe path to the module (or any PHP file with a class)
arrayArray of functions to be executing
\?arrayA list of parameters to pass to our functions (null: none)
booleanWhether to do this "properly" (via proper OOP), which will consume more memory
\?stringClass name to use (null: autodetect, which is a little slower)
arrayA 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_TEXTThe zone it is in
\ID_TEXTThe page name
arrayArray of functions to be executing
\?arrayA list of parameters to pass to our functions (null: none)
arrayA 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 |
|---|
\PATHThe path to the module
\?arrayA 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_NAMEThe fallback languagefatal_exit(mixed $text) : mixed
It also adds an entry to the error log, for reference.
| package | core |
|---|
mixedThe error message (string or Tempcode)
mixedNever returns (i.e. exits)file_size_to_tar_block_size(integer $size) : integer
| package | core |
|---|
integerThe file size of a file that would be inside the TAR archive
integerThe 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_TEXTCSS file
\?ID_TEXTTheme (null: default)
string(X) HTML context under which CSS is filtered
stringFiltered CSSfilter_form_field_default(string $name, \?string $val) : string
| package | core |
|---|
stringThe name of the parameter
\?stringThe current value of the parameter (null: none)
stringThe filtered value of the parameterfilter_group_permissivity(array $groups) : array
| package | core |
|---|
arrayList of groups to filter
arrayList 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 |
|---|
stringString to test
booleanWhether to just filter out the naughtyness
stringSame as input stringfilter_naughty_harsh(string $in, boolean $preg = false) : string
| package | core |
|---|
stringString to test
booleanWhether to just filter out the naughtyness
stringSame as input stringfiltercode_to_sql(object $db, array $filters, \ID_TEXT $content_type= '', string $context= '', string $table_join_code= 'r') : array
| package | core |
|---|
objectDatabase object to use
arrayParsed Filtercode structure
\ID_TEXTThe content type (blank: no function needed, direct in-table mapping always works)
stringFirst 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
stringWhat MySQL will join the table with
arrayTuple: 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_TEXTThe type of hook
\ID_TEXTThe hook class to find hook implementations for (e.g. the name of a module)
arrayA map of hook implementation name to [sources|sources_custom]find_all_langs(boolean $even_empty_langs = false) : array
| package | core |
|---|
booleanWhether to even find empty languages
arrayThe installed languages (map, lang=>type)find_all_modules(\ID_TEXT $zone) : array
| package | core |
|---|
\ID_TEXTThe zone name
arrayA 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_TEXTThe zone name
\ID_TEXTThe page type
stringThe file extension to limit us to (without a dot)
booleanWhether to leave file extensions on the page name
\?TIMEOnly show pages newer than (null: no restriction)
integerSelection algorithm constant
arrayA 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_TEXTThe zone name
booleanWhether to leave file extensions on the page name
booleanWhether to take transparent redirects into account
integerSelection algorithm constant
\?ID_TEXTPage type to show (null: all)
arrayA 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 |
|---|
booleanWhether to search the file system and return zones that might not be fully in the system (otherwise will just use the database)
booleanWhether to get titles for the zones as well. Only if !$search
booleanWhether to insist on getting all zones without $start/$max parameters (there could be thousands in theory...)
integerStart position to get results from (ignored if $force_all is on)
integerMaximum zones to get
arrayA list of zone names / a list of quartets (name, title, default page, zone row)find_cache_on(\ID_TEXT $codename) : \?array
| package | core |
|---|
\ID_TEXTThe codename of what will be checked for caching
\?arrayThe cached result (null: no cached result)find_id_moniker(array $url_parts, \ID_TEXT $zone) : \?string
| package | core |
|---|
arrayThe URL component map (must contain 'page', 'type', and 'id' if this function is to do anything).
\ID_TEXTThe URL zone name (only used for Comcode Page URL monikers).
\?stringThe moniker ID (null: could not find)find_id_via_url_moniker(\ID_TEXT $content_type, \SHORT_TEXT $url_moniker) : \?ID_TEXT
| package | core |
|---|
\ID_TEXTThe content type.
\SHORT_TEXTThe URL moniker.
\?ID_TEXTThe ID (null: not found).find_lang_content_names(array $ids) : array
| package | core |
|---|
arrayThe language IDs (array of AUTO_LINK)
arrayHuman 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 |
|---|
stringThe IMAP server hostname.
integerThe IMAP port.
stringThe IMAP inbox identifier.
stringThe IMAP username.
stringThe IMAP password.
\?TIMEOnly 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.
arrayBounces (a map between email address and details of the bounce).find_mail_folders(string $server, integer $port, string $username, string $password) : array
| package | core |
|---|
stringThe IMAP server hostname.
integerThe IMAP port.
stringThe IMAP username.
stringThe IMAP password.
arrayMap 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 |
stringThe codename of the needed script
booleanWhether to append keep variables
integerCode representing what base URL type to use (0=guess, 1=http, 2=https)
\URLPATHThe URL to the scriptfind_sitemap_object(\ID_TEXT $page_link) : \?array
| package | core |
|---|
\ID_TEXTThe page-link we are finding a Sitemap object for (blank: root).
\?arrayA 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_TEXTThe codename of the template being loaded
\?LANGUAGE_NAMEThe language to load the template in (templates can embed language references) (null: users own language)
\ID_TEXTThe theme to use
stringFile type suffix of template file (e.g. .tpl)
stringSubdirectory type to look in
booleanWhether to only search in the default templates
\?arrayList 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_TEXTThe codename of the current template item in the recursion
arrayThe template tree structure for children
booleanWhether the template tree came from a cache (if so, we can take some liberties with it's presentation)
booleanAs $fresh, except something underneath at any unknown point did come from the cache, so this must have by extension
stringHTML 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_TEXTThe theme image ID
booleanWhether to silently fail (i.e. not give out an error message when a theme image cannot be found)
booleanWhether to leave URLs as relative local URLs
\?ID_TEXTThe theme to search in (null: users current theme)
\?LANGUAGE_NAMEThe language to search for (null: users current language)
\?objectThe database to use (null: site database)
booleanWhether to only search the default 'images' filesystem
\URLPATHThe 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 |
|---|
stringInput string
booleanIf we know the input is meant to be unicode
stringGuaranteed 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 |
|---|
\URLPATHThe URL to fix
\URLPATHThe fixed URL (or original one if no fix was needed)flatten_slashed_array(array $array, boolean $already_stripped = false) : string
| package | core |
|---|
arrayArray to convert
booleanWhether PHP magic-quotes have already been cleaned out for the array
stringA humanely readable version of the array.float_format(float $val, integer $decs_wanted= 2, boolean $only_needed_decs= false) : string
| package | core |
|---|
floatThe value to format
integerThe number of fractional digits
booleanWhether to trim trailing zeros
stringNicely formatted stringfloat_to_raw_string(float $num, integer $decs_wanted= 2, boolean $only_needed_decs= false) : string
| package | core |
|---|
floatThe number
integerThe number of decimals to keep
booleanWhether to trim trailing zeros
stringThe 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 |
|---|
stringString-based search filter (blank: make one up to cover everything, but only works if $table is known)
\?arrayLabels for field names (null: none, use auto-generated)
\?ID_TEXTContent-type to auto-probe from (null: none, use string inputs)
\?arrayField types (null: none, use string inputs / defaults for table)
arrayThe form fields, The modded filter, Merger linksform_input_hidden(\ID_TEXT $name, string $value) : \Tempcode
| package | core |
|---|
\ID_TEXTThe name which this input field is for
stringThe value for this input field
\TempcodeThe input fieldform_input_list_entry(string $value, boolean $selected= false, mixed $text= '', boolean $red= false, boolean $disabled= false) : \Tempcode
| package | core |
|---|
stringThe value for this entry
booleanWhether 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)
mixedThe text associated with this choice (blank: just use name for text)
booleanWhether this entry will be put as red (marking it as important somehow)
booleanWhether this list entry is disabled (like a header in a list)
\TempcodeThe input fieldform_input_list_group(mixed $title, \Tempcode $entries) : \Tempcode
| package | core |
|---|
mixedThe title for the group
\TempcodeList entries for group
\TempcodeThe groupform_to_email(\?string $subject= null, string $intro= '', \?array $fields= null, \?string $to_email= null, string $outro= '', boolean $is_via_post= true)
| package | core |
|---|
\?stringThe subject of the email (null: from posted subject parameter).
stringThe intro text to the mail (blank: none).
\?arrayA map of fields to field titles to transmit. (null: all posted fields, except subject and email)
\?stringEmail address to send to (null: look from post environment / staff address).
stringThe outro text to the mail (blank: none).
booleanWhether $fields refers to some POSTed fields, as opposed to a direct field->value map.
foxy_utf8_to_nce(string $data = '') : string
| package | core |
|---|
stringInput text.
stringOutput 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 |
|---|
stringWhat was searched
arrayList of words searched
stringHighlighted portiongeolocate_ip(\?IP $ip = null) : \?string
| package | core |
|---|
\?IPThe IP to geolocate (null: current user's IP)
\?stringThe 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 |
|---|
\?booleanWhether to get the HTTPS base URL (null: do so only if the current page uses the HTTPS base URL)
\?ID_TEXTThe zone the link is for (null: root zone)
\URLPATHThe base-urlget_block_id(array $map) : \ID_TEXT
get_block_info_row(\ID_TEXT $codename, array $map) : \?array
| package | core |
|---|
\ID_TEXTThe block name
arrayThe block parameter map
\?arrayThe block info (null: cannot cache for some reason)get_block_parameters(\ID_TEXT $block) : array
| package | core |
|---|
\ID_TEXTThe name of the block to get parameters for
arrayA 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_TEXTThe codename to check for caching
\LONG_TEXTThe further restraints (a serialized map)
integerSpecial cache flags
integerThe TTL for the cache entry. Defaults to a very big ttl
booleanWhether we are caching Tempcode (needs special care)
booleanWhether 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)
\?arrayParameters to call up block with if we have to defer caching (null: none)
\?mixedThe 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_TEXTThe CPF name stem
\?MEMBERMember to lookup for (null: current member)
stringThe value (blank: has a blank value, or does not exist)get_comcode_page_editability_per_zone(\?MEMBER $member = null) : array
| package | core |
|---|
\?MEMBERThe member being checked for access (null: current member)
arrayA 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_TEXTThe Comcode page name to find
booleanWhether Composr should bomb out if the page was not found
\?ID_TEXTThe zone the Comcode page is in (null: missing)get_complex_base_url(\URLPATH $at) : \URLPATH
| package | core |
|---|
\URLPATHShort base URL we need to probe
\URLPATHThe appropriate base-urlget_content_object(\ID_TEXT $content_type) : \?object
| package | core |
|---|
\ID_TEXTThe content type
\?objectThe 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_TEXTThe ID
arrayThe info array for the content type
\?stringThe table alias (null: none)
arrayThe mappingget_custom_base_url(\?boolean $https = null) : \URLPATH
| package | core |
|---|
\?booleanWhether to get the HTTPS base URL (null: do so only if the current page uses the HTTPS base URL)
\URLPATHThe 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_TEXTThe name of the option
\?SHORT_TEXTThe 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 |
|---|
\PATHThe path to search
\PATHThe path we prepend to everything we find (intended to be used inside the recursion)
booleanWhether to also get special files
booleanWhether to recurse (if not, will return directories as files)
booleanWhether to get files (if not, will return directories as files)
arrayThe contents of the directoryget_directory_size(\PATH $path, boolean $recurse = true) : integer
| package | core |
|---|
\PATHThe path to search
booleanWhether to recurse (if not, will return directories as files)
integerThe 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_TEXTThe username
\SHORT_TEXTThe 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 |
|---|
\PATHThis is the path of the photo which may contain metadata
\?stringThis is the original filename of the photo which may contain metadata (null: derive from path)
arrayMap 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 |
|---|
\PATHThis is the path of the photo which may contain metadata
stringThis is the original filename of the photo which may contain metadata
stringWhichever caption is foundget_file_base() : \PATH
get_file_extension(string $name) : string
get_file_size(\URLPATH $url) : string
| package | core |
|---|
\URLPATHThe URL that the file size of is being worked out for. Should be local.
stringThe formatted-string file sizeget_forum_base_url(boolean $forum_base = false) : \URLPATH
| package | core |
|---|
booleanWhether 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?
\URLPATHThe installed forum base URLget_forum_type() : string
get_function_hash(string $code, string $function) : \SHORT_TEXT
| package | core |
|---|
stringThe code.
stringName of the function.
\SHORT_TEXTThe 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_TEXTThe stub of the parameter name (stub_year, stub_month, stub_day, stub_hour, stub_minute)
booleanWhether to allow over get parameters also
booleanWhether to do timezone conversion
\?TIMEThe 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_TEXTThe stub of the parameter name (stub_year, stub_month, stub_day, stub_hour, stub_minute)
\?integerDefault year (null: none)
\?integerDefault month (null: none)
\?integerDefault day (null: none)
booleanWhether to allow over get parameters also
arrayThe date/time componentsget_ip_address(integer $amount= 4, \?IP $ip= null) : \IP
| package | core |
|---|---|
| set | 1 2 3 4 |
integerThe number of groups to include in the IP address (rest will be replaced with *'s). For IP6, this is doubled.
\?IPIP address to use, normally left NULL (null: current user's)
\IPThe 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 |
|---|
\?MEMBERThe member ID (null: site default language, although better just to call get_site_default_lang directly)
\LANGUAGE_NAMEThe current languageget_lang_browser() : \?LANGUAGE_NAME
| package | core |
|---|
\?LANGUAGE_NAMEThe 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_NAMEThe language
\?ID_TEXTThe language file (null: all non-custom language files)
arrayThe language descriptionsget_lang_file_map(\LANGUAGE_NAME $lang, \ID_TEXT $file, boolean $non_custom = false) : array
| package | core |
|---|
\LANGUAGE_NAMEThe language
\ID_TEXTThe language file
booleanForce usage of original file
arrayThe language entriesget_lang_files(\?LANGUAGE_NAME $lang = null) : array
| package | core |
|---|
\?LANGUAGE_NAMEThe language (null: uses the current language)
arrayThe language filesget_lang_member(\MEMBER $member) : \?LANGUAGE_NAME
| package | core |
|---|
\MEMBERThe member ID
\?LANGUAGE_NAMEThe language used by the member (null: the language will not map)get_logo_url(\?ID_TEXT $zone_name = null) : \URLPATH
| package | core |
|---|
\?ID_TEXTThe zone being operated within (null: auto-detect)
\URLPATHThe 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 |
|---|
\?MEMBERMember we consider quota for (null: do not consider quota)
\?objectDatabase connection to get quota from (null: site DB)
integerThe 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 |
|---|
booleanWhether to just do a quick check, don't establish new sessions
\MEMBERThe 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_TEXTThe page they need to be viewing (null: environment current) (blank: blank't care)
\?ID_TEXTThe page-type they need to be viewing (null: environment current) (blank: don't care)
\?SHORT_TEXTThe type-id they need to be viewing (null: environment current) (blank: don't care)
booleanWhether this has to be done over the forum driver (multi site network)
\?arrayA 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_TEXTThe page they need to be viewing (null: don't care)
\?ID_TEXTThe page-type they need to be viewing (null: don't care)
\?SHORT_TEXTThe type-id they need to be viewing (null: don't care)
booleanWhether this has to be done over the forum driver (multi site network)
\?arrayA map of member-IDs to rows about them (null: Too many)get_mime_type(string $extension, boolean $as_admin) : string
| package | core |
|---|
stringThe file extension (no dot)
booleanWhether there are admin privileges, to render dangerous media types (client-side risk only)
stringThe 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_TEXTThe page name to find
\ID_TEXTThe type of the page we are looking for
\?stringThe special subcategorisation of page we are looking for (e.g. 'EN' for a Comcode page) (null: none)
stringThe file extension for the page type
booleanWhether Composr should bomb out if the page was not found
\?ID_TEXTThe 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_TEXTThe name of the option
booleanWhere to accept a missing option (and return NULL)
\?SHORT_TEXTThe 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 |
|---|
arrayList 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_TEXTThe zone the page is being loaded from
\ID_TEXTThe codename of the page
\TempcodeThe edit URL (blank if no edit access)
\TempcodeThe warningget_page_zone(\ID_TEXT $page_name, boolean $error = true) : \?ID_TEXT
| package | core |
|---|
\ID_TEXTThe page name to find
booleanWhether Composr should bomb out if the page was not found
\?ID_TEXTThe 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_TEXTThe name of the parameter to get
\?mixedThe 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)
booleanIf 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)
\?integerThe 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_TEXTThe name of the parameter to get
\?mixedThe default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
booleanWhether to skip the security check
\?stringThe parameter value (null: missing)get_rand_password() : string
get_remappings(\ID_TEXT $url_scheme) : array
| package | core |
|---|
\ID_TEXTThe URL scheme to use
arrayThe list of URL remappingsget_root_comcode_pages(\ID_TEXT $zone, boolean $include_zone = false) : array
| package | core |
|---|
\ID_TEXTThe zone to get for.
booleanUse page-links in the mapping rather than just page names.
arrayRoot 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 |
mixedThe title to use (usually, a language string code, see below)
booleanWhether the given title is actually a language string code, and hence gets dereferenced
\?arrayParameters sent to the language string (null: none)
\?TempcodeSeparate title to put into the 'currently viewing' data (null: use $title)
\?arrayAwards to say this has won (null: none)
booleanWhether to use this as metadata for the screen
\TempcodeThe 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_TEXTThe META type used by our content (null: Cannot support META search)
\?ID_TEXTThe name of the field that retrieved META IDs will relate to (null: Cannot support META search)
stringSearch string
booleanWhether to do a boolean search.
\ID_TEXTBoolean operator
booleanWhether to only do a META (tags) search
\ID_TEXTOrder direction
integerStart position in total results
integerMaximum results to return in total
booleanWhether to only search titles (as opposed to both titles and content)
\ID_TEXTThe table name
arrayThe 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
stringThe WHERE clause
stringThe WHERE clause that applies specifically for content (this will be duplicated to check against multiple fields). ? refers to the yet-unknown field name
\ID_TEXTWhat to order by
stringWhat to select
\?arrayThe non-translateable fields to search over (null: there are none)
\?stringThe permission module to check category access for (null: none)
\?stringThe field that specifies the permissions ID to check category access for (null: none)
booleanWhether the permissions field is a string
arrayThe 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 |
|---|
booleanWhether to evaluate the URL (so as we don't return Tempcode)
booleanWhether 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)
\?arrayA map of extra parameters for the URL (null: none)
booleanWhether 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)
booleanWhether to avoid mod_rewrite (sometimes essential so we can assume the standard URL parameter addition scheme in templates)
mixedThe 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 |
|---|
stringThe name of the template (based on the filename)
stringThe contents of the file (blank if it does not exist)get_templates_list() : array
| package | core |
|---|
arrayThe 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 |
|---|
arrayTimezone (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 |
|---|
\TIMEInput timestamp
booleanWhether to include the time in the output
booleanWhether to make this a verbose date (longer than usual)
booleanWhether to work in UTC time
booleanWhether contextual dates will be avoided
\?MEMBERMember for which the date is being rendered (null: current member)
stringFormatted timeget_timezoned_time(\TIME $timestamp, boolean $avoid_contextual_dates= false, \?MEMBER $member= null, boolean $utc_time= false) : string
| package | core |
|---|
\TIMEInput timestamp
booleanWhether contextual times will be avoided. Note that we don't currently use contextual (relative) times. This parameter may be used in the future.
\?MEMBERMember for which the time is being rendered (null: current member)
booleanWhether to work in UTC time
stringFormatted 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_TEXTThe table name
arrayThe table row. Must not have aspects of other tables in it (i.e. joins). Pre-filter using 'db_map_restrict' if required
\ID_TEXTThe field name
\?objectThe database connection to use (null: standard site connection)
\?LANGUAGE_NAMEThe language (null: uses the current language)
booleanWhether to force it to the specified language
booleanWhether to force as_admin, even if the lang string isn't stored against an admin (designed for Comcode page caching)
booleanWhether 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)
\?TempcodeThe 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_TEXTThe table name
arrayThe table row. Must not have aspects of other tables in it (i.e. joins). Pre-filter using 'db_map_restrict' if required
\ID_TEXTThe field name
\?objectThe database connection to use (null: standard site connection)
\?LANGUAGE_NAMEThe language (null: uses the current language)
booleanWhether to force it to the specified language
booleanWhether to force as_admin, even if the lang string isn't stored against an admin (designed for Comcode page caching)
booleanWhether 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)
\?TempcodeThe 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 |
|---|
mixedThe ID (if multi-lang-content on), or the string itself
\?objectThe database connection to use (null: standard site connection)
\?LANGUAGE_NAMEThe language (null: uses the current language)
booleanWhether to force it to the specified language
\?stringThe 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_LINKLanguage ID
\ID_TEXTThe element name
objectDatabase connection
stringXML (no root tag)get_tutorial_url(\ID_TEXT $tutorial) : \URLPATH
get_upload_filearray(\ID_TEXT $name, array $filearrays)
| package | core |
|---|
\ID_TEXTThe name of the HTTP file parameter storing the upload.
arrayWhere we are storing our file arrays.
get_upload_limit_config_url() : \?URLPATH
| package | core |
|---|
\?URLPATHThe 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_TEXTThe name of the POST parameter storing the URL (if '', then no POST parameter). Parameter value may be blank.
\ID_TEXTThe name of the HTTP file parameter storing the upload (if '', then no HTTP file parameter). No file necessarily is uploaded under this.
\ID_TEXTThe folder name where we will put this upload
integerWhether 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)
integerThe type of upload it is (bitmask, from CMSUPLOAD* constants)
booleanMake a thumbnail (this only makes sense, if it is an image)
\ID_TEXTThe name of the POST parameter storing the thumb URL. As before
\ID_TEXTThe name of the HTTP file parameter storing the thumb upload. As before
booleanWhether to copy a URL (if a URL) to the server, and return a local reference
booleanWhether to accept upload errors
booleanWhether to give a (deferred?) error if no file was given at all
booleanWhether to apply a 'never make the image bigger' rule for thumbnail creation (would affect very small images)
\?MEMBERMember ID to run permissions with (null: current member)
\?PATHFull path to upload folder, in case it is not relative to the base directory (null: work out)
\?PATHFull path to thumb folder, in case it is not relative to the base directory (null: work out)
\?stringFilename to use (null: choose one)
arrayAn 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 |
|---|
booleanWhether to use a longer online-time -- the session expiry-time
\?MEMBERWe 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
integerThe total online members, returned by reference
\?arrayDatabase rows (null: too many)get_users_timezone(\?MEMBER $member = null) : string
| package | core |
|---|
\?MEMBERMember for which the date is being rendered (null: current user)
stringUsers 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_TEXTThe name of the value
\?ID_TEXTValue to return if value not found (null: return NULL)
booleanWhether 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.
booleanWhether to also check server environmental variables. Only use if $elective_or_lengthy is set to false
\?SHORT_TEXTThe 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_TEXTThe name of the value
\TIMEThe cutoff time (an absolute time, not a relative "time ago")
booleanWhether 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_TEXTThe value (null: value newer than not found)get_version_branch(\?float $general = null) : string
| package | core |
|---|
\?floatGeneral version number (null: on disk version)
stringBranch version number (null: on disk version)get_version_components__from_dotted(string $dotted) : array
| package | core |
|---|
stringDotted version number
arrayTuple 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 |
|---|
\?integerMain version number (null: on disk version)
\?stringMinor version number (null: on disk version)
stringDotted 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 |
|---|
stringAny reasonable input
stringPretty 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 |
|---|
stringPretty version number
stringDotted version numberget_webservice_result(mixed $error_message) : \?string
| package | core |
|---|
mixedThe error message (string or Tempcode)
\?stringThe 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 |
|---|
booleanWhether the zone chooser will be shown inline to something else (as opposed to providing it's own borderings)
\?arrayA list of zone to not put into the list (null: none to skip)
\?arrayA reordering (null: no reordering)
\TempcodeThe 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_TEXTOne of this type has been submitted. By convention it is the language code of what was done, e.g. ADD_DOWNLOAD
\?MEMBERThe member to give the points to (null: give to current member)
\?stringA 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 "" |
\?TempcodeThe Tempcode to put into a nice frame (null: support output streaming mode)
\?mixed'Additional' message (null: none)
stringThe type of special message
booleanWhether to include the header/footer/panels
\TempcodeStandalone pagehandle_active_login(\ID_TEXT $username)
handle_has_checked_recently(\ID_TEXT $id_code) : boolean
| package | core |
|---|
\ID_TEXTSpecial check code (often a URL but does not need to be).
booleanWhether 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 |
|---|
\IPIP address
floatConfidence level (0.0 to 1.0)
\ID_TEXTIdentifier for whatever did the blocking
booleanWhether 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 |
|---|
stringThe 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 |
|---|
stringThe 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 |
|---|
\?MEMBERThe member being checked whether to have the access (null: current member)
\?ID_TEXTThe ID code for the page being checked (null: current page)
\?ID_TEXTThe ID code for the zone being checked (null: search)
\?arrayA list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
\?mixedEither the ID code of a privilege, an array of alternatives that are acceptable (null: none required)
booleanWhether the member has zone and page accesshas_caching_for(string $type) : boolean
| package | core |
|---|---|
| set | block lang comcode_page template |
stringCache type
booleanWhether it has the cachinghas_category_access(\MEMBER $member, \ID_TEXT $module, \ID_TEXT $category) : boolean
| package | core |
|---|
\MEMBERThe member being checked whether to have the access
\ID_TEXTThe ID code for the module being checked for category access
\ID_TEXTThe ID code for the category being checked for access (often, a number cast to a string)
booleanWhether 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 |
|---|
booleanWhether 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 |
|---|
\MEMBERThe member being checked whether to have the access
\ID_TEXTThe ID code for the page being checked
\ID_TEXTThe ID code for the zone being checked
booleanWhether we want to check we have access to the CURRENT page, using any match-key permissions
booleanWhether the member has page accesshas_privilege(\MEMBER $member, \ID_TEXT $permission, \?ID_TEXT $page= null, \?mixed $cats= null) : boolean
| package | core |
|---|
\MEMBERThe member being checked whether to have the permission
\ID_TEXTThe ID code for the permission being checked for
\?ID_TEXTThe ID code for the page being checked (null: current page)
\?mixedA 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)
booleanWhether the member has the permissionhas_privilege_group(\GROUP $group_id, \ID_TEXT $permission, \?ID_TEXT $page= null, \?array $cats= null) : boolean
| package | core |
|---|
\GROUPThe being checked whether to have the permission
\ID_TEXTThe ID code for the permission being checked for
\?ID_TEXTThe ID code for the page being checked (null: current page)
\?arrayA list of cat details to require access to (c-type-1,c-id-1,c-type-2,c-d-2,...) (null: N/A)
booleanWhether 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 |
|---|
\MEMBERThe member being checked whether to have the permission
\ID_TEXTThe ID code for the permission being checked for
\?ID_TEXTThe ID code for the page being checked (null: current page)
\ID_TEXTThe ID code for the permission module being checked for
booleanWhether the member has the permissionhas_zone_access(\MEMBER $member, \ID_TEXT $zone) : boolean
| package | core |
|---|
\MEMBERThe member being checked whether to have the access
\ID_TEXTThe ID code for the zone being checked
booleanWhether 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 |
\URLPATHThe URL to download
\?integerThe number of bytes to download. This is not a guarantee, it is a minimum (null: all bytes)
booleanWhether to throw a Composr error, on error
booleanWhether to block redirects (returns NULL when found)
stringThe user-agent to identify as
\?arrayAn optional array of POST parameters to send; if this is NULL, a GET request is used (null: none)
\?arrayAn 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)
\?resourceFile handle to write to (null: do not do that)
\?stringThe HTTP referer (null: none)
\?arrayA pair: authentication username and password (null: none)
floatThe timeout
booleanWhether to treat the POST parameters as a raw POST (rather than using MIME)
\?arrayFiles to send. Map between field to file path (null: none)
\?arrayExtra headers to send (null: none)
\?stringHTTP verb (null: auto-decide based on other parameters)
stringThe content type to use if a raw HTTP post
\?stringThe 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 |
|---|
mixedThe URL to put in the hyperlink (URLPATH or Tempcode)
mixedThe hyperlinks caption (either Tempcode or string)
booleanWhether the link is an external one (by default, the external template makes it open in a new window)
booleanWhether to escape the hyperlink caption (only applies if it is not passed as Tempcode)
mixedLink title (either Tempcode or string) (blank: none)
\?stringThe access key to use (null: none)
\?TempcodeData to post (null: an ordinary link)
\?stringRel (link type) (null: no special type)
\?ID_TEXTOpen in overlay with the default link/form target being as follows (e.g. _top or _self) (null: an ordinary link)
\TempcodeThe 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 |
|---|
integerBitmask of declarations (IUNDERSTAND* constants).
import_from_xml(string $xml_data, boolean $delete_missing_rows = false) : array
| package | core |
|---|
stringData in XML format
booleanSynchronise deletes as well as inserts/updates
arrayList of operations performedimproperly_filled_in(string $name, \?boolean $posted, array $array)
| package | core |
|---|
stringThe name of the parameter
\?booleanWhether the parameter is a POST parameter (null: undetermined)
arrayThe 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 |
|---|
arrayA map of POST data in search-form style. May contain 'only_titles', 'content' (the critical one!) and 'conjunctive_operator'
stringThe title to try and match
\?stringThe post to try and match (null: not used)
booleanWhether we have a matchin_safe_mode() : boolean
inform_exit(mixed $text, \?boolean $support_match_key_messages = null) : mixed
| package | core |
|---|
mixedThe error message (string or Tempcode)
\?booleanWhether match key messages / redirects should be supported (null: detect)
mixedNever 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 |
|---|
\TempcodeThe title of the info page
mixedThe text to put on the info page (string, or language-Tempcode)
booleanWhether match key messages / redirects should be supported
\?TempcodeURL to have back button to (null: none)
\?TempcodeFields to carry with on back button (null: none)
\TempcodeThe info pageinitialise_special_page_types(\ID_TEXT $special_page_type)
| package | core |
|---|---|
| set | query templates tree lang |
\ID_TEXTThe special page type.
inject_action_spamcheck(\?string $username= null, \?string $email= null)
| package | core |
|---|
\?stringCheck this particular username that has just been supplied (null: none)
\?stringCheck this particular email address that has just been supplied (null: none)
inline_language_editing(\ID_TEXT $codename, \?LANGUAGE_NAME $lang)
| package | core |
|---|
\ID_TEXTThe language ID
\?LANGUAGE_NAMEThe 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 |
|---|
stringThe code.
stringName of the function.
stringThe command we're searching to insert by.
stringCode to insert.
integerWe 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).
booleanSuccess status.insert_code_after__by_linenum(string $code, string $function, integer $linenum, string $newcode) : boolean
| package | core |
|---|
stringThe code.
stringName of the function.
integerLine number relative to start of function.
stringCode to insert.
booleanSuccess status.insert_code_before__by_command(string $code, string $function, string $command, string $newcode, integer $instance_of_command = 1) : boolean
| package | core |
|---|
stringThe code.
stringName of the function.
stringThe command we're searching to insert by.
stringCode to insert.
integerWe 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).
booleanSuccess status.insert_code_before__by_linenum(string $code, string $function, integer $linenum, string $newcode) : boolean
| package | core |
|---|
stringThe code.
stringName of the function.
integerLine number relative to start of function.
stringCode to insert.
booleanSuccess 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_TEXTThe field name
stringThe text
integerThe level of importance this language string holds
\?objectThe database connection to use (null: standard site connection)
booleanWhether it is to be parsed as Comcode
\?integerThe ID to use for the language entry (null: work out next available)
\?LANGUAGE_NAMEThe language (null: uses the current language)
booleanWhether to insert it as an admin (any Comcode parsing will be carried out with admin privileges)
\?stringThe 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)
\?stringAssembled Tempcode portion (null: work it out)
\?integerComcode parser wrap position (null: no wrapping)
booleanWhether to generate a fatal error if there is invalid Comcode
booleanWhether we are saving as a 'volatile' file extension (used in the XML DB driver, to mark things as being non-syndicated to subversion)
arrayThe 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_TEXTThe field name
stringThe text
integerThe level of importance this language string holds
\?objectThe database connection to use (null: standard site connection)
booleanWhether to insert it as an admin (any Comcode parsing will be carried out with admin privileges)
\?stringThe 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)
\?integerComcode parser wrap position (null: no wrapping)
booleanWhether to generate a fatal error if there is invalid Comcode
booleanWhether we are saving as a 'volatile' file extension (used in the XML DB driver, to mark things as being non-syndicated to subversion)
arrayThe language ID save fieldsinsert_lang_xml(\ID_TEXT $field_name, string $xml_data) : array
| package | core |
|---|
\ID_TEXTThe field name
stringXML (with root tag), or just flat text if multi-lang-content is not on
arrayThe 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 |
|---|
stringThe IP address to check for banning (potentially encoded with *'s)
booleanForce check via database
booleanHandle 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.
\?booleanWhether the IP address is banned (null: unknown)ip_cidr_check(\IP $ip, \SHORT_TEXT $cidr) : boolean
| package | core |
|---|
\IPIP address
\SHORT_TEXTCIDR range (e.g. 204.93.240.0/24)
booleanWhether it isis_alphanumeric(string $string, boolean $strict = false) : boolean
| package | core |
|---|
stringThe string to test
booleanWhether to do stricter sanitisation
booleanWhether the string is alphanumeric or notis_ascii_string(string $x) : boolean
is_audio(string $name, boolean $as_admin) : boolean
| package | core |
|---|
stringA URL or file path to the video
booleanWhether there are admin privileges, to render dangerous media types (client-side risk only)
booleanWhether the string pointed to a file appeared to be an audio fileis_browser_decaching() : boolean
| package | core |
|---|
booleanWhether 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 |
|---|
stringThe string to test (Note: This is typed string, not e-mail, because it has to function on failure + we could make an infinite loop)
booleanWhether 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 |
|---|
\?MEMBERMember ID to check (null: current user)
booleanWhether to just do a quick check, don't establish new sessions
booleanWhether the current member is a guestis_httpauth_login() : boolean
is_image(string $name, boolean $mime_too = false) : boolean
| package | core |
|---|
stringA URL or file path to the image
booleanWhether to check mime too
booleanWhether 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 |
|---|
\EMAILThe email address.
\?stringThe IMAP server hostname (null: use configured).
\?integerThe IMAP port (null: use configured).
\?stringThe IMAP inbox identifier (null: use configured).
\?stringThe IMAP username (null: use configured).
\?stringThe IMAP password (null: use configured).
\?TIMELast bounce time (null: not bounced).is_media(string $name, boolean $as_admin) : boolean
| package | core |
|---|
stringA URL or file path to the video
booleanWhether there are admin privileges, to render dangerous media types (client-side risk only)
booleanWhether the string pointed to a file appeared to be an audio fileis_mobile(\?string $user_agent= null, boolean $truth= false) : boolean
| package | core |
|---|
\?stringThe user agent (null: get from environment, current user's browser)
booleanWhether to always tell the truth (even if the current page does not have mobile support)
booleanWhether the user is using a mobile deviceis_on_multi_site_network(\?object $db = null) : boolean
| package | core |
|---|
\?objectThe DB connection to check against (null: main active site database)
booleanWhether 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_TEXTThe zone the page is in
\ID_TEXTThe page codename
booleanWhether the page is to run across an HTTPS connectionis_plupload(boolean $fake_prepopulation = false) : boolean
| package | core |
|---|
booleanSimulate population of the $_FILES array.
booleanWhether an plupload upload has just happened.is_saveable_image(string $name) : boolean
| package | core |
|---|
stringA URL or file path to the image
booleanWhether 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 |
|---|
stringA URL or file path to the video
booleanWhether there are admin privileges, to render dangerous media types (client-side risk only)
booleanWhether it really must be an actual video/audio, not some other kind of rich media which we may render in a video spot
booleanWhether 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 |
|---|
stringThe javascript file required
\?ID_TEXTThe name of the theme (null: current theme)
\?booleanWhether to minify (null: read from environment)
stringThe path to the javascript file in the cache (blank: no file)javascript_tempcode(\?string $position = null) : \Tempcode
| package | core |
|---|---|
| set | NULL header footer |
\?stringPosition to get JavaScript for (null: all positions)
\TempcodeThe Tempcode to tie in the JavaScript filesjs_compile(\ID_TEXT $j, \PATH $js_cache_path, boolean $minify = true)
| package | core |
|---|
\ID_TEXTName of the JS file
\PATHFull path to the JS file
booleanWhether to also do minification
js_minify(string $js) : string
keep_symbol(array $param) : string
| package | core |
|---|
arrayParameters 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)
stringThe 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_TEXTThe field name
\ID_TEXTThe language codename
booleanWhether the given codes value is to be parsed as Comcode
integerThe level of importance this language string holds
arrayThe 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_TEXTThe field name
mixedThe ID (if multi-lang-content on), or the string itself
stringThe text to remap to
\?objectThe database connection to use (null: standard site connection)
booleanWhether it is to be parsed as Comcode
\?stringThe 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)
\?MEMBERThe member that owns the content this is for (null: current member)
booleanWhether to generate Comcode as arbitrary admin
booleanWhether to backup the language string before changing it
arrayThe 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_TEXTThe field name
mixedThe ID (if multi-lang-content on), or the string itself
stringThe text to remap to
\?objectThe database connection to use (null: standard site connection)
\?stringThe 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)
\?MEMBERThe member that owns the content this is for (null: current member)
booleanWhether to generate Comcode as arbitrary admin
arrayThe language ID save fieldslist_to_map(string $map_value, array $list) : array
| package | core |
|---|
stringThe key key of our maps that reside in our map
arrayThe list of maps
arrayThe 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 |
|---|
\PATHThe relative (to Composr's base directory) path to the page (e.g. pages/comcode/EN/start.txt)
\ID_TEXTThe zone the page is being loaded from
\ID_TEXTThe codename of the page
\?PATHThe file base to load from (null: standard)
booleanWhether the page is being included from another
\?objectSemi-filled output template (null: definitely not doing output streaming)
\TempcodeThe pageload_comcode_page_from_cache(\ID_TEXT $codename, \ID_TEXT $zone, \ID_TEXT $theme) : array
| package | core |
|---|
\ID_TEXTThe codename of the page
\ID_TEXTThe zone the page is being loaded from
\ID_TEXTThe theme
arrayThe page rowload_field_restrictions(\?string $this_page= null, \?string $this_type= null) : array
| package | core |
|---|
\?stringThe page name scoped for (null: current page)
\?stringThe page type scoped for (null: current type)
arrayList 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 |
|---|
\PATHThe relative (to Composrs base directory) path to the HTML page
\?PATHThe file base to load from (null: standard)
\?objectSemi-filled output template (null: definitely not doing output streaming)
stringThe pageload_minimodule_page(\PATH $string, \?object $out = null) : \Tempcode
The module result is returned.
| package | core |
|---|
\PATHThe relative path to the module file
\?objectSemi-filled output template (null: definitely not doing output streaming)
\TempcodeThe result of executing the moduleload_module_page(\PATH $string, \ID_TEXT $codename, \?object $out = null) : \Tempcode
The module result is returned.
| package | core |
|---|
\PATHThe relative path to the module file
\ID_TEXTThe page name to load
\?objectSemi-filled output template (null: definitely not doing output streaming)
\TempcodeThe result of executing the moduleload_theme_image_cache(object $db, \ID_TEXT $site, \ID_TEXT $true_theme, \LANGUAGE_NAME $true_lang)
| package | core |
|---|
objectThe database to load from (used for theme images running across multi-site-networks)
\ID_TEXTThe internal name of the database to load from (used for theme images running across multi-site-networks)
\ID_TEXTTheme0
\LANGUAGE_NAMELanguage
load_zone_data() : \ID_TEXT
| package | core |
|---|
\ID_TEXTThe "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 |
|---|
stringTainted string
stringFiltered 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_TEXTThe reason for the hack attack. This has to be a language string codename
\SHORT_TEXTA parameter for the hack attack language string (this should be based on a unique ID, preferably)
\SHORT_TEXTA more illustrative parameter, which may be anything (e.g. a title)
booleanWhether to silently log the hack rather than also exiting
booleanWhether a ban should be immediate
mixedNever returns (i.e. exits)log_it(\ID_TEXT $type, \?SHORT_TEXT $a= null, \?SHORT_TEXT $b= null)
| package | core |
|---|
\ID_TEXTThe type of activity just carried out (a lang string)
\?SHORT_TEXTThe most important parameter of the activity (e.g. id) (null: none)
\?SHORT_TEXTA secondary (perhaps, human readable) parameter of the activity (e.g. caption) (null: none)
log_stats(string $string, integer $pg_time)
| package | core |
|---|
stringThe string to the page file
integerThe time taken for page loading in milliseconds
looks_like_url(string $value, boolean $lax = false) : boolean
| package | core |
|---|
stringThe value to check
booleanWhether to be a bit lax in the check
booleanWhether the value appears to be a URLlookup_language_full_name(\LANGUAGE_NAME $code) : string
| package | core |
|---|
\LANGUAGE_NAMEThe language
stringThe 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 |
|---|
\PATHThe 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 |
stringThe subject of the mail in plain text
\LONG_TEXTThe message, as Comcode
\?arrayThe destination (recipient) e-mail addresses [array of strings] (null: site staff address)
\?mixedThe recipient name. Array or string. (null: site name)
\EMAILThe from address (blank: site staff address)
stringThe from name (blank: site name)
integerThe message priority (1=urgent, 3=normal, 5=low)
\?arrayAn list of attachments (each attachment being a map, path=>filename) (null: none)
booleanWhether to NOT CC to the CC address
\?MEMBERConvert Comcode->tempcode as this member (a privilege thing: we don't want people being able to use admin rights by default!) (null: guest)
booleanReplace above with arbitrary admin
booleanHTML-only
booleanWhether to bypass queueing, because this code is running as a part of the queue management tools
\ID_TEXTThe template used to show the email
\?booleanWhether to bypass queueing (null: auto-decide)
\?arrayExtra CC addresses to use (null: none)
\?arrayExtra BCC addresses to use (null: none)
\?TIMEImplement the Require-Recipient-Valid-Since header (null: no restriction)
\?TempcodeA 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 |
|---|
arrayList of maps, each map representing a row
\ID_TEXTFilename to output
booleanWhether to output CSV headers
booleanWhether to output/exit when we're done instead of return
\?PATHFile to spool into (null: none)
stringCSV 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_TEXTContent type
mixedContent ID
mixedContent title (either unescaped string, or Compiled Comcode [i.e. Tempcode])
\TempcodeInline 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 |
|---|
objectTempcode object
objectTempcode object (no longer cache safe)manualproc_mail(string $to, string $subject, string $message, string $additional_headers, string $additional_flags = '') : boolean
| package | core |
|---|
stringThe TO address.
stringThe subject.
stringThe message.
stringAdditional headers.
stringAdditional stuff to send to sendmail executable (if appropriate, only works when safe mode is off).
booleanSuccess status.mass_delete_lang(\ID_TEXT $table, array $attrs, \?object $connection)
| package | core |
|---|
\ID_TEXTThe table
arrayThe attributes
\?objectThe 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 |
|---|
mixedMatch keys (comma-separated list of match-keys, or array of)
booleanCheck against POSTed data too
\?arrayParameters to check against (null: get from environment GET/POST) - if set, $support_post is ignored)
\?ID_TEXTCurrent zone name (null: get from environment)
\?ID_TEXTCurrent page name (null: get from environment)
booleanWhether 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 |
|---|
\MEMBERUser to check
\ID_TEXTContent type
\ID_TEXTContent ID
\ID_TEXTContent type type
booleanWhether there is permissionme_debug(\IP $ip, mixed $data)
member_blocked(\MEMBER $member_id, \?MEMBER $member_blocker = null) : boolean
| package | core |
|---|
\MEMBERThe member being checked
\?MEMBERThe member who may be blocking (null: current member)
booleanWhether the member is blockedmember_is_online(\MEMBER $member_id) : boolean
| package | core |
|---|
\MEMBERThe member to check
booleanWhether they are onlinemember_personal_links_and_details(\MEMBER $member_id) : array
| package | core |
|---|
\MEMBERA member ID
arrayA 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_TEXTWhere this parameter is referenced, in a slash-combined reference form
stringAlways ""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 |
arrayThe field details
integerWe're processing for the ith row
\ID_TEXTTable type
\?stringSearch term (null: lookup from environment)
\?arrayTuple 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 |
|---|
\IPThe IP address to normalise
\?integerAmount to mask out (null: do not)
\IPThe 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_TEXTThe page-link
\?TIMEThe add time (null: unknown)
\?TIMEThe edit time (null: same as add time)
floatThe sitemap priority, a SITEMAPIMPORTANCE* constant
\ID_TEXTThe refresh frequency
booleanWhether 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_TEXTThe page-link
notify_sitemap_node_edit(\SHORT_TEXT $page_link, boolean $guest_access)
| package | core |
|---|
\SHORT_TEXTThe page-link
booleanWhether 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 |
|---|
stringThe e-mail address to obfuscate
stringThe obfuscated versionobfuscate_entities(string $val) : string
object_factory(string $class, boolean $failure_ok = false) : \?object
| package | core |
|---|
stringThe class name
booleanWhether to return NULL if there is no such class
\?objectThe object (null: no such class)optimise_tempcode(object $ob)
otp(mixed $var, \ID_TEXT $origin = '') : string
| package | core |
|---|
mixedVariable (or NULL if not set)
\ID_TEXTWhere this parameter is referenced, in a compressed reference form
stringValuepage_link_as_url(string $url) : \URLPATH
page_link_decode(\SHORT_TEXT $page_link) : array
| package | core |
|---|
\SHORT_TEXTThe page-link
arrayTriple: 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_TEXTThe codename of the page to load
\ID_TEXTThe zone the page is being loaded in
\TempcodeMessagepage_path_to_page_link(string $page) : string
| package | core |
|---|
stringThe path.
stringThe page-link (blank: could not convert).paragraph(mixed $text, string $guid= '', \?string $class= null) : \Tempcode
| package | core |
|---|
mixedThe text to put into the paragraph (string or Tempcode)
stringGUID for call
\?stringCSS classname (null: none)
\TempcodeThe 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_TEXTThe table name
arrayThe database row
\ID_TEXTThe field name
\?objectThe database connection to use (null: standard site connection)
\?LANGUAGE_NAMEThe language (null: uses the current language)
booleanWhether to force it to the specified language
booleanWhether to force as_admin, even if the lang string isn't stored against an admin (designed for Comcode page caching)
\?TempcodeThe parsed Comcode (null: the text couldn't be looked up)password_hash(string $password, integer $algo, array $options) : \~string
| package | core |
|---|
stringThe password to hash
integerThe algorithm to use (Defined by PASSWORD_* constants)
arrayThe options for the algorithm to use
\~stringThe hashed password (false: error)password_verify(string $password, string $hash) : boolean
| package | core |
|---|
stringThe password to verify
stringThe hash to verify against
booleanIf 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 |
|---|
mixedKey
\?TIMEMinimum timestamp that entries from the cache may hold (null: don't care)
\?mixedThe data (null: not found / NULL entry)persistent_cache_set(mixed $key, mixed $data, boolean $server_wide= false, \?integer $expire_secs= null)
| package | core |
|---|
mixedKey
mixedThe data
booleanWhether it is server-wide data
\?integerThe 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_TEXTThe name of the parameter to get
\?mixedThe 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)
\?integerThe 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_TEXTForm field prefix (input type suffixes will be added automatically)
\?PATHWhere to upload to (null: the correct place for $theme_image_type)
booleanWhether an image is required
booleanWhether this is an edit operation
\?stringPass the filename back by reference (null: do not pass)
\?stringPass the thumbnail back by reference (null: do not pass & do not collect a thumbnail)
integerA CMSUPLOAD* constant
booleanWhether to copy a URL (if a URL) to the server, and return a local reference
\?URLPATHThe 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_TEXTThe name of the parameter to get
\?mixedThe default value to give the parameter if the parameter value is not defined (null: allow missing parameter) (false: give error on missing parameter)
booleanWhether we are cleaning for HTML rather than Comcode/plain-text
booleanWhether to convert WYSIWYG contents to Comcode automatically
\?stringThe 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_TEXTThe type of activity just carried out (a lang string)
\?SHORT_TEXTThe most important parameter of the activity (e.g. id) (null: none / cannot match against)
\?SHORT_TEXTA 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_TEXTThe page name to do it for
booleanDo a redirect if we're not on the canonical URL
propagate_filtercode(\ID_TEXT $prefix = '') : array
| package | core |
|---|
\ID_TEXTPrefix for main filter environment variable
arrayExtra 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 |
booleanWhether to only restore the Tempcode execution part of the state.
booleanWhether 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 |
|---|
\TempcodeThe content being put inside the box
mixedThe title of the standard box, string or Tempcode (blank: titleless standard box)
\ID_TEXTThe type of the box. Refers to a template (STANDARDBOX_type)
stringThe 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|...)
stringLink to be added to the header of the box
\TempcodeThe 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_TEXTThe codename to check for caching
integerThe TTL of what is being cached in minutes
\LONG_TEXTThe requisite situational information (a serialized map) [-> further restraints when reading]
\?BINARYStaff status to limit to (null: Not limiting by this)
\?MEMBERMember to limit to (null: Not limiting by this)
\SHORT_TEXTSorted permissive usergroup list to limit to (blank: Not limiting by this)
\?BINARYBot status to limit to (null: Not limiting by this)
\MINIID_TEXTTimezone to limit to (blank: Not limiting by this)
mixedThe result we are caching
\?arrayA list of the language files that need loading to use Tempcode embedded in the cache (null: none required)
\?arrayA list of the javascript files that need loading to use Tempcode embedded in the cache (null: none required)
\?arrayA list of the css files that need loading to use Tempcode embedded in the cache (null: none required)
booleanWhether we are caching Tempcode (needs special care)
\?ID_TEXTThe theme this is being cached for (null: current theme)
\?LANGUAGE_NAMEThe 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 |
|---|
\URLPATHThe URL to fully qualified
\URLPATHThe base-URL
\URLPATHFully qualified URLratchet_hash(\SHORT_TEXT $password, \SHORT_TEXT $salt, integer $legacy_style = 0) : \SHORT_TEXT
| package | core |
|---|
\SHORT_TEXTThe password in plain text
\SHORT_TEXTThe salt
integerLegacy hashing style to fallback to
\SHORT_TEXTThe salted&hashed passwordratchet_hash_verify(\SHORT_TEXT $password, \SHORT_TEXT $salt, \SHORT_TEXT $pass_hash_salted, integer $legacy_style = 0) : boolean
| package | core |
|---|
\SHORT_TEXTThe password in plain text
\SHORT_TEXTThe salt
\SHORT_TEXTThe 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)
integerLegacy hashing style to fallback to
booleanWhether the password if verifiedrbl_resolve(\IP $ip, \ID_TEXT $rbl_domain, boolean $page_level) : \?array
| package | core |
|---|
\IPThe IP address to lookup
\ID_TEXTThe RBL domain
booleanWhether this is a page level check (i.e. we won't consider blocks or approval, just ban setting)
\?arrayReturn result (null: error)read_filtercode_parameter_from_env(\ID_TEXT $field_name, \?ID_TEXT $field_type = null) : string
| package | core |
|---|
\ID_TEXTThe field name
\?ID_TEXTThe field type (null: work out what is there to read automatically)
stringThe parameter valueread_text_file(string $codename, \?LANGUAGE_NAME $lang= null, boolean $missing_blank= false) : string
| package | core |
|---|
stringThe file name (without .txt)
\?LANGUAGE_NAMEThe language to load from (null: none) (blank: search)
booleanWhether to tolerate missing files
stringThe 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 |
\TempcodeTitle to display on redirect page
mixedDestination URL (may be Tempcode)
\?mixedMessage to show (may be Tempcode) (null: standard redirection message)
booleanFor intermediary hops, don't mark so as to read status messages - save them up for the next hop (which will not be intermediary)
\ID_TEXTCode of message type to show
\TempcodeRedirection 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_TEXTThe name of the block to reinstall
booleanWhether installation was requiredreinstall_module(\ID_TEXT $zone, \ID_TEXT $module) : boolean
| package | core |
|---|
\ID_TEXTThe zone name
\ID_TEXTThe module name
booleanWhether a module installer had to be runrelay_error_notification(string $text, boolean $ocproducts= true, \ID_TEXT $notification_type= 'error_occurred')
| package | core |
|---|
stringA error message (in HTML)
booleanAlso send to ocProducts
\ID_TEXTThe notification type
reload_lang_fields(boolean $full = false)
remove_code(string $code, string $function, string $command, integer $instance_of_command = 1) : boolean
| package | core |
|---|
stringThe code.
stringName of the function.
stringThe command we're searching to insert by.
integerWe remove the nth instance of this command.
booleanSuccess status.remove_duplicate_rows(array $rows, string $id_field = 'id') : array
| package | core |
|---|
arrayThe rows to remove duplication of
stringThe ID field
arrayThe 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 |
|---|
stringData
stringData, 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 |
|---|
arrayRow to render
booleanWhether to include context (i.e. say WHAT this is, not just show the actual content)
booleanWhether to include breadcrumbs (if there are any)
\?ID_TEXTVirtual root to use (null: none)
\ID_TEXTOverridden GUID to send to templates (blank: none)
\TempcodeRendered boxreprocess_url(\URLPATH $url, \URLPATH $operation_base_url) : string
| package | core |
|---|
\URLPATHThe URL that we're operating on.
\URLPATHWe open up linked URLs under this recursively.
stringThe 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_TEXTThe codename of the page to load
booleanWhether it is required for this page to exist (shows an error if it doesn't) -- otherwise, it will just return NULL
\?ID_TEXTThe zone the page is being loaded in (null: as shown by access URL)
\?ID_TEXTThe type of page - for if you know it (null: don't know it)
booleanWhether the page is being included from another
booleanWhether to not check for redirects (normally you would)
\?objectSemi-filled output template (null: definitely not doing output streaming)
\?TempcodeThe page (null: no page)request_via_cron(\ID_TEXT $codename, \?array $map, integer $special_cache_flags, boolean $tempcode)
| package | core |
|---|
\ID_TEXTThe codename of the block
\?arrayParameters to call up block with if we have to defer caching (null: none)
integerFlags representing how we should cache
booleanWhether 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_NAMEThe language to include files from (null: use current users language).
booleanOnly load it up if it is specifically defined for our language.
require_all_open_lang_files(\?LANGUAGE_NAME $lang = null)
| package | core |
|---|
\?LANGUAGE_NAMEThe 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 |
|---|
stringThe 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)
booleanWhether 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_TEXTThe language file name
\?LANGUAGE_NAMEThe language (null: uses the current language)
\?stringThe language type (lang_custom, or custom) (null: normal priorities are used)
booleanWhether 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_TEXTThe language file name
\?LANGUAGE_NAMEThe language (null: uses the current language)
\?stringThe language type (lang_custom, or custom) (null: normal priorities are used)
\PATHWhere we are caching too
booleanWhether to just return if there was a loading error
booleanWhether 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 |
booleanWhether to only restore the Tempcode execution part of the state.
booleanWhether to merge the current output state in.
\?arraySettings 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_TEXTThe page-link we are finding (blank: root).
\?mixedCallback function to send discovered page-links to (null: return).
\?arrayList of node types we will return/recurse-through (null: no limit)
\?integerMaximum number of children before we cut off all children (null: no limit).
\?integerHow deep to go from the Sitemap root (null: no limit).
integerA bitmask of SITEMAPGEN* options.
\ID_TEXTThe zone we will consider ourselves to be operating in (needed due to transparent redirects feature)
integerA bitmask of SITEMAPGATHER* constants, of extra data to include.
\?arrayNode structure (null: working via callback / error).running_locally() : boolean
running_script(string $is_this_running) : boolean
| package | core |
|---|
stringScript filename (canonically we want NO .php file type suffix)
booleanWhether the script is runningsafe_ini_set(string $var, string $value) : \~string
| package | core |
|---|
stringConfig option.
stringNew value of option.
\~stringOld 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_TEXTThe zone
\ID_TEXTThe page
\LANGUAGE_NAMEThe language
\ID_TEXTThe page text
\BINARYThe validated status
\?ID_TEXTThe page parent (null: none)
integerThe page order
\?TIMEAdd time (null: now)
\?TIMEEdit time (null: not edited)
\BINARYWhether to show as edited
\?MEMBERThe submitter (null: current member)
\?ID_TEXTThe old page name (null: not being renamed)
\SHORT_TEXTMeta keywords for this resource (blank: implicit)
\LONG_TEXTMeta description for this resource (blank: implicit)
\PATHThe save pathsave_static_caching(mixed $out, string $mime_type = 'text/html')
| package | core |
|---|
mixedOutput to cache (Tempcode or string)
stringMime 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
\?mixedWhat 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 |
|---|
stringThe filter
stringA 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)
\?stringThe 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)
\?stringThe database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base)
\?stringThe database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
\?stringThe database's field name for the category-set's category-ID (null: don't support subtree [*-style] searches beyond the tree base)
booleanWhether the record-set IDs are numeric
booleanWhether the category-set IDs are numeric
\?objectDatabase connection to use (null: website)
arrayA 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 |
|---|
stringThe filter
stringThe database's ID field for the record-set we're matching
stringThe database's table for the record-set we're matching
\?stringThe 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)
\?stringThe database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base)
\?stringThe database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
\?stringThe database's field name for the category-set's category-ID (null: don't support subtree [*-style] searches beyond the tree base)
booleanWhether the record-set IDs are numeric
booleanWhether the category-set IDs are numeric
\?objectDatabase connection to use (null: website)
arrayA 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 |
|---|
stringThe filter
arrayA map between record-set IDs and record-set parent-category-IDs
\?stringThe 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)
\?stringThe database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base)
\?stringThe database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches)
\?stringThe database's field name for the category-set's category-ID (null: don't support subtree [*-style] searches beyond the tree base)
booleanWhether the record-set IDs are numeric
booleanWhether the category-set IDs are numeric
\?objectDatabase connection to use (null: website)
arrayA 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 |
|---|
stringThe filter
stringThe database's ID field for the record-set we're matching. E.g. 'id'.
\?stringThe 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'.
\?stringThe 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'.
\?stringThe database's field name for the record-set's container-category specifier (null: don't support subtree [*-style] searches). E.g. 'cat'.
\?stringThe 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'.
booleanWhether the record-set IDs are numeric
booleanWhether the category-set IDs are numeric
\?objectDatabase connection to use (null: website)
stringSQL 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_TEXTThe 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_TEXTThe table saved into (null: unknown)
booleanWhether the ID field is not an integer
\ID_TEXTThe validation request will say this ID has been submitted
\TempcodeThe validation request will link to this URL
\?MEMBERMember doing the submitting (null: current member)
seo_get_fields(\ID_TEXT $type, \?ID_TEXT $id= null, boolean $show_header= true) : \Tempcode
| package | core |
|---|
\ID_TEXTThe type of resource (e.g. download)
\?ID_TEXTThe ID of the resource (null: adding)
booleanWhether to show a header
\TempcodeForm 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 |
arrayThe URL component map (must contain 'page').
\ID_TEXTThe zone.
\ID_TEXTThe running script.
booleanWhether to get rid of keep_ variables in current URL.
arrayA 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 |
\TempcodeThe text
booleanWhether to append
booleanWhether to add a box around the parameter
set_helper_panel_tutorial(\ID_TEXT $tutorial)
| package | core |
|---|---|
| sets_output_state |
\ID_TEXTThe 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 |
|---|
booleanWhether 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 |
|---|
\MEMBERThe member going in the usergroup.
\GROUPThe usergroup.
\TIMEThe expiry timestamp.
booleanWhether 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_TEXTThe name of the value
\LONG_TEXTThe value
\BINARYWhether 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 |
|---|
\GROUPThe usergroup having the permission set
\ID_TEXTThe codename of the permission
booleanWhether the usergroup has the permission
\?ID_TEXTThe ID code for the page being checked (null: current page)
\?ID_TEXTThe category-type for the permission (null: none required)
\?ID_TEXTThe 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_TEXTThe session ID
booleanWhether 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 |
stringThe 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_TEXTThe type of resource (e.g. download)
\ID_TEXTThe old ID of the resource
\?arrayList of fields to NOT take in (null: empty list)
\?ID_TEXTThe 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_TEXTThe name of the value
\?SHORT_TEXTThe value (null: delete)
booleanWhether 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_TEXTThe 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 |
|---|
stringFile path (relative to Composr base directory)
integerBitmask of extra stuff to ignore (see IGNORE_* constants)
integerSet this to 0 if you don't want the default IGNORE_* constants to carry through
booleanWhether it should be ignoredsimulated_wildcard_match(string $context, string $word, boolean $full_cover = false) : boolean
| package | core |
|---|
stringThe haystack
stringThe needle (a wildcard expression)
booleanWhether full-coverance is required
booleanWhether we have a matchsitemap_do_next_manager(\Tempcode $title, \?ID_TEXT $page, \ID_TEXT $zone, \Tempcode $completion_text) : \Tempcode
| package | core |
|---|
\TempcodeThe title (output of get_screen_title)
\?ID_TEXTThe name of the page just handled (null: none)
\ID_TEXTThe name of the zone just handled (blank: none/welcome-zone)
\TempcodeThe text to show (blank: default)
\TempcodeThe UIsitemap_xml_build()
| package | core |
|---|
skippable_keep(string $key, string $val) : boolean
| package | core |
|---|
stringParameter name
stringParameter value
booleanWhether 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 |
mixedRefresh to this URL (URLPATH or Tempcode URL)
sort_maps_by(array $rows, mixed $sort_keys)
| package | core |
|---|
arrayList of maps to sort
mixedEither 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 |
|---|
arrayList of maps to sort
mixedEither 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 |
arraySearch results from the search hook, assumed already sorted
arrayExisting array of results (originally starts blank)
stringSort direction
arraySorted resultsspecial_page_types(\ID_TEXT $special_page_type, \Tempcode $out, string $out_evaluated)
| package | core |
|---|---|
| set | query templates tree lang |
\ID_TEXTThe special page type.
\TempcodeThe normal script Tempcode output
stringThe 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_TEXTThe content type
\ID_TEXTThe content ID
arrayThe EXIF data
\?arrayExtra 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_TEXTPage name.
\ID_TEXTScreen type code.
\ID_TEXTResource ID.
\ID_TEXTThe URL zone name (only used for Comcode Page URL monikers).
stringString from which a moniker will be chosen (may not be blank).
booleanWhether we are sure this is a new moniker (makes things more efficient, saves a query).
stringThe chosen moniker.symbol_tempcode(\ID_TEXT $symbol, \?array $parameters= null, \?array $escape= null) : \Tempcode
| package | core |
|---|
\ID_TEXTThe ID of the symbol to use
\?arraySymbol parameters (null: none)
\?arrayEscaping (null: none)
\TempcodeA symbol Tempcode objectsymbol_truncator(array $param, string $type, \?mixed $tooltip_if_truncated = null) : string
| package | core |
|---|---|
| set | left right spread |
arrayParameters 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)
stringThe type of truncation to do
\?mixedTooltip to add on, but only if we end up creating our own tooltip (null: none)
stringThe result.sync_file(\PATH $filename)
sync_file_move(\PATH $old, \PATH $new)
| package | core |
|---|
\PATHFile/directory name to move from (may be full or relative path)
\PATHFile/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 |
|---|
stringLanguage string code
stringLabel 1 (given as a parameter to the language string code)
stringLabel 2 (given as a parameter to the language string code)
stringLabel 3 (given as a parameter to the language string code)
stringPage-link 1
stringPage-link 2
stringPage-link 3
stringAddon that caused the event
\BINARYWhether this post should be public or friends-only
\?MEMBERMember being written for (null: current member)
booleanWhether to push this out as a site event if user requested
\?MEMBERMember 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 |
|---|
\IPIP address to report
\ID_TEXTUsername address to report
\EMAILEmail address to report
stringThe reason for the report (blank: none)
booleanWhether 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 |
|---|
arrayThe TAR file handle
\PATHThe relative path to where we wish to add the file to the archive (including filename)
stringThe data of the file to add
integerThe file mode (permissions)
\?TIMEThe modification time we wish for our file (null: now)
booleanWhether the $data variable is actually a full file path
booleanWhether to return on errors
integerOffset 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 |
|---|
arrayThe TAR file handle
\?resourceThe logfile to write to (null: no logging)
\PATHThe full path to the folder to add
\?integerThe maximum file size to add (null: no limit)
\PATHThe 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)
\?arrayA map (filename=>true) of files to not back up (null: none)
\?arrayA list of directories ONLY to back up from the root (null: no restriction)
booleanWhether to output spaces as we go to keep the connection alive
booleanWhether 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 |
|---|
arrayThe TAR file handle
\?resourceThe logfile to write to (null: no logging)
\PATHThe full path to the folder to add
\TIMEThe threshold time
\?integerThe maximum file size to add (null: no limit)
\PATHThe 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)
booleanWhether to not skip "special files" (ones not normally archive)
arrayA 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 |
|---|
arrayThe TAR file handle
\PATHThe path to the folder to extract to, relative to the base directory
booleanWhether to extract via the AFM (assumes AFM has been set up prior to this function call)
\?arrayThe files to extract (null: all)
booleanWhether to take backups of Comcode pages
tar_get_directory(array $resource, boolean $tolerate_errors = false) : \?array
| package | core |
|---|
arrayThe TAR file handle
booleanWhether to tolerate errors (returns NULL if error)
\?arrayA 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 |
|---|
arrayThe TAR file handle
\PATHThe full path to the file we want to get
booleanWhether to tolerate errors (returns NULL if error)
\?PATHWrite data to here (null: return within array)
\?arrayA 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 |
\?PATHThe path to the TAR archive (null: write out directly to stdout)
stringThe mode to open the TAR archive (rb=read, wb=write)
arrayThe 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 |
|---|
stringThe template text
integerThe position we are looking at in the text
booleanWhether this text is infact a directive, about to be put in the context of a wider template
\ID_TEXTThe codename of the template (e.g. foo)
\?ID_TEXTThe theme it is for (null: current theme)
\?ID_TEXTThe language it is for (null: current language)
booleanWhether to tolerate errors
mixedThe converted/compiled template as Tempcode, OR if a directive, encoded directive informationtest_password(string $password, string $username = '') : integer
| package | core |
|---|
stringThe password to check
stringThe username that will go with the password
integerPassword 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 |
|---|
\TIMEUTC time
stringTimezone (boring style)
\TIMEVirtualised local timeunban_ip(\IP $ip)
unichr(integer $c) : \~string
| package | core |
|---|
integerCharacter number.
\~stringConverted data (false: could not convert).unichrm(array $matches) : \~string
| package | core |
|---|
arrayRegular expression match array.
\~stringConverted data (false: could not convert).unichrm_hex(array $matches) : \~string
| package | core |
|---|
arrayRegular expression match array.
\~stringConverted 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 |
|---|
stringThe data to clean
\?ID_TEXTThe 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)
booleanWhether we are cleaning for HTML rather than Comcode/plain-text
booleanWhether the file is loaded from disk (less conversion needed)
stringThe cleaned dataunparse_filtercode(array $parsed) : string
update_bounce_storage(string $server, integer $port, string $folder, string $username, string $password, \?TIME $since = null)
| package | core |
|---|
stringThe IMAP server hostname.
integerThe IMAP port.
stringThe IMAP inbox identifier.
stringThe IMAP username.
stringThe IMAP password.
\?TIMEOnly 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_TEXTThe codename for the stat
integerWhat to increment the statistic by
upgrade_block(\ID_TEXT $block) : integer
| package | core |
|---|
\ID_TEXTThe name of the block to upgrade
integer0=No upgrade. -2=Not installed, 1=Upgradeupgrade_module(\ID_TEXT $zone, \ID_TEXT $module) : integer
| package | core |
|---|
\ID_TEXTThe zone name
\ID_TEXTThe module name
integer0=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 |
|---|
\URLPATHThe URL to convert to an encoded filename
stringA usable filename based on the URLurl_to_page_link(\URLPATH $url, boolean $abs_only= false, boolean $perfect_only= true) : string
| package | core |
|---|
\URLPATHThe 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).
booleanWhether 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.
booleanWhether to only allow perfect conversions.
stringThe page-link (blank: could not convert).urlise_lang(string $string, mixed $url, string $title= '', boolean $new_window= false) : \Tempcode
| package | core |
|---|
stringThe language string
mixedThe URL (either Tempcode or string)
stringThe title of the hyperlink
booleanWhether to use a new window
\TempcodeThe 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 |
|---|
\?TIMEInput timestamp (null: now)
\?MEMBERMember for which the date is being rendered (null: current member)
\TIMEOutput 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 |
|---|
\?TIMEInput timestamp (null: now)
\?MEMBERMember for which the date is being rendered (null: current member)
\TIMEOutput timestamputf8tohtml(string $utf8) : string
warn_exit(mixed $text, boolean $support_match_key_messages = false) : mixed
| package | core |
|---|
mixedThe error message (string or Tempcode)
booleanWhether match key messages / redirects should be supported
mixedNever returns (i.e. exits)warn_exit_wordfilter(\?ID_TEXT $name, \Tempcode $message) : mixed
| package | core |
|---|
\?ID_TEXTThe 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)
\TempcodeError message
mixedNever returns (i.e. exits)warn_screen(\Tempcode $title, mixed $text, boolean $provide_back= true, boolean $support_match_key_messages= false) : \Tempcode
| package | core |
|---|
\TempcodeThe title of the warn page
mixedThe text to put on the warn page (either Tempcode or string)
booleanWhether to provide a back button
booleanWhether match key messages / redirects should be supported
\TempcodeThe 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 |
|---|
stringData to check.
booleanWhether 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 |
|---|
\PATHCache file path
stringCache contents
booleanWhether to allow gzipping
write_text_file(string $codename, \?LANGUAGE_NAME $lang, string $out)
| package | core |
|---|
stringThe file name (without .txt)
\?LANGUAGE_NAMEThe language to write for (null: none) (blank: search)
stringThe 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 |
|---|
stringThe text to perform on.
integerThe start position of the cut (HTML tags will be taken from before this though).
\?integerThe length you want the concatenated text to be (null: go to end).
booleanWhether to do a substr based on literal position in XHTML, rather than based on number of visible characters.
booleanWhether to add ellipses.
floatA fraction of the length we may exceed by in order to maintain grammar tolerance (finish sentences, finish paragraphs, finish the whole thing).
stringThe result.xhtmlise_html(string $html, boolean $definitely_want= false, boolean $snippet= false) : string
| package | core |
|---|
stringThe XHTML string to convert to XHTML
booleanWhether to force a repair even if we aren't enforcing XHTML strictness
booleanWhether this is a partial snippet of HTML, embeddable in some unknown context
stringThe converted stringxml_rpc(\URLPATH $url, string $method, array $params, boolean $accept_failure = false) : \?string
| package | core |
|---|
\URLPATHThe XML-RPC call URL
stringThe method name to call.
arrayAn array of parameters.
booleanWhether to accept failure.
\?stringThe result (null: failed).xmlentities(string $string, integer $quote_style = ENT_COMPAT) : string
| package | core |
|---|
stringInput string
integerQuote style
stringEscaped version of input stringzip_close(array $open_zip_file) : boolean
| package | core |
|---|
arrayThe zip file resource
booleanWhether the file closed correctlyzip_entry_close(array $zip_entry) : boolean
| package | core |
|---|
arrayDirectory entry resource returned by m_zip_read()
booleanWhether the operation was succesfulzip_entry_filesize(array $zip_entry) : integer
| package | core |
|---|
arrayDirectory entry resource returned by m_zip_read()
integerThe file sizezip_entry_name(array $zip_entry) : string
| package | core |
|---|
arrayDirectory entry resource returned by m_zip_read()
stringThe entry namezip_entry_open(array $zip, array $zip_entry, string $mode = 'rb') : boolean
| package | core |
|---|---|
| set | rb |
arrayThe zip file resource
arrayDirectory entry resource returned by m_zip_read()
stringThe file access mode
booleanWhether the operation was succesfulzip_entry_read(array $zip_entry, integer $zip_entry_file_size = 1024) : \~string
| package | core |
|---|
arrayDirectory entry resource returned by m_zip_read()
integerThe maximum returned data size
\~stringThe data (false: failure)zip_error(integer $errno, boolean $mzip = false) : \Tempcode
| package | core |
|---|
integerThe zip error number.
booleanWhether mzip was used.
\TempcodeError message.zip_open(\PATH $zip_file) : mixed
| package | core |
|---|
\PATHThe zip file path
mixedThe zip file resource (number if error)zip_read(array $open_zip_file) : \~array
| package | core |
|---|
arrayThe zip file resource
\~arrayA 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 |
|---|
\PATHThe full path to the folder to add
\PATHThe 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)
arrayA list of maps that stores time,full_path,name, for each filezone_black_magic_filterer(\PATH $path, boolean $relative = false) : \PATH
| package | core |
|---|
\PATHThe path, assuming in the obvious place.
booleanWhere the passed path is relative.
\PATHThe 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
stringInput Tempcode
Returns
stringOutput Tempcode