Les articles publiés sur le site
-
|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 (...) -
|taille_en_octets
25 juin 2010, par Mark — FiltersThe |taille_en_octets filter (meaning "size in bytes" in French) converts a number of bytes (25678906) into a more explicit character string ("24.4 MB"). Example within a DOCUMENTS loop: #TITRE - #TYPE_DOCUMENT[ - (#TAILLE|taille_en_octets)]) will display "My document - JPEG - 82.6 KB" - (...) -
|safehtml
25 juin 2010, par Mark — FiltersHTML content originating from outside the site (input through forms or through site syndication) are by definition considered as being "uncontrolled", and therefore potentially problematic if it contains unclosed tags, JavaScript, SQL code, etc. SPIP therefore systematically applies the (...)