Class Smarty_custom

Description

The Smarty class modified for PLICI Smarty is a powerfull template engine

  • author: SimpliciWeb
  • version: $Id: config_smarty.inc 922 2008-03-22 09:35:03Z stephanet $

Located in /core/internal_components/common/globals/config_smarty.inc (line 40)

Smarty
   |
   --Smarty_custom
Variable Summary
Method Summary
 Smarty_custom Smarty_custom ([string $template_asked = ""])
 none assign (array|string $tpl_var, [mixed $value = null])
 none assign_by_ref (string $tpl_var,  &$value, mixed $value)
 none assign_by_ref_for_all (string $tpl_var,  &$value, mixed $value)
 none assign_by_ref_to_page (string $tpl_var,  &$value, mixed $value)
 none assign_for_all (string $tpl_var, [mixed $value = null])
 none assign_to_page (string $tpl_var, [mixed $value = null])
 bool canNotBeCached ()
 none display (string $template, [bool $notFromMessage = true], [bool $is_using_cache = false], [bool $notFromTBoUser = true])
 string getTemplateAsked ()
 string|false is_cached (string $p_tpl_name)
 void loadTabIndex ( &$r_tab_selected, integer $r_tab_selected)
 void saveTabIndex ()
 void setCannotBeCached (bool $p_not_be_cached)
 void setHtmlEditor (string $p_name, [string $p_value = NULL], [array $p_template = NULL], [array $p_bbcode = NULL], [string $p_skin = NULL], [string $p_lang = NULL])
 void setTemplateDirAndSecureDir (string $p_template_name)
 void xCloseDebugDiv ()
 void xDisplayInternal (string $template, [bool $notFromMessage = true], [bool $is_using_cache = false], [bool $notFromTBoUser = true])
 bool xOpenDebugDiv (string $p_type, string $p_include_name)
 string xxCloseDebugDiv ()
 string xxOpenDebugDiv (string $p_type, string $p_include_name)
 string _smarty_include (array $params)
Variables
string $compiler_class = 'Smarty_Compiler_custom' (line 126)

The class used for compiling templates.

string $compiler_file = "" (line 119)

The file that contains the compiler class. This can a full pathname, or relative to the php_include path.

string $id_of_cache = "" (line 47)

The MD5 cache id generated by PLICI for using the Smarty cache

string $memori_of_template_name = "" (line 774)

Template memory

bool $m_cannotbecached = false (line 53)

PLICI var to set if this page must use cache or not

string $m_memory_id_of_cache = "" (line 111)

Deprecated

  • deprecated: Seems to ben not used
siteInformation $m_object_siteinformation = null (line 95)

The PLICI main siteInformation class

TPageFo $m_object_t_page = null (line 88)

The PLICI main TPageFo class

*

array $m_tpl_var_for_all = array() (line 103)

The PLICI var containing variable for all the web page (in any template)

integer $page_id = 0 (line 73)

¨PLICI current page id

string $page_name = NULL (line 67)

Current page name from Url

string $page_tpl = NULL (line 80)
  • deprecated: Seems to be not used
string $template_asked = "" (line 60)

Template required by PLICI

Methods
Constructor Smarty_custom (line 136)

The class constructor.

PLICI load and configure the Smarty Object

Smarty_custom Smarty_custom ([string $template_asked = ""])
  • string $template_asked
assign (line 1037)

assigns values to template variables PLICI play with the vars to set it only for the needed template

none assign (array|string $tpl_var, [mixed $value = null])
  • array|string $tpl_var: the template variable name(s)
  • mixed $value: the value to assign
assign_by_ref (line 1067)

assigns values to template variables by reference PLICI play with the vars to set it only for the needed template

none assign_by_ref (string $tpl_var,  &$value, mixed $value)
  • string $tpl_var: the template variable name
  • mixed $value: the referenced value to assign
  • &$value
assign_by_ref_for_all (line 1000)

assigns values to template variables by reference PLICI set this template var for all the template for the web page

none assign_by_ref_for_all (string $tpl_var,  &$value, mixed $value)
  • string $tpl_var: the template variable name
  • mixed $value: the referenced value to assign
  • &$value
assign_by_ref_to_page (line 1025)

