English > Scripts and Templates

Export template: HTML List (English + German)

<< < (3/37) > >>

rick.ca:
Very nice! 8)

Understandably, only the selected movie in HTML Frames can be printed. Is there any way all of the movies could be printed at once?

Hyperlinks (i.e., those created by PVD's hyperlink function) are displayed as code. Can these be handled so they show their display text? And can those that are URL links be translated into HTML hyperlinks?

mgpw4me@yahoo.com:
Very cool  8)

As usual, (you'll have to excuse me) I have some suggestions  ;D

Exporting the movie data to JavaScript arrays would allow you to do regional character transformations, sorts and create views.  A few javascript links to populate the list to create views (people, movie, genre, etc.) and I'd buy it !!  ...and Rick.ca would only be a couple of JS lines away from his long-awaited 'people of interest' template.

svenne:
Topic: links...
First of all I changed the templates to replace the pvd link codes to some kind of silent but W3C conform HTML code (span class='pvdlink' title='[linktype and reference]'...) using a chain(!) of "replace" statements. Funny (and very useful, of course...) that it works this way...
I will use javascript to "reactivate" all pvd links based on movie IDs and URLs later, that's all I can do. The export functionality for templates is limited and there is no direct access to the database contents. For pvd link types "title", "name", "original title", "genre", "country", and so on, the templates can't fetch information to which HTML subpage(s) the exported links should point, or can they?
I wasn't aware myself, but by the way: per default PVD exports all internal link codes as is. That means they show up in the exported HTML source as <link contry="Loompaland">...</link> and so on. You don't see the code when exporting via "Web Pages(IndexMovies)", because they can't be interpreted by the browser and are kindly omitted. But they are there. Nasty, nasty links! They break HTML specifications... The HTML <link>-tag is not allowed within the <body>-tag. That might become problematic, if the W3C or some browser developer considers <link> within the <body> tag to do something, that shurely would differ from its beviour within PVD. Furthermore, the HTML attributes "id", "name" and "title" already have purposes that have nothing to do with their function within PVD. This can lead to very unexpected behaviour in some cases, especially when export templates become more complex, containing CSS and javascript functionality relying on IDs, for instance.
The templates I wrote just replaced "<" or ">" with "&lt;" and "&gt;" to prevent these characters (whenever they appear in floating text) to be misinterpreted as HTML tags, hence all the link codes became visible... Oops!  :)

Topic: printing...
To print all movies at once you'll need a template that exports all the data (you want to print) into a single file. Of course you could add some javasript to the iframe template that gathers all the information by following all links to the subpages, then inserts all of it into the current page and then calls the browser's print dialog, but that's complicated and not reliable. Javascript would need to have access to the different HTML files and depending on security settings and browser behavior this is impossible in some or even most cases.

Topic: javascript functionality...
Regional characters: There should be no problem with regional characters right now since almost every exotic character can be displayed: within the HTML pages the charset is declared as utf-8. Are there some special characters displayed incorrectly after export? Then please tell me more details about that. Or perhaps I didn't understand your suggestion?
Sorting: You can sort the list in PVD and then export it. The sort order will be the same in the exported file. Of course it would be nice to have all the major functionality of PVD in the exported HTML, too. But with all the data that would have to be stored in the HTML file and all the necessary restructuring of HTML content via javascript that follows, it would be easier to have a MySQL-Database with some PHP as frontend. Or a Firebird database... um...
We already have that, or kind of, I'd say even something better, and it is freeware, too! Thanks to Nostra!  ;)
I don't want to mock your suggestions, of course, they are quite neat. But it would be a lot of work to recode the functions of PVD and even internal functions of Firebird to achieve all this funtionality. Let's face it, we've got an export template here, not another fully functional front end to the database. To write something to access a PVD database through the internet with enhanced fuctionality, that is a different task, I guess. But being able to re-sort the movie list in different ways within the HTML file is a cool idea nevertheless, so I probably will spend a lot of spare time and add that... some day...  ;)
By the way (see Nostras post here), the sorting problems of PVD will shurely be addressed sooner or later, though it seems to be a little bit tricky...

The new templates are attached:

mgpw4me@yahoo.com:
No takers, huh?  Oh well, I'll have to write Rick's POI code myself <grin>...maybe soon.

The export works perfectly fine.  If sorting was to be done, then translations would be desirable...and simple...if you only have to deal with a single locale (and locale isn't Kanji).  I have all the people names in my database translated to English characters in the 'transname' field.

Before PVD, I used JavaScript as described to keep my data.  One line of characters (0-Z) for each of title, actor, genre populating the list from lookup tables.  The results were displayed from a second file that was specialized for the title or actor using numeric parameters and loading smaller, more detailed script arrays.

nostra:
Wow, svenne, really great work!

Be sure to see your templates in the standard installation package of 0.9.9.20 ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version