This question is answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 20 - Pages: 2 [ 1 2 | Next ] - Last Post: 13-May-2014 21:11 Last Post By: RobM
John-Simpson

Posts: 299
Registered: 15-Jan-2008
How Can I add the File Name of the image to the Slide Page?
Posted: 26-Apr-2014 23:13
 
  Click to reply to this thread Reply
This is the opposite request to one posed recently by solenederrien

Can this be done in base without altering *Slide.htt*?

Presumably if I have entered some meaningful English Text in Title then that is displayed instead of file name.

I thought I might be able to tick the Photo Data box and select FileName, but either I've missed it or it is not there. (Album Settings/Base/Slide page)

Also, it would be nice to have the option of being able to display the Caption above the image.

See all these things should be part of jAlbum and NOT skin specific. It would make the Forum experts job much easier than having to deal with same or similar problems in different skins.

Sorry about banging the drum for essential features to be part of jAlbum Core Interface.
jGromit

Posts: 21,149
Registered: 31-Jan-2006
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 00:03   in response to: John-Simpson in response to: John-Simpson
 
  Click to reply to this thread Reply
John-Simpson wrote:
Sorry about banging the drum for essential features to be part of jAlbum Core Interface.

We get it. But doing this would make a complete hash of many of the skins developed by independent third parties. Those skins already have settings on their own panels to control things like this. If jAlbum also had settings for the same things, they would be in constant collision. Users would be utterly mystified about why, when they've chosen the jAlbum setting for "caption above," the album puts the caption below. The reason would be, simply, that the skin is built to use its own settings for caption position, and knows nothing of some jAlbum core setting for the same thing.

Your suggestion would, in effect, break countless other skins, many of which are no longer being actively supported. In fact, even some of the bundled skins would break, and some of those aren't really supported (Galleria and Fully, for example).

Be careful what you wish for.
jGromit

Posts: 21,149
Registered: 31-Jan-2006
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 00:06   in response to: John-Simpson in response to: John-Simpson
 
  Click to reply to this thread Reply
John-Simpson wrote:
This is the opposite request to one posed recently by solenederrien

Please explain more fully. The skin now shows the TItle you have entered, or if you haven't entered a Title, it shows the file name. Is that not what you want? If not, please explain what you do want.
John-Simpson

Posts: 299
Registered: 15-Jan-2008
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 16:44   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
John-Simpson wrote:
This is the opposite request to one posed recently by solenederrien

Please explain more fully. The skin now shows the TItle you have entered, or if you haven't entered a Title, it shows the file name. Is that not what you want? If not, please explain what you do want.


Quite simply I want to display both! Why I hear you ask? Well I frequently get told of errors or additions to the slide captions by my web site users and on a large album it is not always easy to determine which of the slides page/photo they are referring to for amendment. On two of my web sites I use my own skin based upon the original bundled skin back in the early days of jAlbum. This showed slide 3 out of 42 for example which was often quoted. But this wasn't any use if the slide order has been altered - say if I've added more slides midstream in a particular folder. Far better is for them to quote the file name (eg. IMG_1234) which I'd also got displayed.

For my third site I've used Base Skin - but to be honest I don't really want to start altering it much - I getting too old in the tooth for that - I just want to press buttons use it!
jGromit

Posts: 21,149
Registered: 31-Jan-2006
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 17:27   in response to: John-Simpson in response to: John-Simpson
 
  Click to reply to this thread Reply
Well, it can't be done without a little code-hacking. In init.bsh, replace this line (line number 172):
Code removed - forum software mangles it.
With this:
Code removed - forum software mangles it.


Edited by: jGromit on 27-Apr-2014 15:17
John-Simpson

Posts: 299
Registered: 15-Jan-2008
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 17:48   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
John-Simpson wrote:
Sorry about banging the drum for essential features to be part of jAlbum Core Interface.

We get it. But doing this would make a complete hash of many of the skins developed by independent third parties. Those skins already have settings on their own panels to control things like this. If jAlbum also had settings for the same things, they would be in constant collision. Users would be utterly mystified about why, when they've chosen the jAlbum setting for "caption above," the album puts the caption below. The reason would be, simply, that the skin is built to use its own settings for caption position, and knows nothing of some jAlbum core setting for the same thing.

Your suggestion would, in effect, break countless other skins, many of which are no longer being actively supported. In fact, even some of the bundled skins would break, and some of those aren't really supported (Galleria and Fully, for example).

Be careful what you wish for.


Yes I realize it is a massive step, I that is why I suggested a complete break for version 13. Call it something else instead of jAlbum! But not jAlbum Lite :) . Users of old skins could still use jAlbum v12.

As I see it at the moment, each skin has added its own bespoke set of features which are presented to the 'ordinary man in the street' in a confusing and wide variety of ways. There is no consistent approach. Simply my argument is make jAlbum easier to use by adding these essential features in a consistent way across all skins. Surely in the long run that would benefit everyone.

By the way - the new effects tab introduced in V12 has facility to add a watermark. This duplicates what is already available in lots of skins. But I think it is the way forward. And it has been done very well and is intuitive.
John-Simpson

