|
A survey of the possibilities to call, extend and modify galleries with the code in the content item.
The "Very Simple Image Gallery" Plugin is called from within the content item. The code used offers - beside of setting the folder with the images - additional possibilities to enhance and arrange the gallery.
A.) Gallery
The code consists of the call {*vsig}{/vsig*} (without the asterisks) and contains the name of the folder with your images. The configured path to this folder (image root, by default "/images/stories") is added by the plugin automatically and must not be inserted.
The complete call in our sample would look such as:
{*vsig}verysimple{/vsig*} - without the asterisks
To use a folder within a folder, the path below the set root folder (by default "/images/stories/") is used, e. g. to use the folder /images/stories/folder/subfolder" the call would look such as:
{*vsig}folder/subfolder{/vsig*} - without the asterisks
In general that´s it and the gallery is ready to go.
B.) Parameter Overrides
Starting with version 1.3.0 the "Very Simple Image Gallery" offers the possibility to change almost every default setting from the backend whilst calling the plugin within the content item. With this feature it is possible to use different settings for every single gallery. One may change the position of the thumbnails, the width of the gallery, if to show captions and/or links and so on.
To achieve this, the call of the plugin gets extended by the needed parameters. They are separated from the folder name and from each other by vertical bars (|). The have the syntax PARAMETER=VALUE:
List of possible parameters:
width - width of the whole gallery in pixel or percent (integer) e.g.: 600
height - maximum height of the images set in pixel; possible values: empty (use full width), (integer) e.g.: 300 imquality - quality of images in percent (integer from 1-100) e.g.: 90
align - align the gallery within the content item; possible values: 0 (right), 1 (center), 2 (left), 3 (float left), 4 (float right)
twidth - width of thumbnails in pixel (integer) e.g.: 80
theight - height of thumbnails in pixel (integer) e.g.: 60
crop - scale thumbnails keeping proportions or cropped; possible values: keep (proportional), crop (crop)
quality - quality of thumbnails in percent (integer from 1-100) e.g.: 80
space - space between thumbnails in pixel (integer) e.g.: 3
right - position of thumbnails; possible values: 0 (below), 1 (right), 2 (below and justified)
area - percent of width reserved for the thumbnails (integer from 1-100) e.g.: 30 Notice: Of importance only when showing the thumbs at the right.
sort - images sort order; possible values: 0 (A-Z - DEFAULT), 1 (Z-A), 2 (old-new), 3 (new-old), 4 (random)
sets - number of thumbnails to show per set; possible values "empty" (all images), any integer
setstxt - label for sets (refer to Plugin Howto)
cfwd - value for control-element "next"; possible values "empty" (default button), any text, filename of button (refer to Plugin Howto)
cbwd - value for control-element "prev"; possible values "empty" (default button), any text, filename of button (refer to Plugin Howto)
caps - show captions; possible values: 0 (no), 1 (yes)
inout - position of captions; possible values: 0 (below the main image), 1 (blended over the main image)
links - show links; possible values: 0 (no), 1 (yes)
script - use JavaScript? possible values: 0 (no), 1 (yes)
folderid - use folder name as identity of the top div-container; possible values: 0 (no), 1 (yes)
Samples:
{*vsig}verysimple|width=600|right=2{/vsig*} - without the asterisks Regardless of the settings in the backend, this gallery is shown with a width of 600 pixel (width=600). The thumbnails are below the main image and get justified to the right border of the main image (right=2) {*vsig}verysimple|width=600|right=1|area=40{/vsig*} - without the asterisks Width 600 pixel (width=600), thumbnails right (right=1), space for thumbnails 40% of 600 pixel (area=40)
{*vsig}verysimple|twidth=80|theight=60|space=3|quality=80{/vsig*} - without the asterisks Thumbnails are 80 pixel of width (twidth=80), 60 pixel of height (theight=60), there is 3 pixel space between them (space=3) and they are generated with 80% of the possible quality (quality=80)
Notice:
The parameters listed here correspond with the parameters in the plugins configuration panel. Find a details description at: Howto Plugin . The first parameter of the initial call always has to be the folder name (path). The sorting of the other parameters is arbitrarily.
C.) Captions
Captions and text have there own call. It´s:
{*vsig_c}gallery-number|imagefile|caption|text{/vsig_c*} - without the asterisks
Gallery-number: The galleries within one content item are numbered automatically by the plugin according their appearance in the article starting with 0. This setting is obligatory.
Imagefile: The exact name of the file "myimage.jpg". Left empty, the call is used as default for the whole gallery. This means, if there is no setting for an image, this one is used.
Caption: The Caption. If left empty . . . no caption is shown.
Text: The additional text below the caption. If left empty . . . no text is shown.
Samples:
{*vsig_c}0||myTitel|myText{/vsig_c*} - without the asterisks This call sets "myTitel" and "myText" as the default values for the first gallery within the current content item by leaving the imagefile-value empty. Notice: You don´t have to set a Default. If you don´t and there is no setting for an image, just nothing is shown.
{*vsig_c}1|pic01.png||myText{/vsig_c*} - without the asterisks pic01.png of the second gallery in the content item has no caption but the text "myText"
{*vsig_c}0|pic02.png||{/vsig_c*} -without the asterisks pic02.png in the first gallery shows no caption and no text although there is a default. The explicit setting overrides it.
{*vsig_c}0|pic05.jpg|myTitelA|myTextA{/vsig_c*} - without the asterisks {*vsig_c}0|pic06.jpg|myTitelB|myTextB{/vsig_c*} - without the asterisks {*vsig_c}0|pic07.jpg|myTitelC|myTextC{/vsig_c*} - without the asterisks {*vsig_c}0|pic08.jpg|myTitelD|myTextD{/vsig_c*} - without the asterisks . . . and so on
Notice: If you don't want to show captions, you may use them to set the attributes "alt" and "title" of your images. If the plugin finds a set caption for an image, it uses the title-line for ALT/TITLE of the image even when captions are not activated. Using this behavior you have also the possibility to deactivate file names as ALT/TITLE with an empty default-call for your gallery.
It is of no importance where within your content item and in which order your setting are. The number of parameters has always to be 4. This means, a call always must contain 3 vertical bars, even if a setting is empty (e.g. the image file). These vertical bars are protected characters within the calls and may not be used within your values.
D.) Links
If we want to link the images of our gallery, there is a third call to do so:
{*vsig_l}gallery-number|imagefile|URL|titel|target{/vsig_l*} - without the asterisks
Gallery-number: The galleries within one content item are numbered automatically by the plugin according their appearance in the article starting with 0. This setting is obligatory.
Imagefile: The exact name of the file "myimage.jpg". Left empty, the call is used as default for the whole gallery. This means, if there is no setting for an image, this one is used.
URL: The URL you want to link the image with. e.g.: http://www.bretteleben.de
Titel: The titel, shown when the mouse is over the image. e.g.: bretteleben.de target: The window, you want to open the linked URL. e.g.: _blank (new window), _self (same window) Samples:
{*vsig_l}0||http://www.bretteleben.de|bretteleben.de|_blank{/vsig_l*} - without the asterisks This call sets a default link for the first gallery within the current content item by leaving the value for the image file empty. The link opens in a new window.
{*vsig_l}1|pic01.png|http://www.disney.com|Disney|_self{/vsig_l*} - without the asterisks pic01.png in the second gallery within the content item is linked to www.disney.com. The link opens in the current window.
{*vsig_l}0|pic02.png|||{/vsig_l*} -without the asterisks We don´t want pic02.png in the first gallery within the content item to be linked. A special case, because as soon as we have links within a gallery, every image gets linked. Setting this empty call the image is linked to the current page, without any further setting.
{*vsig_l}0|pica.jpg|http://www.my.domain.com/myGreatProduct1|greatProduct1|_self{/vsig_l*} - without the asterisks {*vsig_l}0|picb.jpg|http://www.my.domain.com/myGreatProduct2|greatProduct2|_self{/vsig_l*} - without the asterisks {*vsig_l}0|picc.jpg|http://www.my.domain.com/myGreatProduct3|greatProduct3|_self{/vsig_l*} - without the asterisks {*vsig_l}0|picd.jpg|http://www.my.domain.com/myGreatProduct4|greatProduct4|_self{/vsig_l*} - without the asterisks ... and so on
Notice: It is of no importance where within your content item and in which order your setting are. The number of parameters has always to be 5. This means, a call always must contain 4 vertical bars, even if a setting is empty (e.g. the imagefile). These vertical bars are protected characters within the calls and may not be used within your values.
That's it! Have fun with the plugin!
If you have questions or suggestions, please use the comment-function.
I appreciate everyone, supporting me with a link back to www.bretteleben.de on his/her website. The extension itself does not produce any hidden links, eastereggs or whatever.
If you need additional features or customizations for your project that exceed the scope of support offered through the comments, you are invited to submit your requirements specification and the planned budget by email (menu item "Contact" in the menu at the top). |
Thank you sharing this lovely component!
Die Sortierreihenfolge wollte ich ohnehin schon mal in Angriff nehmen, habe aber alles Andere zugunsten der Parameter Overrides zurückgestellt. Danke für's Erinnern, das kommt. Was die Buttons angeht - ich denk' drüber nach :)
Gruß
Andreas
Eigentlich sollte man da ja keine Zusatzfeatures wünschen, damit sie auch "very simple" bleibt.
Hab' aber doch Wünsche:
1) Button oder Link für "nächstes Bild" bzw. "voriges Bild".
Wenn viele Bilder in der Gallerie sind, scrollt man das große Bild hinaus, klickt ein Thumbnail an und sieht gar nicht dass das gewünschte Bild angezeigt wird, weil es ja nach oben hinaus gescrollt ist.
Ein Button zum weiterschalten ware daher angenehm.
2) Sortierreihenfolge einstellbar ... Nach Name? Datum? Vorwärts/rückwärts?
lg, Martin
{vsig}verysimple|right=1|area=36|twidth=54|theight=38|space=1{/vsig}
Notice: In this tag you don't see all settings the plugin uses, but only the parameters I'm overriding for this special gallery.
Best regards
Andreas