Template for dynamic web page view version 1.3

If you made a template for printing or HTML export, you can offer it to the others here. You can also ask here for help about these templates
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Template for dynamic web page view version 1.3

Post by bonienl »

For those interested I have made an update to this template and released version 1.3, which can be downloaded here and there is an online view available.

The following has been changed to this version:

+ Added favorites selection to create a shortlist which can be emailed
+ Added thumbnail view allows dynamic or clickable tooltips
+ Make unkown categories appear or disappear upon selection
* Corrected URL with titles attached sometimes wrongly displayed

Known limitations with emailing:

Copying from javascript to an email has a length restriction. When too much information is copied then the email client will not start at all.

Copying ‘special’ characters, such as ü or à, results into a blank body field of the email.

BonieNL
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

I have added a small update to version 1.3 upon request. If you have downloaded the package already then you'll need to do this again.
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

Corrected a bug where totals would appear multiple times in the email. You can either download the complete package mentioned above or just the single javascript file and overwrite the old version.
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Speed up loading of XML Template

Post by ajwconsult »

Hello,

I have been asked a question by a few subscribers on very slow connections (Like Modem) if there is a way of making the connection to the online database quicker... By the looks of it it will load all the xml content first.

Typicaly One XML database is about 4mb in size, of which loads very slow for those on not so highend connection speeds, 20mbit or more is not an issue.

It is not an option to split the file.

Someone said, there are online dvd companies who have over 40,000 titles and they load quicker.....

Does anyone have any ideas on how this speed up can be done on this online xml template....

Thanks

AJW
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

ajwconsult wrote:Does anyone have any ideas on how this speed up can be done on this online xml template....
The loading message at the beginning is displayed during two phases:

1. The 'content' is downloaded (the biggest part would be the XML database)
2. Scanning the downloaded information and populating the different categories

The first part depends on the available download speed.
Some (paid) code optimization programs exist do reduce file sizes. E.g. http://www.w3compiler.com/ can be used to reduce different parts, however the downside is that source files become unreadable and may stop working in some cases. It is a bit of try and error here.

The second part largly depend on the execution speed of the browser. On my computer there is a big difference between IE8 and FF3.5. The first one takes nearly 3 seconds to complete, while FF3.5 does the same job in 0.75 seconds (or 4 times faster).

Besides choosing the browser some optimization in this part can be achieved as well.

a) Minimize the number of default categories to display. E.g. populating the titles only goes much quicker than all categories (see the XML layout files).
b) Choose a more simplistic layout as default. E.g. the list view has fewer overhead than the expanded view (change this in the movies.html file).
c) Minimize the default number of titles per page. Loading fewer titles gives quicker display (see again the XML layout files).

One addition on the first point.
Modern browsers and web servers support on-the-fly compression. Usually at the web server side it can be set how much compression is involved. This may help too rather then compressing the original files with an external program.
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

Another approach...

To reduce the XML database size you can make a copy of it, which contains only the items needed to display on the web. Say you choose the 'list' view it requires 11 information fields to be stored in the XML file.

To make a downsized copy you can first export the original XML file to a CSV file and choose the required fields. Next you create a new database and import the just created CSV file.

Doing so resulted in my case in a new file which was ~25% of the original file.

Of course this approach restricts you in the information which can be displayed and other views should be removed to avoid missing info.
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Appreciate the suggestions, but stripping the xml would not be an option due to the databases been updated every other day at least.

I assume that most who use this excellent template use it in the same way and keeping the database up to date and using all the contents to ensure the database provides all the information to the viewer in assisting them in choosing their correct title.

The template has now been linked within one of my dvdr programs which will be a LOCAL display rather than the internet.

AJW
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

All true!

The whole idea behind my original approach was to have an easy way to keep the movie database and web content updated. This is accomplished by storing the database as an XML file and perform modifications and additions directly to it (i.e. no extra exports are required).

For most people the size of the XML file won't be too relevant! You need quite a substantial number of entries to come to 4MB. I guess more than the average guy will have at home ;)

