http://my.opera.com/tech-nova/blog/
Sites Web : SPIP commits - by tech-nova
Publié le lundi 21 avril 2008
Un site qui recense les astuces et évolutions des possibilités de SPIP.
Articles syndiqués tirés de ce site
- [11355] Overwrite a criteria for a specific loop only
-
25 avril, par tech-nova
For exemple, the function critere_AUTEURS_recherche_dist() overwrites the criteria recherche for the loop AUTEURS only. The priority order is : critere_TABLE_nomcrit() critere_TABLE_nomcrit_dist() critere_nomcrit() critere_nomcrit_dist()
- [11440] SQL views in the API
-
12 avril, par tech-nova
3 new functions enable to create and delete views for PG, SQlite and MySQL : sql_get_select() : same arguments as sql_select() but returns the query without evaluating it sql_create_view($view_name, $select_request) : creates the view $view_name for the select request $select_request. (...)
- [11435] MySQL views can be used in SPIP loops
-
12 avril, par tech-nova
SQL views are known to be used like tables. They enable to : mask the schema complexity ( -> simplification of queries) give access to a limited number of fields ( -> security) manipulate calculated fields (sum(), max(), avg(), ..) Now you can avoid writing complexe loops by using views : (...)
- [11415] 3 new filters for boolean operators
-
9 avril, par tech-nova
These filters are 'et', 'ou', and 'xou' (for 'and', 'not', and 'xor'). They work like |?' ', : each filter returns a space char if the condition is verified, elsewhere it returns an empty string For example this PHP codeif ($a=='testA' OR ($b=='testB' AND $c=='testC')) echo "OK"; Can be (...)
- [11400] A more secure import from old SPIP versions
-
8 avril, par tech-nova
This commit introduces a lot of things that make the import really secure : Create a set of tables with the old structure and a prefix not used Import data inside Update copy data to the actual site Of course it's a beginning, a lot of things should be done : Make this (...)
- ! INCLURE and {doublons}
-
8 avril, par tech-nova
doublons arrays can be transmitted to included templates. #ENV can also transmit them. These sentences are corrects : [(#INCLUREfond=totodoublons)] spip.php?page=article&id_article=3&doublons[articles]=1,2,89,12&doublons[documents]=15,12 Note that the doublons are (...)
- What is a SPIP pipeline ? It's a hook
-
3 avril, par tech-nova
During the normal execution of several commands, call-outs are made to optional scripts that allow a developer to add functionality or checking. Typically, the hooks allow for a command to change the values of function arguments before any other call, and allow for a post-processing treatment (...)
- Howto use an array in a template ?
-
27 mars, par tech-nova
Arrays are really usefull when you have to manipulate the same elements several times. A new tag has been introduced with the version 1.92 : #ARRAYkey1,value1,key2,value2... allows the creation of a variable length table (useful for constructing a table for a #SET and/or for use with a dynamic (...)
- [11355] overwrite a criterion for a specific loop only
-
25 mars, par tech-nova
For exemple critere_AUTEURS_recherche_dist() will overwrite the criterion recherche for the loops over AUTEURS. The priority order is : critere_TABLE_nomcrit critere_TABLE_nomcrit_dist critere_nomcrit critere_nomcrit_dist
- Easter egg on the private area
-
25 mars, par tech-nova
"You can even create a specific template in the private area. For exemple, this template /squelette/prive/editer/article-23.html is used to edit articles which are in the section number 23 (and it's subsections) (works also to display them)" from (...)
0 | 10