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

0 Members and 3 Guests are viewing this topic.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #60 on: November 15, 2010, 09:52:55 pm »
Some new features...

- I added colored dots for loaned movies and for those on the wish list

- just to make mgpw4me happy ;): I added some sort functionality. While viewing the exported data in your browser you can choose to (re-)sort your movie list in three different ways (but the initial sort order will still be the same you had in PVD when exporting). If you push the "Sort list..."-button a menu will pop up...
If you choose to sort by alphabet: it will be case insensitive and characters like à, á, â, ã, ä, å, will be treated as "a", while the german ß will be treated as double-s, æ will be treated as "ae", and so on... might not be just as good as the Unicode Collation Algorithm, but almost! ;)

« Last Edit: November 16, 2010, 09:37:25 pm by svenne »

mgpw4me@yahoo.com

  • Guest
Re: Export template: HTML List (English + German)
« Reply #61 on: November 16, 2010, 08:00:27 am »
- just to make mgpw4me happy ;):
date=1289854375]

I've always been happy  >:(

As soon as I figure out what I'm doing wrong  I'll add you to my XMas list.  I have my own "little" project that may be ready by then.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #62 on: November 16, 2010, 11:01:44 am »
Oh, don't be angry with me... the sort functionality was one small point you suggested, though a long time ago... the other ones are a little bit too complicated for now and perhaps easier to do with php? I fear that if I additionally exported everything into arrays... that might result in a very big file and further slow things down? The ideas for making everything more interactive were not bad, though. I'm looking forward to your project, does it have something to do with that?

mgpw4me@yahoo.com

  • Guest
Re: Export template: HTML List (English + German)
« Reply #63 on: November 16, 2010, 07:22:17 pm »
Oh, don't be angry with me...

My fault...my sense of humor doesn't always come across as funny.

I noted the sort is quite slow with 5000 movies, so yes, I suppose a big file might slow things down even more.  Firefox isn't a speed demon to start with.  One thing that might be worth looking at:

- export your database
- rename the index.html file to index.hta
- add the following lines to the top of the hta file

Quote
<HEAD>
 <TITLE>Svenne's Monster Application</TITLE>
 <HTA:APPLICATION ID="oMyApp"
      BORDER="thin"
      BORDERSTYLE="normal"
      CAPTION="yes"
      MAXIMIZEBUTTON="yes"
      MINIMIZEBUTTON="yes"
      SHOWINTASKBAR="yes"
      SINGLEINSTANCE="no"
      SYSMENU="yes"
      VERSION="1.0"
      WINDOWSTATE="maximize">
</HEAD>

You now have full access to the windows scripting engine (vbscript or javascript).  There's supposed to be a PECL for PHP that can register PHP as a scripting language, but I haven't been able to get the PECL and PHP versions to match up yet.

I'm still working on getting good quality (~ 400px square) headshots of the people in my database.  My project will allow others to do the same.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #64 on: November 16, 2010, 08:10:29 pm »
The sort itself is quite fast. Restructuring and rendering the page is the slow thing... Internet Explorer is almost the same, even a bit slower...
Thanks for the info on HTA. It's something that I was completely unaware of. :-\ Sounds interesting! :)


Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #65 on: November 16, 2010, 09:36:46 pm »
Due to compatibility problems I changed all fonts to standard sans serif... On most systems that's not much of a change, but on some it should look better now.
« Last Edit: December 07, 2010, 01:23:43 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 #66 on: November 16, 2010, 11:10:54 pm »
 8) Good work, as usual. Thanks!

mgpw4me@yahoo.com

  • Guest
Re: Export template: HTML List (English + German)
« Reply #67 on: November 29, 2010, 12:19:28 pm »
The sort itself is quite fast. Restructuring and rendering the page is the slow thing... Internet Explorer is almost the same, even a bit slower...

Have you considered putting the listbox in a DIV and using InnerHTML to write the entire select at once?  Adding items to a list means the listbox has to be redrawn for each item....InnerHTML should render once.  Hmmm...are you even using a listbox?  I haven't looked.

