This script was inspired by La miniature et son popup, by pym.
Introduction :
When the thumbnail option is activated, a picture inserted into the article as a document has a link that opens the original full-size picture into a blank window.
This script allows to open the original picture by a rollover effect : the thumbnail changes to its full-size picture. The rest of the article is unchanged, excepted the page setup which is adapted to the size of the active picture.
How to install ?
- unzip one of the files attached to the French version of this article depending of the SPIP version you are using, then open survol.php3 [1] in a text editor
- copy/paste the function « survol » :
- either into mes_fonctions.php3 which is located at the root directory of your site (SPIP 1.8)
- or into mes_fonctions.php which is located in the /squelettes directory (SPIP 1.9)
How to use it ?
Apply the filter « survol » to the text in the article template (article.html) : replace #TEXTE
by [(#TEXTE|survol)]
.
Example :
Have a look at this page, where you can notice the behaviour of pictures inserted as documents with their thumbnails.
How does it work ?
The script searches for every thumbnail, which comprises of an img tag preceded by a link to another picture (jpg, png or gif type) : <a href=""><img src=""></a>
. It replaces this string by a single img tag (<img src="" onmouseout="" onmouseover="">
) which includes a rollover : the thumbnail is used as « onmouseout » picture whereas full-size picture is used as « onmouseover ».
Limitations :
- tested for SPIP 1.8.2, 1.9.1 and 1.9.2
- only applies to pictures that were inserted in the article as documents, by the mean of a doc tag (example : <doc123|center>
)
Discussions par date d’activité
Une discussion
Upadłość Konsumencka Sanok Upadłość konsumencka jest sposobem radzenia
sobie z problemami finansowymi i pomaga uniknąć konsekwencji
niespłacania długów. - Upadłość Konsumencka Sanok
Répondre à ce message
Ajouter un commentaire
Avant de faire part d’un problème sur un plugin X, merci de lire ce qui suit :
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.
Suivre les commentaires : |