|
A survey of the possibilities to call, extend and modify galleries with the code in the content item.
The "CSS 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 {*becssg}{/becssg*} (without the asterisks) and contains the name of the folder with your images. The path to this folder "/images/stories" is added by the plugin automatically and must not be inserted. The complete call for example would look such as:
{*becssg}cssgallery{/becssg*} - without the asterisks
To use a folder within a folder, the path below "/images/stories/" is used, e. g. to use the folder /images/stories/folder/subfolder" the call would look such as:
{*becssg}folder/subfolder{/becssg*} - without the asterisks
In general that´s it and the gallery is ready to go.
B.) Parameter Overrides Starting with version 1.2.0 the "CSS Gallery" offers the possibility to change 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 create galleries of different width and height, change the number of thumbnails per row and more.
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 - maximum width of main image in pixel (integer) e.g.: 600
height - maximum height of main image in pixel (integer) e.g.: 450
iqual - quality of scaled main image in percent (integer) e.g.: 90
throw - number of thumbnails per row (integer) e.g.: 4
tqual - quality of thumbnails in percent (integer) e.g.: 70
prld - should we preload the images? possible values: 0 (no), 1 (yes)
align - align the gallery within the content item; possible values: 0 (right), 1 (center), 2 (left), 3 (float left), 4 (float right)
sort - images sort order; possible values: 0 (A-Z - DEFAULT), 1 (Z-A), 2 (old-new), 3 (new-old), 4 (random)
fixstart - leave the start-image visible on hover; possible values: 0 (no), 1 (yes) (may be deactivated when showing images of different proportion in one gallery. not crossbrowser!)
caps - show captions; possible values: 0 (no), 1 (yes)
links - show links; possible values: 0 (no), 1 (yes)
Samples:
{*becssg}cssgallery|width=600|align=2{/becssg*} - without the asterisks Regardless of the settings in the backend, this gallery is shown with a width of 600 pixel (width=600) and aligned left in the article (align=2) {*becssg}cssgallery|caps=0|prld=0{/becssg*} - without the asterisks No captions (caps=0), no preload (prld=0)
{*becssg}cssgallery|width=400|height=300|throw=5|iqual=95|tqual=70{/becssg*} - without the asterisks Width 400 pixel (width=400), height 300 pixel (height=300), 5 thumbs per row (throw=5), quality of main image 95% (iqual=95), quality of thumbs 70% (tqual=70)
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:
{*becssg_c}gallery-number|imagefile|caption|text{/becssg_c*} - without the asterisks
Gallery-number: The galleries within one content item are numbered by the plugin automatically 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:
{*becssg_c}0||myTitel|myText{/becssg_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.
{*becssg_c}1|pic01.png||myText{/becssg_c*} - without the asterisks pic01.png of the second gallery in the content item has no caption but the text "myText"
{*becssg_c}0|pic02.png||{/becssg_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.
{*becssg_c}0|pic05.jpg|myTitelA|myTextA{/becssg_c*} - without the asterisks {*becssg_c}0|pic06.jpg|myTitelB|myTextB{/becssg_c*} - without the asterisks {*becssg_c}0|pic07.jpg|myTitelC|myTextC{/becssg_c*} - without the asterisks {*becssg_c}0|pic08.jpg|myTitelD|myTextD{/becssg_c*} - 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 4. This means, a call always must contain 3 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.
D.) Links If we want to link the images of our gallery, there is a third call to do so:
{*becssg_l}gallery-number|imagefile|URL|titel|target{/becssg_l*} - without the asterisks
Gallery-number: The galleries within one content item are numbered by the plugin automatically 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:
{*becssg_l}0||http://www.bretteleben.de|bretteleben.de|_blank{/becssg_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 imagefile empty. The link opens in a new window.
{*becssg_l}1|pic01.png|http://www.disney.com|Disney|_self{/becssg_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.
{*becssg_l}0|pic02.png|||{/becssg_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.
{*becssg_l}0|pica.jpg|http://www.my.domain.com/myGreatProduct1|greatProduct1|_self{/becssg_l*} - without the asterisks {*becssg_l}0|picb.jpg|http://www.my.domain.com/myGreatProduct2|greatProduct2|_self{/becssg_l*} - without the asterisks {*becssg_l}0|picc.jpg|http://www.my.domain.com/myGreatProduct3|greatProduct3|_self{/becssg_l*} - without the asterisks {*becssg_l}0|picd.jpg|http://www.my.domain.com/myGreatProduct4|greatProduct4|_self{/becssg_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. If you use this extensions, please post a rating and a review at extensions.joomla.org. Furthermore 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. |
Hello,
Is there an easy way to set the plugin not to show anything (image name, text etc.) when the pointer is moved over a picture or the thumbnail? I use one gallery per page, and my code is "{*becssg}Imagedir/Imagesubdir{/becssg}"
Ty!
Hi Marcell!
Use an empty default caption (refer to section captions) in addition to the initial code:
{*becssg}Imagedir/Imagesubdir{/becssg}
{*becssg_c}0|||{/becssg_c} ... without the asterisk
Best regards
Andreas
Hi Andreas,
great product although I am having problems with getting different captions appearing on different images. I call the gallery using
{*becssg}cssgallery{/becssg} - works fine
to add captions to all the images within the gallery I use
{*becssg_c}0||Default Title|Fault Text{/becssg_c} - works fine
To add a caption to just one image I use
{*becssg_c}0|pic01.jpg|Default Title|Default Text{/becssg_c} - works fine
The problem appears when I try to add different captions to different images. For this I would use:
{*becssg_c}0|pic01.jpg|Pic 01 Title|Pic 01 Text{/becssg_c}
{*becssg_c}0|pic02.jpg|Pic 02 Title|Pic 02 Text{/becssg_c}
When I put this in and hit save/apply I get an error like this:
Pasted Graphic.tiff
Hi Mark!
The comment extension does not allow to attach images, so - could you provide a link to the page please?
Best regards
Andreas
Hallo,
zunächsteinmal danke für die Gallerie, genau so puristisch, wie man es braucht. Ich hätte allerdings noch eine Anmerkung. Kann man es denn erreichen, dass beim Anklicken eines Thumbnails automatisch ein I-Frame geöffnet würde? Das wäre klasse...
liebe Grüsse
Thomas
Hallo Thomas!
Nein, denn mir ist keine Möglichkeit bekannt, ohne JavaScript über einen Link der Seite einen Iframe hinzuzufügen oder den Inhalt eines bestehenden zu manipulieren.
Gruß
Andreas
First of all: thank you for the download.
Everything went fine, till I got to the code. I've inserted the code, but I don't see my gallery at the site, only the code. What went wrong?
I don't have the folders 'Image' and ' Thumbnails' either.
http://www.gothsternokke.nl/angela/index.php?option=com_content&view=article&id=18&Itemid=18
Thanks for answering in advance.
Hi Angela!
The Errors on your page indicate that the plugin has not the necessary rights to create directories on your server - i.e. there is a problem with the directory permissions.
To solve this problem, first check the current directory permissions: Joomla! backend > Help > System Info > Directory permissions. Everything should be green (writable) there. If it isn't - please change the permission (e.g. using an ftp-client).
If everything looks fine and the error persists, check the settings you used to configure the Joomla! FTP layer: Joomla! backend > Site > Global Configuration > Server > FTP. Maybe the easiest way is to just deactivate it. If this doesn't help or leads to other problems, maybe you want to have a look at this Howto at forum.joomla.org in the article of the user Degira:
http://forum.joomla.org/viewtopic.php?f=431&t=314112&p=1382452#p1382452
Best regards
Andreas
Hello Andreas
I'm having some trouble here. I have successfully integrated the slide show in my article:
http://www.cooltourschile.com/index.php?option=com_content&view=article&id=153%3Ahuilo-huilo-4-days-3-nights-&catid=99%3Ahuilo-huiolo-4-days--3-nights&Itemid=222〈=en#g_153_0
However, I would like the module leading to the article to pic and show one image from the slide
http://www.cooltourschile.com/index.php?option=com_content&view=article&id=216%3Ahuilo-huilo&catid=127%3Ahuilo-huilo&Itemid=221〈=en
Is this possible?
Best regards
A.Glass
that does the thing!
Hi A.Glass!
It is not possible as a feature of the plugin but it is possible by using an article intro, you don't show within the article itself. Have a look at the article: "Joomla's hidden feature - hiding intro text"
http://www.theartofjoomla.com/home/5-commentary/81-joomlas-hidden-feature-hiding-intro-text.html
Just write an intro with one static image and hide this intro in your article.
Best regards
Andreas
how can i use more than one gallery?
Hi fatih!
1 gallery: {*becssg}folder{/becssg}
2 galleries: {*becssg}folder{/becssg}{*becssg}folder{/becssg}
3 galleries: {*becssg}folder1{/becssg} arbitrary text {*becssg}foldera{/becssg} {*becssg}folder1{/becssg}
... and so on.
Use as many galleries as you want in one article and use as many galleries as you want in as many articles as you want - with as many galleries as you want in every single article :)
Please note: Use the code without the asterisks, I insert them here to prevent the code from getting executed.
Best regards
Andreas
Why does this strange pixel/dot appear on the top left-hand corner of my website whenever I enter in the code for the CSS Gallery to appear? When I remove the code, the pixel/dot disappears. This has never happened on my other sites. How do I get rid of this? I'd really like to continue to use CSS Gallery.
See the page with the strange pixel/dot on the top left-hand corner here: http://realtimesupport.com/dvd-authoring
Thanks.
Hi Roy!
The plugin uses a little trick to preload the images. It places them in a 1x1 pixel div, and moves this div out of sight using an absolute position of -100/-100. In your case, the configuration of the template tells the plugin that the zero-point is not the real one at the top left of the page but the top left of the content area. This moves the preloads into sight.
I just uploaded an update that moves these images from -100/-100 to -1000/-1000. This should solve the problem. Update, clear your cache and give it a try.
Best regards
Andreas
Hi,
the gallery works like a charm, but I need to modify the way how the captions are shown. I need to change the height, color, margins and size of the titles/captions. I did a 'preview' with Firebug, so the changes work well for me. The problem is - I cannot find particular css file in order to modify it. Where it is hidden...?
And the second issue: every thumbnail in my gallery has a link embed (link to my homepage) even if I set the value in plugin control page to "no use links". How and where I can change it?
Thanks for any help!
Hi Martin!
The CSS Gallery makes heavy use of absolute positioning and creates most of the CSS settings on the fly. Therefore it comes without an external stylesheet. Anyway, if you want to use one, save it as /plugins/content/plugin_becssg/becssg.css and enable it by removing the comments that disable this function in the file /plugins/content/becssg.php. Replace "/*" with "//" in line 176 and remove "*/" in line 180.
About the links, the thumbnails always link to something. They are links and the whole gallery is based on the fact that links allow to work with pseudo CSS classes (hover) crossbrowser. Anyway, if you disable the feature "Links" or just don't set links, the thumbnails link to an anchor at the top of the main image. If they link to your homepage instead, something is going wrong. If you provide a link to the page, I will have a look at it.
In addition: If you depend on modifying the plugin, maybe you would want to have a look at my other gallery plugin, the "Very Simple Image Gallery" (menu at the left), it is more flexible and - in most cases - easier to modify.
Best regards
Andreas
Hi Andreas,
Thanks for the feedback.
My Caption problem is solved. As you suggested, I simplified the image names and I also noticed that my image folder was in 'stories' but outside the cssgallery folder.
Maybe that caused a problem?
Either way. it works!!
Hi Bulldog!
Glad to hear it works!
About your second suggestion: No, you don't have to place the images in anfolder "cssgallery", that's just the folder I used in my sample. If you change the image root folder (/plugins/content/becssg.php -> line 33), you may place them even outside /images/stories as long as you stay within the Joomla! root directory.
Best regards
Andreas
I love the plugin, perfect for what I want.
The problem I am having is that I cannot get the Titles and captions to appear at all!
I am new to Joomla and am using a testing site to experiment with.
I only have one gallery, and although the pictures appear, the Title and Text do not. What am I doing wrong.
This is what I have added to my article page in the back end
{*becssg}annasets{/becssg}
{*becssg_c}0|annas_photos_013.jpg|English|Pretty{/becssg_c}
{*becssg_c}0|annas_photos_029.jpg|Herbs|girlie{/becssg_c}
{*becssg_c}0|fairy_tea_set.jpg|Pretty Pink|Pretty girlie tea set with flowery motifs{/becssg_c}
{*becssg_c}0|partea_time_2_022.jpg|Lovely lovely|Pretty girlie tea set with flowery motifs{/becssg_c}
{*becssg_c}0|partea_time_2_032.jpg|Purple Haze|Pretty girlie tea set with flowery motifs{/becssg_c}
{*becssg_c}0|partea_time_2_033.jpg|Nice Set|Pretty girlie tea set with flowery motifs{/becssg_c}
{*becssg_c}0|partea_time_2_037.jpg|Patea|Pretty girlie tea set with flowery motifs{/becssg_c}
{*becssg_c}0|partea_time_2_043.jpg|Love|Pretty girlie tea set with flowery motifs{/becssg_c}
The link to the test page is:
http://stonehenge.cloudaccess.net/joomla-overview/what-is-new-in-1-5.html#g_22_0
Anyone help?
Hi Bulldog!
Yes, help yourself and omit over-complicated image file names. :)
Have a look at your code and compare it to the image file names. Check the usage of underlines and blanks.
Best regards
Andreas
PS.: I added the asterisks in your post to prevent the code from getting executed here.