I'm pulling 80,000 records from the database and putting them into a listbox in about 5 seconds.
« Last Edit: November 29, 2010, 01:30:07 pm by mgpw4me@yahoo.com »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #68 on: December 07, 2010, 11:15:29 am »
Thanks for the hints, I'm not using a listbox. Used an unordered list. I fetch all <li>-elements (have them in an array just as you get them with getelementsbytagname), sort them and put each one into place (without changing the <li>-elements themselves, so there would be no need to rerender those ...in theory). In fact, I thought browsers would wait with page rerendering until all elements are done cause by default page refresh is delayed until everything is in place... I will experiment to find the time consuming steps. Perhaps it's faster not to move the elements but to change their content with innerHTML. I will try a listbox, too. I can imagine you're right with that...
« Last Edit: December 07, 2010, 01:27:37 pm by svenne »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #69 on: December 07, 2010, 01:08:09 pm »
Ok, the whole unordered list is completely taken out of the page now, then sorted, and put back as new unordered list into the page. Although the code looks more time-consuming, it is about three times faster with Firefox. With IE it is not that much, but it's faster. The time consuming step now is the sort function itself. There is a lot of potential for getting that faster, too, since for each comparison the necessary part (title, year, or date added) is extracted from the list elements. But for the time being I'm quite happy with the result...
Thanks for your tips, mgpw4me!
« Last Edit: December 09, 2010, 12:13:20 pm by svenne »

mgpw4me@yahoo.com

  • Guest
Re: Export template: HTML List (English + German)
« Reply #70 on: December 09, 2010, 06:39:18 am »
As rick.ca can tell you, the easiest thing in programming is to tell SOMEONE ELSE how to make something better.  ;D  It's the implementation that makes the magic.

I'm going to take a look at your code with the idea of adding it to my "smart browser" that will connect directly to the PVD database...for poster and people images.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #71 on: December 09, 2010, 06:51:57 am »
Quote
As rick.ca can tell you, the easiest thing in programming is to tell SOMEONE ELSE how to make something better.

That's true. The funny thing is, I couldn't code my way out of a wet paper bag. But most programmers are much better at solving problems than knowing what problems need to be solved. So we need each other. ;D

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #72 on: December 09, 2010, 12:04:09 pm »
Yes, it's always nice to have feedback... if it's good and does not cause lots of recoding... and especially if wishes can be served/problems can be solved in less then 2 minutes... give me more of that, it really is way too rare!! ;D
The info on HTA was very nice. I will surely take advantage of that if not here but some day somewhere...

I'm looking forward to seeing that "smart browser".

In the meanwhile I added the sort functionality to "HTML List", too (since it was only available in "HTML Frames" until now).
« Last Edit: February 24, 2011, 02:24:36 pm by svenne »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #73 on: February 24, 2011, 02:57:30 pm »
Some kind of major update...  :)

Nostra is chained to the oars with version 1 development... I'd like to say thanks and, again, want to contribute something:

Changes in the "HTML Frames"-template:

- added: "category" will be exported
- added: if you click on the button "Further options" you now can switch between (localized) movie title and original movie title

But the major addition to the "HTML Frames"-template is a small executable called "pimpHTMLframesExport.exe". You will find it within the exported data in subfolder:
\[exported filename]_files\pimpHTMLframesExport\

If you run pimpHTMLframesExport.exe it will add additional features to the exported files.

Links will be added for genres, categories, countries, director names, actor names, and audio track languages, if different ones appear in two or more exported entries. So afterwards you can click an actor's name, for example, and get a list of all movies within your exported data where this name appears (as actor). This is not so very different to the behaviour in Personal Video Database itself.

Depending on the amount of exported data there will be a few thousand additional (but predominantly very small) HTML-files, all residing in the subfolder
\[exported filename]_files\.

Just one note:
If your database is really huge and with full actor lists, meaning a total of a trillionzillion different actors in your database, it might take a long time and lots of memory and virtual memory for pimpHTMLframesExport.exe to analyze the data. Try to be patient, but if you run into any problems (program crashes, stalls, etc.), please let me know. With my database containing more than 1200 entries and 15 to 30 actors per entry everything went fine and didn't take a long time. Theoretically it should withstand some 4 billion different(!) actor names in total. I would guess at some point earlier memory size and the size of Windows' swap file might become a limiting factor. But I'm completely unsure if someone could ever run into that. So if someone has a huge database... save all data, documents, and whatever you were working at, first ;) and give it a try. Then let me know what happened. (But don't make me responsible for exploded computers ;D)
 
