absoluteise_and_test_comcode_url
add_wysiwyg_comcode_markup
apply_emoticons
array_html_preg_replace
attachment_popup_script
attachments_script
check_comcode
check_naughty_javascript_url
comcode_escape
comcode_helper_script
comcode_helper_script_step1
comcode_helper_script_step2
comcode_helper_script_step3
comcode_parse_error
comcode_preg_replace
comcode_strip_html_tags
comcode_to_tempcode
convert_html_headers_to_titles
debuttonise
delete_comcode_attachments
delete_lang_comcode_attachments
detagonise
dispatch_member_mention_notifications
do_code_box
do_comcode_attachments
do_emoticon
filter_html
final_attachments_from_preview
find_media_renderers
force_clean_comcode
get_defaults_multi
get_tutorial_link
has_attachment_access
html_to_comcode
in_tag_stack
insert_lang_comcode_attachments
parse_single_comcode_tag
peek_media_mode
pop_media_mode
push_media_mode
remove_wysiwyg_comcode_markup
render_attachment
render_media_url
semihtml_to_comcode
semihtml_to_comcode_wrap
set_tutorial_link
strip_comcode
test_url
update_lang_comcode_attachments
wysiwyg_comcode_markup_style
wysiwygify_media_set
CCP_IN_TAG_ATTRIBUTE_NAME
CCP_IN_TAG_ATTRIBUTE_VALUE
CCP_IN_TAG_ATTRIBUTE_VALUE_NO_QUOTE
CCP_IN_TAG_BETWEEN_ATTRIBUTES
CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT
CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT
CCP_IN_TAG_NAME
CCP_NO_MANS_LAND
CCP_STARTING_TAG
MAX_COMCODE_TAG_LOOK_AHEAD_LENGTH
MAX_URLS_TO_READ
MEDIA_LOWFI
MEDIA_RECOG_PRECEDENCE_HIGH
MEDIA_RECOG_PRECEDENCE_LOW
MEDIA_RECOG_PRECEDENCE_MEDIUM
MEDIA_RECOG_PRECEDENCE_NONE
MEDIA_RECOG_PRECEDENCE_SUPER
MEDIA_RECOG_PRECEDENCE_TRIVIAL
MEDIA_TYPE_ALL
MEDIA_TYPE_AUDIO
MEDIA_TYPE_IMAGE
MEDIA_TYPE_OTHER
MEDIA_TYPE_VIDEO
WYSIWYG_COMCODE__BUTTON
WYSIWYG_COMCODE__HTML
WYSIWYG_COMCODE__STANDOUT_BLOCK
WYSIWYG_COMCODE__STANDOUT_INLINE
WYSIWYG_COMCODE__XML_BLOCK
WYSIWYG_COMCODE__XML_INLINE
absoluteise_and_test_comcode_url(\URLPATH $given_url, \MEMBER $source_member, boolean $as_admin, \ID_TEXT $tag) : \URLPATH
| package | core_rich_media |
|---|
\URLPATHURL to fixup.
\MEMBERThe member who is responsible for this Comcode
booleanWhether to check as arbitrary admin
\ID_TEXTComcode tag name.
\URLPATHFixed URL.add_wysiwyg_comcode_markup(string $tag, array $attributes, \Tempcode $embed, boolean $semihtml, \?integer $method = null) : \?string
| package | core_rich_media |
|---|
stringThe Comcode tag
arrayThe parameters
\TempcodeThe contents of the tag
booleanWhether we are in semihtml mode
\?integerDisplay method (null: auto-detect)
\?stringThe HTML (null: render as native HTML)apply_emoticons(string $text) : string
This is not used in the normal Comcode chain - it's for non-Comcode things that require emoticons (actually in reality it is used in the Comcode chain if the optimiser sees that a full parse is not needed)
| package | core_rich_media |
|---|
stringThe text to add emoticons to (assumption: that this is XHTML)
stringThe XHTML with the image-substitution of emoticonsarray_html_preg_replace(string $element, array $array, string $semihtml) : string
| package | core_rich_media |
|---|
stringThe element name to replace over
arrayA list of pairs: Pattern, Replacement
stringHaystack
stringResultcheck_comcode(\LONG_TEXT $comcode, \?MEMBER $source_member= null, boolean $as_admin= false, \?object $connection= null, boolean $attachment_possibility= false)
| package | core_rich_media |
|---|
\LONG_TEXTThe Comcode to convert
\?MEMBERThe member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully (null: current member)
booleanWhether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
\?objectThe database connection to use (null: standard site connection)
booleanWhether there might be new attachments. If there are, we will check as lax- as attachments are always preserved by forcing lax parsing.
check_naughty_javascript_url(\MEMBER $source_member, \URLPATH $url, boolean $as_admin) : \URLPATH
| package | core_rich_media |
|---|
\MEMBERThe member who submitted the URL
\URLPATHThe URL to check
booleanWhether to check as arbitrary admin
\URLPATHFiltered input URL.comcode_escape(string $in) : string
comcode_helper_script_step1() : \Tempcode
comcode_helper_script_step2() : \Tempcode
comcode_helper_script_step3() : \Tempcode
comcode_parse_error(boolean $preparse_mode, array $_message, integer $pos, \LONG_TEXT $comcode, boolean $check_only = false) : \Tempcode
| package | core_rich_media |
|---|
booleanWhether this is being pre-parsed, to pick up errors before row insertion.
arrayError message details to pass to do_lang, or if the first in the list is NULL, use directly
integerThe position during parsing that the error occurred at
\LONG_TEXTThe Comcode the parser error occurred in
booleanWhether to only check the Comcode.
\TempcodeAn error message to put in the output stream (shown in certain situations, where in other situations we bomb out).comcode_preg_replace(string $element, string $pattern, mixed $replacement, string $semihtml) : string
This is a good test case: exit(comcode_preg_replace('test','#[test](.*)[/test]#','>${1}<','[test]x[test a]y[/test]z[/test]'));
| package | core_rich_media |
|---|
stringThe element name to replace over
stringPattern
mixedReplacement (string or single element array specifying a function name)
stringHaystack
stringResultcomcode_to_tempcode(\LONG_TEXT $comcode, \?MEMBER $source_member= null, boolean $as_admin= false, \?integer $wrap_pos= null, \?string $pass_id= null, \?object $connection= null, boolean $semiparse_mode= false, boolean $preparse_mode= false, boolean $is_all_semihtml= false, boolean $structure_sweep= false, boolean $check_only= false, \?array $highlight_bits= null, \?MEMBER $on_behalf_of_member= null) : \Tempcode
| package | core_rich_media |
|---|
\LONG_TEXTThe Comcode to convert
\?MEMBERThe member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully (null: current member)
booleanWhether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one. Note that if this is passed false, and $source_member is an admin, it will be parsed using admin privileges anyway.
\?integerThe position to conduct wordwrapping at (null: do not conduct word-wrapping)
\?stringA special identifier that can identify this resource in a sea of our resources of this class; usually this can be ignored, but may be used to provide a binding between JavaScript in evaluated Comcode, and the surrounding environment (null: no explicit binding)
\?objectThe database connection to use (null: standard site connection)
booleanWhether to parse so as to create something that would fit inside a semihtml tag. It means we generate HTML, with Comcode written into it where the tag could never be reverse-converted (e.g. a block).
booleanWhether this is being pre-parsed, to pick up errors before row insertion.
booleanWhether to treat this whole thing as being wrapped in semihtml, but apply normal security otherwise.
booleanWhether we are only doing this parse to find the title structure
booleanWhether to only check the Comcode. It's best to use the check_comcode function which will in turn use this parameter.
\?arrayA list of words to highlight (null: none)
\?MEMBERThe member we are running on behalf of, with respect to how attachments are handled; we may use this members attachments that are already within this post, and our new attachments will be handed to this member (null: member evaluating)
\TempcodeThe Tempcode generatedconvert_html_headers_to_titles(string $semihtml) : string
| package | core_rich_media |
|---|
stringSemi-HTML
stringSemi-HTML, with headers converted to titlesdetagonise(array $matches) : string
dispatch_member_mention_notifications(\ID_TEXT $content_type, \ID_TEXT $content_id, \?MEMBER $submitter = null)
| package | core_rich_media |
|---|
\ID_TEXTThe content type
\ID_TEXTThe content ID
\?MEMBERThe content submitter (null: current user)
do_code_box(string $type, \Tempcode $embed, boolean $numbers= true, boolean $in_semihtml= false, boolean $is_all_semihtml= false) : array
| package | core_rich_media |
|---|
stringThe data type (e.g. file extension) we are rendering.
\TempcodeContents (code) to render.
booleanWhether to show line numbers.
booleanWhether what we have came from inside a semihtml tag
booleanWhether what we have came from semihtml mode
arrayA pair: The Tempcode for the code box, and the title of the boxdo_emoticon(array $imgcode) : mixed
| package | core_rich_media |
|---|
arrayParameter triple(template,src,code)
mixedEither a Tempcode result, or a string result, depending on $evaluatefilter_html(boolean $as_admin, \MEMBER $source_member, integer $pos, integer $len, \LONG_TEXT $comcode, boolean $in_html, boolean $in_semihtml)
| package | core_rich_media |
|---|
booleanWhether to explicitly execute this with admin rights. There are a few rare situations where this should be done, for data you know didn't come from a member, but is being evaluated by one.
\MEMBERThe member the evaluation is running as. This is a security issue, and you should only run as an administrator if you have considered where the Comcode came from carefully
integerThe offset of the tag in the Comcode
integerThe length of the Comcode
\LONG_TEXTThe Comcode being parsed
booleanWhether the parser is/was in an HTML region
booleanWhether the parser is/was in a Semi-HTML region
find_media_renderers(\URLPATH $url, array $attributes, boolean $as_admin, \?MEMBER $source_member, integer $acceptable_media= 15, \?ID_TEXT $limit_to= null) : \?array
| package | core_rich_media |
|---|
\URLPATHThe URL
arrayAttributes (e.g. width, height, length)
booleanWhether there are admin privileges, to render dangerous media types
\?MEMBERMember to run as (null: current member)
integerBitmask of media that we will support
\?ID_TEXTLimit to a media rendering hook (null: no limit)
\?arrayThe hooks (null: cannot find one)force_clean_comcode(\LONG_TEXT $comcode) : \LONG_TEXT
| package | core_rich_media |
|---|
\LONG_TEXTThe messy Comcode.
\LONG_TEXTThe cleaned Comcode.get_defaults_multi(array $defaults, \ID_TEXT $param) : array
| package | core_rich_media |
|---|
arrayAll default values for the tag.
\ID_TEXTMatch name for the parameter set.
arrayList of values.get_tutorial_link(\ID_TEXT $name) : \?SHORT_TEXT
| package | core_rich_media |
|---|
\ID_TEXTThe name of the value
\?SHORT_TEXTThe value (null: value not found)html_to_comcode(\LONG_TEXT $html, boolean $force = true) : \LONG_TEXT
| package | core_rich_media |
|---|
\LONG_TEXTThe HTML to be converted
booleanWhether to force full conversion regardless of settings
\LONG_TEXTThe equivalent Comcodein_tag_stack(array $tag_stack, array $tags) : boolean
| package | core_rich_media |
|---|
arrayThe tag stack
arrayThe tags
booleanWhether one is presentparse_single_comcode_tag(string $data, string $tag = '\w+') : array
| package | core_rich_media |
|---|
stringThe data being parsed
stringThe tag we're expecting to see here / a regexp
arrayA map of parsed attributespeek_media_mode() : integer
push_media_mode(integer $m)
remove_wysiwyg_comcode_markup(string $semihtml)
render_media_url(mixed $url, mixed $url_safe, array $attributes, boolean $as_admin= false, \?MEMBER $source_member= null, integer $acceptable_media= 15, \?ID_TEXT $limit_to= null, \?URLPATH $url_to_scan_against= null) : \?Tempcode
| package | core_rich_media |
|---|
mixedThe URL
mixedURL to render (no sessions etc)
arrayAttributes (e.g. width, height, length). IMPORTANT NOTE: Only pass in 'mime_type' from user data if you have verified privileges to do so, no verification is done within the media API.
booleanWhether there are admin privileges, to render dangerous media types
\?MEMBERMember to run as (null: current member)
integerBitmask of media that we will support
\?ID_TEXTLimit to a media rendering hook (null: no limit)
\?URLPATHThe URL to do media detection against (null: use $url)
\?TempcodeThe rendered version (null: cannot render)semihtml_to_comcode(\LONG_TEXT $semihtml, boolean $force = false) : \LONG_TEXT
| package | core_rich_media |
|---|
\LONG_TEXTThe Semi-HTML to be converted
booleanWhether to force full conversion regardless of settings
\LONG_TEXTThe equivalent Comcodesemihtml_to_comcode_wrap(array $matches) : string
set_tutorial_link(\ID_TEXT $name, \SHORT_TEXT $value)
strip_comcode(string $text, boolean $for_extract= false, \?array $tags_to_preserve= null) : string
| package | core_rich_media |
|---|
stringPlain-text/Comcode
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)
stringPurified plain-texttest_url(\URLPATH $url_full, string $tag_type, string $given_url, \MEMBER $source_member) : \Tempcode
| package | core_rich_media |
|---|
\URLPATHURL to test.
stringComcode tag type, to which the URL is associated.
stringURL actually provided.
\MEMBERThe member who is responsible for this Comcode
\TempcodeError message, or blank if no error.wysiwyg_comcode_markup_style(string $tag, \?array $attributes= null, \?Tempcode $embed= null) : integer
| package | core_rich_media |
|---|
stringThe Comcode tag
\?arrayThe parameters (null: don't consider)
\?TempcodeThe contents of the tag (null: don't consider)
integerThe Comcode integration stylewysiwygify_media_set(\LONG_TEXT $semihtml) : \LONG_TEXT
| package | core_rich_media |
|---|
\LONG_TEXTThe Semi-HTML to be converted
\LONG_TEXTThe equivalent ComcodeA media renderer coded to fall-back to a simple image if we have low-fi mode turned on.
« More »CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_LEFT = 5
| package | core_rich_media |
|---|
CCP_IN_TAG_BETWEEN_ATTRIBUTE_NAME_VALUE_RIGHT = 6
| package | core_rich_media |
|---|