Author Topic: Custom HTML Export  (Read 13074 times)

Offline bcap

  • Newcomer
  • *
  • Posts: 35
    • View Profile
Custom HTML Export
« on: March 28, 2007, 07:39:15 AM »
How do we make a custom HTML Web Gallery for export?

How can we edit an already existing one. For example in the PM Classic one, I don't want the "title" to be centered, I want it to be left justified.

Any help is appreciated.

Great update by the way Kirk!

Thanks

Bryan

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Custom HTML Export
« Reply #1 on: March 28, 2007, 08:38:33 AM »
Bryan,

How do we make a custom HTML Web Gallery for export?

How can we edit an already existing one. For example in the PM Classic one, I don't want the "title" to be centered, I want it to be left justified.

You would need to copy the current template to your own folder and then modify it like the following:

Modify the cb_title style from this: (use your text editor's "Find" to look for '#cb_title')

#cb_title {
        font-family:"#{spec.title_font}", sans-serif; font-size: #{spec.title_font_size}pt;
        text-align:center;
        color:##{spec.title_font_color}
}

to this:

#cb_title {
        font-family:"#{spec.title_font}", sans-serif; font-size: #{spec.title_font_size}pt;
        text-align:left;
        color:##{spec.title_font_color}
}

(I just changed text-align:center; to text-align:left; the rest was unchanged.)

Then I would change the description of the template so you can easily tell them apart.  From this:

  def self.template_display_name  # template name shown in dialog list box
    "PM Classic"
  end

to this:

  def self.template_display_name  # template name shown in dialog list box
    "PM Classic (title left aligned)"
  end

Then save the file.  Next go into Preferences and tell PM where you store your custom user templates.

That should do it.

-Kirk

Offline bcap

  • Newcomer
  • *
  • Posts: 35
    • View Profile
Re: Custom HTML Export
« Reply #2 on: March 28, 2007, 09:18:07 AM »
Thanks Kirk!

is there a tutorial or anything like that as to how to create your own templates?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Custom HTML Export
« Reply #3 on: March 28, 2007, 09:36:02 AM »
Thanks Kirk!

is there a tutorial or anything like that as to how to create your own templates?

No.  But we expect that a very large majority of our users would never be able to create their own custom templates since it requires programming experience and HTML/CSS experience.

We will likely add a generic template that can do simple variable substitution in HTML files that users create with programs like Dreamweaver.

-Kirk

Offline bcap

  • Newcomer
  • *
  • Posts: 35
    • View Profile
Re: Custom HTML Export
« Reply #4 on: March 28, 2007, 01:11:18 PM »
Kirk,

I would think that the majority of photographers or people using PM would understand/know HTML/CSS.

Is there a way to make a template in HTML/CSS for us to use if we do know how to code?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Custom HTML Export
« Reply #5 on: March 28, 2007, 01:16:52 PM »
I would think that the majority of photographers or people using PM would understand/know HTML/CSS.

Is there a way to make a template in HTML/CSS for us to use if we do know how to code?

Do you mean to say that you know HTML/CSS *and* you know how to write programs with programming languages?

-Kirk

Offline dbrouse

  • Full Member
  • ***
  • Posts: 190
    • View Profile
    • DC Corporate Headshots
Re: Custom HTML Export
« Reply #6 on: March 28, 2007, 02:33:41 PM »
Kirk,

I would think that the majority of photographers or people using PM would understand/know HTML/CSS.

Is there a way to make a template in HTML/CSS for us to use if we do know how to code?

bcap....I can only speak for me, but my time is better served producing images, NOT learning CSS/HTML or any other programming languages or that matter.  Honestly, I don't the slightest idea what CSS is...but I am a PM "power" user if that matters...

Delane
Delane B. Rouse/Rouse Photography Group, LLC
Mac OS: Version 10.7.4, Build 12713

