⇒ http://my.opera.com/tech-nova/blog/
Un site qui recense les astuces et évolutions des possibilités de SPIP.
Articles syndiqués tirés de ce site
- Howto use an array in a template ?
-
Mars 2008, 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
-
Mars 2008, 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
-
Mars 2008, 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 (...)
- ! Custom fields are directly interpreted
-
Mars 2008, par tech-nova
With the revision [11350], any custom field can directly be used in templates with the tags #FOO and #EDITfoo (with the plugin « crayons » [fr]) You don’t have to change inc/modifier or specify the structure of the table : the core directly manages them. However the private interface actually (...)
- [11350] any table field creates its specific tag
-
Mars 2008, par tech-nova
The value of any field ’foo’ can be displayed in your templates with #FOO — Even if this is a field of the ’official’ tables. Much more, this value can be edited in the public area with an inline content editor (actually it’s still not possible in the private area) : sql_showtable() is used (...)
- [11341] The form name in #ACTION_FORMULAIREpage, formulaire
-
Mars 2008, par tech-nova
A template formulaire/foo.html can contain another template with #INCLUDE - which can refer to it with #ACTION_FORMULAIRE#SELF, foo
- [11289] Ajax without coding in SPIP
-
Mars 2008, par tech-nova
includes the template and ajaxifies all it’s links. By default, the javascript variable « ajaxbloc_selecteur » is used. It transforms into ajax call each link that corresponds to the jquery selector ’.pagination a,a.ajax’. An ajax call refreshes the template’s result by restauring it’s #ENV, (...)
- Optimizing your SPIP server
-
Février 2008, par tech-nova
It’s in fact usefull for every website. Here is what I do : - Expires header and Etag : I add this to http.conf : # cache ExpiresActive On ExpiresDefault A300 ExpiresByType image/x-icon A2592000 ExpiresByType application/x-javascript A2592000 ExpiresByType text/css A2592000 (...)
- #URL_ECRIRE just discovered
-
Février 2008, par tech-nova
I barely know what #URL_PAGE is. But not #URL_ECRIRE,.. until today ;) This helper, like #URL_ACTION_AUTEUR, enables us to link your website to the private area. #URL_ECRIREnaviguer returns ecrire/ ?exec=naviguer #URL_ECRIREnaviguer, args returns ecrire/ ?exec=naviguer&args (it’s like (...)
- [11156] : new filter to exclude elements by keyword
-
Janvier 2008, par tech-nova
Nothing new in fact, just a simplification : !id_mot=2 now returns all the elements that are not linked to id_mot=2 (including elements without any keyword)