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

0 Members and 3 Guests are viewing this topic.

Offline ouafouaf

  • Member
  • *
  • Posts: 21
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #80 on: April 24, 2011, 08:28:02 pm »
Sorry for letting your post unanswered. I don't come to the forums very often (only when I have something to whine about, really :p ).
I do have a very slow computer indeed. I tried the page on a newer computer, it works fine.
I might come around some day when I have time to play around with your template. I will probably come around then and bore you with my problems, seeing how poor my coding is  ;D
cheers.

Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #81 on: May 21, 2011, 09:00:46 am »
Svenne,

Great template!

A question: when I add the Moviemeter rating  (%value=rating) to the report is shows zero for all records.
Is this option not available for this template?

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #82 on: May 21, 2011, 10:28:37 am »
Hi Arj0n!

I think {%value=rating} represents your own, personal rating. There also is IMDB-rating ({%value=imdbrating}) and the Moviemeter rating is stored in "other rating": try {%value=orating}, that should work.

All this %value stuff is provided by the PVD interface and is independent from any specific template, it should work in every template there was, is, and will be, ;) mine included.

Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #83 on: May 21, 2011, 11:15:08 am »
Thanx Svenne.

Stupid me, I thought 'rating' was representing the moviemeter-rating but like you said I should use 'orating' in stead of 'rating'...
My bad.

Thanx.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export templates: HTML List/Frames (English + German) + Print Layout
« Reply #84 on: September 12, 2011, 11:51:44 am »
Just a minor change:
When the "original title" field was empty for an episode, then the "HTML Frames" template produced a pair of nasty empty brackets instead of omitting the field. Now the brackets are omitted in that case.

[attachment deleted by admin]
« Last Edit: October 05, 2011, 06:03:39 pm by svenne »

Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #85 on: September 25, 2011, 11:40:36 am »
@Svenne:
In the pimp-readme is stated: "Links will be added for genres, categories, countries, director names, actor names, and languages of audio tracks"
But which template field is the "language of audio tracks"?

I added this line to movieiframe.ptm :  <h2>Language</h2><p id="langs">{%value=langs}</p> but it doesn't show up in the iframe at all. Probably cause I doesn't have it filled in my DB.
I added this line to movieiframe.ptm :  <h2>Language</h2><p id="origlang">{%value=origlang}</p> but it didn't got linked after the pimp.

Also:
Can you add fields to get linked by pimpHTMLframesExport.exe?
It would be nice if the entries in the 'producer' and 'writer' fields also get a link for example

Great template b.t.w.!
« Last Edit: September 25, 2011, 12:01:08 pm by arj0n »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #86 on: September 25, 2011, 12:26:47 pm »
The template field is {%value=astreams params="full" template="HTML Frames\astreams.ptm"}. It's the line beginning with <h2>Audio</h2> in movieiframe.ptm and it refers to the subtemplate astreams.ptm. The language information is called by {%param=langs} in astreams.ptm.

Your browser would display something like this in the end (as long as in PWD the "languages"-field is not empty, of course):

 Audio:

    English (mp3, stereo)

pimpHTMLframesExport.exe will process this part of the exported file. Any additional lines with {%value=langs} or whatever are ignored. pimpHTMLframesExport.exe is just a bonus thing working with the existing template as is. You can add own lines and costumize the template to some extend and pimpHTMLframesExport.exe should still work fine, but it won't touch, link or mess around with the customized parts of the template.


Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #87 on: September 25, 2011, 02:19:26 pm »
The template field is {%value=astreams params="full" template="HTML Frames\astreams.ptm"}. It's the line beginning with <h2>Audio</h2> in movieiframe.ptm and it refers to the subtemplate astreams.ptm. The language information is called by {%param=langs} in astreams.ptm.

Your browser would display something like this in the end (as long as in PWD the "languages"-field is not empty, of course):

 Audio:

   English (mp3, stereo)
Ah, added this to movieiframe.ptm:
<h2>Audio</h2><p id="astreams">{%value=astreams params="full" template="HTML Frames\astreams.ptm"}</p>

and it does show the field properly.
But... the items in that field shown in the browser still havem't got a link after running the pimper.

quoting from the pimper readme file:
"Links will be added for genres, categories, countries, director names, actor names, and languages of audio tracks, if those
appear in two or more database entries."

links are added after running the pimper: genres, categories, countries, director names, actor names
links are not added after running the pimper: languages of audio tracks.

So, do I still use the wrong field? or is it something else?

pimpHTMLframesExport.exe will process this part of the exported file. Any additional lines with {%value=langs} or whatever are ignored. pimpHTMLframesExport.exe is just a bonus thing working with the existing template as is. You can add own lines and costumize the template to some extend and pimpHTMLframesExport.exe should still work fine, but it won't touch, link or mess around with the customized parts of the template.

I understand but I was looking for an answer why I can't get the field "language of audio tracks" linked as stated in the readme of the pimper...

