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 |
---|
\URLPATH
URL to fixup.
\MEMBER
The member who is responsible for this Comcode
boolean
Whether to check as arbitrary admin
\ID_TEXT
Comcode tag name.
\URLPATH
Fixed URL.add_wysiwyg_comcode_markup(string $tag, array $attributes, \Tempcode $embed, boolean $semihtml, \?integer $method = null
) : \?string
package | core_rich_media |
---|
string
The Comcode tag
array
The parameters
\Tempcode
The contents of the tag
boolean
Whether we are in semihtml mode
\?integer
Display method (null: auto-detect)
\?string
The 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 |
---|
string
The text to add emoticons to (assumption: that this is XHTML)
string
The XHTML with the image-substitution of emoticonsarray_html_preg_replace(string $element, array $array, string $semihtml) : string
package | core_rich_media |
---|
string
The element name to replace over
array
A list of pairs: Pattern, Replacement
string
Haystack
string
Resultcheck_comcode(\LONG_TEXT $comcode, \?MEMBER $source_member= null
, boolean $as_admin= false
, \?object $connection= null
, boolean $attachment_possibility= false
)
package | core_rich_media |
---|
\LONG_TEXT
The Comcode to convert
\?MEMBER
The 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)
boolean
Whether 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.
\?object
The database connection to use (null: standard site connection)
boolean
Whether 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 |
---|
\MEMBER
The member who submitted the URL
\URLPATH
The URL to check
boolean
Whether to check as arbitrary admin
\URLPATH
Filtered 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 |
---|
boolean
Whether this is being pre-parsed, to pick up errors before row insertion.
array
Error message details to pass to do_lang, or if the first in the list is NULL, use directly
integer
The position during parsing that the error occurred at
\LONG_TEXT
The Comcode the parser error occurred in
boolean
Whether to only check the Comcode.
\Tempcode
An 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 |
---|
string
The element name to replace over
string
Pattern
mixed
Replacement (string or single element array specifying a function name)
string
Haystack
string
Resultcomcode_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_TEXT
The Comcode to convert
\?MEMBER
The 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)
boolean
Whether 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.
\?integer
The position to conduct wordwrapping at (null: do not conduct word-wrapping)
\?string
A 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)
\?object
The database connection to use (null: standard site connection)
boolean
Whether 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).
boolean
Whether this is being pre-parsed, to pick up errors before row insertion.
boolean
Whether to treat this whole thing as being wrapped in semihtml, but apply normal security otherwise.
boolean
Whether we are only doing this parse to find the title structure
boolean
Whether to only check the Comcode. It's best to use the check_comcode function which will in turn use this parameter.
\?array
A list of words to highlight (null: none)
\?MEMBER
The 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)
\Tempcode
The Tempcode generatedconvert_html_headers_to_titles(string $semihtml) : string
package | core_rich_media |
---|
string
Semi-HTML
string
Semi-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_TEXT
The content type
\ID_TEXT
The content ID
\?MEMBER
The 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 |
---|
string
The data type (e.g. file extension) we are rendering.
\Tempcode
Contents (code) to render.
boolean
Whether to show line numbers.
boolean
Whether what we have came from inside a semihtml tag
boolean
Whether what we have came from semihtml mode
array
A pair: The Tempcode for the code box, and the title of the boxdo_emoticon(array $imgcode) : mixed
package | core_rich_media |
---|
array
Parameter triple(template,src,code)
mixed
Either 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 |
---|
boolean
Whether 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.
\MEMBER
The 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
integer
The offset of the tag in the Comcode
integer
The length of the Comcode
\LONG_TEXT
The Comcode being parsed
boolean
Whether the parser is/was in an HTML region
boolean
Whether 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 |
---|
\URLPATH
The URL
array
Attributes (e.g. width, height, length)
boolean
Whether there are admin privileges, to render dangerous media types
\?MEMBER
Member to run as (null: current member)
integer
Bitmask of media that we will support
\?ID_TEXT
Limit to a media rendering hook (null: no limit)
\?array
The hooks (null: cannot find one)force_clean_comcode(\LONG_TEXT $comcode) : \LONG_TEXT
package | core_rich_media |
---|
\LONG_TEXT
The messy Comcode.
\LONG_TEXT
The cleaned Comcode.get_defaults_multi(array $defaults, \ID_TEXT $param) : array
package | core_rich_media |
---|
array
All default values for the tag.
\ID_TEXT
Match name for the parameter set.
array
List of values.get_tutorial_link(\ID_TEXT $name) : \?SHORT_TEXT
package | core_rich_media |
---|
\ID_TEXT
The name of the value
\?SHORT_TEXT
The value (null: value not found)html_to_comcode(\LONG_TEXT $html, boolean $force = true
) : \LONG_TEXT
package | core_rich_media |
---|
\LONG_TEXT
The HTML to be converted
boolean
Whether to force full conversion regardless of settings
\LONG_TEXT
The equivalent Comcodein_tag_stack(array $tag_stack, array $tags) : boolean
package | core_rich_media |
---|
array
The tag stack
array
The tags
boolean
Whether one is presentparse_single_comcode_tag(string $data, string $tag = '\w+'
) : array
package | core_rich_media |
---|
string
The data being parsed
string
The tag we're expecting to see here / a regexp
array
A 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 |
---|
mixed
The URL
mixed
URL to render (no sessions etc)
array
Attributes (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.
boolean
Whether there are admin privileges, to render dangerous media types
\?MEMBER
Member to run as (null: current member)
integer
Bitmask of media that we will support
\?ID_TEXT
Limit to a media rendering hook (null: no limit)
\?URLPATH
The URL to do media detection against (null: use $url)
\?Tempcode
The rendered version (null: cannot render)semihtml_to_comcode(\LONG_TEXT $semihtml, boolean $force = false
) : \LONG_TEXT
package | core_rich_media |
---|
\LONG_TEXT
The Semi-HTML to be converted
boolean
Whether to force full conversion regardless of settings
\LONG_TEXT
The 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 |
---|
string
Plain-text/Comcode
boolean
Whether this is for generating an extract that does not need to be fully comprehended (i.e. favour brevity)
\?array
List of tags to preserve (null: none)
string
Purified plain-texttest_url(\URLPATH $url_full, string $tag_type, string $given_url, \MEMBER $source_member) : \Tempcode
package | core_rich_media |
---|
\URLPATH
URL to test.
string
Comcode tag type, to which the URL is associated.
string
URL actually provided.
\MEMBER
The member who is responsible for this Comcode
\Tempcode
Error message, or blank if no error.wysiwyg_comcode_markup_style(string $tag, \?array $attributes= null
, \?Tempcode $embed= null
) : integer
package | core_rich_media |
---|
string
The Comcode tag
\?array
The parameters (null: don't consider)
\?Tempcode
The contents of the tag (null: don't consider)
integer
The Comcode integration stylewysiwygify_media_set(\LONG_TEXT $semihtml) : \LONG_TEXT
package | core_rich_media |
---|
\LONG_TEXT
The Semi-HTML to be converted
\LONG_TEXT
The 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 |
---|