Jelix 1.6.40

jelix

Packages

auth
controllers
core
modules
dao
db
events
tests
forms
installer
kvdb
cache
coord
debugbar
responsehtml
logger
jtpl
urls
utils
feeds
datatypes

Interfaces, Classes and Traits

ConfigCompilerPluginInterface
interface for plugins of jConfigCompiler
jILogMessage
interface for log message. A component which want to log a message can use an object implementing this interface.
jILogger
interface for loggers
jIHTMLResponsePlugin
interface for plugins for jResponseBasicHtml or jResponseHtml, which allows to make changes in the response at several step
CaptchaValidatorInterface
Interface for validators for the captcha widget
ParentWidgetInterface
Interface for widgets that can have children widget: main builder, choice etc.
WidgetInterface
Interface for HTML widgets plugins
jIKVPersistent
interface for KV driver which store values in a persistent manner (in a file...)
jIKVttl
interface for KV driver which support 'time to live' on values useful to use the driver as a cache storage
jIKVSet
jIDebugbarPlugin
interface for plugins for the debugbar
jAuthDriverBase
base class for some jAuth drivers
jBasicErrorHandler
Error handlers for the framework.
jFileLogger
logger storing message into a file
jLogErrorMessage
this class is formatting an error message for a logger
jLogMessage
class that handles a simple message for a logger
jLogDumpMessage
class that handles a dump of a php value, for a logger
jMailLogger
logger sending message by email
jStderrLogger
logger sending message to stderr
jStdoutLogger
logger sending message to stdout
jSyslogLogger
logger storing message into syslog
jResponseHtml4
Response class for HTML 4 or XHTML 1.x
jDaoDbMapper
It allows to create tables corresponding to a dao file.
jSQLLogMessage
class that handles a sql query for a logger
jDbIndex
Represents an index on some columns
jDbConstraint
jDbUniqueKey
represents a unique key
jDbPrimaryKey
used to declare a primary key
jDbReference
used to declare a foreign key
jDbColumn
jDbParameters
allow to normalize & analyse database parameters.
jDbSchema
jDbTable
ApacheCGI
Simulate an Apache with CGI module or fastcgi module + PHP-FPM
ApacheMod
simulate a server configured with apache + mod_php
FakeServerConf
base class for servers
HtmlBuilder
Main HTML form builder
ReCaptchaValidator
SimpleCaptchaValidator
RootWidget
WidgetBase
textInstallReporter
simple text reporter
ghostInstallReporter
a reporter which reports... nothing
jInstallerEntryPoint
container for entry points properties
jInstallerModuleInfos
Properties of a module, and values about its installation status
jKVDb
main class to access to key-value storage databases
jKVDriver
zendframeworkCoordPlugin
Jelix plugin to use the Zend Framework library
mssqlDaoBuilder
driver for jDaoCompiler
mssqlDbConnection
mssqlDbResultSet
Layer encapsulation resultset mssql.
mssqlDbTools
Provides utilities methods for a database
mysqliDbStatement
sqlsrvDaoBuilder
driver for jDaoCompiler
sqlsrvDbConnection
sqlsrvDbResultSet
Layer encapsulation resultset mssql.
sqlsrvDbTools
Provides utilities methods for a database
defaultlogDebugbarPlugin
plugin to show general message logs
sessiondataDebugbarPlugin
plugin to show content of a session
soaplogDebugbarPlugin
plugin to show soap message
sqllogDebugbarPlugin
plugin to show all sql queries into the debug bar
debugbarItemInfo
information for a component a debug bar
debugbarHTMLResponsePlugin
plugin for jResponseHTML, it displays a debugbar
errorsDebugbarPlugin
native plugin for the debugbar, which displays list of errors, warnings.
minifyHTMLResponsePlugin
plugin for jResponseHTML, which minify css and js files
dbKVDriver
Driver for jKVDB, that uses an SQL table to store key/value data.
file2KVDriver
fileServer
legacysyslogLogger
logger storing message into syslog using old api
soapfileLogger
logger storing soap message into several xml files
jAtom10Info
jAtom10Item
jAtom10Reader
jRSS20Info
jRSS20Item
jRSS20Reader
jLogSoapMessage
class that handles a dump of a php value, for a logger
SoapClientDebug
jSoapObject
classes that are mapped to soap types could inherits from this object in order to have some helpers and a better mapping than the default soap mapper
jVersionComparator
class to compare version numbers. it supports the following keywords: "pre", "-dev", "b", "beta", "a", "alpha".

Table of Contents