Posts: 299
Registered: 15-Jan-2008
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 19:39   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Well, it can't be done without a little code-hacking. In init.bsh, replace this line (line number 172):
Code removed - forum software mangles it.
With this:
Code removed - forum software mangles it.

I made a copy of base Tools/Skin Developer/ Create New Skin and substituted the line as you suggested but ..... It comes up with an error!

However, I'll think that I'll live with the way it was for the following reasons:

When creating BASE-COPY I lost all the Album Settings that I'd put in BASE.

i.e.
  • SITE TAB - text entered into: Logo, Header Content and Footer Content
  • DESIGN: Colour info for text links and text for watermark
and likewise for tick boxes in other tabs etc.

Also - altering Base and working on Base-copy would mean that I wouldn't benefit from any updates to Base that are issued, unless I remembered to re-input your code!

This is why I think that it would be far easier to have as many features 'hard wired' into jAlbum.

But thank you for for doing the code - maybe it was my fault it didn't work! Many many thanks your help is always appreciated.

Edited by: jGromit on 27-Apr-2014 15:15
John-Simpson

Posts: 299
Registered: 15-Jan-2008
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 19:41   in response to: John-Simpson in response to: John-Simpson
 
  Click to reply to this thread Reply
Just out of interest - this is the error report:

 Stack trace for jAlbum 12 using skin Base-copy 3.0.1:
 
se.datadosen.tags.ElementException: Evaluation error on line 96:
 
