apply_emoticons (line 90)
Get the text with all the smilie codes replaced with the correct XHTML. Smiles are determined by your forum system.
This is not used in the normal comcode chain - it's for non-comcode things that require smilies (actually in reality it is used in the Comcode chain if the optimiser sees that a full parse is not needed)
string
apply_emoticons
(string $text)
-
string
$text: The text to add smilies to (assumption: that this is XHTML)
comcode_escape (line 62)
Make text usable inside a string inside comcode
string
comcode_escape
(string $in)
comcode_to_tempcode (line 170)
Convert the specified comcode (unknown format) into a tempcode tree. You shouldn't output the tempcode tree to the browser, as it looks really horrible. If you are in a rare case where you need to output directly (not through templates), you should call the evaluate method on the tempcode object, to convert it into a string.
tempcode
comcode_to_tempcode
(LONG_TEXT $comcode, [?MEMBER $source_member = NULL], [boolean $as_admin = false], [?integer $wrap_pos = 60], [?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])
-
LONG_TEXT
$comcode: The comcode to convert
-
?MEMBER
$source_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
$as_admin: 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.
-
?integer
$wrap_pos: The position to conduct wordwrapping at (NULL: do not conduct word-wrapping)
-
?string
$pass_id: 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
$connection: The database connection to use (NULL: standard site connection)
-
boolean
$semiparse_mode: 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
$preparse_mode: Whether this is being pre-parsed, to pick up errors before row insertion.
-
boolean
$is_all_semihtml: Whether to treat this whole thing as being wrapped in semihtml, but apply normal security otherwise.
-
boolean
$structure_sweep: Whether we are only doing this parse to find the title structure
-
boolean
$check_only: Whether to only check the Comcode. It's best to use the check_comcode function which will in turn use this parameter.
-
?array
$highlight_bits: A list of words to highlight (NULL: none)
-
?MEMBER
$on_behalf_of_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)
do_emoticon (line 146)
Turn a triple of emoticon parameters into some actual tempcode.
mixed
do_emoticon
(array $imgcode)
-
array
$imgcode: Parameter triple(template,src,code)
html_to_comcode (line 73)
Convert (X)HTML into comcode
LONG_TEXT
html_to_comcode
(LONG_TEXT $html)
-
LONG_TEXT
$html: The HTML to converted
init__comcode (line 24)
Standard code module initialisation function.
void
init__comcode
()
strip_comcode (line 192)
Strip out any Comcode from this "plain text". Useful for semantic text is wanted but where Comcode is used as "the next best thing" we have.
string
strip_comcode
(string $self_title)
-
string
$self_title: Plain-text/Comcode