BYTECODE_CACHE_EXISTS  = unction_exists('opcache_compile_file') || unction_exists('apc_cache_info') || unction_exists('eaccelerator_info') || unction_exists('xcache_info')
JELIX_LIB_CORE_PATH  = JELIX_LIB_PATH . 'core/'
JELIX_LIB_PATH  = __DIR__ . '/'
JELIX_LIB_UTILS_PATH  = JELIX_LIB_PATH . 'utils/'
JELIX_NAMESPACE_BASE  = 'http://jelix.org/ns/'
base of namespace path used in xml files of jelix
JELIX_VERSION  = '1.6.40'
Version number of Jelix
LIB_PATH  = dirname(JELIX_LIB_PATH) . '/'
SERVICES_JSON_LOOSE_TYPE  = 16
hash_equals()  : mixed
sha1WithSalt()  : mixed
function to use to crypt password. use the password_salt value in the config file of the plugin.
bcrypt()  : mixed
hash password with blowfish algorithm. use the password_salt value in the config file of the plugin
jelix_read_ini()  : mixed
jelix_scan_module_sel()  : mixed
jelix_scan_action_sel()  : mixed
jelix_scan_class_sel()  : mixed
jelix_scan_locale_sel()  : mixed
jelix_autoload()  : mixed
function used by php to try to load an unknown class
checkAppOpened()  : mixed
check if the application is opened. If not, it displays the yourapp/install/closed.html file with a http error (or lib/jelix/installer/closed.html), and exit.
checkAppNotInstalled()  : mixed
check if the application is not installed. If the app is installed, an error message appears and the scripts ends.
isAppInstalled()  : mixed
jtpl_block_common_ifuserconnected()  : string
a special if block to test easily if the current user is connected
jtpl_block_common_ifusernotconnected()  : string
a special if block to test easily if the current user is not connected
jtpl_block_common_stripws()  : mixed
remove all extra whitespaces
jtpl_cfunction_common_break()  : mixed
cfunction to allow to had a break instruction in a template
jtpl_cfunction_common_fetchtpl()  : string
fetch the content of a template without template variables of calling template, except private variables setted by some plugins
jtpl_cfunction_common_fetchzone()  : string
cfunction to fetch the content of a zone into a tpl var
jtpl_cfunction_common_include()  : string
function plugin : include a template into another template
jtpl_cfunction_common_zone()  : string
cfunction plugin : include the content of a zone
jtpl_function_common_counter()  : mixed
function plugin : Increment and print a counter on all calls.
jtpl_function_common_counter_init()  : mixed
function plugin : Init a counter.
jtpl_function_common_counter_reset()  : mixed
function plugin : Reset a counter.
jtpl_function_common_counter_reset_all()  : mixed
function plugin : Reset all the counters.
jtpl_function_common_cycle_init()  : mixed
Type: function<br> Name: cycle_init<br> Date: Feb, 2008<br> Purpose: initialize cycling through given values<br> Input: - values = comma separated list of values to cycle - name = name of cycle (optional)
jtpl_function_common_cycle_reset()  : mixed
Type: function<br> Name: cycle_reset<br> Date: Feb, 2008<br> Purpose: reset the cycle of a given cycle name or the default<br> Input: - name = name of cycle (optional)
jtpl_function_common_dumptolog()  : mixed
Dump a value into log files
jtpl_function_common_repeat_string()  : mixed
Repeat a string
jtpl_function_common_tolog()  : mixed
Dump a value into log files
jtpl_modifier_common_cat()  : string
Modifier plugin : catenate a value to a variable
jtpl_modifier_common_count_array()  : int
modifier plugin : display count of an array
jtpl_modifier_common_count_characters()  : int
Modifier plugin : count the number of characters in a text
jtpl_modifier_common_count_paragraphs()  : int
modifier plugin : count the number of paragraphs in a text
jtpl_modifier_common_count_records()  : int
modifier plugin : display count of a DbResultSet Object (how many records)
jtpl_modifier_common_count_sentences()  : int
modifier plugin : count the number of sentences in a text
jtpl_modifier_common_count_words()  : int
modifier plugin : count the number of words in a text
jtpl_modifier_common_date_format()  : string
modifier plugin : format a date <pre> {$mydate|date_format:"%b %e, %Y"} </pre>
jtpl_modifier_common_datetime()  : string
modifier plugin : change the format of a date.
jtpl_modifier_common_implode()  : string
modifier plugin : apply the implode function on the given value
jtpl_modifier_common_indent()  : string
Modifier plugin: indent lines of text
jtpl_modifier_common_jdatetime()  : string
modifier plugin : change the format of a date
jtpl_modifier_common_number_format()  : string
NumberFormat plugin for jTpl that wraps PHP number_format function
jtpl_modifier_common_regex_replace()  : string
modifier plugin : regular epxression search/replace
jtpl_modifier_common_replace()  : string
modifier plugin : simple search/replace
jtpl_modifier_common_round()  : float
Modifier plugin : Rounds a float
jtpl_modifier_common_spacify()  : string
modifier plugin : add spaces between characters in a string
jtpl_modifier_common_sprintf()  : string
modifier plugin : format strings via sprintf
jtpl_modifier_common_strip()  : string
modifier plugin : Replace all repeated spaces, newlines, tabs with a single space or supplied replacement string
jtpl_modifier_common_truncate()  : string
modifier plugin : Truncate a string
jtpl_modifier_common_truncatehtml()  : string
modifier plugin : cut a html formated string and close all opened tags so that it doesn't inpact on the rest of the page You should use this modifier in a zone so that the return value is cached Plugin from sniplr (original sources can be found here: http://snipplr.com/view.php?codeview&id=3618 ) <pre>{$mytext|wordwrap} {$mytext|truncatehtml:150:"\n<a href="...">read full article</a>"} {$mytext|truncatehtml:45} </pre>
jtpl_modifier_common_wiki()  : string
modifier plugin : transform a wiki text to another format you can use other transformations by given the name of corresponding wikirenderer rules <pre> {$var|wiki} {$var|wiki:"classicwr_to_xhtml"} </pre>
jtpl_modifier_common_wordwrap()  : string
modifier plugin : wrap a string of text at a given length. Same parameters as the php wordwrap function <pre>{$mytext|wordwrap} {$mytext|wordwrap:40} {$mytext|wordwrap:45:"\n"} {$mytext|wordwrap:60:"\n":true} </pre>
jtpl_block_html_form()  : string
a block to display an html form, with data from a jforms
jtpl_block_html_formcontrols()  : string
a block to loop over controls list of a form and to display them
jtpl_block_html_formdata()  : string
a block to display only data of a form
jtpl_block_html_formsubmits()  : string
a block to loop over submit button list of a form and to display them
jtpl_block_html_ifctrl()  : string
a special if block to test easily the current control name TO BE USED inside a {formcontrols} block
jtpl_block_html_ifctrl_value()  : string
a special if block to test easily the current control value TO BE USED inside a {formcontrols} block
jtpl_block_html_ifctrlexists()  : string
a special if block to check if a ctrl exist in the form TO BE USED inside a `{form}` or `{formadata}` block
jtpl_block_common_jscompress()  : string
jscompress : formate a js block code by removing spaces, tabs and returns.
jtpl_block_html_swf()  : string
swf plugin : Adds html code to display a swf
jtpl_block_html_swfjs()  : string
swfjs plugin : Adds html and JS code to display a swf
jtpl_cfunction_html_const()  : string
compiled function plugin : display a constant. Not available in untrusted templates
jtpl_cfunction_html_formfull()  : string
Display a full form without the use of other plugins.
jtpl_cfunction_html_swfbiscuit()  : string
swfbiscuit plugin : Adds html code to display a swf
jtpl_function_html_ctrl_control()  : mixed
function plugin : print the html content of a form control. You should use this plugin inside a formcontrols block
jtpl_function_html_ctrl_label()  : mixed
function plugin : print the label of a form control. You should use this plugin inside a formcontrols block
jtpl_function_html_ctrl_rawvalue()  : mixed
function plugin : print the raw value of a form control, without trying to display a corresponding label and without to display values of child controls. You should use this plugin inside a formcontrols block
jtpl_function_html_ctrl_value()  : mixed
function plugin : print the value of a form control. You should use this plugin inside a formcontrols block
jtpl_function_html_diff()  : mixed
function plugin : show a diff between two string
jtpl_function_html_formdatafull()  : mixed
Display all data of a form without the use of other plugins.
jtpl_function_html_formreset()  : mixed
function plugin : print the html content of a form reset button.
jtpl_function_html_formsubmit()  : mixed
function plugin : print the html content of a form submit button. You can use this plugin inside a formsubmits block
jtpl_function_html_formurl()  : mixed
function plugin : write the url corresponding to the given jelix action
jtpl_function_html_formurlparam()  : mixed
function plugin : write the url corresponding to the given jelix action
jtpl_function_html_gravatar()  : mixed
gravatar plugin : write the url corresponding to the image of the gravatar account identified by the given email address
jtpl_function_html_hook()  : mixed
hook plugin
jtpl_function_html_image()  : mixed
image plugin : write the url corresponding to the image
jtpl_function_html_jfullurl()  : mixed
function plugin : write the full url (with domain name) corresponding to the given jelix action
jtpl_function_html_jlocale()  : mixed
function plugin : write the localized string corresponding to the given locale key
jtpl_function_html_jmessage()  : mixed
function plugin : Display messages from jMessage
jtpl_function_html_jrooturl()  : mixed
function plugin : write the root url corresponding to the given ressource type If this ressource type is not specified in the config file, returned value will be basePath
jtpl_function_html_jurl()  : mixed
function plugin : write the url corresponding to the given jelix action
jtpl_function_html_jurlpattern()  : mixed
function plugin: write the url corresponding to the given jelix action, inserting placeholder name (between two %) for some parameter, so you can generate the url dynamically in JS by replacing placeholders by javascript values.
jtpl_function_html_link_to_remote()  : mixed
function plugin : Ajax request
jtpl_function_html_mailto()  : mixed
Examples: <pre> {mailto array("address"=>"me@domain.com")} {mailto array("address"=>"me@domain.com","encode"=>"javascript")} {mailto array("address"=>"me@domain.com","encode"=>"hex")} {mailto array("address"=>"me@domain.com","subject"=>"Hello to you!")} {mailto array("address"=>"me@domain.com","cc"=>"you@domain.com,they@domain.com")} {mailto array("address"=>"me@domain.com","extra"=>'class="mailto"')} </pre>
jtpl_function_html_pagelinks()  : mixed
displays page links
jtpl_function_html_resurl()  : mixed
function plugin : write the url corresponding to a resource stored in a www directory of a module
jtpl_function_html_urljsstring()  : mixed
function plugin : write the url corresponding to the given jelix action for javascript
jtpl_meta_html_html()  : mixed
meta plugin : modify an html response object
jtpl_meta_html_htmlmodule()  : mixed
meta plugin : allow to add css files and js files stored into modules, in an html response object
jtpl_modifier_html_nl2br()  : string
modifier plugin : convert \r\n, \r or \n to <<br/>> Example: {$text|nl2br}
jtpl_modifier_html_vardump()  : string
Dump any value
jtpl_block_ltx2pdf_lcmd()  : string
a special to insert latex content
jtpl_block_ltx2pdf_lenv()  : string
a special to insert latex content
jtpl_function_ltx2pdf_jlocale()  : mixed
function plugin : write the localized string corresponding to the given locale key
jtpl_function_ltx2pdf_jurl()  : mixed
function plugin : write the url corresponding to the given jelix action
jtpl_modifier_ltx2pdf_latex()  : the
modifier plugin : simple search/replace for latex chars
jtpl_cfunction_text_const()  : string
compiled function plugin : display a constant. Not available in untrusted templates
jtpl_function_text_formdatafull()  : mixed
Display all data of a form without the use of other plugins.
jtpl_function_text_jfullurl()  : mixed
function plugin : write the full url (with domain name) corresponding to the given jelix action
jtpl_function_text_jlocale()  : mixed
function plugin : write the localized string corresponding to the given locale key
jtpl_function_text_jurl()  : mixed
function plugin : write the url corresponding to the given jelix action
jtpl_modifier_html_vardump()  : string
Dump any value
jtpl_cfunction_xml_const()  : string
compiled function plugin : display a constant. Not available in untrusted templates
jtpl_function_xml_jfullurl()  : mixed
function plugin : write the full url (with domain name) corresponding to the given jelix action
jtpl_function_xml_jlocale()  : mixed
function plugin : write the localized string corresponding to the given locale key
jtpl_function_xml_jurl()  : mixed
function plugin : write the url corresponding to the given jelix action
jtpl_meta_xml_xml()  : mixed
meta plugin : modify an xml response object
is_resource()  : bool
Check if the given value is a resource or not.