assigns values to template variables by reference PLICI set this template var only for the page template (only for details, not for links)

none assign_by_ref_to_page (string $tpl_var,  &$value, mixed $value)
  • string $tpl_var: the template variable name
  • mixed $value: the referenced value to assign
  • &$value
assign_for_all (line 987)

assigns values to template variables PLICI set this template var for all the tempaltes (details and links)

none assign_for_all (string $tpl_var, [mixed $value = null])
  • string $tpl_var: the template variable name
  • mixed $value: the referenced value to assign
assign_to_page (line 1013)

assigns values to template variables PLICI set this template var only for the page template (only for details, not for links)

none assign_to_page (string $tpl_var, [mixed $value = null])
  • string $tpl_var: the template variable name
  • mixed $value: the referenced value to assign
canNotBeCached (line 634)

Accessor for m_cannotbecached

bool canNotBeCached ()
display (line 715)

executes & displays the template results PLICI make many tratement to print the correct html code

none display (string $template, [bool $notFromMessage = true], [bool $is_using_cache = false], [bool $notFromTBoUser = true])
  • string $template
  • bool $notFromMessage: Set to false if is from the Message class only
  • bool $is_using_cache: Define if cache is used, then make different treatement
  • bool $notFromTBoUser: Set to false if is from the TBoUser class only
getTemplateAsked (line 976)

Accessor for $this->template_asked

string getTemplateAsked ()
is_cached (line 647)

test to see if valid cache exists for this template PLICI can bypass this function to force template to not be cached

  • return: results of _read_cache_file()
string|false is_cached (string $p_tpl_name)
  • string $p_tpl_name: name of template file
loadTabIndex (line 698)

PLICI load the tab index

void loadTabIndex ( &$r_tab_selected, integer $r_tab_selected)
  • integer $r_tab_selected
  • &$r_tab_selected
saveTabIndex (line 681)

PLICI save the tab index

void saveTabIndex ()
setCannotBeCached (line 615)

PLICI force this page to not be cached

void setCannotBeCached (bool $p_not_be_cached)
  • bool $p_not_be_cached
setHtmlEditor (line 669)

Assign to Smarty a var $p_name wich contain the htmleditor code to print

void setHtmlEditor (string $p_name, [string $p_value = NULL], [array $p_template = NULL], [array $p_bbcode = NULL], [string $p_skin = NULL], [string $p_lang = NULL])
  • string $p_name: The smarty var name
  • string $p_value: Value into the input
  • array $p_template: Template list
  • array $p_bbcode: BBcode list
  • string $p_skin: Skin name
  • string $p_lang: The default language code
setTemplateDirAndSecureDir (line 781)

From a short template path, find and set the good template and secure directory for Smarty.

void setTemplateDirAndSecureDir (string $p_template_name)
  • string $p_template_name: Template path
xCloseDebugDiv (line 321)

Used for closing the debug printing when acceding to a page with www.sample.com/?plici_debug=true

  • access: private
void xCloseDebugDiv ()
xDisplayInternal (line 808)

Display the template

  • access: private
void xDisplayInternal (string $template, [bool $notFromMessage = true], [bool $is_using_cache = false], [bool $notFromTBoUser = true])
  • string $template
  • bool $notFromMessage
  • bool $is_using_cache
  • bool $notFromTBoUser
xOpenDebugDiv (line 376)

Used for openning the debug printing when acceding to a page with www.sample.com/?plici_debug=true

  • access: private
bool xOpenDebugDiv (string $p_type, string $p_include_name)
  • string $p_type
  • string $p_include_name
xxCloseDebugDiv (line 311)

Used for closing the debug printing when acceding to a page with www.sample.com/?plici_debug=true

  • access: private
string xxCloseDebugDiv ()
xxOpenDebugDiv (line 332)

Used for openning the debug printing when acceding to a page with www.sample.com/?plici_debug=true

string xxOpenDebugDiv (string $p_type, string $p_include_name)
  • string $p_type
  • string $p_include_name
_smarty_include (line 391)

called for included templates PLICI manage this blocs here : <!--{include file="block_auto_container"}-->

string _smarty_include (array $params)
  • array $params

Documentation generated on Tue, 25 Mar 2008 15:32:57 +0100 by phpDocumentor 1.3.2