Author Topic: HTML Template Exporter: icons for navigation?  (Read 7149 times)

Offline bazography

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
HTML Template Exporter: icons for navigation?
« on: December 16, 2010, 04:41:44 PM »
Been using PM for years but I’m just now playing with the HTML Template Exporter for the first time and have questions.

A few years back I created a template for Web Photo Album 2.26, a plugin for Dreamweaver. It hasn’t been supported for years and no longer runs on current systems so I need to replace it.

It would be brilliant if I could get pages from HTML Template Exporter to look exactly like my previous albums. Plus it would be much more convenient and save me several steps to do it straight from PM.

I am a novice at web design, but I took the example included with the PM documentation and started modifying. So far I have figured out how to duplicate 95% of my previous template into a new template for HTML Template Exporter, but I’m now stuck on one thing.

In my previous template, the preview pages used image icons instead of text for navigation. It used icons for “First”, “Next”, “Index”, “Previous” and “Last” that were designed to match the theme. I’d really like to keep the icons if I can, but can’t work out how to make HTML Template Exporter use my images instead of text. Also, the template so far only has “Next”, “Index”, and “Previous” and doesn’t use links for “First” and “Last”. It would be nice if my new galleries looked identical to the old ones, but I can certainly live without “First” and “Last” if I have to. But I’m really hoping I can at least use icons instead of text.

Is that possible, and can anyone help me out? If it is too complicated to explain it all here, maybe someone knows where I can read up about it.

Thanks.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: HTML Template Exporter: icons for navigation?
« Reply #1 on: December 16, 2010, 06:35:16 PM »
Been using PM for years but I’m just now playing with the HTML Template Exporter for the first time and have questions.

A few years back I created a template for Web Photo Album 2.26, a plugin for Dreamweaver. It hasn’t been supported for years and no longer runs on current systems so I need to replace it.

It would be brilliant if I could get pages from HTML Template Exporter to look exactly like my previous albums. Plus it would be much more convenient and save me several steps to do it straight from PM.

I am a novice at web design, but I took the example included with the PM documentation and started modifying. So far I have figured out how to duplicate 95% of my previous template into a new template for HTML Template Exporter, but I’m now stuck on one thing.

In my previous template, the preview pages used image icons instead of text for navigation. It used icons for “First”, “Next”, “Index”, “Previous” and “Last” that were designed to match the theme. I’d really like to keep the icons if I can, but can’t work out how to make HTML Template Exporter use my images instead of text. Also, the template so far only has “Next”, “Index”, and “Previous” and doesn’t use links for “First” and “Last”. It would be nice if my new galleries looked identical to the old ones, but I can certainly live without “First” and “Last” if I have to. But I’m really hoping I can at least use icons instead of text.

Is that possible, and can anyone help me out? If it is too complicated to explain it all here, maybe someone knows where I can read up about it.

You'd do something like this:

<a href="{preview_page_previous_path}"><img src="assets/prev.gif" width="48" height="21" border="0" alt="previous" /></a><img src="assets/bar.gif" width="12" height="21" alt="" /><a href="{preview_page_next_path}"><img src="assets/next.gif" width="48" height="21" border="0" alt="next" /></a>

Be sure to put your custom images in the 'assets' folder alongside your template.

HTH,

-Kirk

Offline bazography

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: HTML Template Exporter: icons for navigation?
« Reply #2 on: December 17, 2010, 02:04:38 AM »
Thanks so much for the fast response Kirk (as usual!).

I wish I had looked into using PM for my template years ago... had no idea how much of the process i could automate. I've now set up several variables to drop in the appropriate text, whereas before I was doing it all manually.

I have everything working beautifully, but I'm still not sure if or how I can add "First and "Last" navigation buttons as well. As I said before, not a big deal if it is going to be major operation, just nice if I could make the new template the same as the previous pages. This is how I have it set up now:

    <a href="{preview_page_previous_path}"><img src="assets/previous.gif" width="200" height="45" border="0" alt="previous" /></a>
    <a href="index.html"><img src="assets/home.gif" width="200" height="45" border="0" alt="index" /></a>
    <a href="{preview_page_next_path}"><img src="assets/next.gif" width="200" height="45" border="0" alt="next" /></a>

Oh, one last thing... my thumbnails template allows for 5 columns max but unlimited rows. Sometimes I have more than 100 images which means I need more than 20 rows. I noticed that changing the number of rows with the up arrow stops at 20. I typed in 30 manually and it worked fine, but it reverts back to 20 after each use rather than keeping the last used setting like the other fields. I just made a snapshot set to 30 rows so it's only one extra step, but I'm wondering if that is expected behaviour or a glitch as PM usually keeps the previous settings.

Thanks again.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: HTML Template Exporter: icons for navigation?
« Reply #3 on: December 17, 2010, 06:29:02 AM »
I wish I had looked into using PM for my template years ago... had no idea how much of the process i could automate. I've now set up several variables to drop in the appropriate text, whereas before I was doing it all manually.

I have everything working beautifully, but I'm still not sure if or how I can add "First and "Last" navigation buttons as well. As I said before, not a big deal if it is going to be major operation, just nice if I could make the new template the same as the previous pages. This is how I have it set up now:

    <a href="{preview_page_previous_path}"><img src="assets/previous.gif" width="200" height="45" border="0" alt="previous" /></a>
    <a href="index.html"><img src="assets/home.gif" width="200" height="45" border="0" alt="index" /></a>
    <a href="{preview_page_next_path}"><img src="assets/next.gif" width="200" height="45" border="0" alt="next" /></a>

I'm going to add {preview_page_first_path} and {preview_page_last_path} for you.  You're the second person ever to even try using the feature so I'm going to add this feature to 4.6.7 (next beta release) because I want you to be successful.  In fact, I'll send you the updated template which you can drop into your install of PM 4.6.x and it should work fine.  Send me your email address privately.

Quote from: bazography
Oh, one last thing... my thumbnails template allows for 5 columns max but unlimited rows. Sometimes I have more than 100 images which means I need more than 20 rows. I noticed that changing the number of rows with the up arrow stops at 20. I typed in 30 manually and it worked fine, but it reverts back to 20 after each use rather than keeping the last used setting like the other fields. I just made a snapshot set to 30 rows so it's only one extra step, but I'm wondering if that is expected behaviour or a glitch as PM usually keeps the previous settings.

It's limited to 20 in the code.  I've upped the limits to 100x100.  Having the large range is no problem, users likely won't have any issues and if they decide to use 100 rows, they'll know what they're going to get...

Thanks for your interest.

-Kirk

Offline bazography

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: HTML Template Exporter: icons for navigation?
« Reply #4 on: December 17, 2010, 11:54:18 AM »
New template is installed and tested. "First" and "Last" buttons work perfectly, rows and columns now allow up to 100, and when I select the number of rows that preference is now retained for the next time.

In other words... absolutely perfect... amazing... superb... brilliant... etc etc!

Many thanks Kirk!!