Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - svenne

Pages: 1 2 3 4 5 6 [7] 8
121
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


122
Scripts and Templates / HTML export template for printing purposes
« 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...

123
Yes, at least that was what I expected, since it says on the help page:

width - Maximum image width (The image will be resized to fit)
height - Maximum image height (The image will be resized to fit)

I supposed this to be like CSS max-width and max-height: that the image will never be wider than "width" and never be taller than "height" while aspect ratio is preserved?

124
I think, at least something has changed with version 0.9.9.21, but it still doesn't work. Consider the following code:

{%value=poster maxvalues="1" width="50" height="1000"}

Any poster wider then 50 pixels should be shrinked to 50 pixels in width while preserving aspect ratio. Actual behaviour it is quite strange, because now (if it's smaller than 1000 pixels in height) it is going to be stretched to 1000 pixels in height while preserving aspect ratio. So it gets even wider than it was originally.

125
Scripts and Templates / DivXBase Export Template
« on: May 04, 2010, 12:48:10 pm »
DivXBase v1.12 (by MetaGen) is a rather old movie database application (it is available in german only, I think). There was no development anymore for years now, the project is completely abandoned and its original homepage is gone, too (although you can still download it from several freeware sites).

So why bother? Since it is very small, even doesn't need to be installed (just one single .exe), but nevertheless is able to analyze media files on its own, this program was the weapon of choice for everyone in need for something very compact and easy to use. But as time went by DivXBase became more and more antiquated. New codecs where developed, Matroska and other containers became more present, and DivXBase can't handle them. Data had to be added by hand in these cases. Information stored about codecs is very limited within DivXBase anyway.

I know a lot of people still running DivXBase. And although DivXBase is very simple, Personal Video Database is the first app that provides all of its crucial features, concerning different storage media, split media files, same IDs for different entries (for files stored on the same DVD for example), customizable export, multiple databases, etc.

But as you can imagine, it is much easier to give PVD a try if you know that you could switch back whenever you want to...

To import DivXBase data in PVD is easy (via CSV-import):
- export your DivXBase database: Choose "Export to Exel File (CSV)" in DivXBase
- the exported file needs to be opened in WordPad (not Notepad, cause this might cut off lines longer than 256 chars)
- in WordPad you need to search and replace (press CTRL+H), choose case sensitive
- replace every occurrence of " x " (it's three characters: space+x+space) with "x"
- save the file
- in PVD configure the CSV import ("Tools"-Menu -> Preferences -> Plugins, choose "CSV" (Type: General Import) and click "Configure"
- add fields to the right pane in this order: "Title", "Media Count", "Languages", "Video Codec", "ID", "Resolution", "Size", "Length", "Quality", "Comment"
- set Delimiter to ; and Text Qualifier to "
- enable "Ignore Header"
- that's it, after clicking "OK" twice you can go to the "Import"-menu and choose "Get Movies from CSV file" and import the data
- be patient, it might take some time to finish

With the attached export template PVD can rebuild a fully functional DivXBase database file (.dxb). Information on loaned entries will be exported, too. Limitations: PVD's URL-field will not be exported to DivXBase's OFDB- and IMDB-numbers.


[attachment deleted by admin]

126
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.

127
Support / Bug with templates: GIF exported as BMP
« on: May 03, 2010, 05:34:33 pm »
When using templates: GIF-images are exported as bitmaps, but with file extension GIF, as it seems. At least Internet Explorer (v7) only displays them when renamed to BMP. Code used to export them:
{%value=poster maxvalues="1"}
Im running version 0.9.9.21 on WinXP.

And now for something completely different  ;) (won't start another thread for this...):
In the help file under "Posters, Photos, Screenshots"-Subtemplates the parameter "imgdata" is not mentioned:
http://www.videodb.info/help/hlp_export.html
I guess you didn't leave that that out on purpose, cause it's quite necessary to have any posters exported at all with a subtemplate.

128
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.

129
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.)

130
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.

131
Almost perfect...  ;)  I had a bug in them, that rendered one of the scrollbars useless in Firefox.  :-[
New versions...

132
Some strange behaviour when exporting poster images via template...
I would suppose the following line to resize every poster image that is wider than 350px, but it does not.
{%value=poster width="350" height="500"}
If a poster image is smaller than 500px in height, it can be a million trillion px wide ;) without being resized.

133
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.

134
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... ;)

135
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:

136
Support / Re: Date fields can't be cleared
« on: April 07, 2010, 03:09:17 am »
I see. Yes, "seen date" seems to be ok, then. So the issue is only with "release date", just as you said.

137
Support / Re: duration of the film (when exported) is not rounded
« on: April 07, 2010, 03:04:22 am »
Great, thanks a lot!  :D

138
No, RTF cannot be displayed in a browser. We can stick just to HTML and CSS and first see what's possible, that makes sense.

Ok, frames...
At the moment templates don't allow saving the additional HTML-file containing the frameset, do they?
For frames you'd have to save this file + the movie list + the movie detail pages. But I could do something similar using iframes (inner frames), or I'd better say, I already did that.  ;)
Iframes are not so very different from frames, they are standard HTML since HTML 4.0 and supported by all modern browsers, as far as I know.
I didn't include all possible fields, but I could add more to the template in near future.

There are four attachments. The first two are just updated versions of "HTML List" (the templates are now replacing <, > and & with proper HTML codes). The last two are those with iframes, just try them and you will see what they do...

(see latest post of mine in this thread for attachments!!)

139
Support / Re: duration of the film (when exported) is not rounded
« on: April 02, 2010, 01:09:37 pm »
Seconds would be neat for interaction with other programs that won't deal with minutes but want to have the length in seconds for CSV import. PVD export templates seem to be limited to minutes at the moment.

140
Every value that can be exported can be formatted for printing with HTML and CSS. The result would only be limited by the printing capabilities of the browser. Within the CSS you can even assign fixed font sizes in "pt" (point), just as it is done in Word, for example.

There is another possibility that might work out even better: I could try to write export templates for rich text files (.rtf). Did something similar few years ago.

Rich text is some kind of markup language, just like HTML, but more cryptic. Though the file format once was introduced by Microsoft, it's been there for decades now and every word processor I came across would open RTF-files with ease. It's not limited to Windows systems. The format is common to Mac- and Linux-applications, too. So anyone could open their exported movie details, movie lists, or whatever, with their standard word processor. RTF-files are already assigned to the standard word processor in most cases by default, so (double)click the RTF-file and it shows up. Then you can apply some changes to the content if you want to and just print it.

Pages: 1 2 3 4 5 6 [7] 8