/plugins/newmail/functions.php

Description

SquirrelMail NewMail plugin

Functions

Includes
include_once (SM_PATH.'config/newmail_config.php') (line 31)

load config

include_once (SM_PATH.'plugins/newmail/config_default.php') (line 26)

load default config

include_once (SM_PATH.'plugins/newmail/config.php') (line 33)
Constants
SM_NEWMAIL_FILETYPE_MP3 = 3 (line 19)
SM_NEWMAIL_FILETYPE_OGG = 4 (line 20)
SM_NEWMAIL_FILETYPE_SVG = 6 (line 22)
SM_NEWMAIL_FILETYPE_SWF = 5 (line 21)
SM_NEWMAIL_FILETYPE_WAV = 2 (line 18)

file type defines

Functions
newmail_create_media_tags (line 712)

Detects used media type and creates all need tags

  • return: html tags with media objects
string newmail_create_media_tags (string $newmail_media)
  • string $newmail_media
newmail_detect_filetype (line 312)

Function tries to detect if file contents match declared file type

Function returns default extension for detected mime type or 'false'

TODO: use $contents to check if file is in specified type

string newmail_detect_filetype (string $contents, string $type)
  • string $contents: file contents
  • string $type: file mime type
newmail_folder_status (line 175)
void newmail_folder_status ( $statusarr)
  • $statusarr
newmail_get_mediatype (line 346)

Function tries to detect uploaded file type

  • return: One of SM_NEWMAIL_FILETYPE_* defines or false.
integer newmail_get_mediatype (string $type, string $filename)
  • string $type
  • string $filename
newmail_get_mediatype_by_ext (line 380)

Function provides filetype detection for browsers, that upload files with application/octet-stream file type.

Ex. some version of Opera.

  • return: One of SM_NEWMAIL_FILETYPE_* defines or false.
integer newmail_get_mediatype_by_ext (string $filename)
  • string $filename
newmail_media_embed (line 568)

Creates embed tags of multimedia object

docs about embed Apple: http://www.apple.com/quicktime/authoring/embed.html

Warnings: * Returned string does not contain html closing tag. * embed tags will be created by newmail_media_objects() only when $newmail_mediacompat_mode option is enabled. Option is not enabled by default in order to comply to w3.org specs. * This is internal function, use newmail_media_objects() instead

  • return: embed html tags and attributes required by selected media type.
  • link: Info about embed tag
string newmail_media_embed (string $object, integer $type, string $path, [array $args = array()], [bool $addsuffix = true])
  • string $object: object name
  • integer $type: media object type
  • string $path: URL to media object
  • array $args: media object attributes
  • bool $addsuffix: controls addition of suffix to media object url
newmail_media_embed_close (line 675)

Adds closing tags for object

Warning: * This is internal function, use newmail_media_objects() instead

  • return: closing tag of media object
string newmail_media_embed_close (integer $type)
  • integer $type: media object type
newmail_media_object (line 452)

Creates object tags of multimedia object for browsers that comply to w3.org specifications.

Warnings:

  • Returned string does not contain html closing tag.
  • This is internal function, use newmail_media_objects() instead

  • return: object html tags and attributes required by selected media type.
  • link: W3.org specs
string newmail_media_object (string $object, integer $type, string $path, [array $args = array()], [bool $addsuffix = true])
  • string $object: object name
  • integer $type: media object type
  • string $path: URL to media object
  • array $args: media object attributes
  • bool $addsuffix: controls addition of suffix to media object url
newmail_media_objects (line 401)

Creates html object tags of multimedia object

Main function that creates multimedia object tags

  • return: object html tags and attributes required by selected media type.
string newmail_media_objects (string $object,  $types, string $path, [array $args = array()], [string $extra = ''], [bool $addsuffix = true], integer $type)
  • string $object: object name
  • integer $type: media object type
  • string $path: URL to media object
  • array $args: media object attributes
  • string $extra: tags that have to buried deep inside object tags
  • bool $addsuffix: controls addition of suffix to media object url
  • $types
newmail_media_object_close (line 652)

Adds closing tags for object

Warning: * This is internal function, use newmail_media_objects() instead

  • return: closing tag of media object
string newmail_media_object_close (integer $type)
  • integer $type: media object type
newmail_media_object_ie (line 510)

Creates multimedia object tags for Internet Explorer (Win32)

Warning: * Returned string does not contain html closing tag, because this multimedia object can include other media objects. * This is internal function, use newmail_media_objects() instead

  • return: object html tags and attributes required by selected media type.
  • todo: add ogg and svg support
string newmail_media_object_ie (string $object, integer $type, string $path, [array $args = array()], bool $addsuffix)
  • string $object: object name
  • integer $type: media object type
  • string $path: URL to media object
  • array $args: media object attributes
  • bool $addsuffix: controls addition of suffix to media object url
newmail_media_object_ie_close (line 629)

Adds closing tags for ie object

Warning: * This is internal function, use newmail_media_objects() instead

  • return: closing tag of media object
string newmail_media_object_ie_close (integer $type)
  • integer $type: media object type
newmail_media_prepare_args (line 699)

Converts media attributes to string

Warning: * attribute values are automatically sanitized by sm_encode_html_special_chars() * This is internal function, use newmail_media_objects() instead

  • return: string with object attributes
string newmail_media_prepare_args (array $args)
  • array $args: array with object attributes
newmail_optpage_register_block_function (line 41)

Register newmail option block

void newmail_optpage_register_block_function ()
newmail_plugin_function (line 217)

Insert needed data in left_main

void newmail_plugin_function ()
newmail_pref_function (line 135)

Load newmail plugin settings

void newmail_pref_function ()
newmail_sav_function (line 57)

Save newmail plugin settings

void newmail_sav_function ()
newmail_set_loadinfo_function (line 166)

Set loadinfo data

Used by option page when saving settings.

void newmail_set_loadinfo_function ()

Documentation generated on Mon, 13 Jan 2020 04:22:34 +0100 by phpDocumentor 1.4.3