Details:
Sourced file: inline evaluation of: ``/*  	init.bsh - the Beanshell script to initialize the skin  	Author: Laza  */   . . . '' Token Parsing Error: Lexical error at line 171, column 55.  Encountered: "\\" (92), after : "" : at Line: 96 : in file: inline evaluation of: ``/*  	init.bsh - the Beanshell script to initialize the skin  	Author: Laza  */   . . . '' : void initPage ( ) { 
 
	at se.datadosen.jalbum.AlbumBean.doProcessExpression(AlbumBean.java:1981)
	at se.datadosen.jalbum.AlbumBean.processExpression(AlbumBean.java:1958)
	at se.datadosen.jalbum.AlbumBean.processBeanShellFile(AlbumBean.java:1945)
	at se.datadosen.jalbum.AlbumBean.prepareMakeAlbum(AlbumBean.java:2337)
	at se.datadosen.jalbum.AlbumBean.makeAlbum(AlbumBean.java:2129)
	at se.datadosen.jalbum.AlbumBean.smartMakeAlbum(AlbumBean.java:2113)
	at se.datadosen.jalbum.JAlbumFrame$11.run(JAlbumFrame.java:950)
jGromit

Posts: 21,149
Registered: 31-Jan-2006
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 27-Apr-2014 21:12   in response to: John-Simpson in response to: John-Simpson
 
  Click to reply to this thread Reply
Attachment init.bsh (8.7 KB)
This is a classic case of the forum software doing us a "favor" instead of just leaving the code alone. Replace the skin's init.bsh with the attached version (I left the original code in there, but commented out). Tested, with no errors.

To avoid losing your settings, the skin name has to be the same. Two ways to do this...

First, just modify the existing skin. After all, you can always reinstall it later if you change your mind.

Second (and one of my favorites), make your own copy of the skin. Let's say you call it BaseJS. Now open your existing project file in a text editor. Find the line that says:

skin=Base

and change it to:

skin=BaseJS

Now open the project in jAlbum.
John-Simpson

Posts: 299
Registered: 15-Jan-2008
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 30-Apr-2014 14:17   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
This is a classic case of the forum software doing us a "favor" instead of just leaving the code alone. Replace the skin's init.bsh with the attached version (I left the original code in there, but commented out). Tested, with no errors.

To avoid losing your settings, the skin name has to be the same. Two ways to do this...

First, just modify the existing skin. After all, you can always reinstall it later if you change your mind.

Second (and one of my favorites), make your own copy of the skin. Let's say you call it BaseJS. Now open your existing project file in a text editor. Find the line that says:

skin=Base

and change it to:

skin=BaseJS

Now open the project in jAlbum.

I've installed your init.bsh file and there are no errors but also on my album no file name in the comments section.

 // Slide page caption
	
	if ( slideShowTitle ) {
//		sb.append("<span class="\"title\"">" + title.replaceAll("_", " ") + "</span>");
		sb.append("<span class="\"title\"">");
		if(fileTitle != void && fileTitle != null) sb.append(fileTitle.replaceAll("_", " ") + " ");
		sb.append(label + "</span>");
	}
	if ( slideShowComment && comment != void && !isEmpty(comment) ) {
		if (sb.length() > 0) sb.append(sep);
		sb.append("<span class="\"comment\"">" + comment + "</span>");
	}
	if ( slideShowPhotoData && meta != void && meta != null ) {
		if (sb.length() > 0) sb.append(sep);
		sb.append("<span class="\"meta\"">" + getPhotoData( photoDataTemplate ) + "</span>");
	}
	if ( originalPath != void && fileCategory != Category.video && fileCategory != Category.audio ) {
		if (sb.length() > 0) sb.append(sep);
		sb.append("<span class="\"original\""><a href=\"" + originalPath + "\" title=\"" + getText("originalInfo") + "\">" + getText("download") + "</a></span>");  
	} 


Even if it worked, the problem is that I will have a bespoke version of Base called Base-JS which is off line from any improvements to Base done by the designer.
jGromit

Posts: 21,149
Registered: 31-Jan-2006
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 30-Apr-2014 16:26   in response to: John-Simpson in response to: John-Simpson
Helpful
  Click to reply to this thread Reply
Attachment ss000776.png (58.4 KB)
It works when I use it. A demo, with a Title entered for the first and third images, but not for the others: (demo album removed)

You do, of course, have to tell Base to display the TItle. See screenshot.

If you're going to customize a skin, then you're always going to have to deal with the "what happens when there's a new version" problem. I don't know any way around that.
John-Simpson

Posts: 299
Registered: 15-Jan-2008
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 01-May-2014 11:57   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
You do, of course, have to tell Base to display the TItle. See screenshot.

If you're going to customize a skin, then you're always going to have to deal with the "what happens when there's a new version" problem. I don't know any way around that.


I didn't appreciate that the Title had to be displayed, I assumed that what you had done was independent of the Title being displayed. So ticking that box did the trick!

I have altered your code slightly by changing the space thus:
 + " - Image Ref: ");


And I might have just preferred the image reference to be the first item in the comments list, followed by Title, but there are so many combinations of this that I think I'll say enough is enough and thanks for your help.

Regarding when a new version of Base is issued - I agree I don't know either. (Unless Laza adds it in on a skin revision)
jGromit

Posts: 21,149
Registered: 31-Jan-2006
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 01-May-2014 15:24   in response to: John-Simpson in response to: John-Simpson
Helpful
  Click to reply to this thread Reply
John-Simpson wrote:
jGromit wrote:
And I might have just preferred the image reference to be the first item in the comments list, followed by Title, but there are so many combinations of this that I think I'll say enough is enough and thanks for your help.

That code should be obvious enough so that you can tinker with it to get things looking the way you want, but you are in the wonderful world of Java, where errors can produce smoke and flames. Post back if you get stuck.

Regarding when a new version of Base is issued - I agree I don't know either. (Unless Laza adds it in on a skin revision)

When I was using other people's skins for my albums (Chameleon, then Boxer), I used to keep a cheat sheet listing the customizations and bug fixes I had done to them so that I could make the changes again when there was a new version. When my list for Boxer hit page 3, it was time to produce a fork from the skin, which is how Matrix got started (today, I don't think they share a single line of code, and they produce HTML that's completely different, in some very fundamental ways).
John-Simpson

Posts: 299
Registered: 15-Jan-2008
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 01-May-2014 22:32   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
That code should be obvious enough so that you can tinker with it to get things looking the way you want, but you are in the wonderful world of Java, where errors can produce smoke and flames. Post back if you get stuck.
Had a tinker and this seems to work:
if ( slideShowTitle ) {
//		sb.append("<span class="\"title\"">" + title.replaceAll("_", " ") + "</span>");
		sb.append("<span class="\"title\"">" + "Image Ref: " + label + " - " + "</span>");
		sb.append("<span class="\"title\"">");
		if(fileTitle != void && fileTitle != null) sb.append(fileTitle.replaceAll("_", " ") + "</span>");

You are correct - it took me a few goes to get it to work!
When I was using other people's skins for my albums (Chameleon, then Boxer), I used to keep a cheat sheet listing the customizations and bug fixes I had done to them so that I could make the changes again when there was a new version.

You are very well organised. I shall probably not remember what I've done here!
RobM

Posts: 4,859
Registered: 4-Aug-2006
Re: How Can I add the File Name of the image to the Slide Page?
Posted: 01-May-2014 23:03   in response to: John-Simpson in response to: John-Simpson
 
  Click to reply to this thread Reply
John-Simpson wrote:
Had a tinker and this seems to work:
 if ( slideShowTitle ) {
 //		sb.append("<span class="\"title\"">" + title.replaceAll("_", " ") + "</span>");
 		sb.append("<span class="\"title\"">" + "Image Ref: " + label + " - " + "</span>");
 		sb.append("<span class="\"title\"">");
 		if(fileTitle != void && fileTitle != null) sb.append(fileTitle.replaceAll("_", " ") + "</span>"); 

I think you have inadvertently made a change that is not quite right. If Title tests to Void/null you will be missing the end span. I think this should work (iPad, so not tested!)
 if ( slideShowTitle ) {
//		sb.append("<span class="\" title\"">" + title.replaceAll("_", " ") + "</span>");
		sb.append("<span class="\" title\">Image Ref: " + label + " - ");
		if(fileTitle != void && fileTitle != null) sb.append(fileTitle.replaceAll("_", " "));
		sb.append("</span>");
} 


Edited by: RobM on 01-May-2014 22:03
Quoted quotes in coded code

Point your RSS reader here for a feed of the latest messages in all forums