Template for dynamic web page view version 1.2

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
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Hello everyone,

I was wondering if there any good programmers who can provide some pointers on how to add a check box at the side of each title, along with a comment box for their email address.

Let say there was 7000 titles to purchase, tick the ones you want, when finished filter your result to shown only your choice, fill in your email address and click send to email the result.

I would prefer to keep this dynamic template, just add this modification if possible as everyone is used to this now after all this time.

Appreciate anyone who can help,
AJW

PS: I don't have a clue about xml coding or php so hope simple instructions if possible. Even a software title that may do in WYSIWYG software (can get from torrent). Already have, dreamweaver, expressions-v2, coffeecup-html
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

AJWconsult

I have introduced the ability to select "favorites". These can be selected by ticking the appropriate checkbox and the list of your selection can be viewed under "my favorites".

Within this category it is possible to submit an email by pressing EMAIL in the header. Your email client will be opened and has a list of the selected movies - identified by their unique number and film title.

A new keyword BOX is available for the XML layout file to specify where you want the checkbox to appear and which film properties you want to copy to the email.

Currently I have this under test -- test page has been removed !!!

Let me know what you think of it and if find any errors please let me know.

BonieNL
Last edited by bonienl on 2009-05-06 08:04:45, edited 1 time in total.
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

That is excellent m8... Bloody excellent..

I see
1. ID=1 - 2 Fast 2 Furious
2. ID=2 - 2001: A Space Odyssey
3. ID=3 - 3:10 to Yuma
4. ID=4 - 48 Hrs.

Would it be possible to know when you have finished this excelent addition and how I can change "ID=1" "ID=2" and so on for my unique movie identifyer which is located in the field called "Media Label"

Also, where can I put MY EMAIL address to be auto filled in the "TO" of the email.

Can't wait....

Much appreciated and a credit to this forum.

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

Post by bonienl »

For everything there is an answer!

As said before I created a new keyword in the layout files which is used to define the properties to go into the email. In your case it would look something like this:

Code: Select all

<box pin="movie.getAttribute('Number')" value="'ID='+movie.getAttribute('Media')"/>
In the file locale.xml are two entries where you can specify email address and subject. For testing purposes I have now filled-in the address part too and it will appear next time in the email.

Perhaps I need to do a little bit of fine tuning or crunch the unexpected bug, but most of it is done and a final version won't take too long.
northman
Posts: 19
Joined: 2008-09-21 19:17:33

Post by northman »

bonjour
Magnifique, quel beau travail
vivement la version finale
comme "ajwconsult", j'adore ce template
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Excellent, I look forward the files and thank you for your assistance in the matter.

I am sure there will be loads more wanting this amendment.

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

Post by ajwconsult »

Hello bonienl,

There was just one little little question... I was actually asked by, well you know...

Would it be possible to go even one further and total the amount of dvd's to shown on the actual template so an enquiry can see how many dvd's they have chosen.

TV Series is a single library ID but will have anything from 1 to 6 dvd's in it usually.

If this is possible, will it take much longer for you to complete this excellent addition.

Can I be a little more cheeky ;-) Any idea when you can complete.

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

Post by bonienl »

AJW,

I should start charging you ;) just kidding

It wasn't too complicated your request but I made it an option which is by default off. Assuming this is something specific and people have to turn it on to use it.

This is an easy thing to do by editing the layout.xml files and add the attribute totals="true", so it looks for example like this

Code: Select all

   <box pin="movie.getAttribute('Number')" value="movie.getAttribute('OriginalTitle')" totals="true"/>
It required an update to the javascript source and the translation file: locale.xml. Any text customization including email address you have to do in this file.
Go to the new topic about version 1.3 and download the package from there.

With this option on there are two lines added to the end of the list in the email:

Total Titles = x
Total Disks = x
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Excellent.... Just obtained and uploaded already...

Sorry to be dense... where do I do the changes so the email looks like:

1 - MediaLabel - OriginalName - Disks
2 - MediaLabel - OriginalName - Disks

Example:
(1 - S0001 - 24 Season 1 - 6dvds)

Really do appreciate your changes to this template. A credit to this forum.

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

Post by bonienl »

ajwconsult wrote:1 - MediaLabel - OriginalName - Disks
2 - MediaLabel - OriginalName - Disks
This you can do in the XML layout files, these are plain text files which you can edit. By default layout1.xml is taken. Open this file in notepad or similar and create the following to represent the above syntax:

Code: Select all

 <box pin="movie.getAttribute('Number')" value="rowindex+' - '+movie.getAttribute('MediaLabel')+' - '+movie.getAttribute('OriginalTitle')+' - '+movie.getAttribute('Disks')+'dvds'"/>
However keep in mind that a length limitation exists for copying info to the email client. The more eleborate you make each entry the less lines can be entered.
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Post by ajwconsult »

Perfect..

Tested and works exactly as I dreamed of...