BonieNL
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Hello again,

Over the weekend there have been a copy of subscribers who could not use the auto call of the email client.

It seems that some companies restrict their employees from certain functions from weblinks and programs.

I thought, would it be possible to add an option (keeping the email) to send all the information to a webpage or something that will not call for an external program so they can copy all the contents themselves into whatever email program they are allowed to use, as I am goind to add a webversion to send internet mail for them.

The information on the notepad would be exactly as what is put into the email note section at the moment along with the email address to send it to.

Thanks

AJW
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Hello,

I found out the problem that a few have been having...

Most are using Windows Live, Yahoo and so on for the email program and not the likes of Microsoft Outlook.

Hope you can provide some ideas of what options I have.

AJW
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

I need to think about this, but currently haven't time to do so because of travelling obligations.

BonieNL
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Appreciate your time as usual....

I look forward to any suggestions when you havetime,
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

Ok, I created one way of doing this. The approach I have taken is that first a new window is opened showing the selected titles and within this window an email button is present to copy this information to your email client.

In case no email client is present or copying doesn't work, it is always possible to manually copy & paste the information of the new window to somewhere else.

Two files are updated which can be downloaded here or you can download the complete package mentioned in the first post.

But hey there is more :)

I have added the possibility to remember your favorites upon a next visit. If you want this behaviour then the option save="true" must be added to the box keyword in the layout file. So it looks something like this:

Code: Select all

   <box pin="movie.getAttribute('Number')" value="movie.getAttribute('OriginalTitle')" save="true"/>
Another 'convenience' is the possibility to clear your favorites list at once. This is done while in the "My Favorites" category and pressing the "My Favorites" button at the bottom. A confirmation is asked before actual clearing.

BonieNL
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Excellent work...

A couple have tested already and now they can request using thier Webmail accounts.

Appreciate your help on this matter AGAIN.

AJW
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Hello BonieNL again....

After the excellent responce to the excellent updates which are working exactly as requested previously.....

I wonder..... Would it be possible..... Yep, me again ;)

I would like to add other formats to the library, of which require a "File Size" account as well...

Still keeping everything as it is, would it be possible to include the "File Size" along with total in the output for emailing.

Example:
Total Titles = 5
Total Disks = 5
Total File Size = 4,000Mb

I had a look at the original code, not a clue :-)

Thanks again and again and again...
AJW
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

It is not too complicated to add this extra line of information. Instead of trying to explain here the necessary code update. I put an updated version available for download. This zip file contains only the two updated files.

Btw if you want to suppress an individual line then you have to set the respective string value to empty ("") in the locale.xml file.

I made a small update by placing all related text in the locale.xml file instead of hardcoded. If you have downloaded the file earlier, pls download it again.

BonieNL
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Possible to Sort

Post by ajwconsult »

Hello BonieNL

I was curious if it is possible to automatically sort the order of the listing provided in the email...

If you randomly select from the listing, e.g. 1,4,2,8,5,9

It presents the email in that order instead of 1,2,4,5,8,9

Thanks again.....

After this change, I think you may due another FREEBIE..
How about Transporter 3

AJW
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

The problem with sorting the list is to select on which item. Because the user can choose whatever is the format of each line (XML layout) it can't be a fixed setting, like the title.

I thought about sorting before but haven't found an adequate solution so far. Any ideas are welcome.

Hmm one possible approach is popping up while writing this reply...

It will take me some time to realize this. Be patient
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

While typing the previous reply I realized that actually sorting can be done in a very simple way: just take each line as is and sort them alphabetically.

Not really a long wait :hihi:

Download the updated javascript file here and enjoy a sorted list.
spiderman
Posts: 51
Joined: 2008-08-14 17:58:38

Unmerge number fields

Post by spiderman »

When titles are entered beginning with a number it merges all titles to #. It is possible to unmerged it. I use this template for my U2-bootleg collection and want to set order on "Tour" eg year - tour name

thanks in advanced for your help

keep up the good work :grinking:
Post Reply