Constants

BYTECODE_CACHE_EXISTS

public mixed BYTECODE_CACHE_EXISTS = unction_exists('opcache_compile_file') || unction_exists('apc_cache_info') || unction_exists('eaccelerator_info') || unction_exists('xcache_info')

JELIX_LIB_CORE_PATH

public mixed JELIX_LIB_CORE_PATH = JELIX_LIB_PATH . 'core/'

JELIX_LIB_PATH

public mixed JELIX_LIB_PATH = __DIR__ . '/'

JELIX_LIB_UTILS_PATH

public mixed JELIX_LIB_UTILS_PATH = JELIX_LIB_PATH . 'utils/'

JELIX_NAMESPACE_BASE

base of namespace path used in xml files of jelix

public mixed JELIX_NAMESPACE_BASE = 'http://jelix.org/ns/'
Tags
name

JELIX_NAMESPACE_BASE

JELIX_VERSION

Version number of Jelix

public mixed JELIX_VERSION = '1.6.40'
Tags
name

JELIX_VERSION

LIB_PATH

public mixed LIB_PATH = dirname(JELIX_LIB_PATH) . '/'

SERVICES_JSON_LOOSE_TYPE

public mixed SERVICES_JSON_LOOSE_TYPE = 16

Functions

hash_equals()

hash_equals(mixed $known_str, mixed $user_str) : mixed
Parameters
$known_str : mixed
$user_str : mixed
Return values
mixed

sha1WithSalt()

function to use to crypt password. use the password_salt value in the config file of the plugin.

sha1WithSalt(mixed $salt, mixed $password) : mixed
Parameters
$salt : mixed
$password : mixed
Tags
deprecated
Return values
mixed

bcrypt()

hash password with blowfish algorithm. use the password_salt value in the config file of the plugin

bcrypt(mixed $salt, mixed $password[, mixed $iteration_count = 12 ]) : mixed
Parameters
$salt : mixed
$password : mixed
$iteration_count : mixed = 12
Return values
mixed

jelix_read_ini()

jelix_read_ini(mixed $fileName[, mixed $config = null ]) : mixed
Parameters
$fileName : mixed
$config : mixed = null
Return values
mixed

jelix_scan_module_sel()

jelix_scan_module_sel(mixed $selStr, mixed $selObj) : mixed
Parameters
$selStr : mixed
$selObj : mixed
Return values
mixed

jelix_scan_action_sel()

jelix_scan_action_sel(mixed $selStr, mixed $selObj, mixed $actionName) : mixed
Parameters
$selStr : mixed
$selObj : mixed
$actionName : mixed
Return values
mixed

jelix_scan_class_sel()

jelix_scan_class_sel(mixed $selStr, mixed $selObj) : mixed
Parameters
$selStr : mixed
$selObj : mixed
Return values
mixed

jelix_scan_locale_sel()

jelix_scan_locale_sel(mixed $selStr, mixed $selObj) : mixed
Parameters
$selStr : mixed
$selObj : mixed
Return values
mixed

jelix_autoload()

function used by php to try to load an unknown class

jelix_autoload(mixed $class) : mixed
Parameters
$class : mixed
Return values
mixed

checkAppOpened()

check if the application is opened. If not, it displays the yourapp/install/closed.html file with a http error (or lib/jelix/installer/closed.html), and exit.

checkAppOpened() : mixed

This function should be called in all entry point, before the creation of the coordinator.

Tags
see
jAppManager
todo

migrate the code to jAppManager or jApp

Return values
mixed

checkAppNotInstalled()

check if the application is not installed. If the app is installed, an error message appears and the scripts ends.

checkAppNotInstalled() : mixed

It should be called only by some scripts like an installation wizard, not by an entry point.

Tags
todo

migrate the code to jAppManager or jApp

Return values
mixed

isAppInstalled()

isAppInstalled() : mixed
Tags
todo

migrate the code to jAppManager or jApp

Return values
mixed

jtpl_block_common_ifuserconnected()

a special if block to test easily if the current user is connected

jtpl_block_common_ifuserconnected(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $params = array() ]) : string
{ifuserconnected} ..here generated content if the user is connected  {/ifuserconnected}
Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$params : array<string|int, mixed> = array()

no parameters. array should be empty

Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_common_ifusernotconnected()

a special if block to test easily if the current user is not connected

jtpl_block_common_ifusernotconnected(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $params = array() ]) : string
{ifusernotconnected} ..here generated content if the user is NOTconnected  {/ifusernotconnected}
Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$params : array<string|int, mixed> = array()

no parameters. array should be empty

Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_common_stripws()

remove all extra whitespaces

jtpl_block_common_stripws(mixed $compiler, mixed $begin[, mixed $param = array() ]) : mixed
Parameters
$compiler : mixed
$begin : mixed
$param : mixed = array()
Return values
mixed

jtpl_cfunction_common_break()

cfunction to allow to had a break instruction in a template

jtpl_cfunction_common_break(mixed $compiler) : mixed
    {for $i = 1; $i < 10; $i++}
  • {$i}
  • {if $i == '4'}{break}{/if} {/for}
Parameters
$compiler : mixed
Return values
mixed

jtpl_cfunction_common_fetchtpl()

fetch the content of a template without template variables of calling template, except private variables setted by some plugins

jtpl_cfunction_common_fetchtpl(jTplCompiler $compiler[, array<string|int, mixed> $param = array() ]) : string

It allows to use a template as a recursive way, in a cleaner way than include, because it doesn't inherits of variables from the parent template

Meta content must not use template variable given to 'fetch', as they will not be available at the time of meta processing (except if they are a copy of template variable of the parent template)

{fetch 'myModule~foo', array('varname'=>'value) }
Parameters
$compiler : jTplCompiler

the template compiler

$param : array<string|int, mixed> = array()

0=>string the template selector (string) 1=>array a list of template variable to inject into the template 2=>boolean : inherits (true) or not of private variables. default is true.

Return values
string

the php code corresponding to the function content

jtpl_cfunction_common_fetchzone()

cfunction to fetch the content of a zone into a tpl var

jtpl_cfunction_common_fetchzone(jTplCompiler $compiler[, mixed $params = array() ]) : string
 {fetchzone 'myVar', 'myModule~myzone', array('foo'=>'bar)}
{if $myVar !== ''}
{$myVar}
{/if}
Parameters
$compiler : jTplCompiler

the template compiler

$params : mixed = array()
Return values
string

the php code corresponding to the function content

jtpl_cfunction_common_include()

function plugin : include a template into another template

jtpl_cfunction_common_include(jTplCompiler $compiler[, array<string|int, mixed> $param = array() ]) : string
{include 'myModule~foo'}
Parameters
$compiler : jTplCompiler

the template compiler

$param : array<string|int, mixed> = array()

0=>$string the template selector (string)

Return values
string

the php code corresponding to the function content

jtpl_cfunction_common_zone()

cfunction plugin : include the content of a zone

jtpl_cfunction_common_zone(jTplCompiler $compiler[, mixed $params = array() ]) : string
 {zone 'myModule~myzone'}
{zone 'myModule~myzone',array('foo'=>'bar)}
Parameters
$compiler : jTplCompiler

the template compiler

$params : mixed = array()
Return values
string

the php code corresponding to the function content

jtpl_function_common_counter()

function plugin : Increment and print a counter on all calls.

jtpl_function_common_counter(jTpl $tpl[, string $name = '' ][, bool $print = true ]) : mixed
{for $i=0;$i<10;$i++}{counter 'name', true}{/for}
Parameters
$tpl : jTpl

The template

$name : string = ''

The name of the counter

$print : bool = true

Print the counter or not

Return values
mixed

jtpl_function_common_counter_init()

function plugin : Init a counter.

jtpl_function_common_counter_init(jTpl $tpl[, string $name = '' ][, string $type = '0' ][, string|int $start = 1 ][, int $incr = 1 ]) : mixed
{counter_init 'name', 'type', 'start', 'incr'}
Parameters
$tpl : jTpl

The template

$name : string = ''

The name of the counter

$type : string = '0'

The type of the counter ('0', '00', 'aa' or 'AA').

$start : string|int = 1

Where the counter start. String if type == 'aa'/'AA'

$incr : int = 1

How many time the counter is increased on each call

Return values
mixed

jtpl_function_common_counter_reset()

function plugin : Reset a counter.

jtpl_function_common_counter_reset(jTpl $tpl[, string $name = '' ]) : mixed
{counter_reset 'name'}
Parameters
$tpl : jTpl

The template

$name : string = ''

The name of the counter

Return values
mixed

jtpl_function_common_counter_reset_all()

function plugin : Reset all the counters.

jtpl_function_common_counter_reset_all(jTpl $tpl) : mixed
{counter_reset_all}
Parameters
$tpl : jTpl

The template

Return values
mixed

jtpl_function_common_cycle_init()

Type: function<br> Name: cycle_init<br> Date: Feb, 2008<br> Purpose: initialize cycling through given values<br> Input: - values = comma separated list of values to cycle - name = name of cycle (optional)

jtpl_function_common_cycle_init(jTpl $tpl, string $name[, string $values = '' ]) : mixed

Examples:

{cycle_init '#eeeeee,#d0d0d0d'}
{cycle_init 'name','#eeeeee,#d0d0d0d'}
Parameters
$tpl : jTpl
$name : string

the name of the cycle or the list of values

$values : string = ''

the list of values

Tags
throws
jException
Return values
mixed

jtpl_function_common_cycle_reset()

Type: function<br> Name: cycle_reset<br> Date: Feb, 2008<br> Purpose: reset the cycle of a given cycle name or the default<br> Input: - name = name of cycle (optional)

jtpl_function_common_cycle_reset(jTpl $tpl[, string $name = '' ]) : mixed

Examples:

{cycle_reset 'name'}
{cycle_reset}
Parameters
$tpl : jTpl
$name : string = ''

the name of the cycle

Tags
throws
jException
Return values
mixed

jtpl_function_common_dumptolog()

Dump a value into log files

jtpl_function_common_dumptolog(jTpl $tpl, mixed $value) : mixed
Parameters
$tpl : jTpl
$value : mixed
Return values
mixed

jtpl_function_common_repeat_string()

Repeat a string

jtpl_function_common_repeat_string(jTpl $tpl[, string $string = '' ][, int $count = 1 ]) : mixed
{repeat_string 'mystring'}
{repeat_string 'mystring',4}
Parameters
$tpl : jTpl

The template

$string : string = ''

The string to repeat

$count : int = 1

How many times to repeat

Return values
mixed

jtpl_function_common_tolog()

Dump a value into log files

jtpl_function_common_tolog(jTpl $tpl, mixed $message) : mixed
Parameters
$tpl : jTpl
$message : mixed
Return values
mixed

jtpl_modifier_common_cat()

Modifier plugin : catenate a value to a variable

jtpl_modifier_common_cat(string $string, string $cat) : string
 {$var|cat:"foo"}
 {$var|cat:$othervar}
Parameters
$string : string

the string to be modified

$cat : string

the string to concat to $string

Return values
string

jtpl_modifier_common_count_array()

modifier plugin : display count of an array

jtpl_modifier_common_count_array(array<string|int, mixed> $aArray) : int
{$myarray|count_array}
Parameters
$aArray : array<string|int, mixed>
Return values
int

jtpl_modifier_common_count_characters()

Modifier plugin : count the number of characters in a text

jtpl_modifier_common_count_characters(string $string[, bool $include_spaces = false ]) : int
{$mytext|count_characters}
{$mytext|count_characters:true}
Parameters
$string : string
$include_spaces : bool = false

include whitespace in the character count

Return values
int

jtpl_modifier_common_count_paragraphs()

modifier plugin : count the number of paragraphs in a text

jtpl_modifier_common_count_paragraphs(string $string) : int
{$mytext|count_paragraphs}
Parameters
$string : string
Return values
int

jtpl_modifier_common_count_records()

modifier plugin : display count of a DbResultSet Object (how many records)

jtpl_modifier_common_count_records(jDbResultSet $DbResultSet) : int
{$myarray|count_records}
Parameters
$DbResultSet : jDbResultSet
Return values
int

jtpl_modifier_common_count_sentences()

modifier plugin : count the number of sentences in a text

jtpl_modifier_common_count_sentences(string $string) : int
{$mytext|count_sentences}
Parameters
$string : string
Return values
int

jtpl_modifier_common_count_words()

modifier plugin : count the number of words in a text

jtpl_modifier_common_count_words(string $string) : int
{$mytext|count_words}
Parameters
$string : string
Return values
int

jtpl_modifier_common_date_format()

modifier plugin : format a date <pre> {$mydate|date_format:"%b %e, %Y"} </pre>

jtpl_modifier_common_date_format(string $string[, string $format = "%b %e, %Y" ][, string|int $default_date = null ]) : string
Parameters
$string : string

input date string

$format : string = "%b %e, %Y"

strftime format for output

$default_date : string|int = null

default date if $string is empty

Return values
string

the formated date

jtpl_modifier_common_datetime()

modifier plugin : change the format of a date.

jtpl_modifier_common_datetime(string $date[, string $format_out = 'lang_datetime' ][, string $format_in = '' ]) : string

The date can be given as a string, or as a DateTime object.

It uses DateTime to convert a date. It takes two optionnal arguments. The first one is the format of the output date. It should be a format understood by DateTime, or one of this format identifier: 'lang_date', 'lang_datetime', 'lang_time', 'lang_long_datetime'. By default, it use the locale datetime format. The second one is the format of the given date, if the date format is not understood by DateTime.

examples : {$mydate|datetime} {$mydate|datetime:'dd/mm/YY'}

Parameters
$date : string

the date

$format_out : string = 'lang_datetime'

the format identifier of the output date

$format_in : string = ''

the format identifier of the given date

Tags
see
jDateTime
Return values
string

the converted date

jtpl_modifier_common_implode()

modifier plugin : apply the implode function on the given value

jtpl_modifier_common_implode(mixed $arr[, mixed $glue = " " ]) : string
Parameters
$arr : mixed
$glue : mixed = " "
Return values
string

jtpl_modifier_common_indent()

Modifier plugin: indent lines of text

jtpl_modifier_common_indent(string $string[, int $chars = 4 ][, string $char = " " ]) : string
{$mytext|indent}
{$mytext|indent:$number_of_spaces}
{$mytext|indent:$number_of_chars:$chars_to_repeat}
Parameters
$string : string
$chars : int = 4

the value of the indentation

$char : string = " "

the char to repeat

Return values
string

jtpl_modifier_common_jdatetime()

modifier plugin : change the format of a date

jtpl_modifier_common_jdatetime(string $date[, string $format_in = 'db_datetime' ][, string $format_out = 'lang_date' ]) : string

It uses jDateTime to convert a date. It takes two optionnal arguments. The first one is the format identifier of the given date (by default, it is db_datetime). The second one is the format identifier of the output date (by default, it is lang_date).

Availabled format identifiers are (with the equivalent constant of jDateTime) :

  • 'lang_date' (jDateTime::LANG_DFORMAT)
  • 'lang_datetime' => jDateTime::LANG_DTFORMAT)
  • 'lang_time' => jDateTime::LANG_TFORMAT)
  • 'db_date' => jDateTime::DB_DFORMAT)
  • 'db_datetime' => jDateTime::DB_DTFORMAT)
  • 'db_time' => jDateTime::DB_TFORMAT)
  • 'iso8601' => jDateTime::ISO8601_FORMAT)
  • 'timestamp' => jDateTime::TIMESTAMP_FORMAT)
  • 'rfc822'=> jDateTime::RFC822_FORMAT)
  • 'full_lang_date'=> jDateTime::FULL_LANG_DATE

examples : {$mydate|jdatetime} {$mydate|jdatetime:'db_time':'lang_time'}

Parameters
$date : string

the date

$format_in : string = 'db_datetime'

the format identifier of the given date

$format_out : string = 'lang_date'

the format identifier of the output date

Tags
throws
jException
see
jDateTime
Return values
string

the converted date

jtpl_modifier_common_number_format()

NumberFormat plugin for jTpl that wraps PHP number_format function

jtpl_modifier_common_number_format(float $number, int $decimals[, string $dec_point = false ][, string $thousands_sep = false ]) : string
Parameters
$number : float

the number to format

$decimals : int

the number of decimals to return

$dec_point : string = false

the separator string for the decimals

$thousands_sep : string = false

the separator string for the thousands

Return values
string

jtpl_modifier_common_regex_replace()

modifier plugin : regular epxression search/replace

jtpl_modifier_common_regex_replace(string $string, string|array<string|int, mixed> $search, string|array<string|int, mixed> $replace) : string

You should provide two arguments, like the first both of preg_replace {$mystring|regex_replace:'/(\w+) (\d+), (\d+)/i':'${1}1,$3'}

Parameters
$string : string
$search : string|array<string|int, mixed>
$replace : string|array<string|int, mixed>
Return values
string

jtpl_modifier_common_replace()

modifier plugin : simple search/replace

jtpl_modifier_common_replace(string $string, string $search, string $replace) : string

You should provide two arguments, like the first both of str_replace

{$mystring|replace:'foo':'bar'}
Parameters
$string : string

the string to modify

$search : string

the string to search

$replace : string
Return values
string

jtpl_modifier_common_round()

Modifier plugin : Rounds a float

jtpl_modifier_common_round(float $val, int $precision) : float
 {$var|round:2}
Parameters
$val : float

the value to round

$precision : int

The number of decimal digits to round to.

Return values
float

jtpl_modifier_common_spacify()

modifier plugin : add spaces between characters in a string

jtpl_modifier_common_spacify(string $string[, string $spacify_char = ' ' ]) : string
{$mytext|spacify}
{$mytext|spacify:$characters_to_insert}
Parameters
$string : string

the string to spacify

$spacify_char : string = ' '

spaces to add

Return values
string

jtpl_modifier_common_sprintf()

modifier plugin : format strings via sprintf

jtpl_modifier_common_sprintf(string $string, string $format) : string
{$mytext|sprintf:'my format %s'}
Parameters
$string : string
$format : string
Tags
see
sprintf
Return values
string

jtpl_modifier_common_strip()

modifier plugin : Replace all repeated spaces, newlines, tabs with a single space or supplied replacement string

jtpl_modifier_common_strip(string $text[, string $replace = ' ' ]) : string
{$var|strip}
{$var|strip:" "}
Parameters
$text : string

the text to strip

$replace : string = ' '

the string replacing the repeated spaces

Return values
string

jtpl_modifier_common_truncate()

modifier plugin : Truncate a string

jtpl_modifier_common_truncate(string $string[, int $length = 80 ][, string $etc = '...' ][, bool $break_words = false ]) : string

Truncate a string to a certain length if necessary, optionally splitting in the middle of a word, and appending the $etc string.

{$mytext|truncate}
{$mytext|truncate:40}
{$mytext|truncate:45:'...'}
{$mytext|truncate:60:'...':true}
Parameters
$string : string

the string to truncate

$length : int = 80

the number of char to keep

$etc : string = '...'

the string to append to the truncated string

$break_words : bool = false

false if the last word shouldn't be cut

Return values
string

jtpl_modifier_common_truncatehtml()

modifier plugin : cut a html formated string and close all opened tags so that it doesn't inpact on the rest of the page You should use this modifier in a zone so that the return value is cached Plugin from sniplr (original sources can be found here: http://snipplr.com/view.php?codeview&id=3618 ) <pre>{$mytext|wordwrap} {$mytext|truncatehtml:150:"\n<a href="...">read full article</a>"} {$mytext|truncatehtml:45} </pre>

jtpl_modifier_common_truncatehtml(string $string[, int $nbChar = 200 ][, string $etcPattern = '...' ]) : string
Parameters
$string : string

the string to truncate

$nbChar : int = 200

number of chars to keep (warning html tags included )

$etcPattern : string = '...'

the string to append to the truncated string

Return values
string

jtpl_modifier_common_wiki()

modifier plugin : transform a wiki text to another format you can use other transformations by given the name of corresponding wikirenderer rules <pre> {$var|wiki} {$var|wiki:"classicwr_to_xhtml"} </pre>

jtpl_modifier_common_wiki(string $text[, string $config = 'wr3_to_xhtml' ]) : string
Parameters
$text : string

the wiki texte

$config : string = 'wr3_to_xhtml'

the name of the wikirenderer rule to use

Tags
see
jWiki
link
http://wikirenderer.berlios.de/
Return values
string

jtpl_modifier_common_wordwrap()

modifier plugin : wrap a string of text at a given length. Same parameters as the php wordwrap function <pre>{$mytext|wordwrap} {$mytext|wordwrap:40} {$mytext|wordwrap:45:"\n"} {$mytext|wordwrap:60:"\n":true} </pre>

jtpl_modifier_common_wordwrap(string $string[, int $length = 80 ][, string $break = " " ][, bool $cut = false ]) : string
Parameters
$string : string
$length : int = 80
$break : string = " "
$cut : bool = false
Return values
string

jtpl_block_html_form()

a block to display an html form, with data from a jforms

jtpl_block_html_form(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $param = array() ]) : string

usage : {form $theformobject,'submit_action', $submit_action_params} here form content {/form}

You can add this others parameters :

  • string $builderName (default is 'html')
  • array $options for the builder. Example, for the 'html' builder :
    • "errorDecorator"=>"name of your javascript object for error listener"
    • "method" => "post" or "get". default is "post"
Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$param : array<string|int, mixed> = array()

0=>form object 1=>selector of submit action 2=>array of parameters for submit action 3=>name of the builder : default is html 4=>array of options for the builder

Tags
see
jForms
Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_html_formcontrols()

a block to loop over controls list of a form and to display them

jtpl_block_html_formcontrols(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $param = array() ]) : string

usage : {formcontrols} here content to display one control {/formcontrols} It accept also some parameters

  1. an optional jFormsBase object if the {formcontrols} is outside a {form} block
  2. an optional array of control names : only these controls will be displayed
Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$param : array<string|int, mixed> = array()

empty array or 0=>jFormsBase object or 0=>jFormsBase object, 1=>array of control names or 0=>array of control names

Tags
see
jForms
Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_html_formdata()

a block to display only data of a form

jtpl_block_html_formdata(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $param = array() ]) : string

usage : {formdata $theformobject} here the form content {/formdata}

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$param : array<string|int, mixed> = array()

0=>form object 2=>name of the builder : default is html 3=>array of options for the builder

Tags
see
jForms
since
1.0.1
Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_html_formsubmits()

a block to loop over submit button list of a form and to display them

jtpl_block_html_formsubmits(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $param = array() ]) : string

