rcmail_html_page

Extends \rcmail_output_html

Class to create an empty HTML page with some default styles

package

Webmail

subpackage

View

Methods

Process template and write to stdOut

write(string $template = '') 
inherited

Arguments

$template

string

HTML template content

Object constructor

__construct() 
inherited

Set environment variable

set_env(string $name, mixed $value) 
inherited

Arguments

$name

string

Property name

$value

mixed

Property value

Getter for the current page title

get_pagetitle() : string
inherited

Response

string

The page title

Set skin

set_skin($skin) 
inherited

Arguments

$skin

Helper method to recursively read skin meta files and register search paths

load_skin($skin_path) 
inherited

Arguments

$skin_path

Check if a specific template exists

template_exists($name) : boolean
inherited

Arguments

$name

Response

boolean

True if template exists

Find the given file in the current skin path stack

get_skin_file($file, &$skin_path = null, $add_path = null) : mixed
inherited

Arguments

$file

$skin_path

$add_path

Response

mixed

Relative path to the requested file or False if not found

Register a GUI object to the client script

add_gui_object($obj, $id) : void
inherited

Arguments

$obj

$id

Call a client method

command() 
inherited abstract

Add a localized label to the client environment

add_label() 
inherited abstract

Invoke display_message command

show_message(string $message, string $type = 'notice', array $vars = null, boolean $override = true, int $timeout) 
inherited abstract

Arguments

$message

string

Message to display

$type

string

Message type [notice|confirm|error]

$vars

array

Key-value pairs to be replaced in localized text

$override

boolean

Override last set message

$timeout

int

Message displaying time in seconds

Delete all stored env variables and commands

reset() 
inherited

Redirect to a certain url.

redirect(mixed $p = array(), int $delay = 1) 
inherited abstract

Arguments

$p

mixed

Either a string with the action or url parameters as key-value pairs

$delay

int

Delay in seconds

Send output to the client.

send() 
inherited abstract

Parse a specific skin template and deliver to stdout (or return)

parse($name = 'main', $exit = true, $write = true) 
inherited
link

http://php.net/manual/en/function.exit.php

Arguments

$name

$exit

$write

Return executable javascript code for all registered commands

get_js_commands() : string
inherited

Response

string

$out

Make URLs starting with a slash point to skin directory

abs_url($str, $search_path = false) : string
inherited

Arguments

$str

$search_path

Response

string

Show error page and terminate script execution

raise_error(int $code, string $message) 
inherited

Arguments

$code

int

Error code

$message

string

Error message

Replace all strings ($varname) with the content of the according global variable.

parse_with_globals($input) 
inherited

Arguments

$input

Callback funtion for preg_replace_callback() in parse_with_globals()

globals_callback($matches) 
inherited

Arguments

$matches

Correct absolute paths in images and other tags add timestamp to .js and .css filename

fix_paths($output) 
inherited

Arguments

$output

Callback function for preg_replace_callback in write()

file_callback($matches) : string
inherited

Arguments

$matches

Response

string

Parsed string

Modify file by adding mtime indicator

file_mod($file) 
inherited

Arguments

$file

Public wrapper to dipp into template parsing.

just_parse(string $input) : string
inherited
uses
since 0.1-rc1

Arguments

$input

string

Response

string

Parse for conditional tags

parse_conditions(string $input) : string
inherited

Arguments

$input

string

Response

string

Determines if a given condition is met

check_condition($condition) : boolean
inherited
todo

Extend this to allow real conditions, not just "set"

Arguments

$condition

Response

boolean

True if condition is met, False if not

Inserts hidden field with CSRF-prevention-token into POST forms

alter_form_tag($matches) 
inherited

Arguments

$matches

Parse & evaluate a given expression and return its result.

eval_expression($expression) : mixed
inherited

Arguments

$expression

Response

mixed

Expression result

Search for special tags in input and replace them with the appropriate content

parse_xml($input) : string
inherited
todo

Use DOM-parser to traverse template HTML

Maybe a cache.

Arguments

$input

Response

string

Altered input string

Callback function for parsing an xml command tag and turn it into real html content

xml_command($matches) : string
inherited

Arguments

$matches

Response

string

Tag/Object content

Include a specific file and return it's contents

include_php($file) : string
inherited

Arguments

$file

Response

string

Contents of the processed file

Create and register a button

