This year’s version is looking good! It has been extensively tested and has benefited from a wide range of unit tests to make the programming more secure. Version 2.1 takes a first step towards splitting SPIP’s functions into modules. The new “extensions” directory is a sign of this. The plugins in this directory are enabled automatically when SPIP is installed and cannot be disabled. This opens the way for the creation of specific SPIP distributions.
The main improvements of version 2.1
- Faster:
- Better management of disk access
- Caching of calculated paths
- Improvements and extension of the virtual SQL Server
- More secure:
- Sha256 on passwords and actions
- Checking of the correct behaviour of .htaccess files
- Automatic detection of SPIP updates
- Better appearance:
- Integration (as an extension) of the plugin "porte_plume" which helps with the editing of text fields and offers a preview while editing
- A GUI which is lighter and more elegant
- The editing area accepts graphical themes (such as those of the plugin "themes_interface_privee")
- Better management of the size of text fields (conditional sizing).
- Management (completely configurable) PNG24 transparency for MSIE6 on the public site
- A return of the links to "Modify this article" and "Propose this article" during article creation
- New interface for managing plugins
- Updated procedures for backing up and restoring a site’s database
- Handling of URLs with accented characters by setting
_TRANSLITTERER_URL
to “false” (check the server configuration)
- More up-to-date:
- Compatibility with PHP 5.3
- jQuery updated to version 1.4.2
- Integration of pclzip version 2.8.2
- Slimmer:
- A first set of core features have become “extensions”: compressor (js, css, html), porte-plume (toolbar), filters for images and colours (image processing), safehtml (security for forums and petitions), support for older browsers
- Management of a new directory (extensions/) to store these plugins, activate upon installation of SPIP and which can not be deactivated
- More extensible:
- New entry points for plugins
- New interface for managing of plugins with an associated directory (ecrire/plugins)
- Plugins can be installed in one or more other directories if defined by the constant
_DIR_PLUGINS_SUPPL
(makes pooling - mutualisation - easier) - The online help can be extended to include customised sections with automatic management of their translations
- Better structured:
- Implementation of an authentication API
- Improvement of the LDAP interface
- A recasting of the notification API
- Standardisation of the
#LOGO_
tags: parameters are now passed between braces and "double pipes" become obsolete (but still functional). - New tags and functions:
#BOUTON_ACTION
,|balise_img
,|couleur_luminance
(similar to|couleur_saturation
but acting on the luminous intensity of the color) - Dynamic tags (of the type
#FORMULAIRE_
) can now work with values that are only calculated during compilation
- Easier to debug:
- Improved debugger is now able to indicate the faulty line in a template
- Debugger now gives information on the exact location of the possible misuse of dynamic tags
- The debugger API is more flexible (more ways of calling it and customising it)
- Improved include mode (
?var_mode=inclure
) which shows the various inclusions (integration with the Skeleditor plugin to overload and edit templates online) - Possibility of overloading the
spip_log()
function
- More geek:
- Compiler provides better separation between the parser and the abstraction hierarchy, thus allowing for new syntax (for the brave)
- Reappearance of a complete and adjustable de-compiler for creating and testing new syntax
Known incompatibilities
As with any major version change, updating to SPIP 2.1 involves some incompatibilities with previous versions. The necessary changes are easy to make:
- In loops, the names of non-SPIP SQL tables need to be written exactly, respecting upper-/lower-case lettering, and not in capital letters:
Therefore<BOUCLE_a(MyTable )...
, and not<BOUCLE_a(MYTABLE)...
<BOUCLE_a(my_info)...
instead of<BOUCLE_a(MY_INFO)...
- The (already obsolete) filter
|reduire_image
is now gone, replaced by|image_reduire
) -
include_spip("inc/filtres_images");
needs to be added in PHP scripts which contain functions using image filters - Use the updated files in the directory
ecrire/url/
as a basis for writing customised URL scripts - The pipeline
creer_chaine_url
is replaced by more specific pipelines:propres_creer_chaine_url
,arbo_creer_chaine_url
, ... - A brace stuck to a tag is now considered to be providing arguments to this tag
Example: in a style sheet:.rub_#ID_RUBRIQUE{font-size: 1.2em;}
will not work
you must separate the brace:.rub_#ID_RUBRIQUE {font-size: 1.2em;}
or use the full notation for the tag:.rub_[(# id_rubrique)]{font-size: 1.2em;}
- jQuery calls of the type
$("input[@name=firstname]")
, which were already obsolete in jQuery 1.3, no longer work with the version (1.4.2) used by SPIP 2.1. This must now be written:$("input[name=firstname]")
- The syntax
#SET{variable,}
will no longer work to define a variable as empty. Instead,#SET{variable,''}
should be used - For plugins, the empty declaration
<fonctions></fonctions>
in theplugin.xml
file is no longer accepted - To use a specific function of a plugin only if the plugin is activated (and if not, do nothing) you must now write:
[(#BALISE|appliquer_filtre{specific_function})]
instead of:[(#BALISE|specific_function)]
which will generate an error - For all of the #LOGO_xxx tags [1], the false filters |fichier and |lien have been respectively replaced by the standard syntax with asterisks: #LOGO_xxx** and #LOGO_xxx*.
The positioning false filters (|top, |left, |right, |center and |bottom) and the |#URL_yyy tags working as filters are now to be written as tag arguments
The syntax (#LOGO_xxx is therefore replaced by #LOGO_xxxleft and the syntax (#LOGO_xxx is replaced by #LOGO_xxx#URL_yyy - It is highly recommended to use #INSERT_HEAD so that the extensions can supply their own specific stylesheet and JavaScript code