Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

functions.php File Reference

Go to the source code of this file.

Namespaces

namespace  ImaComm

Functions

 theme ($theme)
 getAlbum ()
 onPage ()
 showPage ()
 deverror ($msg, $serious=false)
 genLink ($title=null, $vars=null, $href=null)
 formBegin ($href=null, $method="post")
 formEnd ()
 popupLink ($title, $href)
 parseValue ($value, $type)
 dprint ($var)

Variables

 add = array("album", "image")
 _functions_prefix = realpath(dirname(__FILE__))


Function Documentation

deverror msg,
serious = false
 

Prints information about developer error, i.e. notices that has happened an error.

Parameters:
string $msg Message to display to user
boolean $serious Is the error serious error, i.e. should we die after error has occured.
Returns:
string Return HTML code if error was not serious. Otherwise doesn't return (PHP exits)

Definition at line 157 of file functions.php.

Referenced by ThemeEngine::loadTemplate(), noMethod(), SetupDocument::partheader(), and showPage().

dprint var  ) 
 

Prints debug information about wanted variable with print_r-function.

Parameters:
mixed $var Variable to print out
Returns:
string Debug output

Definition at line 321 of file functions.php.

Referenced by ThemeEngine::applyTemplate().

formBegin href = null,
method = "post"
 

Start HTML form and adds maybe some hidden form values

Parameters:
string $href Address where form should be sent. If null, current PHP page is used.
string $method Form method, POST or GET
Returns:
string HTML code

Definition at line 222 of file functions.php.

References add.

Referenced by Document::addCommentBox(), and Document::signinout().

formEnd  ) 
 

Return HTML Form ending tag

Returns:
string HTML code

Definition at line 243 of file functions.php.

Referenced by Document::addCommentBox(), and Document::signinout().

genLink title = null,
vars = null,
href = null
 

Generates automatically link with wanted title and extra variables. Adds end to the link also some must-have-variables, e.g. current album, photo etc.

Parameters:
string $title Title to show as link text
string $vars Colon separated variables that should be add. Variables can have also values, separeted with =, e.g. var1=val1:var2:var3=val2
Returns:
string HTML code

Definition at line 182 of file functions.php.

References add.

Referenced by Document::albums(), Document::comments(), Document::navigation(), and Document::signinout().

getAlbum  ) 
 

Parses current album from album path and returns a correct album ID. Or -root- if user is on the top level.

Returns:
string Album ID

Definition at line 83 of file functions.php.

References album.

Referenced by Document::addCommentBox(), and Document::comments().

onPage  ) 
 

This function returns current PHP page without extension. E.g. is called from index.php, returns index

Returns:
string Page name without extension

Definition at line 103 of file functions.php.

Referenced by Document::addCommentBox().

parseValue value,
type
 

Gets a value and type what it should be and checks if given value fits to the type. If not, return closest possible value, e.g. false/true, 0, etc.

Parameters:
mixed $value Value to check
string $type Type, e.g. integer, string, boolean or theme
Returns:
mixed Correct value that is type $type

Definition at line 278 of file functions.php.

References _functions_prefix.

Referenced by Configuration_XML::loadData().

popupLink title,
href
 

Creates a link which creates a popup window to show wanted page.

Parameters:
string $title Title to show as a link text.
string $href Address to go in a popup window
Returns:
string HTML code of wanted popup window

Definition at line 260 of file functions.php.

Referenced by Document::about(), and Document::failedSignIn().

showPage  ) 
 

Load correct page from theme stock and load it. Notice that you must have loaded active them with theme(theme name) function.

See also:
theme()

Definition at line 116 of file functions.php.

References _SESSION, deverror(), dirs, document, and theme().

theme theme  ) 
 

Select preferred theme or if it could not be founded, select first theme in themes/-folder

Parameters:
string $theme Theme name that should be tried to load. If wanted theme doesn't exists, first theme in themes-folder is loaded instead.

Definition at line 41 of file functions.php.

References _SESSION, and theme().

Referenced by Document::comments(), and Document::navigation().


Variable Documentation

_functions_prefix = realpath(dirname(__FILE__))
 

Definition at line 33 of file functions.php.

add = array("album", "image")
 

Definition at line 31 of file functions.php.

Referenced by formBegin(), and genLink().


Generated on Sun Oct 19 11:08:01 2003 for ImaComm by doxygen1.3