SPIP Bonux

Enjoy the fresh functions of Bonux all over your Spip website !

ATTENTION : End of support for SPIP versions 2.* and inferior (see also Security & maintenance updates : new versions SPIP 3.2.2, 3.1.9 and 3.0.28 & Fixing release for branch 3.2 : SPIP 3.2.3).

Most features brought by SPIP Bonux have already been reported to SPIP 3 and are now native core functionalities. For the features which haven’t been reported, please now refer to Bonux for SPIP 3.*

Because we just could not put everything in SPIP 2.0 (the box was to small), here comes a plugin with little more tweaks in it ! Take it as a gift, with our kind regards !

How soft it is ! Is it new ?

According to its fans, SPIP-Bonux improves the comfort of your user experience with forms in the private area, whose colours last longer than before.

It is just a slight variation on the private area’s styles. This one now offers a new set of colours, softer for the eyes, leading to more concentration abilities on your editorial work. Bonux-gift : those forms stay accessible, even when pictures display is desactivated in the browser.

A loop (POUR) to get for... to... effects

A loop (POUR) (french equivalent for « FOR ») now lets you loop on all php arrays, although they are passed through #ENV, #GET or whatever.

<BOUCLE_test(POUR){array #ENV{array}}>
#KEY=>#VALUE<br />
</BOUCLE_test>

KEY and VALUE can then be used in criterions, as for a certain number of criterions in traditionnal SPIP’s loops (pagination for exemple)

Those arrays might already be present in because they are brought as an argument for an include (<code>#INCLURE), or as a context for a CVT form, or come from any filter returning a PHP array() : (#ENV{something}|my_filter), or at last, from every tag returning an array(), like #ARRAY ...

Numerous exemples available in the plugin’s /tests/ directory.

A loop (CONDITION) to get if... then... else... effects

<BOUCLE_test(CONDITION){si #ENV{test}|>{5}}>
true
</BOUCLE_test>
false
<//B_test>

« si... » is the french for « if... »

Tags to play with arrays

SPIP already lets you initialize an array with

#SET{my_array,#ARRAY{1,first_value,2,second_value,3,third_value}}

SPIP-Bonux adds a #SET_MERGE tag which allows to merge and to allocate a value at the same time.

#SET_MERGE{name_of_my_array,#GET{my_array},#ARRAY{key,value}}

and a tag #SET_PUSH, to add any element to it :

#SET_PUSH{my_array,value}

A new criterion compteur ( = counter)

Inspired by Classer les articles par nombre de commentaires, this criterion compteur lets you count elements issued from a table, associated to elements issued from another table.

For exemple, to display authors (AUTEUR) with their number of articles :

<BOUCLE1(AUTEURS){compteur articles}{par compteur_articles}>
#ID_AUTEUR : #COMPTEUR{articles}
</BOUCLE1>

#COMPTEUR tag is associated to criterion and allows to display the counter value for each author.

Plugin originally developped by Cedric Morin, tetue and Matthieu Marcillaud.
Notice translated from French to English by Etienne BRACKERS aka ’Loiseau2nuit’.

Discussion

Aucune discussion

Ajouter un commentaire

Avant de faire part d’un problème sur un plugin X, merci de lire ce qui suit :

  • Désactiver tous les plugins que vous ne voulez pas tester afin de vous assurer que le bug vient bien du plugin X. Cela vous évitera d’écrire sur le forum d’une contribution qui n’est finalement pas en cause.
  • Cherchez et notez les numéros de version de tout ce qui est en place au moment du test :
    • version de SPIP, en bas de la partie privée
    • version du plugin testé et des éventuels plugins nécessités
    • version de PHP (exec=info en partie privée)
    • version de MySQL / SQLite
  • Si votre problème concerne la partie publique de votre site, donnez une URL où le bug est visible, pour que les gens puissent voir par eux-mêmes.
  • En cas de page blanche, merci d’activer l’affichage des erreurs, et d’indiquer ensuite l’erreur qui apparaît.

Merci d’avance pour les personnes qui vous aideront !

Par ailleurs, n’oubliez pas que les contributeurs et contributrices ont une vie en dehors de SPIP.

Qui êtes-vous ?
[Se connecter]

Pour afficher votre trombine avec votre message, enregistrez-la d’abord sur gravatar.com (gratuit et indolore) et n’oubliez pas d’indiquer votre adresse e-mail ici.

Ajoutez votre commentaire ici

Ce champ accepte les raccourcis SPIP {{gras}} {italique} -*liste [texte->url] <quote> <code> et le code HTML <q> <del> <ins>. Pour créer des paragraphes, laissez simplement des lignes vides.

Ajouter un document

Suivre les commentaires : RSS 2.0 | Atom