Thanx for the info.
« Last Edit: September 25, 2011, 02:21:23 pm by arj0n »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #88 on: September 25, 2011, 02:52:52 pm »
pimpHTMLframesExport.exe looks for certain structures in the exported HTML-files. If these structures are not present (or different from the original template) it won't work. Did you try the original template to see, if it works there? The readme just explains what it does with files generated by the original template. It was never meant to be some kind of universal extention to the template script engine of Personal Video Database...

Also, links will be added only if there are two or more movies with identical language entries.

pimpHTMLframesExport.exe does not search for the structure <h2>Audio</h2><p id="astreams">...</p>. So it just ignores that line. pimpHTMLframesExport.exe searches for list elements belonging to a list with the classname "sound".

In the exported HTML files it looks like this:

Code: [Select]
 <h2>Audio</h2>
  <ul class="sound">
    <li>Spanish (AC3, stereo)</li>
  </ul>

or like this, if there are two audio streams:

Code: [Select]
 <h2>Audio</h2>
  <ul class="sound">
    <li>English (AC3, 6 channels)</li>
    <li>Italian (AC3, stereo)</li>
  </ul>



Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #89 on: September 25, 2011, 03:08:06 pm »
Found something strange:
when having only 1 language: a link is added.
when having >1 language: no links are added.

In my test I always had 2 languages, separated by a comma. That way it seems not work.
I thought it was possible to have >1 language and getting links for all of them...

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #90 on: September 25, 2011, 03:18:21 pm »
Quote
I thought it was possible to have >1 language and getting links for all of them...
That is right. But the entries must not be comma separated ("English, Spanish, French"), but within different list entries ("<li>English</li><li>Spanish</li><li>French</li>"). All within <ul class="sound">, as I mentioned before.

Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #91 on: September 25, 2011, 03:54:05 pm »
Quote
I thought it was possible to have >1 language and getting links for all of them...
but within different list entries
Darn, I must have made a mistake causing the 2 same entries be not the same list.

something like ending up with 2 records having the same language but record 1 and 2 having this difference:
("<li>English</li>
and
("<li>english</li>

Sigh, sorry.

*slaps forehead*


Thanx for answering again Svenne,

Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #92 on: September 28, 2011, 04:27:18 pm »
I made an export with 145 entries and the 3 filter buttons (genre, category and language) were working after pimping.
After adding more entries I made a new export (having 247 entries) but the 3 filter buttons aren't reacting anymore after pimping.

I used the original template files.
The file pimpHTMLframesExport runs with no errors.

What's wrong?

EDIT:
Removed some entries in the Languages list and somehow the 3 filter buttons work again.
It must have been one or more items in the Language list.
Still don't know which one was the 'bad entry'...
Are there any specific characters not allowed for such list(s)?
« Last Edit: September 28, 2011, 04:43:32 pm by arj0n »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #93 on: October 04, 2011, 12:58:08 am »
Special characters could be an issue. I tried several special characters including chinese symbols... only space+"(" as well as "," (both without quotes) would give unexpected results, shortening or splitting up language entries. I will correct that soon. Nevertheless, the three filter buttons always did their job.
I could imagine some kind of "interference" if you choose the same export filename a second time or over and over again. Perhaps it might be only if you don't delete the old files first. But it's just a guess. The export would/should run fine and do a proper job. But your browser might have parts of the former file versions in its cache, causing some weird behaviour. Empty the browser's cache, that might help.
If it's not the browser's cache and if you can reproduce the error, tell me the details and I will eliminate the bug.

Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #94 on: October 04, 2011, 07:55:46 am »
Special characters could be an issue. I tried several special characters including chinese symbols... only space+"(" as well as "," (both without quotes) would give unexpected results, shortening or splitting up language entries. I will correct that soon. Nevertheless, the three filter buttons always did their job.
Yes, I guess it must have been a comma or something...

I could imagine some kind of "interference" if you choose the same export filename a second time or over and over again. Perhaps it might be only if you don't delete the old files first. But it's just a guess.

I always delete the old export before making a new one, just in case.  ;)

The export would/should run fine and do a proper job. But your browser might have parts of the former file versions in its cache, causing some weird behaviour. Empty the browser's cache, that might help.
If it's not the browser's cache and if you can reproduce the error, tell me the details and I will eliminate the bug.
I haven't encountered that error anymore, so it must have been something in the 'special characters' corner.


Question:
Could you please add a fourth filter-button, one for for 'actors'?

Offline arj0n

  • User
  • ***
  • Posts: 32
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #95 on: October 04, 2011, 07:57:07 am »
Special characters could be an issue. I tried several special characters including chinese symbols... only space+"(" as well as "," (both without quotes) would give unexpected results, shortening or splitting up language entries. I will correct that soon. Nevertheless, the three filter buttons always did their job.
Yes, I guess it must have been a comma or something like "(".
I removed several things so I can't tell you what exactly caused this...

I could imagine some kind of "interference" if you choose the same export filename a second time or over and over again. Perhaps it might be only if you don't delete the old files first. But it's just a guess.

I always delete the old export before making a new one, just in case.  ;)

