Author Topic: Export template: HTML List (English + German)  (Read 146650 times)

0 Members and 1 Guest are viewing this topic.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #20 on: April 08, 2010, 08:55:22 pm »
Quote
Links to local files should work now.

Perfectly. Thanks!

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #21 on: April 09, 2010, 02:30:44 am »
Almost perfect...  ;)  I had a bug in them, that rendered one of the scrollbars useless in Firefox.  :-[
New versions...
« Last Edit: April 10, 2010, 09:47:37 pm by svenne »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #22 on: April 09, 2010, 02:54:42 am »
Good thing you caught that. Nostra would have been very unhappy to find it couldn't display Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb. ;D

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #23 on: April 10, 2010, 09:47:11 pm »
Hell, yes!! :D Never wanted that to happen!

New versions, again... (for frame templates only, the list templates stayed the same)
A "broken" image was displayed in the upper right corner on exported HTML pages when movie entries had no poster with them. Corrected that.
Then I tidied up a little and "streamlined" the exported code. The stylesheets are in seperate files. The templates are a lot easier to maintain now and the seperate stylesheets offer new possibilities. Now there can be user selectable stylesheets (switching between stylesheets would even work without javascript). Therefore it will be possible with a single export template to provide different layouts (list only or fully detailed records, for example). I will implement that next week.
« Last Edit: April 11, 2010, 03:19:10 pm by svenne »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #24 on: April 10, 2010, 11:06:25 pm »
Quote
The templates are a lot easier to maintain now and the seperate stylesheets offer new possibilities.

One possibility is straightforward modifications will be easy for most users. It didn't take me long to figure out how to add my custom Reviews to the report. In movieframe.ptm, I simply added...

  <h2>Description</h2><p>{%value=description}</p>
  <h2>Review</h2><p>{%value=Review custom="true"}</p>
  <h2>Comments</h2><p>{%value=comment}</p>

...and it worked! :o (I'm always amazed when the obvious works.) Maybe you could prepare a brief tutorial when you're done on how to use the templates provided, along with instructions for such modifications.

mgpw4me@yahoo.com

  • Guest
Re: Export template: HTML List (English + German)
« Reply #25 on: April 10, 2010, 11:08:24 pm »
Sounds like Nostra started something with all the docs that have suddenly appeared  ;D

buah

  • Guest
Re: Export template: HTML List (English + German)
« Reply #26 on: April 11, 2010, 03:02:29 am »
Svenne, thank you for a really nice html export template. Don't blame me for not being clear enough to say that there should be only right (i)frame, while there wasn't actual need for a left one.
Once again, really impressed with the result.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #27 on: April 11, 2010, 03:14:45 pm »
To both rick and mgpw4me: That's how it should be.  ;)

I will prepare a brief tutorial, but I won't give an introduction to HTML and CSS. Concerning the HTML part you can copy and paste lines, change them and see what happens. I was trying to keep that as simple and compact as possible. Perhaps I should mention that the list templates have some headlines that you can't see with standard styles applied, so don't be surprised.

After you finished to change something you should test if the HTML is still valid (that every tag has its closing tag, and so on), especially if you're less experienced. You can do that here: http://validator.w3.org
I tried it myself a few minutes ago and saw that I used XHTML syntax in one line and I'm into (barrier-free) web design for years now... I changed that now, but I'm shure you won't see any difference in this case, most browsers are kind enough and don't bother.
CSS is a bit more complicated, because the different browsers still (mis)interpret some things in different ways, but people could change colors or fonts quite safely. Nevertheless I would advice them to read one of the CSS tutorials you can find easily on the web. The majority of users won't even know about hexadecimal values or RGB colors, for example, and I don't want to write a documentation raising more questions than giving answers to those. Nevertheless, everyone who wants to should dare to mess with the source code. There's no reason not to try and if they do something wrong their computers won't explode afterwards... although in some cases I'd really like that.  ;D
You can validate CSS here: http://jigsaw.w3.org/css-validator/

To buah: Thanks, I like it that you like it (like it is, like).  ;) And there only is one iframe, the list part is a simple <div></div> containing an unordered list (<ul></ul>). By the way, it would be possible to have a "real" frameset generated with templates (but the iframe looks nicer...). I just wasn't aware that nostra implemented a copy command that can be used. It's documented here, but I overread that.  ::)

