English > Scripts and Templates
Export template: HTML List (English + German)
rick.ca:
--- Quote from: mgpw4me@yahoo.com on April 07, 2010, 09:14:43 am ---...and Rick.ca would only be a couple of JS lines away from his long-awaited 'people of interest' template.
--- End quote ---
It must be long awaited—I can't remember what it is! ???
rick.ca:
--- Quote ---I will use javascript to "reactivate" all pvd links based on movie IDs and URLs later, that's all I can do.
--- End quote ---
I wasn't expecting more, and even this isn't essential. It now looks okay.
BTW, I appreciate you taking the time to explain all this, as well as coding the templates. While I don't understand fully, it helps me understand what's feasible. And begging others to do what I already know is feasible is always more effective. ;D
And I agree the object here is not to replace PVD with some kind of Java-Web contraption. It's to find ways to extend the functionality of the program. And in doing so, if nostra is relieved of the burden of providing the same function within the program, so much the better. Printing may be a good example of this. I've always wondered what users expect when they ask for a "printing feature." A full-blown report generator would be overkill and beyond the capability of most users. A non-configurable solution would be of limited use. And it's hard to imagine what half-measures might work. So printing using templates like these seems like a good solution.
While I like the HTML Frames template, I wonder what you think of my original idea of a separate list (one movie per line) linked to a detailed report. My thought was, being separate, the list could provide the means to print a simple list of the selected movies, while the detailed report would provide the means to print the details (with each movie starting on a new page). In other words, the details would all be in one page, with the links from the list being to anchors. It wouldn't be as slick as what you've done for browsing purposes, but maybe it would be a way of displaying the same information while also providing the means to print two different reports. Being in one template also makes it easier to use and maintain.
svenne:
Nice to hear these templates will find their way into the standard installation package! :)
I could write a template for a seperate movie list linking to detailed reports (plural!). In fact I just would have to modify the existing iframe template a little bit (and throw out the iframe). A list linked to a single detailed report file is not possible, sorry. Templates allow two ways of data export: either one single list (that can be split into some smaller portions with a maximum number of movies per page) or: a list linking to several subpages each containig the data for one movie.
For printing purposes I could extend the single list template adding some more standard fields and the poster images. JavaScript can be used to show or hide details for a selected movie or for all of the movies at once. Hence you would be able to print the index (without page breaks between each entry, of course) or all the movie entries with all the details visible (with each movie starting on a new page when printed).
That should become a third template called "Detailed HTML List", because I really like the simpler one, too. It's compact and nice to send per eMail. Including the poster-images in the detailed list will blow up the summed file size of the exported data quite a lot!
So, for the new versions of the iframes and list templates I added some JavaScript to revive the ID-links and URL-links. Of course, whenever you export only a portion of your database, the id-links pointing to movies that were NOT exported will then point to files that do not exist, that means they will be broken. No way to avoid that. But I think that won't be too annoying. At least I can live with it... ;)
rick.ca:
--- Quote ---Of course, whenever you export only a portion of your database, the id-links pointing to movies that were NOT exported will then point to files that do not exist, that means they will be broken.
--- End quote ---
I don't think anyone will have a problem with that. But since you're inclined to think about such things... URL links can be to local files, and these don't require a protocol to work in PVD. Is it possible to detect these and add the "file://" prefix they would require to work in a browser?
--- Quote ---A list linked to a single detailed report file is not possible, sorry.
--- End quote ---
Then I suppose the next best thing would be a pair of templates that would be run at the same time (i.e., with the same file selection). One would print as a simple list that could be used as an index or table of contents. The other would print the details with each movie starting on a new page.
svenne:
Yes, I understand what you'd like to have for printing purposes. I will see what I can do.
New versions of the templates...
I modified the javascript part. Links to local files should work now.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version