File/nasmail/functions/page_header.php

Description

Copyright (c) 1999-2006 The SquirrelMail Project Team Copyright (c) 2006-2009 The NaSMail Project

Prints the page header (duh)

This script contains modifications ported from SquirrelMail 1.4.9+. See commits tagged with SM-PATCH keyword. Modifications are copyrighted by the SquirrelMail Project Team. Copyright (c) 2007 The SquirrelMail Project Team

  • version: $Id: page_header.php 1486 2009-11-08 12:52:32Z tokul $
  • license: GNU Public License
Includes
 include_once (SM_PATH.'functions/global.php') (line 18)

required files

 include_once (SM_PATH.'functions/imap_mailbox.php') (line 21)
 include_once (SM_PATH.'functions/strings.php') (line 19)
 include_once (SM_PATH.'functions/html.php') (line 20)
Functions
compose_Header (line 490)

Short form of displayPageHeader() function for message composition window

blatently copied/truncated/modified from the above function

void compose_Header (array $color, string $mailbox)
  • array $color: color Color theme
  • string $mailbox: mailbox Mailbox name
displayHtmlHeader (line 33)

Creates HTML page header

Function creates NaSMail HTML page header from <!DOCTYPE> to </head>. Always set up the language before calling these functions

void displayHtmlHeader ([string $title = 'NaSMail'], [string $xtra = ''], [boolean $do_hook = TRUE])
  • string $title: title page title
  • string $xtra: xtra custom headers added after title
  • boolean $do_hook: do_hook controls generic_header hook execution
displayInternalLink (line 162)

Outputs internal link

Same as makeInternalLink, but does echo instead of returning string.

  • deprecated:
void displayInternalLink (string $path, string $text, [string $target = ''], [boolean $do_hook = false])
  • string $path: path
  • string $text: text
  • string $target: target
  • boolean $do_hook: do_hook controls internal_link hook execution
displayMessageHeader (line 642)

Prints page header in pages related to message content display

Function arguments are 100% compatible with displayMessageHeader() arguments. It only turns off use of displayPageHeader() in NSM_LAYOUT_PREVIEW mode. Function MUST be used instead of stardard displayPageHeader, if script displays content related to displayed message. For example: properties of attached files or some actions related to data taken from message viewed in read_body.php. If script uses displayPageHeader() when it must use displayMessageHeader(), display will be broken in NSM_LAYOUT_PREVIEW mode.

  • since: 1.4
void displayMessageHeader (array $color, string $mailbox, [string $xtra = ''], [int $session = false])
  • array $color: color Color theme
  • string $mailbox: mailbox Mailbox name
  • string $xtra: xtra Additional javascript executed onload
  • int $session: session
displayPageHeader (line 225)

Prints page header and top menu lines

void displayPageHeader (array $color, string $mailbox, [string $xtra = ''], [int $session = false])
  • array $color: color Color theme
  • string $mailbox: mailbox Mailbox name
  • string $xtra: xtra Additional javascript executed onload
  • int $session: session
makeComposeLink (line 179)

Create compose link

Returns a link to the compose-page, taking in consideration the compose_in_new and javascript settings. Function handles compose in a new windows and session id issues internally.

  • return: a link to the compose page
string makeComposeLink (string $url, [string $text = null], [string $target = ''], [boolean $do_hook = false])
  • string $url: url the URL to the compose page
  • string $text: text the link text, default "Compose"
  • string $target: target
  • boolean $do_hook: do_hook controls execution of internal_link hook
makeExternalLink (line 131)

Same as makeInternalLink, but without base_uri prefix

void makeExternalLink (string $url, string $text, [string $target = ''], [boolean $do_hook = false])
  • string $url: url
  • string $text: text
  • string $target: target
  • boolean $do_hook: do_hook controls internal_link hook execution
makeInternalLink (line 94)
void makeInternalLink (string $path, string $text, [string $target = ''], [boolean $do_hook = false])
  • string $path: path link url relative to base uri.
  • string $text: text link name
  • string $target: target html target attribute value
  • boolean $do_hook: do_hook controls internal_link hook execution
nsm_page_title (line 579)

Returns standard formated NaSMail page title.

This function should be used after page header is printed with displayPageHeader(). It allows to use same formating style in all NaSMail pages.

Warning. This function returns html tags with open table cell. Scripts must close cell with '</td></tr></table>' after displaying own output.

  • return: html formated page title
  • since: 1.4
string nsm_page_title (string $title, [string $subtitle = ''], [boolean $backlink = false])
  • string $title: Page title
  • string $subtitle: Subtitle
  • boolean $backlink: Prints link to message. Scripts must provide passed_id, startMessage, mailbox and passed_ent_id parameters in GET or POST. passed_id is required. Others are optional, but link might be broken, if startMessage or mailbox are not set correctly.

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