SPIP JQUERY CYCLE 2

Help for Spip jQuery Cycle 2 plugin

sjcycle/Parameters

Decryption of the syntax and parameters of the typographic shortcut "sjcycle"

The typographic shorcut "sjcycle" allows to insert easily one or several slide shows in an article : you just have to copy it out inside the space « Text » of the article, where you wish to place the slide show.

This shortcut contains several parameters separated by the character "|".

- Parameter "N", compulsory :
<sjcycleN>
Corresponds to the number of the article containing images. You can insert a slide show with images of an article in an article X Y.

- Parameter "ALIGN", optional :
<sjcycleN|ALIGN>
Allows to specify the alignment of the slide show within the text. If it is not specified, the alignment is "center". The alignment options :

  • "left" : to the left of the text ;
  • "center" : to center in the text ;
  • "right" : to the right of the text.

- Parameter "docs=n1,n2,[...],nx", optional :
<sjcycleN|ALIGN|docs=n1,n2>
Allows to specify the list of images to be displayed in the slide show. Thus several slide shows can be displayed within the same text, images can be taken out. If it is not specified, all the images are selected.

- Parameter "id_diapo", optional :
<sjcycleN|ALIGN|id_diapo=X>
Allows to attribute a specific id to a slide show to be able to target it in css by dsjcycle_X. Since the version 1.1, not necessary any more to display several slide shows in the same article

Example :
<sjcycle16|center|docs=101,102,103,104|id_diapo=1>
<sjcycle16|center|docs=105,106,107,108,109|id_diapo=2|opt=fx:'shuffle',timeout:2000>
This displays 2 slide shows in the same article, the first one on 4 images with the parameters by default of the site and the second on 5 images, with parameters different from those by default.

- Parameter "legende", optional :
<sjcycleN|ALIGN|legende=X>
Allows to post a legend under the slide show

  • If X=1, we post as legend the images’title
  • If X=model, we post as legend the text supplied by the model sjcycle_model. This allows to create a legend containing the author’s name, the article’s title, well anything we want...
  • If X=a text, this text is posted as legend

- Parameter "lien_article" et "forcer_lien_reference", optionnals (added in 1.6 version) :
<sjcycleN|ALIGN|lien_article=XXX|forcer_lien_reference=on>
Lets put a link on the slideshow to an article XXX other than that containing images. In the case of a multilingual site, provide the id of the reference article, the model is responsible for finding the id of the article to the visitor’s language. This option disables the opening in a box. If the item does not exist in the current language we put or not a link to the article according the reference parameter forcer_lien_reference is defined or not.

Example :
<sjcycle16|center|lien_article=171> : Slide show on all the images of the article 16 with a link to the article 171

- Parameter "liens_individuels", optional (add in 1.7 version) :
<sjcycleN|ALIGN|liens_individuels=valeur>
Allows to place a link on each image of the slideshow to an article, a section or an external site following the parameter value (article, rubrique, externe). If the value is "article" or "rubrique", the identifier of the object is taken ??in the description field of each image. If the value is "externe" the scope description of each image must contain an http link. This option disables the opening in a box.

Example :
<sjcycle16|center|liens_individuels=article> : slideshow of all images of article 16 with, on each image, a link to the article whose id is contained in the description of the image.

- Parameter "opt=p1:v1 ;p2:v2 ;[...] ;px:vx", optional :
<sjcycleN|ALIGN|opt=p1:v1;p2:v2>
Allows to use the options of the script jcycle. The complete list is defined on the site of the plugin jquery jcycle here. These values overwrite those defined in the configuration page of the plugin. The possible options correspond to those of the version used in this plugin spip and not to those proposed on the page quoted above. At present, it is the version 2.88 (08-JUN-2010) that is used.

Example :
<sjcycle16|center|opt=autostop:1;autostopCount:5> : Slide show on all the images of the article 16 but which will stop at the fifth image
<sjcycle16|center|opt=fx:'fade'> :Slide show on all the images of the article 16 with a « fade » effect of transition which replaces the one defined globally for the whole site

- Settings of overload of the general configuration :
<sjcycleN|ALIGN|param=valeur>
These values overwrite those defined in the configuration page of the plugin :

  • width : width in pixels of the cropped images
  • height : height in pixels of the cropped images
  • position : position of the original image in the cropped image (left top, left center, left bottom, center top, center, center bottom, right top, right center, right bottom)
  • background : background color of the cropped images (format #FF0000)
  • border_color : border color of the cropped images (format #FF0000)
  • border_width : width in pixels of the border
  • div_margin : margin in pixels around the cropped images

Example :
<sjcycle16|center|background=#000000> : slideshow centered on all images of Article 16 but with a black background, no matter the background color defined in the configuration page of the plugin.