comcode_to_clean_text (line 102)
Make some Comcode more readable.
string
comcode_to_clean_text
(string $message_plain)
-
string
$message_plain: Comcode text to change
filter_css (line 576)
Filter out any CSS selector blocks from the given CSS if they definitely do not affect the given (X)HTML.
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.
string
filter_css
(string $css, string $context)
-
string
$css: CSS
-
string
$context: (X)HTML context under which CSS is filtered
form_to_email (line 807)
Send the posted form over email to the staff address.
void
form_to_email
([?string $subject = NULL], [string $intro = ''], [?array $fields = NULL])
-
?string
$subject: The subject of the email (NULL: from posted subject parameter).
-
string
$intro: The intro text to the mail.
-
?array
$fields: A map of fields to field titles to transmit. (NULL: all posted fields, except subject and email)
form_to_email_entry_script (line 777)
Entry script to process a form that needs to be emailed.
void
form_to_email_entry_script
()
init__mail (line 24)
Standard code module initialisation function.
void
init__mail
()
mail_wrap (line 163)
Attempt to send an e-mail to the specified recipient. The mail will be forwarding to the CC address specified in the options (if there is one, and if not specified not to cc).
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.
?tempcode
mail_wrap
(string $subject_tag, 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])
-
string
$subject_tag: The subject of the mail in plain text
-
LONG_TEXT
$message_raw: The message, as Comcode
-
?array
$to_email: The destination (recipient) e-mail addresses [array of strings] (NULL: site staff address)
-
?mixed
$to_name: The recipient name. Array or string. (NULL: site name)
-
EMAIL
$from_email: The from address (blank: site staff address)
-
string
$from_name: The from name (blank: site name)
-
integer
$priority: The message priority (1=urgent, 3=normal, 5=low)
-
?array
$attachments: An list of attachments (each attachment being a map, path=>filename) (NULL: none)
-
boolean
$no_cc: Whether to NOT CC to the CC address
-
?MEMBER
$as: Convert comcode->tempcode as this member (a privilege thing: we don't want people being able to use admin rights by default!) (NULL: guest)
-
boolean
$as_admin: Replace above with arbitrary admin
-
boolean
$in_html: HTML-only
-
boolean
$coming_out_of_queue: Whether to bypass queueing, because this code is running as a part of the queue management tools
sms_callback_script (line 757)
Handle maintenance of SMS numbers (block numbers if they prove unreliable).
void
sms_callback_script
()
sms_wrap (line 683)
Attempt to send an SMS.
void
sms_wrap
(string $message, array $to_sms)
-
string
$message: The message
-
array
$to_sms: The member IDs of those tracking this
_box_callback (line 91)
Make boxes readable. Callback for preg_replace_callback.
string
_box_callback
(array $matches)
_indent_callback (line 67)
Indent text lines. Callback for preg_replace_callback.
string
_indent_callback
(array $matches)
_mail_css_rep_callback (line 53)
Replace CSS image references such that it is cid'd. Callback for preg_replace_callback.
string
_mail_css_rep_callback
(array $matches)
_mail_img_rep_callback (line 39)
Replace an HTML img tag such that it is cid'd. Callback for preg_replace_callback.
string
_mail_img_rep_callback
(array $matches)
_title_callback (line 78)
Make titles readable. Callback for preg_replace_callback.
string
_title_callback
(array $matches)