Since it is possible to store all the CSS in seperate files now, I can do more complex things with so called alternate styles (that have to be in different files).

Concerning PVD export templates in general, some stuff seems not to be documented. Nostra even introduced something like functions, but I don't know if there are more, what they do and how they work. By the way, is there a possibility to define some kind of (constant) global variables in the %OPTIONS% part, that could be used throughout the template? Something like #define in C++? It doesn't need to be that complex, simple string replacement would do (like {#StringReplace...}, just not applied to %values but to the template itself). Sometimes missed that, but just a little bit.

New versions of the templates... I only transformed the single occurence of XHTML into HTML, no big deal...

(The two language versions of the iframe template have some files in common. When extracting the second one to the same directory you surely will be asked if you want to replace files. You can safely click yes, those files are the same anyway. Both language versions will work properly afterwards.)
« Last Edit: April 11, 2010, 11:46:32 pm by svenne »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #28 on: April 11, 2010, 10:03:24 pm »
A small glitch with HTML Frames... Print view will only render one page. If opened in a separate tab or window, the print view will properly span two pages for longer entries.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #29 on: April 11, 2010, 11:46:12 pm »
I see... The problem lies in the nature of iframes + some less than perfect browser behaviour:
http://kb.mozillazine.org/Problems_printing_web_pages#Does_not_print_multiple_pages
Internet Explorer is not so different from Firefox. IE7 even printed a scrollbar (but it was of no use, I really tried hard but I only ripped the paper... ;) At least I could prevent IE from printing scrollbars via CSS now...).
Iframes (and frames) always where problematic when it comes to printing. One of two workarounds is what you did. The other is (at least in Firefox): right click into the iframe and tell the browser to print the current frame (choose "This Frame" -> "Print Frame").

I'm still working on a template for printing purposes...

You can always find the newest templates here in the first post.
« Last Edit: July 10, 2010, 04:23:51 pm by svenne »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #30 on: May 03, 2010, 07:53:03 pm »
I had quite a lot of other things to do, so it took a little bit longer... Here is the first version of an HTML export template for printing purposes. Since I really didn't have much time, consider this alpha...
In Firefox you can choose between different print layouts: In the menu "View" go to "Page Styles" and you'll see a list to choose from. If your Database is huge it might take some time for the browser to reformat the whole thing (same with the browser's print preview). So be patient. Choosing different styles is possible in all common browsers and in IE8 or newer. It will work with IE7, too, but that'll need some javascript. I'm planning to add a menu to the exported HTML anyway, to make the different settings more obvious.
« Last Edit: May 22, 2010, 06:42:08 pm by svenne »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
HTML export template for printing purposes
« Reply #31 on: May 22, 2010, 06:56:23 pm »
It became quite tricky, because both Internet Explorer 7 and 8 are buggy. With IE8 at least you can choose between alternate stylesheets and they will be rendered on screen, but while printing the whole thing alternate stylesheets are ignored...  ::)
Ok, at last I found a workaround and now everything's fine in IE (as long as JavaScript is not deactivated, of course). Tested it with IE8, but with IE7 it should be ok, too, since problems of IE7 were the same.
Firefox is fine anyway.
Hope you like it...
« Last Edit: June 05, 2010, 05:41:57 pm by svenne »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #32 on: May 22, 2010, 08:30:24 pm »
Nice! Thanks.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: HTML export template for printing purposes
« Reply #33 on: June 05, 2010, 05:54:48 pm »
I made some changes to the "HTML Print Layout" template:
- fixed some problems with the browsers refresh button
- in "no details"-view the information on genre now is ommitted. Replaced it with file properties (filesize, codec, languages)
- added "show/hide movie id" and "show/hide file properties" to the "Print Layout" dialog

« Last Edit: June 06, 2010, 01:46:12 am by svenne »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #34 on: June 06, 2010, 12:16:32 am »
This is coming along nicely. Now I wonder what happened to all those who were looking for a "print" capability. ::)