usage : {formsubmits} here content to display one submit {/formsubmits} It accept also some parameters

  1. an optional jFormsBase object if the {formsubmits} is outside a {form} block
  2. an optional array of submit control names : only these controls will be displayed
Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$param : array<string|int, mixed> = array()

empty array or 0=>jFormsBase object or 0=>jFormsBase object, 1=>array of submit names or 0=>array of submit names

Tags
see
jForms
Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_html_ifctrl()

a special if block to test easily the current control name TO BE USED inside a {formcontrols} block

jtpl_block_html_ifctrl(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $params = array() ]) : string

{ifctrl 'name1','name2',...} some tpl {else} some other tpl {/ifctrl}

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$params : array<string|int, mixed> = array()

0=>'name',etc. to match against current control name

Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_html_ifctrl_value()

a special if block to test easily the current control value TO BE USED inside a {formcontrols} block

jtpl_block_html_ifctrl_value(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $params = array() ]) : string

{ifctrl_value 'name', 'expected-value'} some tpl {else} some other tpl {/ifctrl_value}

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$params : array<string|int, mixed> = array()

0=>'name',etc. to match against current control name and expected value

Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_html_ifctrlexists()

a special if block to check if a ctrl exist in the form TO BE USED inside a `{form}` or `{formadata}` block

jtpl_block_html_ifctrlexists(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $params = array() ]) : string

{ifctrlexists 'name1'} some tpl {else} some other tpl {/ifctrlexists}

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$params : array<string|int, mixed> = array()

0=>'name', to match against current control name

Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_common_jscompress()

jscompress : formate a js block code by removing spaces, tabs and returns.

jtpl_block_common_jscompress(mixed $compiler, mixed $begin[, mixed $params = array() ]) : string

Example: {jscompress}var foo = bar;{/jscompress}

Parameters
$compiler : mixed
$begin : mixed
$params : mixed = array()
Return values
string

jtpl_block_html_swf()

swf plugin : Adds html code to display a swf

jtpl_block_html_swf(jTplCompiler $compiler, bool $begin, array<string|int, mixed> $params) : string

Example : {swf 'promobidon.swf', array('id'=>'promo', 'width'=>150, 'height'=>90), array('quality'=>'hight', 'wmode'=>'transparent'), array('longeur'=>150)} {image 'toupie.png'} {/swf}

Render :

$params[0] url of the swf $params[1]['id'] id of <object .../> $params[1]['class'] class of <object .../> $params[1]['width'] Width final of SWF $params[1]['height'] Height final of SWF $params[2][xx] Parameter of the Flash Player $params[3][xx] Flashvar for the Flash Player

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$params : array<string|int, mixed>

parameters for the url

Return values
string

PHP generated code

jtpl_block_html_swfjs()

swfjs plugin : Adds html and JS code to display a swf

jtpl_block_html_swfjs(jTplCompiler $compiler, bool $begin, array<string|int, mixed> $params) : string

Example : {swfjs 'promobidon.swf', array('id'=>'promo', 'width'=>150, 'height'=>90, 'detect'=>true), array('quality'=>'hight', 'wmode'=>'transparent'), array('longeur'=>150)} {image 'toupie.png'} {/swfjs}

Render after the execution of javascript file :

$params[0] url of the swf $params[1]['id'] id of <object .../> $params[1]['class'] class of <object .../> $params[1]['width'] Width final of SWF $params[1]['height'] Height final of SWF $params[1]['version'] (ex: '6.0.65') Detect specific major, minor and revision versions of the Flash plugin. $params[1]['expressinstall'] (true:Bool) Use Express Install, or show an update message if Flash isn't installed. OR $params[1]['update'] (false:Bool) Or, degrade silently and gracefully. $params[2][xx] Parameter of the Flash Player $params[3][xx] Flashvar for the Flash Player

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$params : array<string|int, mixed>

parameters for the url

Return values
string

PHP generated code

jtpl_cfunction_html_const()

compiled function plugin : display a constant. Not available in untrusted templates

jtpl_cfunction_html_const(jTplCompiler $compiler[, array<string|int, mixed> $param = array() ]) : string
{const 'foo'}
Parameters
$compiler : jTplCompiler

the template compiler

$param : array<string|int, mixed> = array()

0=>$string the constant name

Return values
string

the php code corresponding to the function content

jtpl_cfunction_html_formfull()

Display a full form without the use of other plugins.

jtpl_cfunction_html_formfull(jTplCompiler $compiler[, mixed $params = array() ]) : string

usage : {formfull $theformobject,'submit_action', $submit_action_params}

You can add this others parameters :

  • string $builderName (default is 'html')
  • array $options for the builder. Example, for the 'html' builder :
    • "errorDecorator"=>"name of your javascript object for error listener"
    • "method" => "post" or "get". default is "post"
Parameters
$compiler : jTplCompiler

the template compiler

$params : mixed = array()
Return values
string

the php code corresponding to the begin or end of the block

jtpl_cfunction_html_swfbiscuit()

swfbiscuit plugin : Adds html code to display a swf

jtpl_cfunction_html_swfbiscuit(jTpl $tpl, array<string|int, mixed> $params) : string

Example : {swfbiscuit 'promobidon.swf', array('id'=>'promo', 'width'=>150, 'height'=>90), array('quality'=>'hight', 'wmode'=>'transparent'), array('longeur'=>150)}

Render :

$params[0] url of the swf $params[1]['id'] id of <object .../> $params[1]['class'] class of <object .../> $params[1]['width'] Width final of SWF $params[1]['height'] Height final of SWF $params[2][xx] Parameter of the Flash Player $params[3][xx] Flashvar for the Flash Player

Parameters
$tpl : jTpl

template engine

$params : array<string|int, mixed>

parameters for the url

Return values
string

PHP generated code

jtpl_function_html_ctrl_control()

function plugin : print the html content of a form control. You should use this plugin inside a formcontrols block