Additional to that feature: filters will be added (to the "further options"-menu) for genre, category, and language, if there is sufficient data. (If you don't use category at all, for example, and the field stays empty throughout your database, a category filter would make no sense. So there must be two ore more categories, elsewise no category filter will be added.)

Some of the additional features will only appear if javascript is enabled in your browser.

pimpHTMLframesExport.exe should be run on freshly exported data (meaning only once on the exported data). Afterwards (or if you don't intend to run pimpHTMLframesExport.exe at all) you can safely delete the subfolder "pimpHTMLframesExport".
« Last Edit: March 02, 2011, 02:58:02 pm by svenne »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #74 on: March 02, 2011, 03:01:23 pm »
- Internet Explorer had problems with script content declaration as utf-8, hence some javascript functions were broken in Internet Explorer. I fixed that...

- changed some minor things in pimpHTMLframesExport.exe...
« Last Edit: September 12, 2011, 11:52:40 am 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 #75 on: March 02, 2011, 11:50:07 pm »
Quote
Some kind of major update...

Very impressive! I created one for 929 movies in about six minutes—so the time is not an issue. And the links, once created, are very fast. It makes a handy "quick reference" for use in a browser. It's such a simple thing I hadn't thought of it before, but it's particularly useful having links only for items present in other records in the collection. The list I created is of feature films I own and/or have seen in the past—so most links mean "I've seen this (category, actor) before in..." I can create the same list in PVD using filters, but the links I see there don't have the same meaning.

[attachment deleted by admin]

Offline ouafouaf

  • Member
  • *
  • Posts: 21
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #76 on: March 20, 2011, 10:56:39 pm »
Hello there.
I tried this export template today for the first time, and was very pleased with the result.
I made some minor changes on the layout to suit my needs, but there are a couple of changes that I can't do myself. I don't want to mess with the codes (my knowledge about coding is very basic), and all the comments in the code are in german. I hope you guys could help me with it ?

I would love to modify the framed template to have both original and translated title in the film lift (and possibly original title first).
Also, I would like to have the films ordered by year as default setting.

Any chance you could help me with that ? I'd be very grateful.

edit: Also, the "Further Options" doesn't seem to work well. I haven't read all the posts in this thread, so I don't know if it has been reported by someone else. I a "Rebuilding List" popup, but then nothing happens. I have "only" 300 entries exported, and I let the "rebuilding" process run for a long time, but it doesn't seem to work. Tried on Firefox and IE. Does anyone else have this problem ?

*ouaf
« Last Edit: March 20, 2011, 11:07:04 pm by ouafouaf »

Offline ouafouaf

  • Member
  • *
  • Posts: 21
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #77 on: March 20, 2011, 11:37:03 pm »
I should try a little harder before I ask for help. I figured out (after randomly changing stuff in the code ^^) everything I needed.
But yes, the "Further Options" is quite a problem. I used it with a smaller list (50 entries), it took about 30 seconds. For bigger lists, it's very slow. I suppose I'll just avoid using it ;)

And again, thank you for this very nice template. And so easy to use for noobs like me !

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #78 on: March 20, 2011, 11:49:22 pm »
Hi ouaf,
default sort order is always the sort order you had in Personal Video Database itself at the time you exported your data. Sort in PVD by year and this will be the default sort order in the HTML list.
Concerning the "rebuilding"-popup: if it just stays there and nothing happens, it seems as if there was an error while executing the javascript code. The popup will not be removed, because javascript execution did stop. I don't have any problems with the javascript code, so I can't reproduce the error myself. To help me find the cause: In Firefox there is an "Error Console" in the "Tools"-menu. Please start it. In this console click "Clear" (in the upper right). Then (on the exported HTML page) choose "Further Options" and tell me, what errors are shown in the "Error Console".
What operating system do you have? WIndows XP, Vista, Linux, something else?
Thanks for your feedback.
Svenne

P.S.: I will tell you how to add the original title soon (so both localized title and the original will be shown)... won't be complicated. It shall be in the movie list, right? The truth is: It is already there, but hidden. You can switch between original title and localized title in the "Further Options" menu, but since that one doesn't do its job on your PC, it won't help you now... If possible, I will try to fix it...
« Last Edit: March 20, 2011, 11:55:52 pm by svenne »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #79 on: March 20, 2011, 11:52:30 pm »
Oh, ok, just saw your second reply... is your PC fast or slow in general? I tested "Further Options" with more than thousand entries and it takes only a few seconds (AMD Athlon 2.4GHz, WinXP)... maybe something goes terribly wrong in your case. As I said (see previous post), if you could give me some more information I could try to fix it.
« Last Edit: March 21, 2011, 12:14:41 am by svenne »

 

anything