Page 1 of 1

Template for dynamic web page view

Posted: 2008-03-12 23:16:39
by bonienl
Hi All,

I started to use the original template made by Twink some time ago and liked the features of it. The approach taken is excellent, however the script did have some quirks and when managing a larger movie database, the script was not as efficient as could be.

Because I am using Firefox as my main browser I wanted to have full support for it, besides Internet Explorer. In this process I begun to modify the original script and addressed the other issues I came across when using it on my own movie database. This resulted in several modifications and speed optimizations.

A next step was the introduction of some new features not available in the original template, but something needed when maintaining a larger database, such as more navigation buttons and a GOTO function.

While working on the layouts, I felt that a simplification of the XML layout syntax was desired to make things more understandable and easier to set up. Specially when more complex layouts are required. Besides new code words to be used, also new helper functions are included to make life easier.

The several layout files I have created represent - I think - a good view of the possibilities, but ofcourse all is adaptable to your own preferences and hopefully the XML syntax is easy enough to modify to your heart's desire.

I can't describe here all changes I have made, but a few visible ones are given below. The "readme" file included in the package has more details.

- Template works well in both Internet Explorer and Mozilla

- Sorting of columns is now persistent in all views and category selections.

- The original "popup" view was modified from a non-movable box to a moving window which follows the mouse while going over the different movie titles.

- New is a thumbnail view with a customizable tooltip function, this shows all movie pictures grouped together and moving the mouse reveals more information.

Cookies are used now to remember one's personal preferences, this allows a user to customize the look-and-feel on-the-fly and keep it that way when re-visiting the page.

The "readme" file also contains instructions on how to create the web page (getting started) and more notes on tweaking the output, including a description of fields and code words for the XML layout file.

For those interested you can download the complete package from here

I have made an example site to show how things look like and it allows you to try out the possibilities, which can be viewed here

I hope you find this a useful update to the original template of Twink.

BonieNL

Posted: 2008-03-13 09:41:35
by antp
It looks nice and seem to work well :)
I suppose that I could include it with the program, in the installation?

Posted: 2008-03-13 19:28:05
by bonienl
I suppose that I could include it with the program, in the installation?
Sure, if it helps to promote your excellent AMC program, it is not a problem to distribute freely.

BonieNL

Posted: 2008-03-13 22:38:44
by bad4u
Nice work.

Just a short note: On list mode (and maybe on popup mode) it would be helpful, if there would be a link to external movie site (instead of a linked picture, maybe on title or number?).

Posted: 2008-03-14 07:32:46
by bonienl
Thanks for the kudos.

Bad4u, this is a great idea, so I made a small addition and added the possibility to make links to text fields too.

In principle any text field may have a reference but in the example site I have added this to the sequence number and optionally you may specify an ordinary tooltip (alt='...') along with it.
The files layout3=popup and layout5=list show this behaviour.

For those who already downloaded the zip file, you'll need to do this again.

Posted: 2008-03-14 12:54:09
by antp
Note that "alt" is not tooltip, it is the replacement text (sometimes displayed as tooltip). For the real tooltip it is "title".

Posted: 2008-03-14 14:23:56
by bonienl
Note that "alt" is not tooltip
I know, but I intentionally used it because the keyword "title" is used already for the column header title and I wanted to avoid confusion.

Internally the script will translate the "alt" attribute to the correct "title" attribute.

Posted: 2008-03-14 19:38:36
by antp
Sorry, I misunderstood your post then ;)

Posted: 2008-03-14 23:33:51
by bad4u
Thanks! :)

Posted: 2008-03-16 16:06:17
by bonienl
Small addition.

I added the possibility to enter both the keywords "alt=" or "title=" as tooltip indicator.

In this process I also corrected two bugs I came across.

- Categories with multiple spaces in their name are now properly handled (e.g. "Dolby Digital 5.1")
- Correct numeric/alphabet sorting on all supported attribute fields of AMC

This resulted in a minor revision release version 0.91 which can be downloaded from here

Posted: 2008-04-08 22:37:45
by axelv
Hi Bonienl, I write from Italy.
I tried to install your template but doesn't work.
Mozilla firefox give me "No matching titles found" in the film list.
Internet Explorer 7 load the list but I make some little change in the dimension of images. These are stretched.
Why Mozilla give me this error?

Sorry for my english... ;)

P.S.: Now Internet explore doesn't work too. I've tried again to open index.html file of my list and now IE stopped in Loading movie database, please wait...
Why??? What's happened??

Posted: 2008-04-12 04:22:43
by bonienl
Hi Axelv,

It could be a problem with the format of your XML database file. Sometimes firefox does not accept the file because some "foreign" characters are present in it.

An easy way to check if firefox can read your XML file without problem is by opening it directly in firefox itself. You can do this by using CTRL-O and select your file.

If anything wrong or not accepted then firefox will tell and shows a reference to the line in your XML file with the error. You need to make the corrections either in AMC or with a text editor on the XML file itself (either delete the non-accepted character or replace it).

When IE stops at "Loading movie database, please wait..." then usually something is wrong with the javascript source. Did you make any modifications in the movies.js file?

You may also want to try to clear the cache and cookies history and see if IE can load the web page again.

Good luck, BonieNL

Posted: 2008-04-14 13:47:32
by axelv
Thanks for reply! I tried to open the XML file and it gives me this error. Wich is the problem????

Errore interpretazione XML: non well-formed
Indirizzo: file:///Users/xxxxxxxxx/Desktop/Prova/movies.xml
Linea numero 7, colonna 450:

I tried to delete this film but AMC give me another error. Delete it and then another error!!
I sand my XML file of database at Rapidshare. The link is below Can you see it? Can you explain me which is the problem and how can I solve this??
Thanks.

http://rapidshare.com/files/107414392/movies.xml.html

Posted: 2008-04-14 14:52:07
by antp
It is due to some non-printable characters: you have lots of these in the texts of some movies, but I wonder from where they come: there is no reason for that.
They appear as empty squares in AMC.
Maybe this is due to the site from which you downloaded the movie info, or to the script used for that.

Here is a script which will replace these characters from your catalog (you will then have to re-export it to xml if you were using .amc file format).
Run that script using Tools -> Scripting -> Editor -> New.
Apply it to all movies.

I guess that these should be replaced by spaces (?), but not always, so the script will also remove double spaces.

Code: Select all

program newScript;
var
  s: string;
begin
  s := GetField(fieldDescription);
  s := StringReplace(s, #19, ' ');
  s := StringReplace(s, #25, ' ');
  s := StringReplace(s, #28, ' ');
  s := StringReplace(s, #29, ' ');
  s := StringReplace(s, '  ', ' ');
  SetField(fieldDescription, s);
end.
There is one that you will have to remove manually, I do not know why the script does not seem to be able to do it:
in the movie 61, "Little Miss Sunshine", in the description text in titles related to Toni Collette there is the "In Her Shoes" followed by a square which you have to remove.

Posted: 2008-04-15 09:31:48
by axelv
Thanks Antp! Now it works fine!
I'll ever use this script in the future. Thanks again! ;)

Posted: 2008-12-14 23:41:35
by mrkanijo
WoW amazing web template , intuitive and easy to use, good looking, and in some few steps i mounted my movies site, thank you for doing this template
:grinking: