Jos! Gallery is great. I'm a complete neophyte and have gotten it up and looking good on my pages. Thanks!
2 questions:
1. How to set the order of the images? Are they displayed in the order that they are uploaded? Or in alphabetical order by filename (seems not to be that). Could you provide instructions on how to get images into desired order, using the current version? Thanks.
EDIT: I think it may actually be alpha by filename--checking on that now. sorry...
2. I can't seem to get comments displaying in any of the templates. Could you provide some guidance? I saw some discussion of putting
Hi and sorry for my error--question 1 is solved for now. The order in the images folder is the order the gallery will appear, and that is alpha by filename. So question 2 remains. Thanks again.
You see a html escaping parameter after the $image->comment variable. Thats needed for Lightbox to include html in the comment. I found that in the Lightbox documentation on http://www.huddletogether.com/projects/lightbox2/
For other templates it might be similar, maybe the html escaping is not needed. The Fancybox template won't be suitable because of the tiny space. I didn't test it in the other templates myself.
Yeah i tried it with that and with this: {$image->comment|escape:'html'}
It'll show normal text from the comments but just not HTML text that you can stick website links in. For example, i have a gallery of website screenshots and i want to have links in the title or comments that people can click on to go to the website. Currently, you need to copy and paste the url.
Ok i tried {$image->comment|htmlentities} but it still displays the raw html code instead of a link:
Website Description - Website Description
I had a look at a page about Fancybox and it seems it might not support inline HTML yet... wonder could it be just something that needs changing in the template or is it a change which has to be done in the js file?
I want the description to appear in or under the fancybox window. So not at the thumbs. For that ya probably need to edit some stuff in this js file. ( modules/gallery/templates/fancybox/jquery.fancybox.pack.js ).
The original file is hardly readable so I've thrown in some enter's which made it a bit more readable:
(download the .txt file attached to this post)
At this point I only know what the element is called where the image title is being displayed(fancybox-title-main). Im starting here because the image title is being produced in a way I may also want for the description.
In the attached javascript file at line 304 you see:
function aa(a)
{
if(a&&a.length)
switch(c.titlePosition)
{
case "inside":return a;
case "over":return'<span id="fancybox-title-over">'+a+"</span>";
default:return'<span id="fancybox-title-wrap">
<span id="fancybox-title-left"></span>
<span id="fancybox-title-main">'+a+'</span>
<span id="fancybox-title-right"></span></span>'
}
return false
}
variable "a" in the fancybox-title-main element is the image title.
What I want to know now is, how is variabe "a" being filled with the title you enter in the admin section of the gallery module.
edit: Just found out that you can put html code in the Title field in Admin->Gallery->Yourgallery. This sort of fixes my problem but im still gonna try to use the description field in Admin->Gallery->Yourgallery to display the image description.
So you can add html to the Title field in the Admin section of the Gallery module, example:
Take a look at what options Fancybox has built in nowadays on http://fancybox.net/
Note the setting for different title positions: 'outside', 'inside' and 'over'. It should not be to difficult to look at the sourcecode of the given examples and build that into the gallerytemplate...
Jos wrote:
You better not want to edit the javascript files.
Take a look at what options Fancybox has built in nowadays on http://fancybox.net/
Note the setting for different title positions: 'outside', 'inside' and 'over'. It should not be to difficult to look at the sourcecode of the given examples and build that into the gallerytemplate...
Yeah I noticed alot of settings are avaiable in the js file. But Ill go have a look at it. Thx
edit:
I've added an option ( 'titleposition': 'inside' ) in the javascript part of the Fancybox template in Admin->Gallery.