jtpl_function_html_ctrl_control(jTpl $tpl[, string $ctrlname = '' ][, array<string|int, mixed> $attributes = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$ctrlname : string = ''

the name of the control to display (required if it is outside a formcontrols)

$attributes : array<string|int, mixed> = array()

attribute to add on the generated code (html attributes for example)

Tags
throws
jException
Return values
mixed

jtpl_function_html_ctrl_label()

function plugin : print the label of a form control. You should use this plugin inside a formcontrols block

jtpl_function_html_ctrl_label(jTpl $tpl[, string $ctrlname = '' ][, string $format = '' ]) : mixed
Parameters
$tpl : jTpl

template engine

$ctrlname : string = ''

the name of the control to display (required if it is outside a formcontrols)

$format : string = ''
Tags
throws
jException
Return values
mixed

jtpl_function_html_ctrl_rawvalue()

function plugin : print the raw value of a form control, without trying to display a corresponding label and without to display values of child controls. You should use this plugin inside a formcontrols block

jtpl_function_html_ctrl_rawvalue(jTpl $tpl[, string $ctrlname = '' ][, string $sep = ', ' ]) : mixed
Parameters
$tpl : jTpl

template engine

$ctrlname : string = ''

the name of the control to display (required if it is outside a formcontrols)

$sep : string = ', '

separator to display values of a multi-value control

Tags
throws
jException
Return values
mixed

jtpl_function_html_ctrl_value()

function plugin : print the value of a form control. You should use this plugin inside a formcontrols block

jtpl_function_html_ctrl_value(jTpl $tpl[, string $ctrlname = '' ][, string $sep = ', ' ]) : mixed
Parameters
$tpl : jTpl

template engine

$ctrlname : string = ''

the name of the control to display (required if it is outside a formcontrols)

$sep : string = ', '

separator to display values of a multi-value control

Tags
throws
jException
Return values
mixed

jtpl_function_html_diff()

function plugin : show a diff between two string

jtpl_function_html_diff(jTpl $tpl, string $str1, string $str2[, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$str1 : string

the first string

$str2 : string

the second string

$options : array<string|int, mixed> = array()

contains : 'nodiffmsg' message when no diff found ; 'version1' ; 'version2' to be compared ; 'type' of display

Return values
mixed

jtpl_function_html_formdatafull()

Display all data of a form without the use of other plugins.

jtpl_function_html_formdatafull(jTpl $tpl, jFormsBase $form[, string $builder = 'html' ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$form : jFormsBase

the form to display

$builder : string = 'html'

the builder type to use

$options : array<string|int, mixed> = array()

options for the builder

Return values
mixed

jtpl_function_html_formreset()

function plugin : print the html content of a form reset button.

jtpl_function_html_formreset(jTpl $tpl) : mixed
Parameters
$tpl : jTpl

template engine

Return values
mixed

jtpl_function_html_formsubmit()

function plugin : print the html content of a form submit button. You can use this plugin inside a formsubmits block

jtpl_function_html_formsubmit(jTpl $tpl[, string $ctrlname = '' ][, array<string|int, mixed> $attributes = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$ctrlname : string = ''

the name of the submit to display (required if it is outside a formsubmits)

$attributes : array<string|int, mixed> = array()

attributes for the generated html element

Tags
throws
jException
Return values
mixed

jtpl_function_html_formurl()

function plugin : write the url corresponding to the given jelix action

jtpl_function_html_formurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

Return values
mixed

jtpl_function_html_formurlparam()

function plugin : write the url corresponding to the given jelix action

jtpl_function_html_formurlparam(jTpl $tpl[, string $selector = null ][, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string = null

selector action

$params : array<string|int, mixed> = array()

parameters for the url

Return values
mixed

jtpl_function_html_gravatar()

gravatar plugin : write the url corresponding to the image of the gravatar account identified by the given email address

jtpl_function_html_gravatar(jTpl $tpl, string $email[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$email : string

account

$params : array<string|int, mixed> = array()

parameters for :

  1. the default avatar URL
  2. the default size of the image
  3. the username to be put in the "alt" attribute of the img
Return values
mixed

jtpl_function_html_hook()

hook plugin

jtpl_function_html_hook(jTpl $tpl, string $event[, array<string|int, mixed> $params = array() ]) : mixed

It allows to retrieve HTML content, coming from responses of an event, and inserting at the place of the hook tag.

Example:

{hook 'myevent'}

In a Jelix Event listener:

function onmyevent($event) { $event->add('
html content
'); }

Result:

html content
Parameters
$tpl : jTpl

template engine

$event : string

the event name to call

$params : array<string|int, mixed> = array()

parameters to give to the listener

Return values
mixed

jtpl_function_html_image()

image plugin : write the url corresponding to the image

jtpl_function_html_image(jTpl $tpl, string $src[, array<string|int, mixed> $params = array() ]) : mixed

Add a link to the image, The image is resized, and cached

class :string id :string alt :string width :uint height :uint maxwidth :uint only with maxheight maxheight :uint only with maxwidth zoom 1-100 omo :boolean alignh [left|center|right|:int] alignv [top|center|bottom|:int] ext [png|jpg|gif] quality 0-100 if ext = jpg shadow :boolean soffset :uint sangle :uint sblur :uint sopacity :uint scolor #000000 :string background #000000 :string

gif -> image/gif jpeg -> image/jpeg jpg -> image/jpeg jpe -> image/jpeg xpm -> image/x-xpixmap xbm -> image/x-xbitmap wbmp -> image/vnd.wap.wbmp png -> image/png other -> image/png

Parameters
$tpl : jTpl

template engine

$src : string

the url of image relative to the www path

$params : array<string|int, mixed> = array()

parameters for the transformation and img element

Return values
mixed

jtpl_function_html_jfullurl()

function plugin : write the full url (with domain name) corresponding to the given jelix action

jtpl_function_html_jfullurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ][, string $domain = null ][, bool $escape = true ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

$domain : string = null

domain name, false if you want to use the config domain name or the server name

$escape : bool = true

if true, then escape the string for html

Return values
mixed

jtpl_function_html_jlocale()

function plugin : write the localized string corresponding to the given locale key

jtpl_function_html_jlocale(jTpl $tpl, string $locale) : mixed

example : {jlocale 'myModule~my.locale.key'}

Parameters
$tpl : jTpl

template engine

$locale : string

the locale key

Return values
mixed

jtpl_function_html_jmessage()

function plugin : Display messages from jMessage

jtpl_function_html_jmessage(mixed $tpl[, mixed $type = '' ]) : mixed
Parameters
$tpl : mixed
$type : mixed = ''
Return values
mixed

jtpl_function_html_jrooturl()

function plugin : write the root url corresponding to the given ressource type If this ressource type is not specified in the config file, returned value will be basePath

jtpl_function_html_jrooturl(jTpl $tpl, string $ressourceType) : mixed
Parameters
$tpl : jTpl

template engine

$ressourceType : string

the name of the ressource type

Return values
mixed

jtpl_function_html_jurl()

function plugin : write the url corresponding to the given jelix action

jtpl_function_html_jurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ][, bool $escape = true ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

$escape : bool = true

if true, then escape the string for html

Return values
mixed

jtpl_function_html_jurlpattern()

function plugin: write the url corresponding to the given jelix action, inserting placeholder name (between two %) for some parameter, so you can generate the url dynamically in JS by replacing placeholders by javascript values.

jtpl_function_html_jurlpattern(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ][, array<string|int, mixed> $placeholders = array() ]) : mixed

example :

it may produce something like that (depending how the url is configured for the 'jxacl~admin_rightslist' action): index.php/acl/rightslist/%idgroup%/bar?acl=%acl%

Then you can replace placeholders

var urlpattern = document.getElementById("baz").dataset.url; var id_group = 45, acl = 'hello'; var url = urlpattern.replace("%idgroup%", id_group); url = url.replace("%acl%", acl);

Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

static parameters for the url

$placeholders : array<string|int, mixed> = array()

list of placeholders: key=name of an url parameter, value=a placeholder name you choose

Return values
mixed

function plugin : Ajax request

jtpl_function_html_link_to_remote(mixed $tpl, mixed $label, mixed $element_id, mixed $action_selector, mixed $action_parameters, mixed $option) : mixed

it creates a javascript ajax function example :

{link_to_remote
 'Link',    
 'result',    
 'test~default:ajax', array('id'=>'34'),    
 array(
   'position'=>'html',    
   'method'=>'GET',    
   'beforeSend'=>'alert("beforeSend")',    
   'complete'=>'alert("complete")',    
   'error'=>'alert("error")',    
)}
Parameters
$tpl : mixed
$label : mixed
$element_id : mixed
$action_selector : mixed
$action_parameters : mixed
$option : mixed
Return values
mixed

jtpl_function_html_mailto()

Examples: <pre> {mailto array("address"=>"me@domain.com")} {mailto array("address"=>"me@domain.com","encode"=>"javascript")} {mailto array("address"=>"me@domain.com","encode"=>"hex")} {mailto array("address"=>"me@domain.com","subject"=>"Hello to you!")} {mailto array("address"=>"me@domain.com","cc"=>"you@domain.com,they@domain.com")} {mailto array("address"=>"me@domain.com","extra"=>'class="mailto"')} </pre>

jtpl_function_html_mailto(mixed $tpl, mixed $params) : mixed
Parameters
$tpl : mixed
$params : mixed
Tags
params

jTpl $tpl

params

array $params

Return values
mixed

displays page links

jtpl_function_html_pagelinks(jTpl $tpl, string $action, array<string|int, mixed> $actionParams, int $itemsTotal, int $offset[, int $pageSize = 15 ][, string $paramName = 'offset' ][, array<string|int, mixed> $displayProperties = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$action : string

selector of the action

$actionParams : array<string|int, mixed>

parameters for the action

$itemsTotal : int

number of items

$offset : int

index of the first item to display

$pageSize : int = 15

items number in a page

$paramName : string = 'offset'

name of the parameter in the actionParams which will content a page offset

$displayProperties : array<string|int, mixed> = array()

properties for the links display

Return values
mixed

jtpl_function_html_resurl()

function plugin : write the url corresponding to a resource stored in a www directory of a module

jtpl_function_html_resurl(jTpl $tpl, string $module, array<string|int, mixed> $file[, mixed $intheme = false ][, bool $escape = true ]) : mixed
Parameters
$tpl : jTpl

template engine

$module : string

the module name

$file : array<string|int, mixed>

the relative path of the wanted file to the www directory of the module

$intheme : mixed = false
$escape : bool = true

if true, then escape the string for html

Return values
mixed

jtpl_function_html_urljsstring()

function plugin : write the url corresponding to the given jelix action for javascript

jtpl_function_html_urljsstring(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ][, mixed $jsparams = array() ]) : mixed

it creates a javascript string, that contains the url, with dynamic javasript parameters
example : {urljsstring 'jxacl~admin_rightslist',array(),array('grpid'=>'idgroup','__rnd'=>'Math.random()')};
it will produce: "index.php?module=acl&action=admin_rightslist&grpid="+idgroup+"&__rnd="+ Math.random();

Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

$jsparams : mixed = array()
Return values
mixed

jtpl_meta_html_html()

meta plugin : modify an html response object

jtpl_meta_html_html(jTpl $tpl, string $method[, mixed $param = null ][, mixed $params = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$method : string

indicates what you want to specify (possible values : js, css, jsie, jsie7, jsltie7, cssie, cssie7, cssltie7, csstheme, cssthemeie, cssthemeie7, cssthemeltie7, bodyattr, keywords, description, others)

$param : mixed = null

parameter (a css style sheet for "css" for example)

$params : mixed = array()
Tags
see
jResponseHtml
params

array $params additionnal parameters (a media attribute for stylesheet for example)

Return values
mixed

jtpl_meta_html_htmlmodule()

meta plugin : allow to add css files and js files stored into modules, in an html response object

jtpl_meta_html_htmlmodule(jTpl $tpl, string $method, string $module, mixed $path[, mixed $params = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$method : string

indicates what you want to specify (possible values : js, css, jsie, cssie, cssie7, cssltie7, csstheme, cssthemeie, cssthemeie7, cssthemeltie7)

$module : string

the module where file is stored

$path : mixed

the relative path inside the {module}/www/ directory, or inside the {module}/www/themes/{currenttheme}/ directory

$params : mixed = array()
Tags
see
jResponseHtml
params

array $params additionnal parameters for the generated tag (a media attribute for stylesheet for example)

Return values
mixed

jtpl_modifier_html_nl2br()

modifier plugin : convert \r\n, \r or \n to <<br/>> Example: {$text|nl2br}

jtpl_modifier_html_nl2br(string $string) : string
Parameters
$string : string

the string to modify

Return values
string

jtpl_modifier_html_vardump()

Dump any value

jtpl_modifier_html_vardump(mixed $value) : string
Parameters
$value : mixed
Return values
string

jtpl_block_ltx2pdf_lcmd()

a special to insert latex content

jtpl_block_ltx2pdf_lcmd(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $param = array() ]) : string

usage : {lcmd } .. calls the <command>} latex command

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$param : array<string|int, mixed> = array()

1=>latex command

Return values
string

the php code corresponding to the begin or end of the block

jtpl_block_ltx2pdf_lenv()

a special to insert latex content

jtpl_block_ltx2pdf_lenv(jTplCompiler $compiler, bool $begin[, array<string|int, mixed> $param = array() ]) : string

usage : {lenv 'latex_block_name'} ..here latex content {/lenv}

Parameters
$compiler : jTplCompiler

the template compiler

$begin : bool

true if it is the begin of block, else false

$param : array<string|int, mixed> = array()

1=>latex command

Return values
string

the php code corresponding to the begin or end of the block

jtpl_function_ltx2pdf_jlocale()

function plugin : write the localized string corresponding to the given locale key

jtpl_function_ltx2pdf_jlocale(jTpl $tpl, string $locale) : mixed

example : {jlocale 'myModule~my.locale.key'}

Parameters
$tpl : jTpl

template engine

$locale : string

the locale key

Return values
mixed

jtpl_function_ltx2pdf_jurl()

function plugin : write the url corresponding to the given jelix action

jtpl_function_ltx2pdf_jurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

Return values
mixed

jtpl_modifier_ltx2pdf_latex()

modifier plugin : simple search/replace for latex chars

jtpl_modifier_ltx2pdf_latex(string $string) : the
Parameters
$string : string

the string to modify

Return values
the

modified string

jtpl_cfunction_text_const()

compiled function plugin : display a constant. Not available in untrusted templates

jtpl_cfunction_text_const(jTplCompiler $compiler[, array<string|int, mixed> $param = array() ]) : string
{const 'foo'}
Parameters
$compiler : jTplCompiler

the template compiler

$param : array<string|int, mixed> = array()

0=>$string the constant name

Return values
string

the php code corresponding to the function content

jtpl_function_text_formdatafull()

Display all data of a form without the use of other plugins.

jtpl_function_text_formdatafull(jTpl $tpl, jFormsBase $form) : mixed
Parameters
$tpl : jTpl

template engine

$form : jFormsBase

the form to display

Return values
mixed

jtpl_function_text_jfullurl()

function plugin : write the full url (with domain name) corresponding to the given jelix action

jtpl_function_text_jfullurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ][, string $domain = false ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

$domain : string = false

domain name, false if you want to use the config domain name or the server name

Return values
mixed

jtpl_function_text_jlocale()

function plugin : write the localized string corresponding to the given locale key

jtpl_function_text_jlocale(jTpl $tpl, string $locale) : mixed

example : {jlocale 'myModule~my.locale.key'}

Parameters
$tpl : jTpl

template engine

$locale : string

the locale key

Return values
mixed

jtpl_function_text_jurl()

function plugin : write the url corresponding to the given jelix action

jtpl_function_text_jurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

Return values
mixed

jtpl_modifier_html_vardump()

Dump any value

jtpl_modifier_html_vardump(mixed $value) : string
Parameters
$value : mixed
Return values
string

jtpl_cfunction_xml_const()

compiled function plugin : display a constant. Not available in untrusted templates

jtpl_cfunction_xml_const(jTplCompiler $compiler[, array<string|int, mixed> $param = array() ]) : string
{const 'foo'}
Parameters
$compiler : jTplCompiler

the template compiler

$param : array<string|int, mixed> = array()

0=>$string the constant name

Return values
string

the php code corresponding to the function content

jtpl_function_xml_jfullurl()

function plugin : write the full url (with domain name) corresponding to the given jelix action

jtpl_function_xml_jfullurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ][, string $domain = null ][, bool $escape = true ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

$domain : string = null

domain name, false if you want to use the config domain name or the server name

$escape : bool = true

if true, then escape the string for html

Return values
mixed

jtpl_function_xml_jlocale()

function plugin : write the localized string corresponding to the given locale key

jtpl_function_xml_jlocale(jTpl $tpl, string $locale) : mixed

example : {jlocale 'myModule~my.locale.key'}

Parameters
$tpl : jTpl

template engine

$locale : string

the locale key

Return values
mixed

jtpl_function_xml_jurl()

function plugin : write the url corresponding to the given jelix action

jtpl_function_xml_jurl(jTpl $tpl, string $selector[, array<string|int, mixed> $params = array() ][, bool $escape = true ]) : mixed
Parameters
$tpl : jTpl

template engine

$selector : string

selector action

$params : array<string|int, mixed> = array()

parameters for the url

$escape : bool = true

if true, then escape the string for xml

Return values
mixed

jtpl_meta_xml_xml()

meta plugin : modify an xml response object

jtpl_meta_xml_xml(jTpl $tpl, string $method, mixed $param) : mixed
Parameters
$tpl : jTpl

template engine

$method : string

indicates what you want to specify (possible values : xsl,css,csstheme)

$param : mixed

parameter (a css style sheet url for "css" for example)

Tags
see
jResponseXml
Return values
mixed

is_resource()

Check if the given value is a resource or not.

is_resource(mixed $value) : bool

It take care about internal classes that replaced resources into PHP 8.0, like GdImage, CurlHandle etc..

Parameters
$value : mixed
Return values
bool

Search results