Subversion Repositories novenutils

[/] [trunk/] [doc/] [README.txt] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 lolautruche
===========================
2
 Noven Utils Documentation
3
===========================
4
 
5
---------------------------------
6
 2009 Jerome Vieilledent - Noven
7
---------------------------------
8 2 lolautruche
 
9 6 lolautruche
 
10
Introduction
11
============
12
 
13 2 lolautruche
This extension adds several template operators to the system :
14
 
15
- String operators (Must be used with pipe ("|") template syntax) :
16
 
17 6 lolautruche
  - **espace_as_entities()** => Does an *htmlentities* on the given string, taking the charset used into account.
18
  - **split_words_in_parts($maxLength)** => Splits too long words and adds one or more caesura character(s).
19
  - **shorten_to_last_word($maxLength)** => Cuts a string to *$length* characters and then cuts at the end of the last word. Also adds "..." to the cutted string
20
  - **str_replace($search, $replace, $subject)** => Simple *str_replace* (identical to PHP str_replace function)
21
 
22 2 lolautruche
- Misc operators :
23
 
24 6 lolautruche
  - **persistent_variable_append($key, $value, $mergeExisting=false)** => Adds a value to the *persistent_variable* variable, available in node templates and in pagelayout when a node is displayed. Can be a replacement to *ezpagedata_set()* and *ezpagedata_append()* operators when not in *ezwebin* context.
25
      + http://ez.no/doc/ez_publish/technical_manual/4_x/templates/the_pagelayout/variables_in_pagelayout#module_result
26
      + http://ez.no/developer/forum/general/pass_variable_from_pagelayout/re_pass_variable_from_pagelayout
27
  - **server_variable($name)** => Returns the *$_SERVER[$name]* variable
28
  - **session_set($variable, $value)** => Sets a session variable from template
29
  - **media_url($addQuotes='yes')** => Adds a Media Host to an URL (useful if you want to host your media files - ie. css, js, contrib images... - on a different hostname)
30
      + Define your Media Host in *novenutils.ini*
31
      + In your templates, just add *|media_url* to your media URLs (ex.: *<link type="text/css" rel="stylesheet" href={$css|ezroot|media_url} />*)
32
 
33
 
34
Install
35
=======
36
- Unpack **novenutils** extension folder under *extension/*
37
- Activate **novenutils** in *settings/override/site.ini.append.php*