Les articles publiés sur le site
-
|plus
25 juin 2010, par Mark — FiltersThe |plusxx (French for "add") filter is a mathematical operation filter. It returns the results of adding (the sum) the value of the tag and the xx argument passed to the filter. If the tag's output is not a numeric type, it will be considered as being 0 (zero) and the filter will simply (...) -
|push
25 juin 2010, par Mark — Filters|push is used to add a value to the end of an array/table. The |push filter (since spip) is applied to a tag returning a PHP array/table (seer #ARRAY) and adds a new value to it. The key is incremented by 1 for each new value. if no key has been defined for the first value, the table is indexed (...) -
|match
25 juin 2010, par Mark — FiltersThe |match filter uses a regular expression to display a pattern existing in the tag, or nothing if that pattern is absent. For example: retrieve the first word from the title: [(#TITRE|match^\w+)] ; display "toto" if that phrase appears in the title: [(#TITRE|matchtoto)] It is possible to pass (...) -
|replace
25 juin 2010, par Mark — FiltersThe |replace filter uses a regular expression to delete all replace all occurrences of a pattern in the tag. Used with a single parameter, a regular expression, the pattern will be deleted. For example, to delete any occurrences of "notaXX" in the text body: [(#TEXTE|replacenota\d*)]. Whenever (...) -
|ou
25 juin 2010, par Mark — FiltersThe |ou filter [1] (since SPIP 2.0) is used to check the existence of at least one of two possible elements. Wikipedia offers a complete definition of the Logical disjunction. Examples: [(#CHAPO|ou#PS) There is either a stand-first or a post-scriptum (or both) ] [(#CHAPO|ou#PS|non) There is (...)