Thank you again for your help with this.. Makes it so easier for online browsers now and no mistake from them anymore...

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

Post by bonienl »

Just wondering where I can get my free copy :D
Treli
Posts: 1
Joined: 2009-05-21 15:06:53

Post by Treli »

Hi Bonienl,

I'm having a problem with the date sort. It either does not sort, or sorts incorrectly.

The date format appears as 5/21/2009 (m/dd/yyyy), which is how it is saved in the xml file. When sorted, the dates are ordered: 5/21, 5/3, 5/9. On your example site, the dates appear as 13-08-2007 (dd-mm-yyyy), and order chronologically.



Thanks in advance for any help you could provide,

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

Post by ajwconsult »

Hello Trelli,

If I remember the date is sorted by your system date...

You can change this by
Control Panel
Regional Setting
Date
Change your date there...

Hope this helps

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

Post by bonienl »

To cope with the different date formats there is a variable setting in the locale.xml file which can be adjusted.

In your case change to system="mdy".

Clear your browser's cache and it should work after reload.
templateuser
Posts: 1
Joined: 2009-06-11 18:16:18

Adding Fields?

Post by templateuser »

I would like to add the 'Borrower' field to display on my webpage when using this template. I tried editing and making a new layout (layout7.xml) to include this, but it doesn't load. I added a name under format, and it showed up when using settings, but it will not load when selected. Any help?
ajwconsult
Posts: 76
Joined: 2008-02-22 21:50:31

Re: Adding Fields?

Post by ajwconsult »

templateuser wrote:I would like to add the 'Borrower' field to display on my webpage when using this template. I tried editing and making a new layout (layout7.xml) to include this, but it doesn't load. I added a name under format, and it showed up when using settings, but it will not load when selected. Any help?

This works on layout1.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<layout>
<options category="All" pagesize="200" sortkey="MediaLabel" searchkey="OriginalTitle,Catagory,Actors,Director,MediaLabel,Source,Year,Borrower"/>

<group name="Title" setting="getAttribute('OriginalTitle').charAt(0)" checked="true"/>
<group name="Genre" setting="getAttribute('Category')"/>
<group name="Media Type" setting="getAttribute('MediaType')"/>
<group name="Movie Maker" setting="getAttribute('Source')"/>
<group name="RIP Type" setting="getAttribute('VideoFormat')"/>
<group name="Borrower" setting="getAttribute('Borrower')"/>

<default
empty="images/empty.gif"
rating="images/rating*.gif"
flag="flags/*.gif"
arrow="images/arrow-*.gif"
film="guide/*"
code="images/region*.gif"
region="2"
more="true"
top="3"
/>

<row>
<cell title="Library ID" sortby="MediaLabel">

<box pin="movie.getAttribute('Number')" value="movie.getAttribute('Number')+' '+movie.getAttribute('MediaLabel')+' '+movie.getAttribute('OriginalTitle')+' > '+'Disks='+movie.getAttribute('Disks')" totals="true" save="true"/>

<text>movie.getAttribute('MediaLabel')</text>
</cell>

<cell title="Title" sortby="OriginalTitle">
<text>movie.getAttribute('OriginalTitle')</text>
</cell>

<cell title="Genre" sortby="Category">
<text>movie.getAttribute('Category')</text>
</cell>

<cell title="Length" sortby="Length" align="center">
<text>format(movie.getAttribute('Length'),'h')</text>
</cell>

<cell title="Rip Type" sortby="VideoFormat">
<text>movie.getAttribute('VideoFormat')</text>
</cell>

<cell title="Year" sortby="Year" align="center">
<text>movie.getAttribute('Year')</text>
</cell>

<cell title="Date" sortby="Date" align="center">
<text>movie.getAttribute('Date')</text>
</cell>

<cell title="Disks" sortby="Disks" align="center">
<text>movie.getAttribute('Disks')</text>
</cell>

<cell title="Borrower" sortby="Borrower">
<text>movie.getAttribute('Borrower')</text>
</cell>



</row>
</layout>
koberec
Posts: 3
Joined: 2009-02-14 18:45:21

Post by koberec »

hi, this is the best template :) but one question: my problem is "sort by date"; new movies are somewhere in the middle. the first one is 31.12.2008 (12.31.2008).. newest additions always start 2008. do you have any idea? thanks, o.

ps: both version 1.2 & 1.3
bonienl
Posts: 156
Joined: 2008-02-24 10:10:43
Location: Netherlands

Post by bonienl »

Change in the file "locale.xml" the variable system to the format you need. By default it is set to european format 'dmy', english style would be 'mdy'.

Afterwards clear your browser's cache and reload the page.
koberec
Posts: 3
Joined: 2009-02-14 18:45:21

Post by koberec »

yes.. i know about it.. but this is not a problem.. problem is the year 2009. everything from 0 till 2008 is ok. but 2009 doesnt work.. but thanks for the answer :) o.
Post Reply