Offline jimb

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: Custom HTML Export
« Reply #7 on: March 28, 2007, 04:13:05 PM »
I started a thread about this a few days ago.
http://forums.camerabits.com/index.php?topic=1136.0
Other than Kirk's response, no one else commented, so I'm interested in what's being said here.

Kirk asked for an example of what works. The templates provided in Photoshop are one example, and other applications use a similar approach. They are written in HTML, and use tokens to fill in the variable content provided by the program. I really feel this method gives the user the most flexibility in creating/modifying HTML galleries. The Ruby scripting approach in the PM beta is just too complex for most people.

Any thoughts??

Offline bcap

  • Newcomer
  • *
  • Posts: 35
    • View Profile
Re: Custom HTML Export
« Reply #8 on: March 28, 2007, 05:19:55 PM »
Kirk ... sorry I mean that I know HTML/CSS and can do websites. My bad ...

Also, Delane, I understand that this isn't ideal FOR YOU, which is why there are built in templates. Almost every photographer I know is very proficcient in HTML and CSS and thensome. Also, I run a business, photography is a big part of it, but presentation and workflow is a huge part of it too.

I think a whole "Design Studio" would be great ... maybe a WYSIWYG editor where you can drag fields like "keyword" or "title", etc combined with an html editor - like Dreamweaver.

You could drag a "title" field onto the canvas and then whatever it yped in "Title" when you export the HTML gallery (much like it is now) will be put into the "title" field you put in your template. This way you could code in some php or anything else that may seem suitable.

What do you think Kirk?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Custom HTML Export
« Reply #9 on: March 28, 2007, 05:35:40 PM »
Kirk ... sorry I mean that I know HTML/CSS and can do websites. My bad ...

Also, Delane, I understand that this isn't ideal FOR YOU, which is why there are built in templates. Almost every photographer I know is very proficcient in HTML and CSS and thensome. Also, I run a business, photography is a big part of it, but presentation and workflow is a huge part of it too.

I think a whole "Design Studio" would be great ... maybe a WYSIWYG editor where you can drag fields like "keyword" or "title", etc combined with an html editor - like Dreamweaver.

You could drag a "title" field onto the canvas and then whatever it yped in "Title" when you export the HTML gallery (much like it is now) will be put into the "title" field you put in your template. This way you could code in some php or anything else that may seem suitable.

What do you think Kirk?

I don't think we're going to enter the DreamWeaver space anytime soon.  I can see adding a generic HTML exporter template (as I have stated at least a couple of times earlier) that would do Photoshop-like token replacement.

But it isn't going to be in 4.5.0.

If you want to work more closely with me on this matter, feel free to contact me privately and we can discuss some ideas for the next update.

-Kirk

Offline JAS Photo

  • Sr. Member
  • ****
  • Posts: 394
    • View Profile
    • JAS Photo LLC
Re: Custom HTML Export
« Reply #10 on: March 28, 2007, 06:03:44 PM »
Kirk - would it be possible for those that do make their own templates to share them like code replacement - you could have a folder of them for download (at your own risk)

Joe
Joe Sorrentino
JAS Photo LLC
http://www.JASPhoto.com

Offline mklass

  • Sr. Member
  • ****
  • Posts: 377
    • View Profile
    • Mick Klass Photography
Re: Custom HTML Export
« Reply #11 on: March 29, 2007, 03:34:16 AM »
iView Media Pro uses the approach of a HTML template that can have variables inserted into it. While I use PM for all by file manipulation tasks, the HTML output is pretty rudimentary. With iView the pages can be customized to match the design of your web site (I use Dreamweaver). It just takes a click of a button or two to create or update a gallery. iView will even ftp the files to your server, if you wish. I can update the 11 galleries on my site in less that 5 minutes. No additional HTML editing is needed before uploading them to my site.

Here are the results that I have gotten: http://www.mickklassphoto.com (Click on one of the gallery names on the left.)

The only thing I use iView for is to create the catalogs and generate the HTML pages. If PM had the customization capability, I would much prefer to just use it.