|
Replies:
15
-
Pages:
2
[
1
2
| Next
]
-
Last Post:
2 Dec 17, 11:51
Last Post By: AndreWolff
|
Threads:
[
Previous
|
Next
]
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
How to get a folderthumb.jpg?
Posted:
30 Nov 17, 19:20
|
|
|
We have seen now that the jAlbum core does a great job to produce a theme image folderimage.jpg, but what about the other thumbnail image box on the folder panel?
Is it it also possible to let the jAlbum core create the corresponding folderthumb.jpg image?
If not, how should I create such an image?
I can’t find the information in the Folder panel API.
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 14:34
in response to: AndreWolff
|
|
|
We have seen now that the jAlbum core does a great job to produce a theme image folderimage.jpg, but what about the other thumbnail image box on the folder panel?
Is it it also possible to let the jAlbum core create the corresponding folderthumb.jpg image?
If not, how should I create such an image?
I can’t find the information in the Folder panel API.
The core does generate such a thumbnail for you, but it's put among the other thumbnail images of the "thumbs" folder from the folder that image originates from. The "thumbPath" variable should point to it.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 14:41
in response to: davidekholm
|
|
|
|
The core does generate such a thumbnail for you, but it's put among the other thumbnail images of the "thumbs" folder from the folder that image originates from. The "thumbPath" variable should point to it.
So if I understand you well, the thumbs folder should always contain an folderthumb.jpg image?
That does not happen at my place, see attached screenshot.
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 14:54
in response to: AndreWolff
|
|
|
The core does generate such a thumbnail for you, but it's put among the other thumbnail images of the "thumbs" folder from the folder that image originates from. The "thumbPath" variable should point to it.
So if I understand you well, the thumbs folder should always contain an folderthumb.jpg image?
That does not happen at my place, see attached screenshot.
In case of folderthumbs, they retain their original file name, and yes, they are created if even if that image is excluded.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 15:02
in response to: davidekholm
|
|
|
In case of folderthumbs, they retain their original file name, and yes, they are created if even if that image is excluded.
OK, thanks for your help!
If I am the only guy who did not know this, it is not required to add this information to the Folder panel API!
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 15:06
in response to: AndreWolff
|
|
|
In case of folderthumbs, they retain their original file name, and yes, they are created if even if that image is excluded.
OK, thanks for your help!
If I am the only guy who did not know this, it is not required to add this information to the Folder panel API!
Hard to tell . The "thumbPath" variable has been around since day 1 and points to the representing thumbnail for folders too.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 17:06
in response to: davidekholm
|
|
|
Hard to tell . The "thumbPath" variable has been around since day 1 and points to the representing thumbnail for folders too.
Well, may be there is today a problem with the "thumbPath" variable, I have this code at the start of index.htt:
<%
String albumImagePath = thumbPath;
%>
and I get this message:
Typed variable declaration : Void initializer. : at Line: 20
: in file: inline evaluation of: `` // Index page file index.htt // "Slide Show 4" Derived from Slide Show . . . '' : albumImagePath = thumbPath
in index.htt at line number 20
Edit:
To investgate this, I did add in index.htt this debug code: <!-- thumbPath= ${thumbPath} iconPath = ${iconPath} -->
and this showed in index.htm: <!-- thumbPath= iconPath = -->
Edited by: AndreWolff on 01-Dec-2017 17:35
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 18:31
in response to: AndreWolff
|
|
|
thumbPath is only available as you iterate objects, not at the top of index.htt.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 20:09
in response to: davidekholm
|
|
|
thumbPath is only available as you iterate objects, not at the top of index.htt.
Well that is not said in the variable page!
You know how to make things complicated!
I need that image in the header for sharing an album on Facebook via next meta tag:
<meta property="og:image" content="https://andrewolff.jalbum.net/Vecht_Beerze/albumimage.jpg">
So I should do an iterartion in page-header.inc?
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 20:46
in response to: AndreWolff
|
|
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
1 Dec 17, 20:59
in response to: AndreWolff
|
|
Correct |
|
|
You know how to make things complicated!
Flattering me won't get you anywhere
Try <%= IO.urlEncode(rootFolder.getThumbnailPath()) %>
in index.htt. That provides the encoded path to the thumbnail that represents the album.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
2 Dec 17, 10:54
in response to: davidekholm
|
|
|
Try <%= IO.urlEncode(rootFolder.getThumbnailPath()) %>
in index.htt. That provides the encoded path to the thumbnail that represents the album.
Yes that works, Thanks!
But why don’t you set in the core:
thumbPath= rootFolder.getThumbnailPath()
?
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
2 Dec 17, 11:38
in response to: AndreWolff
|
|
|
But why don’t you set in the core:
thumbPath= rootFolder.getThumbnailPath()
?
That's a long story to explain (variable scopes and visibility). Changing the visibility of that variable so the current folder's thumbPath is also visible in index.htt could break compatibility with skins.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
2 Dec 17, 11:42
in response to: davidekholm
|
|
|
That's a long story to explain (variable scopes and visibility). Changing the visibility of that variable so the current folder's thumbPath is also visible in index.htt could break compatibility with skins.
OK I do understand that, but what about a new variable
folderThumb= rootFolder.getThumbnailPath()
Anyhow I think you should add this information to the Variables page!
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How to get a folderthumb.jpg?
Posted:
2 Dec 17, 11:45
in response to: AndreWolff
|
|
|
Introducing a new variable is far less risky, but there is a point in being a bit conservative with introducing new variables. I haven't heard any requests for this from any other developers.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|