File/plugins/html_mail/functions.php

Description

NaSMail HTML Mail Plugin (modified SquirrelMail plugin version) Copyright (c) 2004-2005 Paul Lesneiwski <pdontthink@angrynerds.com> Copyright (c) 2006-2009 The NaSMail Project Licensed under the GNU GPL. For full terms see the file COPYING.

  • version: $Id: functions.php 1438 2009-01-31 14:11:08Z tokul $
Includes
 include_once (SM_PATH.'plugins/html_mail/load_config.php') (line 16)

load configuration

Functions
getBrowserType (line 736)

Detects used browser from HTTP_USER_AGENT string

  • return: first key - browsername (Opera, Explorer, Gecko). second key - version.
array getBrowserType ()
html_area_is_on_and_is_supported_by_users_browser (line 687)

Checks if htmlarea can be used in selected browser.

  • return: true = works. false = does not work
boolean html_area_is_on_and_is_supported_by_users_browser ()
html_mail_advanced_optpage_do (line 1231)

Adds html option block to advanced preferences

void html_mail_advanced_optpage_do ()
html_mail_alter_type_do (line 783)

Changes outgoing message format to include multipart

html and text parts if needed

  • return: modified message object
object Message html_mail_alter_type_do (array &$argv)
  • array &$argv: argv
html_mail_check_browser (line 1317)

Checks if browser supports used html editor engine

  • return: true = supports, false = does not support
  • since: 2.6
boolean html_mail_check_browser ()
html_mail_choose_type_on_the_fly (line 23)

Inserts controls on the compose page that let the user switch between HTML and text on the fly.

  • deprecated: Different function is used since NaSMail 1.3
void html_mail_choose_type_on_the_fly ()
html_mail_compose_button_row_do (line 57)

Adds buttons to NaSMail 1.3+ compose form

void html_mail_compose_button_row_do ()
html_mail_compose_form_process_do (line 1343)

Function is used to process NaSMail 1.3+ compose_form_process hook actions

  • since: 2.6
void html_mail_compose_form_process_do ( &$args, array $args)
  • array $args: hook parameters
  • &$args
html_mail_disable_squirrelspell_do (line 506)

Turns off spellcheck plugin when the user is composing HTML-formatted email, since spellcheck will choke on the HTML. This function also reformats the message body as needed (such as getting the HTML part to edit if user settings demand it).

void html_mail_disable_squirrelspell_do ()
html_mail_emoticons_do (line 488)

Enables display of emoticons on compose screen if possible

void html_mail_emoticons_do ()
html_mail_fix_image_urls (line 1289)

Fixes urls in html emails

Convert relative URIs to absolute; also removes URIs to download.php (embedded images, etc) until we find the time to code a way to forward on those images

  • return: html text with full image urls.
  • since: 2.6
string html_mail_fix_image_urls (string $string)
  • string $string: html formated text with relative image urls
html_mail_footer (line 300)

Inserts extra JavaScript at bottom of compose page that is needed by the

enhanced editor

void html_mail_footer ()
html_mail_header_do (line 106)

"Turns on" this plugin if the compose page is currently

being shown

void html_mail_header_do ()
html_mail_loading_prefs_do (line 1252)

Loads html_mail preferences

void html_mail_loading_prefs_do ()
html_mail_notes_button_row_do (line 82)

Adds buttons to compose form in Notes plugin

  • since: 2.7
void html_mail_notes_button_row_do ()
html_mail_notes_form_process_do (line 1372)

Function is used to process Notes plugin notes_form_process hook actions

  • since: 2.7
void html_mail_notes_form_process_do ( &$args, array $args)
  • array $args: hook parameters
  • &$args
html_mail_optpage_do (line 1155)

Adds html option block to compose preferences

void html_mail_optpage_do ()
html_mail_parse_icons_array (line 1024)

Converts array with emoticons to html tags

string html_mail_parse_icons_array (array $aIcons)
  • array $aIcons: aIcons array with icons. key = image file, value = name
html_mail_turn_on_htmlarea (line 120)

Do the actual insertion of the enhanced text editor

Also check that this plugin is in the correct order in $plugins array

void html_mail_turn_on_htmlarea ()
insert_emoticons (line 956)

Show emoticons on screen

void insert_emoticons ()
my_html_entity_decode (line 1051)

Converts html entities to utf-8

In PHP 5.0.0+ uses html_entity_decode() function. Function was introduced in PHP 4.3.0+, but it handles utf-8 only in 5.0.0 Beta1 and later. In older versions internal NaSMail functions are used.

  • return: converted text
string my_html_entity_decode (string $text)
  • string $text: text
sqHTMLWordWrap (line 1083)

Wraps text at $wrap characters while preserving HTML tags

Has a problem with special HTML characters, so call this before you do character translation.

Specifically, &#039 comes up as 5 characters instead of 1. This should not add newlines to the end of lines.

void sqHTMLWordWrap ( &$line,  $wrap)
  • &$line
  • $wrap

Documentation generated on Sun, 22 Nov 2009 17:36:31 +0200 by phpDocumentor 1.4.3