SPIP-Contrib

SPIP-Contrib

عربي | Deutsch | English | Español | français | italiano

273 Plugins, 191 contribs On SPIP-Zone, 135 visitors now

Homepage > Outils pour plugins > SPIP Bonux > SPIP Bounce

SPIP Bounce

Enjoy the fresh functions of Bounce all over your Spip site !

15 January 2009 – by Cedric Morin, Loiseau2nuit, Matthieu Marcillaud, tetue

All the versions of this article: [English] [Español] [français] [italiano]

6 Votes

This plugin will “wash” your SPIP laundry more than ever, with nice gifts inside ! Soften private user interface, loops POUR (for... to...) and CONDITION, arrays, counters, and so on...

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-Bounce 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. Bounce-gift : those forms stay accessible, even when pictures display is desactivated in the browser.

JPEG - 209.4 kb

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.

  1. <BOUCLE_test(POUR){array #ENV{array}}>
  2. #KEY=>#VALUE<br />
  3. </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 (#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

  1. <BOUCLE_test(CONDITION){si #ENV{test}|>{5}}>
  2. true
  3. </BOUCLE_test>
  4. false
  5. <//B_test>

"si..." is the french for “if...”

Tags to play with arrays

SPIP already lets you initialize an array with

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

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

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

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

  1. #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 :

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

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

P.S.

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

Back to top

Comment on this article

Who are you?
  • [Log in]

To show your avatar with your message, register it first on gravatar.com (free et painless) and don't forget to indicate your Email addresse here.

Enter your comment here Les choses à faire avant de poser une question (Prolégomènes aux rapports de bugs. )
Add a document

Back to top

Here they're talking

  • (fr) Brownygreen

    3 février – <blink style='color:red;'>public|spip|ecrire:commentaire</blink>

    Un thème simple de couleur marron et vert, en largeur fixe, constitué de 2 colonnes avec une en-tête facilement personnalisable. Présentation Adaptation de Versatility par E-cosystems. Si vous utilisez le plugin Menus, une navigation principale (...)

  • (fr) Corbeille

    2 novembre 2008 – 27 <blink style='color:red;'>public|spip|ecrire:commentaires</blink>

    Un plugin pour retrouver les éléments supprimés dans la corbeille.

  • (fr) Formulaire de contact libre

    27 avril 2011 – 35 <blink style='color:red;'>public|spip|ecrire:commentaires</blink>

    Dans SPIP il n’y a pas un formulaire de contact, mais autant de formulaires de contact que d’auteurs. Cette phrase de Romy, dans son article Une page de contact dans mon SPIP, pointe un petit manque de SPIP. La possibilité d’insérer rapidement un (...)

  • (fr) Typographie avancée

    3 mars 2010 – <blink style='color:red;'>public|spip|ecrire:commentaires</blink>

    « Typographie avancée » active automatiquement un grand nombre d’automatismes destinés à affiner la typographie des textes produits par SPIP. Nécessite PHP 5 au minimum. « Typographie avancée » est l’adaptation, pour SPIP, de la classe « PHP Typography », (...)

  • (fr) Plugin Convertisseur

    24 février 2008 – 15 <blink style='color:red;'>public|spip|ecrire:commentaires</blink>

    Convertit différents formats d’articles (wiki, docx, pdf, etc..). en format SPIP (texte avec les raccourcis typographiques SPIP)