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


Permlink Replies: 12 - Pages: 1 - Last Post: 16 Aug 14, 17:39 Last Post By: RobM Threads: [ Previous | Next ]
RobM

Posts: 3,624
Registered: 4-Aug-2006
Support .inc files in the user interface
Posted: 15 May 14, 23:23
 
  Click to reply to this thread Reply
Users can edit filetypes.xml, in the program's system directory, to include ".inc" files in the user interface. Doing so though, means having to make the change again if that file is updated by jAlbum. Being able to see/edit .inc files would, I think, help promote their use and make it easier for those that use them to manage them.

Another feature, in support of the use of .inc files, is to be able to include them by right-clicking and selecting add new page. Maybe done by splitting templates and includes in to two subsections?

As an example, I use twenty six logo/banner.inc files to set a unique banner/logo for each (or a set of) index page(s) and their associated slide pages.
RobM

Posts: 3,624
Registered: 4-Aug-2006
Re: Support .inc files in the user interface
Posted: 18 May 14, 18:48   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Just to clarify, using filetypes.xml is not a good solution as every .inc file would need to be manually excluded from the album. What I envisioned is more akin to treating them like .htt pages.
JeffTucker

Posts: 7,678
Registered: 31-Jan-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 20:06   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Curious - why not just make them HTT files? At the end of the day, they're all just text files that may include some mixture of jAlbum scripting language, Beanshell code, and Java.

Maybe I'm just having trouble understanding how these would be used.
RobM

Posts: 3,624
Registered: 4-Aug-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 20:41   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
If they were HTT files they would generate a page themselves, unless you excluded each one added. Plus it could cause confusion as to what a user was adding when selecting a page template. What I was thinking of was to treat them like HTT files for editing, but ignored as part of the album objects. Adding a new page would give the option of a page template or an include template.

In a project, when an index page is made, or a HTT file is processed it may include, in the skin, page-header.inc. That file might include an include file that is in the project directory, in my example above, it is to define the logo/banner/theme image for the index and, if wanted, the slide pages. So for a project with five folders each having five folder of images you could have lots of, say, foldername-logo.inc. None of those files can be created or show up in the project, you have to go outside jAlbum, add them and edit them and then return to jAlbum.

If you could make your project include files into templates, that user can add and edit, then the process is easier and more likely to be used.
RobM

Posts: 3,624
Registered: 4-Aug-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 20:56   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Trying to think of a working example. Let's say that you can have a variation of a template page
That is ignored as far as contributing to the album output.

I make a include template and add it to my skin. When adding the template I rename it and then open it, like a template page. In the GUI I can now select an image file.

The code of the template then saves the image to a subfolder of the project's 'res' folder, renaming it and maybe scaling it to if needed. The rest of the templates html code is then processed as normally, adding, say, the image tags and path to that image so that it shows up in the generated index page for a given folder.

That's probably no clearer, is it!
JeffTucker

Posts: 7,678
Registered: 31-Jan-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 21:01   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
OK, I see the distinction.

I just have to wonder how many users would be capable of making use of them. Most have trouble entering some extra HTML or custom CSS code in a user interface box.
RobM

Posts: 3,624
Registered: 4-Aug-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 21:08   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
OK, I see the distinction.
... Most have trouble entering some extra HTML or custom CSS code in a user interface box.
That, in a nutshell, sums it up! This way they would not need to enter the HTML code, just select an image or an option and carry on. :)
JeffTucker

Posts: 7,678
Registered: 31-Jan-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 21:10   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I make a include template and add it to my skin. When adding the template I rename it and then open it, like a template page. In the GUI I can now select an image file.

The code of the template then saves the image to a subfolder of the project's 'res' folder, renaming it and maybe scaling it to if needed. The rest of the templates html code is then processed as normally, adding, say, the image tags and path to that image so that it shows up in the generated index page for a given folder.


I'm doing that already in my skins, but via a different mechanism. Try Matrix - hit the Logo tab, and add an image. You can control a lot of its characteristics, but just take the defaults, though you might want to scale it if the original is larger than, say, 80x80. Add a few pics, and make the album.

Internally, I keep track of the full path to the original image. When creating the album, I look to the original path, and if I find the image, I copy it to the .jalbum subdir of the image directory. Then, I use the .jalbum copy of the image to generate the scaled version for the album, and stash the resulting file in the res directory. That way, even if the user moves or deletes the original, the project still has the .jalbum copy to use. If, on the other hand, the user updates the original, the project copies that new version to .jalbum, and uses it for the album.

But yeah, extending it to folders means creating another big, ugly custom UI. I've long wished for jAlbum to be extended so that settings can be applied selectively at the folder level. But I can't even imagine what the UI would look like.
RobM

Posts: 3,624
Registered: 4-Aug-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 22:59   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
RobM wrote:
I make a include template and add it to my skin. When adding the template I rename it and then open it, like a template page. In the GUI I can now select an image file.
I'm doing that already in my skins, but via a different mechanism. Try Matrix - hit the Logo tab, and add an image. You can control a lot of its characteristics, but just take the defaults, though you might want to scale it if the original is larger than, say, 80x80. Add a few pics, and make the album.
But yeah, extending it to folders means creating another big, ugly custom UI. I've long wished for jAlbum to be extended so that settings can be applied selectively at the folder level. But I can't even imagine what the UI would look like.

My Notables skin can have up to three images in the banner area. I have one on the left all of the time, one on the right that is theme based and one in the middle that is topic based. All are controlled by one .inc file. To make it easier to manage, if there is no .inc file in a folder I check the parent folder and use that. Trying to get that into a skin's settings would melt what is left of my brain. As you can tell, trying to explain it shows there is not much left ;)
jimberry

Posts: 518
Registered: 30-Aug-2004
Re: Support .inc files in the user interface
Posted: 29 May 14, 23:01   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
At the moment, a user can change the filetype of jAlbum pages, but only globally (i.e. ALL pages will use the new filetype).

Perhaps for this case, the output file's filetype could be triggered by the templates filetype instead of by the default filetype".

For example, upon encountering a text file "banner.inct" jAlbum would process it like any other template, but instead of outputting "banner.html" would output "banner.inc"
JeffTucker

Posts: 7,678
Registered: 31-Jan-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 23:19   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Trying to get that into a skin's settings would melt what is left of my brain.

I worked it out once, and just keep re-using the code - for logo images, background images, music tracks, and so on. If I had to start over from scratch, I'd probably be doomed.
RobM

Posts: 3,624
Registered: 4-Aug-2006
Re: Support .inc files in the user interface
Posted: 29 May 14, 23:21   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I'll take that as a vote in favour of this idea ;)
RobM

Posts: 3,624
Registered: 4-Aug-2006
Re: Support .inc files in the user interface
Posted: 16 Aug 14, 17:39   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
An alternative to supporting .inc files would be a means of turning off the generation of the HTML/RSS files normally created by a template. I could then make a template that generated the .inc file. Would that be possible?
Legend
Forum admins
Helpful Answer
Correct Answer

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