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


Permlink Replies: 10 - Pages: 1 - Last Post: 14 Jun 22, 19:43 Last Post By: RobM Threads: [ Previous | Next ]
PhilippeCharles

Posts: 121
Registered: 8-Dec-2012
Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 14 Nov 20, 10:04
 
  Click to reply to this thread Reply
I am using the "about" and "contact" additionnal pages now on every Projector album.

A good improvement would be to copy/paste the requested page with their content, to avoid having to fill in each and every page again and again with the same data.

It is possible to copy/paste an additionnal page today, but the behavior of copied page can be quite strange when editing, and in any case, this does not include the data inside the original page.

Thank you for your support.
PhilippeCharles

Posts: 121
Registered: 8-Dec-2012
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 24 May 22, 22:54   in response to: PhilippeCharles in response to: PhilippeCharles
 
  Click to reply to this thread Reply
@Laza,
Any update on this one ;-) ?
RobM

Posts: 4,377
Registered: 4-Aug-2006
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 24 May 22, 23:12   in response to: PhilippeCharles in response to: PhilippeCharles
 
  Click to reply to this thread Reply
PhilippeCharles wrote:
@Laza,
Any update on this one ;-) ?
Have you tried using this external tool?
Laza

Posts: 1,900
Registered: 6-Sep-2005
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 25 May 22, 09:57   in response to: PhilippeCharles in response to: PhilippeCharles
 
  Click to reply to this thread Reply
The HTT file itself contains only the layout. The data comes from the "Title" and "Comment" fields. So when you copy the HTT file, the content doesn't go through. A skin alone cannot solve this. The tool Rob suggested will do what you are after.
PhilippeCharles

Posts: 121
Registered: 8-Dec-2012
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 26 May 22, 19:02   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Thanks RobM and Laza,
Indeed this tool should do the job!
Question answered.
RobM

Posts: 4,377
Registered: 4-Aug-2006
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 28 May 22, 16:23   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
The HTT file itself contains only the layout. The data comes from the "Title" and "Comment" fields. So when you copy the HTT file, the content doesn't go through. A skin alone cannot solve this. The tool Rob suggested will do what you are after.
Your post made me think more about this, wondering if a skin could indeed control this. I think the answer is yes.

The templates would need two additional checkboxes, ‘Save as default’ and ‘Use defaults’. If no defaults exist the use defaults is unavailable. If save as default is checked the settings are saved as normal but a copy saved to the config folder. I was thinking maybe config>Templates>skinName/skinFamily>templateName.

That would make it much easier for users.
It would require users saving the defaults before doing a complete uninstall/install of jAlbum. That can easily be added to the help files.

Any thoughts?
RobM

Posts: 4,377
Registered: 4-Aug-2006
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 30 May 22, 13:59   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Laza wrote:
The HTT file itself contains only the layout. The data comes from the "Title" and "Comment" fields. So when you copy the HTT file, the content doesn't go through. A skin alone cannot solve this. The tool Rob suggested will do what you are after.
Your post made me think more about this, wondering if a skin could indeed control this. I think the answer is yes.

The templates would need two additional checkboxes, ‘Save as default’ and ‘Use defaults’. If no defaults exist the use defaults is unavailable. If save as default is checked the settings are saved as normal but a copy saved to the config folder. I was thinking maybe config>Templates>skinName/skinFamily>templateName.

That would make it much easier for users.
It would require users saving the defaults before doing a complete uninstall/install of jAlbum. That can easily be added to the help files.

Any thoughts?

I have converted an About.htt to save and use default values, but to be honest it is a bit of a pain. A contact page would be doable, but the code would double or treble in size compared to an existing contact page. The existing tool seems to be the best solution overall.
PhilippeCharles

Posts: 121
Registered: 8-Dec-2012
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 31 May 22, 21:53   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Hello RobM,
Thank you for your investigations.

To make the code smaller, one compromise would be that the skin only manages the "use default" function?
In that case, an idea would be to define a template common to all skins, that users could fill in manually, with a text editor?
RobM

Posts: 4,377
Registered: 4-Aug-2006
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 1 Jun 22, 00:26   in response to: PhilippeCharles in response to: PhilippeCharles
 
  Click to reply to this thread Reply
PhilippeCharles wrote:
Hello RobM,
Thank you for your investigations.

To make the code smaller, one compromise would be that the skin only manages the "use default" function?
In that case, an idea would be to define a template common to all skins, that users could fill in manually, with a text editor?

I experimented with common templates several years ago, with some success back then. The problem is that although skins can use common templates, the final 'look' depends on the skins styling code. The styling code can't be common with 100% success.

I have reduced the code some more, and if I new more than I do I might be able to get it even simpler.

If you want to have a play try the attached customised Missive skin.
Open a test project and select the skin, then add the 'AboutTest.htt' file.
Open the page and fill in some sections, close the template and make the album.
Delete the template and then add it again, it will be blank.

Fill in some fields again - add a comment and a title. Click the 'Save settings as defaults' button and close the template. Make album and view the result. Delete the template and then add it again.

Open the template and it should have the template's 'default' values - but not yet the title or comment. Close the template, make album and view the album again. The title and comment should be shown (in jAlbum if not shown do a view refresh).

You can change the page settings and they will remain as set, adding the template to another project would still load the default values. I will add a 'Delete defaults' button, but for now you need to change/delete field entries and save as default or manually delete the files.

What I have done:
I get the config directory location and then make some file references to:
templateDefaults, missiveTemplates and about.properties.
I then check if the about.properties file exists and then set values for the gui components.
If no file the components are empty, if the file exists it reads the saved settings.

If the user presses the 'Save settings as defaults' button I write out the settings, title and comment to the 'about.properties' file (configDir/templateDefaults/missiveTemplates/about.properties)

Other templates would be written to the skin's 'templates' directory.

I'd be interested in knowing if you prefer the external tool or this approach - no guarantee though that any skin developer would implement this idea.
RobM

Posts: 4,377
Registered: 4-Aug-2006
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 1 Jun 22, 16:57   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Whilst the above works I have now realised there is a much simpler way to do this.
Essentially it is to enable the ‘Save as default’ button after a project has been made at least once. Then simply copy the template.info file to the defaults folder. This would make saving a default for something like the contact page much easier.

I’ll post my final code somewhere in the developers wiki.
RobM

Posts: 4,377
Registered: 4-Aug-2006
Re: Projector - Improvement - Possibility to have predefined additionnal pages
Posted: 14 Jun 22, 19:43   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Just to complete as promised the code for saving and loading defaults, for any template, is on the Sample scripts page.
Legend
Forum admins
Helpful Answer
Correct Answer

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