**SPIP**
# Article proposé
L’article "**SPIP 3.2**
(SPIP)" est proposé
à la publication depuis le mercredi 25 octobre 2017.
* * *
## SPIP 3.2
mercredi 25 octobre 2017 , par [jack](.././?page=auteur&id_auteur=593&)
SPIP 3.2 is an improved version of SPIP 3.1, which includes an update of
embedded JavaScript libraries, better ergonomics of the private space as
well as many improvements.
Here are the details of the evolutions
## Javascript
**jQuery**
* **Update of jQuery** to version 3.2 (in SPIP 3.1 it is jQuery 1.12).
* **integration of `jQuery-migrate-3.0.0.js`** to facilitate migrations
of scripts using jQuery. GitHub - jquery/jquery-migrate: A development tool to help migrate away from APIs and features that have been or will be removed from jQuery core
**Important :** These changes imply that it is strongly recommended to
update the scripts using jQuery. This mainly concerns the following changes
:
* bind() => on()
* unbind() => off()
* load() => on(’load’, ...)
* unload() => on(’unload’, ...)
* jQuery.isArray() => Array.isArray() </blockquote>**jQuery UI**
* **Upgrade of jQuery UI** to version 1.12 (in SPIP 3.0 it isjQuery UI
1.11). jQuery UI 1.12 Upgrade Guide | jQuery UI . Change implementation :
* any jQuery UI is loaded in the backoffice by default.
* In public part, when a jQuery UI element is requested via the
"jqueryui_plugins" pipeline, all jQuery JI JS / CSS is also loaded.
> **Important : ** These changes imply that javascript calls that load
jQuery UI modules with `$.getScript()` will no longer work. You can either
load jQuery UI globally into your templates, or via the `jqueryui_plugins`
pipeline for a plugin, or use `$.getScript()` on the path of the file
"jquery-ui.js" directly.
>
> So :
>
> $.getScript("
>
> #CHEMIN
>
>
>
> {prive/javascript/ui/core.js}
>
> ", function()
>
> {
> $.getScript("
>
> #CHEMIN
>
> {prive/javascript/ui/widget.js}", function(){
> $.getScript("
>
> #CHEMIN
>
> {prive/javascript/ui/mouse.js}", function(){
> $.getScript("
>
> #CHEMIN
>
> {prive/javascript/ui/sortable.js}", function(){
> // ...
> })})})}
>
> );
>
> Could become :
>
> $.getScript("
>
> #CHEMIN
>
>
>
> {prive/javascript/ui/jquery-ui.js}
>
> ", function()
>
> {
> // ...
> }
>
> );**JS Cookie**
* The JS Cookies library is integrated in version 2.1.3. It replaces
jQuery.cookie. GitHub - js-cookie/js-cookie: A simple, lightweight JavaScript API for handling browser cookies
* The old syntax `$.cookie()` still works in most of the cases but it
is advisable to migrate
* `$.cookie(key)` becomes `Cookies.get(key)`
* `$.cookie(key, value)` becomes `Cookies.set(key, value)`
* `$.cookie(key, value, options)` becomes `Cookies.set(key, value,
options)`
## PHP
* Numerous notices PHP removed.
* Compatibility with PHP 7.1## Core
**Navigation items sorting & favourite entries**
The plugin "Menu privé alphabétique
(Menu privé alphabétique - SPIP-Contrib)" is integrated :
* The navigation sub-menus (in the "Edit", "Publication", "Activity",
...) are now sorted in alphabetical order [1] .
* inauthor’s preferences, it is now possible to check "favourite"
menu entries, which will then appear in the top of the relevant navigation
sub-menus.
* if a sub-menu contains more than 20 entries, it is then displayed in
2 columns.
**Simplifying the "correspondence cookie"**
The button to enable this cookie in the private area was not explicit.
Furthermore, the cookie eventually deactivated if an author regularly
logged on to the same site. The solution chosen is to remove the notion
(and the button) of "correspondence cookie", and to create the cookie (as
admin) systematically when an author loges on and has the rights of access
to the private area . The admin cookie is renewed at the same time as the
session cookie, and removed when disconnecting.
Related Tickets : # 1740 (Constante _DUREE_COOKIE_CORRESPONDANCE (#3740) · Tickets · spip / spip · GitLab), # 1710
**Dependencies of plugins to PHP extensions**
It is now possible to specify in `paquet.xml` that a plugin needs a PHP
extension to work. Ticket #3829 (Pouvoir demander un module PHP dans paquet.xml (#3819) · Tickets · spip / spip · GitLab). An
error will be displayed if the extenseion is not loaded. Syntax :
<necessite
nom
=
"php:curl"
/>
<necessite
nom
=
"php:xdebug"
compatibilite
=
"[2.0.0;]"
/>
**Form*** the #FORMULAIRE_INSCRIPTION tag takes a third argument to indicate
the page to which the person is redirected when they confirms their
registration.
[
(
#FORMULAIRE_INSCRIPTION
{6forum,0,
#URL_PAGE
{welcome}}
)
]
**Criteria*** the `{par champ}` criterion has been rewritten to better support the
field names from joint tables, thus harmonizing with `{par num champ}` and
`{par multi champ}` operation. Expressions `{par expr champ}` can now be
created without overloading the criterion, for all intents and purposes.
* `{par sinum champ}` was added to place elements with numbers (other
than `0.`) first. So `{par sinum titre, num titre, titre}`will put titles
with numbers before those without (unlike `{par num titre, titre}`. And
contrary to `{par titre, num titre}`, number 100 will be placed after
number 20.
**Pipelines**
* **formulaire_receptionner** : this pipeline is called when a form is
posted by a visitor but before the parsing of the data posted by the
verification function.
**Various tickets**
* Inclusions, connect & pagination (Tickets #3823
(Pagination et connect (#3823) · Tickets · spip / spip · GitLab) et #3899
(Comportement des inclusions avec le paramètre connect. (#3899) · Tickets · spip / spip · GitLab)) : ajax paginations take into account
the active `connect` parameter. The`connect` explicit in an inclusion takes
precedence over the one coming from the URL.
* The number of an author’s session files has been limited (Ticket
#3807 ([gestion sessions] : suppression de session inutilisée (#3807) · Tickets · spip / spip · GitLab))
* A new password can now be sent to an author from the private area
(Ticket #2250 (Un bouton pour envoyer les identifiants (#2250) · Tickets · spip / spip · GitLab))
**Deleted files**
* ecrire/inc/aider.php (moved to plugins-dist/aide/inc/aide.php)
* ecrire/inc/pclzip.php (moved to
plugins-dist/archiviste/inc/pclzip.php)
**Relocations**
* the date filters are now in inc/filtres_dates.php (moved from
inc/filtres.php) (Ticket #3583 (Séparer les filtres de date de inc/filtres.php dans un autre fichier (#3583) · Tickets · spip / spip · GitLab)).
**Suppression**
* the deprecated functions `afficher_plus() `,
`debut_cadre_couleur_foncee() `, `fin_cadre_couleur_foncee()` have been
moved to the plugin Grenier.
## Plugins
**Online help**
* New plugin which integrates the online help management (functions
moved from the Core or Plugin SVP)
**Archiviste**
* New plugin that integrates the management of zip and tar archives
(functions moved from the Core)
**Image Filters**
* Deprecated functions and files from SPIP 2.1 (Ticket #3601
(Supprimer les vieilles fonctions d'images du plugin filtres_images (#3601) · Tickets · spip / spip · GitLab)) have been removed. The elements have
been moved to the plugin Grenier.
**Grenier**
* Home for deprecated functions of the plugin Image filters.
* Home for Core deprecated functions**Medias**
* Integration of the plugin Minidoc (Minidoc : différentes vues pour les documents attachés - SPIP-Contrib) in
the plugin médias. It allows different views of the documents lists
attached to the editorial objects. Ticket #3888
(https://core.spip.net/issues/3888)
* The default presentation of these attached document lists has also
been changed
* Integration of the plugin Ordoc (Ordoc : ordonner les documents attachés - SPIP-Contrib) in
the plugin médias. Ticket #3887 (https://core.spip.net/issues/3887).
115/5000
It allows the sorting of the documents lists attached to editorial
objects [2] , and adds a "rang\_lien" field in the table
spip\_documents_liens. Then it becomes possible to use loops such as: :
<BOUCLE_docs
(DOCUMENTS)
{id_article}
{par rang_lien, num titre, titre, date}
>
.* The structure of the expected HTML code returned from the
`afficher_metas_document` has been changed. It also sends the HTML of the
displayed details to the document rather than nothing by default, which
enables to complete the `<table>` tag.
**Keywords**
* An advanced administration of the keywords has been added. It allows
them to merge or create associations / dissociations with another keyword
Commit 100448 (Connexion · GitLab)
**Organiser**
* Upgrade of the library FullCalendar (https://fullcalendar.io/) to
version 3.5 (was version 1.6). If you used this library in public area, see
Upgrading to v2 - Docs v3 | FullCalendar ou
Documentation | FullCalendar in order to migrate
* Integration Moment.js (http://momentjs.com/) library (required by
FullCalendar)
**Sites**
* Search in syndicated articles on a site is now possible. Ticket #3859
(https://core.spip.net/issues/3859)
**SVP - Management of plugin**
* Taking into account of the display of dependency errors on PHP
extensions.. Ticket #3819 (Pouvoir demander un module PHP dans paquet.xml (#3819) · Tickets · spip / spip · GitLab).
* More comprehensible display of versions of dependency errors.
* You can now download a plugin without activating it. In this case the
plugin search page will remain. Ticket #3471
(https://core.spip.net/issues/3471)
* A progress bar is displayed in multiple actions (avoids redirection
errors). Ticket #3473 (https://core.spip.net/issues/3473)
* Correction of the absence of confirmation of the actions when
additional actions are automatically added by SVP (for example to activate
or to deactivate dependencies).
* `inc/pcltar.php` and`lib/pcltar/` moved into the plugin Archiviste.
**Extended URLs**
Arborescent URLs (mainly) can handle multilingualism (multis fields on
topics for example) and multiple parents (polyhierarchy).
* Tolerate several parents for an object. Commit 100814
* A field `langue` on the table `spip_urls` has been added. Commit
100835 (Connexion · GitLab)
* It is possible to define a specific URL for a certain language on an
editorial object by editing the URL. To do this, in the input field,
indicate `[code langue]:[url propre]` as `en:movies` and `fr:videos`.
Commit 100835 (Connexion · GitLab)
* The declaration of "type" possibly prefixing the URL of an object in
tree-based URLs (example : ’mot’ in `mot/titre_du_mot`) can receive
syntax based on a multi tag to translate the term to the language Commit
100836 (Connexion · GitLab)
* Tree-based URLs can handle multilingualism, adding the language code
in the URL, which can be activated by the constant `_url_arbo_multilang`.
Commit 100844 (Connexion · GitLab).
[1] Previously, the order could depend on a desired position, of the
order in which the plugins were activated
[2] For sites that used the plugin Mosaique
(Mosaïque - SPIP-Contrib) a migration plugin
(Migration de Mosaïque vers Ordoc - SPIP-Contrib) exists
— Envoyé par SPIP (https://www.spip.net/)
---------------------------------------------------------------------------
![]()