The print layout control doesn't seem to work properly in the "no details" view (in Firefox, if that matters)...
  • movie id appears whether selected or not
  • selecting movie id causes genre to disappear
  • show file properties doesn't work unless movie id is also selected

I think you should keep genre. It's still there, but your post implies you intended to remove it. It could be set apart from file properties by using a different font (or simply not italicizing)—should they both be selected.

It would also be nice if sequential numbers could be used instead of, or in addition to, id. A numbered "no detail" view could then be used as a table of contents for a detailed view.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #35 on: June 06, 2010, 12:48:56 am »
I can't reproduce that behaviour, works fine here on Firefox 3.6.3...  :o
PVD never overwrites existing files (except the main html files and the poster images). Did you export to a directory where the subfolder "htmlprintfiles" already existed? Old versions of the stylesheets would be a problem. Try to delete "htmlprintfiles" and then do a fresh export with "HTML Print Layout". Please let me know if it works afterwards.

Ok, I will add sequential numbers soon.
I added ID, cause you can use the ID to index your DVDs and stick the number onto the cover of every DVD. Makes it easier to find the right one...

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #36 on: June 06, 2010, 01:24:42 am »
Quote
Please let me know if it works afterwards.

Yes, that was the problem. But I still think you should keep genre—the list is a little lean with just title and year. ;)

Quote
I added ID, cause you can use the ID to index your DVDs and stick the number onto the cover of every DVD. Makes it easier to find the right one...

Yes, I'm sure that exactly why some want to be able to print a list. For me, there's no need for either. Since I don't use ID, I can Reindex the movies selected for the report to get a numbered list. 8)

Posters don't span pages well. I'm sure users can figure that out on there own. But, if it's possible, you may want to consider forcing "one page per record" if "show poster" is selected.
« Last Edit: June 06, 2010, 01:40:44 am by rick.ca »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #37 on: June 06, 2010, 02:03:03 am »
Ok, no sequential numbers then. Would have been a little bit more difficult to achieve than just showing/hiding things. But if someone really wants this, I could add the feature to reindex within the exported file (so you won't loose your original IDs in PVD). By the way, if you sort your database alphabetically prior to export, there might be no real need for a table of contents with numbers. But if you'd like to have it, just tell me.

Yes, some poster images will span over two pages in Firefox as long as you don't choose "one page per record", but Internet Explorer for example handles this in a different way and avoids to split the images. So I don't want to force the "one page per record" setting, but instead let the user decide what to do. A CSS rule could be added to tell the browser never to split the DIV-tag containing the poster ("page-break-inside:avoid;"), but Firefox still ignores this. Might be implemented in near future though.

I added 'show/hide genre' now...
« Last Edit: June 06, 2010, 01:53:24 pm by svenne »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #38 on: June 06, 2010, 03:02:57 am »
Quote
But if someone really wants this, I could add the feature to reindex within the exported file...

Fair enough. No point in catering to those who won't speak for themselves. ;D

Quote
...but Internet Explorer for example handles this in a different way and avoids to split the images.

The easier fix is to use the IE Tab Plus add-on for Firefox. That allows switching to the IE rendering engine and (while it never occurred to me before) that includes printing.

Quote
I added 'show/hide genre' now...

Thanks!

A minor suggestion: If the assigned filename (without the extension) was used as the report title, the user would have the ability to name the report whatever they like.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #39 on: June 06, 2010, 01:52:17 pm »
Thanks for the info on IE Tab Plus.

Quote
...user would have the ability to name the report whatever they like
I tried a different approach now to provide full control over the title apart from the filename...

Something different: Within the template, in %OPTIONS%-area: is it possible to get the filename that was chosen by the user in the filter dialog, with and without extension? Something like %filename%?
Then I'd like to change the subdirectories name from "htmlprintfiles" to "%filename%_files" (and I would need to omit the filenames extension here) to take advantage of this Windows feature:
http://paulelso.wordpress.com/2006/09/20/xp-folder-option-managing-pairs-of-web-pages-and-folders/

You can always find the newest print template here.
« Last Edit: July 10, 2010, 04:23:28 pm by svenne »