The export would/should run fine and do a proper job. But your browser might have parts of the former file versions in its cache, causing some weird behaviour. Empty the browser's cache, that might help.
If it's not the browser's cache and if you can reproduce the error, tell me the details and I will eliminate the bug.
I haven't encountered that error anymore, so it must have been something in the 'special characters' corner.


Question: could you please add a fourth filter-button, one for for 'Actors'?
« Last Edit: October 04, 2011, 08:06:31 am by arj0n »

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #96 on: October 04, 2011, 12:48:52 pm »
"," and " (" won't be a problem in future versions.

A filter button/menu for actors is not practicable. In my database there are aproximately 12600 actors. And I only imported the most prominent actors from the first page for each movie in IMDB!
In a small database there might be a few thousand actors only, but even those could not be handled in such a menu. One major thing that keeps the exported HTML files from bloating to infinity is that I only link actors that occur in two or more movie entries.

Remember that all exported data is stored in HTML files. There is a lot of redundant information. As an example: movie entry x is listed in several files... for each actor that participates in it (+ at least in one other movie), in the file with the filmlist of the director, in the genre list, etc.
If you want to have a film list available for each actor without having a few ten thousand lists prestored as HTML files bringing your hard drive's file system to its knees... you will need to generate the lists on demand. It would take a lot of time to gather the corresponding data from all the exported movie sheets (pimpHTMLframesExport does so) on the fly. To be able to generate such lists fast you would need a genuine database... like Personal Video Database. ;)  By the way, javascript's access to the file system is very restricted, too. That can be changed, but I wanted to keep the exported thing publishable on any PC and on the net.

If you want to have such features outside of Personal Video Database (which uses Firebird as database): there are some approaches to get the data to mysql as a backend for web pages on common hosters and alikes:
PVD .9.9.21 Website Template Easy to Web scripts based on PK Template
(PK's MovieDB dynamic website template)
Kroozbox - PVD to media theatre solution


« Last Edit: October 04, 2011, 01:07:39 pm by svenne »

mgpw4me

  • Guest
Re: Export template: HTML List (English + German)
« Reply #97 on: October 04, 2011, 03:53:54 pm »
The database is directly accessible via HTML scripting (JavaScript / VbScript), if you install the Firebird driver...Internet Explorer version below:

<html>
<head><title>ActiveX Data Objects (ADO)</title></head>
<body BACKGROUND="CLDSHALF.JPG" TEXT="#000000">

<select size="40">

<script language="VBScript">

Dim cn, cmd, rs, i, dbpath, timein

dbpath ="Database=c:\program files\personal video database\movies 3.pvd"

Set cn = CreateObject ("ADODB.Connection")
cn.Open "DRIVER={Firebird/InterBase(r) driver};User=SYSDBA;Password=masterkey;" & dbpath & ";auto_commit=true"

set rs = cn.execute("select MOVIES.""title"", MOVIES.""year"", MOVIES.""mid"" from MOVIES order by MOVIES.""title"", MOVIES.""year""")

do while not rs.eof
   document.write ("<option value='" & rs("mid").value & "'>" & rs("title").value  & " (" & rs("year").value & ")")
   rs.movenext
loop

rs.close
cn.close

</script>

</select>

</body>
</html>

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List (English + German)
« Reply #98 on: October 04, 2011, 04:35:11 pm »
Thanks for the info. Nice to know. So, there are lots of opportunities...

All depends on what you want to do. Setting up a PC for customers in a video store? Or host a personal list of favourite movies on a third party internet server? Or do you want to share your DVD collection with friends, having the exported HTML files on an USB stick in your pocket? Or have a tiny list that you can attach to an email?
By the way, you can run Personal Video Database from your USB stick on any PC without having to install it there. There is a portable mode.

Concerning the HTML export templates: I want to keep them as "independent" as possible. They should not depend on a certain operating system or third party drivers and should stay apart from the original (comprehensive) database. They depend on a browser capable of javascript and iframes, of course. But that should be sufficient.

Offline svenne

  • Power User
  • ****
  • Posts: 145
    • View Profile
Re: Export template: HTML List + HTML Frames (English + German)
« Reply #99 on: October 05, 2011, 06:14:33 pm »
New versions:
- HTML Frames: I changed the behaviour of the menus. Now they disappear if you click somewhere else on the page. Found it quite annoying that I could only get rid of them by choosing something or pressing the "Further options..." button again.
- writers, composers and producers will be exported if the fields in Personal Video Database are not empty
- pimpHTMLframesExport processes exported credits for writers, composers and producers
- nonalphanumeric characters in the language field should not be a problem anymore
« Last Edit: November 17, 2011, 12:36:28 pm by svenne »