button($attrib) : string
inherited
todo

Remove all inline JS calls and use jQuery instead.

Remove all sprintf()'s - they are pretty, but also slow.

Arguments

$attrib

Response

string

HTML button

Link an external script file

include_script($file, $position = 'head') 
inherited

Arguments

$file

$position

Add inline javascript code

add_script($script, $position = 'head') 
inherited

Arguments

$script

$position

Link an external css file

include_css($file) 
inherited

Arguments

$file

Add HTML code to the page header

add_header(string $str) 
inherited

Arguments

$str

string

HTML code

Process template and write to stdOut

_write($templ = '', $base_path = '') 
inherited

Arguments

$templ

$base_path

Returns iframe object, registers some related env variables

frame(array $attrib, boolean $is_contentframe = false) : string
inherited

Arguments

$attrib

array

HTML attributes

$is_contentframe

boolean

Register this iframe as the 'contentframe' gui object

Response

string

IFRAME element

Create a form tag with the necessary hidden fields

form_tag($attrib, $content = null) : string
inherited

Arguments

$attrib

$content

Response

string

HTML code for the form

Build a form tag with a unique request token

request_form($attrib, $content = '') : string
inherited

Arguments

$attrib

$content

Response

string

HTML code for the form

GUI object 'username' Showing IMAP username of the current session

current_username($attrib) : string
inherited

Arguments

$attrib

Response

string

HTML code for the gui object

GUI object 'preloader' Loads javascript code for images preloading

preloader($attrib) : void
inherited

Arguments

$attrib

GUI object 'searchform' Returns code for search function

search_form($attrib) : string
inherited

Arguments

$attrib

Response

string

HTML code for the gui object

Builder for GUI object 'message'

message_container($attrib) : string
inherited

Arguments

$attrib

Response

string

HTML code for the gui object

GUI object 'charsetselector'

charset_selector($attrib) : string
inherited

Arguments

$attrib

Response

string

HTML code for the gui object

Include content from config/about.<LANG>.html if available

about_content($attrib) 
inherited

Arguments

$attrib

Setter for page title

set_pagetitle(string $title) 
inherited

Arguments

$title

string

Page title

Getter for the current skin path property

get_skin_path() 
inherited

Register a template object handler

add_handler($obj, $func) : void
inherited

Arguments

$obj

$func

Register a list of template object handlers

add_handlers($arr) : void
inherited

Arguments

$arr

Magic getter

__get($var) 
inherited

Arguments

$var

Setter for output charset.

set_charset(string $charset) 
inherited

To be specified in a meta tag and sent as http-header

Arguments

$charset

string

Charset name

Getter for output charset

get_charset() : string
inherited

Response

string

Output charset name

Environment variable getter.

get_env(string $name) : mixed
inherited

Arguments

$name

string

Property name

Response

mixed

Property value

Send HTTP headers to prevent caching a page

nocacheing_headers() 
inherited

Send header with expire date 30 days in future

future_expire_header($offset = 2600000) 
inherited

Arguments

$offset

Create an edit field for inclusion on a form

get_edit_field($col, $value, $attrib, $type = 'text') : string
inherited static

Arguments

$col

$value

$attrib

$type

Response

string

HTML field definition

Convert a variable into a javascript object notation

json_serialize($input) : string
inherited static

Arguments

$input

Response

string

Serialized JSON string

Constants

JS_OBJECT_NAME

JS_OBJECT_NAME
inherited

Properties

type

type : 
inherited

message

message : 
inherited

js_env

js_env : 
inherited

js_labels

js_labels : 
inherited

js_commands

js_commands : 
inherited

skin_paths

skin_paths : 
inherited

template_name

template_name : 
inherited

scripts_path

scripts_path : 
inherited

script_files

script_files : 
inherited

css_files

css_files : 
inherited

scripts

scripts : 
inherited

default_template

default_template : 
inherited

header

header : 
inherited

body

body : 
inherited

base_path

base_path : 
inherited

devel_mode

devel_mode : 
inherited

deprecated_templates

deprecated_templates : 
inherited

ajax_call

ajax_call : 
inherited

framed

framed : 
inherited

pagetitle

pagetitle : 
inherited

object_handlers

object_handlers : 
inherited

browser

browser : 
inherited

app

app : 
inherited

config

config : 
inherited

charset

charset : 
inherited

env

env : 
inherited