SPIP 1.7, SPIP 1.7.2

[SP<font color="yellow">IP 1.7.2] introduces several new criteria and tags, as well as some bug corrections, most specifically:

SPIP in Chinese

Chinese has just been added to the list of available languages: Arab, Bulgarian, Réunion Creole, Danish, German, English, Esperanto, Spanish, Farsi, French, Galician, Italian, Dutch, Occitan (7 versions), Polish, Portugese, Vietnamese... and now Chinese!

Automatic creation of vignette thumbnails

— Rather than GD, you can choose to use ImageMagick if that library exists on the server in the form of the "imagick" PHP module, or as the command line instruction "convert". (NB: if you use fink (Mac OS X), you must specify the access path /sw/bin/convert in the inc_version.php3) file. ImageMagick generally provides better graphical results.
— Whether you use the GD or ImageMagick library, the thumbnails are now recreated whenever they are needed (so they can now be deleted if you change the method of creation or he size of the thumbnails).
— Attention: You will need to open the site advanced configuration page to select your preferred method for generating thumbnails. If several methods are available, click on the image that looks the best; if "imagick" is there, it’s better to choose it in favour of "convert": the method used to call the library is "cleaner".

Optional criteria

Optional criteria make it possible to have loops that can be used for several different purposes: The new syntax means you only need to add a question mark to a criteria for it only to be taken into consideration if a suitable value is passed into the context. As an example, this can be used to enormously simplify the loops in the backend-dist.html, while still making it possible to specify that we want the backend "restricted to articles written in creole" (backend.php3?lang=cpf) or "from section 7 and its sub-sections" (backend.php3?id_rubrique=7).

In the latter case, then loop would now be:

<BOUCLE_backend(ARTICLES){lang?}{branche?}{par date}{inverse}{0,10}>

Handy tools to complete the multilingual armory:

— the {lang_select} criterion is used to force the selection of the language for the (AUTEURS) loop, which is not normally the case (in its inverse, the {lang_select=non} criteria is used to tell the (ARTICLES), (RUBRIQUES) or (BREVES) loops to not select the language).

— the $forcer_lang customisation variable tells SPIP that it must check to see if the site visitor has a language cookie, and if they do, then to pass it as an active parameter to the corresponding page. This is what the login page for the private zone does in the SPIP standard distribution.

— the #MENU_LANG (and #MENU_LANG_ECRIRE) tags display a menu of languages that allow the visitor to view "this page in..." a variety of languages. The first tag displays the list of the site’s languages, the second one lists all of the available languages in the private zone (and is used on the private zone login screen).

— finally, the optional criteria can allow a given loop (in fact, a given squelette template file) to display with the articles of the site in all languages, or just the articles in the language passed in the URL. This can be useful, for example, inside search loops:

<BOUCLE_recherche(ARTICLES){lang?}{recherche}{par points}{inverse}{0,10}>

Small bonuses

— SP<font color="yellow">IP 1.7.1 introduced a bug with bullets which would not respect paragraph markers that preceded them.
— the statistics display now offers a "preview" of the results at the end of the day based on the average (of site visits) and the popularity of the article (for article visits). Make of it what you will...

SP<font color="yellow">IP 1.7.1 has some enhancements which are detailed below.

Search engine:

-  Indexing of petitions and forums. Note that forums are indexed by thread, and not message after message.

-  Optimisation of sorting {by points}: articles containing the exact words that are requested get many more points than those containing only words starting with the requested words; in the same way, if a request concerns several words, the articles containing all of those words will now be returned at the top of the list. So the search engine now gives much more relevant results.

-  Enhancement of the search engine for articles in German and in Vietnamese:

  • in German, you can type either "über", or "ueber", or "uber", to find the first of these three words ("über"): "ueber" is the "complex" transliteration while "uber" is the simple one.
  • in Vietnamese, a language with many and various kinds of accents, to find the word "Người" with all its accents you can type it:
    • either with the right accents
    • or as "nguoi" — without any accents
    • or as "ngu7", accents being internally transcoded into numbers.
    • Technical note : to allow searches in the "ngu+" form — i.e. directly in the usual transliteration of Vietnamese as seen on the Internet — the $_GET['recherche'] variable has to be processed beforehand in order for the '`?~.^+(- to be replaced by 123456789 transcoding. Of course SPIP can’t provide such processing by default because it applies only to researches made in the Vietnamese language.

-  Search result highlighting is utf-8 compatible.

In the templates:

-  The {tout} criterion in a (RUBRIQUES) loop will also return sections that are empty sections too.
-  The #EXPOSER tag can be used to highlight the path to an article in section or article lists (See Highlighting an item in a list)
-  A new filter for backend files: |texte_backend
-  Systematic removal of title-numbers in forum reply posts.
-  Requesting a template with a lang=... parameter is now possible.
-  In the same way <INCLUDE(...){lang}> or <INCLUDE(...){lang=xx}> are working at last, and are able to fetch a template that’s more precisely defined by a language (article.xx.html file).
-  Addition of id_auteur in (FORUMS) loops.
-  It is possible to use a {url==...} criterion in (SYNDIC_ARTICLES) loops.
-  Addition of the #URL_AUTEUR tag.
-  The |couper{} filter has been spruced up, especially for very short lengths. So [(#TITRE|couper{5})] will fetch exactly 5 characters.
-  The |reduire_image filter enables image-size reduction on the fly, either by using the gd (or gd2) library if it’s present, or by writing width=... height=.... inside the generated HTML code.

Typographical shortcuts:

-  A <poesie>...</poesie> tag has been added to enable verse (poems or songs) to be typed with the appropriate line breaks.

-  Multiple exclamations are better managed (in French, as in "Whoah!??!!").

In the private area:

-  In the "Complete interface" mode the ecrire/articles.php3?id_article=x page makes revision of non-breakable spaces easier by highlighting them in light grey — the setting has to be made in the ecrire/mes_options.php3 file (you’ll have to create one if you haven’t already done so).
-  Mail buttons in the authors’ list have been restored.

Experimental features:

-  entry points have been made in typo() and propre() for special patches
-  the $cookie_path option has been added to hack SPIP with external scripts like Spikini).

SP<font color="yellow">IP 1.7 (January, 3rd 2004) completed the internationalisation of the system by introducing the much requested function of multilingual site creation. The official site, hosted at http://www.spip.net, is itself multilingual (by the way, volunteers to expand the translations are always welcome: you can meet us at: http://www.spip.net/rubrique4.html).

Database backups

You are strongly advised to back up your database before updating SPIP. To achieve this, go to "Site Administration" in the private area and click on "Site maintenance" and "Backup the database". Once the database is backed up (to complete the backup, you need to create a file with a special name in the directory "ecrire/data"), you can retrieve the resulting file (dump.xml or dump.xml.gz).

After completing the backup, you can update SPIP as explained below.

If you encounter any problem and you need to restore the backup: start by reinstalling the SPIP version with which you made that backup (VERY IMPORTANT)! Do not try to restore a backup made with version 1.6 (for instance) under version 1.7! Once you reinstall the right version of SPIP, you can restore the backup you created earlier.

Also, remember that to obtain a full backup, you need to copy the contents of the "IMG/" directory to a safe place. This directory contains all the logos, images and documents that you uploaded from the private area.

Important: this backup is only a precaution. Do not try to restore if everything went well with the update. Also, do not delete the database before the update; it would be risky to do so, and is pointless.


You can update SPIP using the usual procedure. You have two alternatives:

-  Use the automatic installer, spip_loader.php3: this file, which you can find at http://www.spip.net/spip-dev/INSTALL, will automatically overwrite your current version with version 1.7.

Note: if the automated installation is not compatible with your system, spip_loader.php3 will warn you. You will then have to use the manual installation described below.

-  Manually download SP<font color="yellow">IP 1.7 to your site. To achieve this you must:

1. Choose one of the archives in the directory http://www.spip.net/spip-dev/DISTRIB; you can choose the complete version (containing all the languages) or a monolingual version containing only one language but which is faster to download.

2. Download this archive to your computer and extract the files with a suitable application (Winzip under Windows for example).

3. Upload the files extracted to your web site using FTP. It goes without saying that the files should be uploaded to the same location as the previous version.

Once the new version is in place, you must let the system update the database: you will be required to create a file (or a folder) with a special name in the directory "ecrire/data". This precaution is there to insure that the person who is performing the update is authorised to do so.

Note: if a subsequent problem prevents you from accessing the private area of your site, you can create a new access simply by deleting the file inc_connect.php3 from the "ecrire" directory, which triggers a new installation procedure.

Once SPIP is updated, you can start enjoying the new features of version 1.7 which are detailed below.

Good luck and happy publishing.

Multilingual sites

SPIP version 1.6 was enriched with a number of translations making it possible to use the private area in various languages, and thus widening the use of SPIP to authors of different languages. Version 1.7 enhances this feature by allowing a multilingual public site without any installation effort (except the modification of some configuration options). This major functionality (which covers various aspects like displaying dates and forms and the management of translated articles) is the subject of a separate document.

Several tools dedicated to multilingual management have made their appearance in version 1.7:

-  Special configuration options
-  A system of translation management between articles
-  A page dedicated to the translation management by language
-  A bundle of already translated strings in different languages for the public site

Follow up of the translation

The range of the languages available has grown significantly. To date, SPIP’s editing interface has been translated into the following languages:
-  French
-  English
-  Chinese
-  Dutch
-  Vietnamese
-  Spanish
-  Arabic
-  Farsi
-  Creoles and pidgins, French-based
-  German
-  Danish
-  Esperanto
-  Italian
-  Galician
-  Bulgarian
-  Polish
-  Catalan
-  Seven different variations of Occitan: Niçard, Languedocien, Gascon, Provençau, Auvergnat, Vivaro-Alpin and Limousin.

Your public site takes advantage of these translations thanks to a system of already translated texts provided with SPIP. You can see this system in action in the default templates of SP<font color="yellow">IP 1.7: change the language of the site or an article, refresh the corresponding public page and the common texts (navigation, dates, forms...) will be displayed in the chosen language.

The documentation itself is gradually being translated into various languages on our official site http://www.spip.net. This is a very significant piece of work, and there is plenty of room for more translators (See the translator’s section - L’espace des traducteurs).

Other significant modifications

Private area:

-  A graphical tool bar catering for the most significant formatting shortcuts has been added above the text editing box for articles, news items and forums. It makes it possible for beginners to make use of the main typographical shortcuts by using the tool bar buttons rather than their keyboard equivalents.

-  At the login screen, users can now choose to remain logged in for a few days. This avoids having to re-enters their passwords too often.

-  The personal agenda has been completely revamped.

Monthly calendar
The calendar interface distinguishes editorial elements (publishing of articles and news items) and appointments (general announcements and personal messages).
Display of a day
The main column displays all the appointments. The colour code allows the identification of memos (blue), appointments with other participants (green) and general appointments (yellow).
In the left column, a button makes it possible to come back to today’s date and simplified calendars ease the navigation from one day to another.
In the right column, the next day is displayed.

-  A page for the remote monitoring of the site’s activity allows the retrieval of the syndication address (Really Simple Syndication) and the injection of the site’s activity into a calendar (in iCal format).

-  New Navigation system for the whole site.

The new navigation system

Public site:

-  Addition of the #DATE tag for the DOCUMENTS loop.

Minor corrections and additions

Private area:

-  It is now possible to configure a sender’s email address for mails from the site (if it is left empty, the apparent address of the sender is identical to that of the recipient, as with previous versions).

-  When updating the database, SPIP initially checks if the permissions are sufficient and displays an error message if they are not.

-  The display of referrers has been completely revamped.

-  Two additional configuration variables for mes_options.php3: you can now configure whether SPIP will ignore connections by REMOTE_USER (htaccess) and/or HTTP authentication.

-  Passwords can now contain accents (with an 8-bit character set of the ISO-8859-1 type, not UTF-8)

Public site, templates:

-  When a message is submitted to a public forum, the name and e-mail of the sender are stored and fed automatically to a form if the sender posts other messages during the same session. This will spare the need to type one’s name again and again in case of an extensive participation in the forums.

-  Pages corresponding to an unpublished article are no longer stored in the cache.

-  An error message is now displayed instead of a blank page when the server cannot generate a page and it is not in the cache (for example, when using the search engine during a MySQL failure).

-  More precise handling of MySQL errors in the templates.

-  Correction of a small bug in the public forums. In certain cases, the page was not automatically regenerated after a comment had been submitted.

-  Correction of the doublons bug with the HIERARCHIE loop.

-  For hackers there is now the possibility of redefining the #INTRODUCTION tag by placing a new function introduction(...) in mes_fonctions.php3. As a start, you could base this function on calcul_introduction which is in inc-calcul.php3.

Site content and miscellaneous:

-  Addition of nom_site and url_site fields to articles, to be activated, under the name of "hypertext link", in the configuration of the site (#NOM_SITE and #URL_SITE tags allow these values to be displayed).

-  Support of Arabic character sets (Windows-1256 and ISO-8859-6).

-  Configuration of the URL for the external glossary (for "[?search word]" shortcuts) is now more flexible. It has the form "url_glossary_with_%s", where %s is replaced by the term sought after".

-  MySQL 4.1.0 compatibility.

-  Introduction of a load management mechanism (intended for the host server): when SPIP detects the presence of a file named lock in ecrire/data/ and providing this file is not too old (less than 10 minutes), it avoids making unnecessary calculations such as indexing, statistics, etc..

-  New typographical shortcut "<quote>...</quote>", to quote a piece of text (useful in the public forums).

-  Other optimisations and enhancements.

Author bealach, Mark Published : Updated : 21/03/23

Translations : عربي, català, Deutsch, English, Español, français, italiano, Nederlands, Türkçe