[Solved!] (help) small, easy template needed!

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
Post Reply
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

[Solved!] (help) small, easy template needed!

Post by wicker_man »

Hi all!

I've been using Ant Movie Catalog for about 4 years now and I'm a great fan!
I've exported my film list onto a webserver so that my friends can see what films should they beg me :hihi: - In the past i've adapted an existing template and i've got, from that, an static html list, with links to static html individual pages. Great! It 's here >>> http://suavemelancolia.com/wm/

Still, a few weeks ago i started thinking about having something more "flashy", a nicer looking presentation for my film list.
Today, i found tiltviwewer ( http://www.airtightinteractive.com/projects/tiltviewer/ ) - it is a flash and xml based image viewing application for the web. It was very much what i was looking for.
With it, i grabbed the first 100 films from my list and i've been able to produce this >>> http://suavemelancolia.com/wm/tiltviewer/

As you can see on the link, above, it gives me a groovy grid (5x5) of my films. If you click on the arrows, you can go forward or backward, 25 films at a time, on the list. If you click on a cover, it will zoom onto it. On the lower right corner of the cover there's a circular icon - clicking on it will rotate the cover and will show, on the back, the number of the film, it's "title" and a "description". If you click somewhere on the blank space between pics it will xoom out. With the right mouse button, you can make it fullscreen - sweet!!!

The tiltviewer thing has an xml file on with one lists all of the photos in the following manner:

Code: Select all

		<photo imageurl="imgs/0001.jpg" linkurl="http://suavemelancolia.com/wm/wicker_man_01.html">
			<title>0001</title>
			<description>0001</description>
		</photo>

		<photo imageurl="imgs/0002.jpg" linkurl="http://suavemelancolia.com/wm/wicker_man_02.html">
			<title>0002</title>
			<description>0002</description>
		</photo>

		<photo imageurl="imgs/0003.jpg" linkurl="http://suavemelancolia.com/wm/wicker_man_03.html">
			<title>0003</title>
			<description>0003</description>
		</photo>
etc...


Now, here's where my limited knowledge limits me, and therefore where i would need help:

I would like to use the export feature on AMC, through a template, so that it can create a file that starts like this:

Code: Select all

<tiltviewergallery>
	<photos>
Ends like this:

Code: Select all

	</photos>
</tiltviewergallery>
and in the middle has something like this (variables):

Code: Select all

<photo imageurl="imgs/$$ITEM_NUMBER.jpg" linkurl="$$ITEM_FILEINDIV">
			<title>$$ITEM_ORIGINALTITLE</title>
			<description>$$ITEM_DIRECTOR</description>
		</photo>

I do not know how to do this, and I know that this can be done automatically (the easy way!) and not as I did with the 100 first films, by hand, copy pasting the afternoon away.

Could any kind soul help me? I would be very grateful! :wink:

Thanks all,
wm
Last edited by wicker_man on 2008-04-25 14:49:02, edited 1 time in total.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

I didn't use any templates yet, so there might be better ways, but this should work for your needs:
Open export window, choose html export, click on the 'new' button and copy/paste this into a new template:

Code: Select all

<tiltviewergallery>
  <photos>
    $$ITEM_BEGIN
    <photo imageurl="imgs/$$ITEM_NUMBER.jpg" linkurl="$$ITEM_FILEINDIV">
      <title>$$ITEM_ORIGINALTITLE</title>
      <description>$$ITEM_DIRECTOR</description>
    </photo>
    $$ITEM_END
  </photos>
</tiltviewergallery>
Save as a new template. On the left side of export window choose if you want to export with images. Use it.
The only problem should be, that you have to rename the .html file to .xml ;)
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

Hi bad4u,

Thanks for the quick reply.
Unfortunately, it only gave me a list of the directors, nothing else.

Why? Probably because <description> does not make sense to AMC and <title> does.

Or the other way around, i dunno.... still, this gave me an idea, i'm going to try and implement it and will get back with results.

later!
wm
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

I just took your code for the export part .. you will need to adapt it to the items and paths you need :

Instead of <description>$$ITEM_DIRECTOR</description> you probably want to take <description>$$ITEM_DESCRIPTION</description> ..

Same for the paths to the pictures.. just give correct path and URL within this code, i.e. if you have your xml file on a web folder /movielist and your pictures on /movielist/images you will have to change the "imgs/$$ITEM_NUMBER.jpg " to something like "images/$$ITEM_NUMBER.jpg " .. if you have other names for your pictures (not the movie number) you will have to change the name itself (i.e. $$ITEM_NUMBER.jpg -> $$ITEM_ORIGINALTITLE.jpg).. it can differ from the code example ;)
Last edited by bad4u on 2008-04-24 19:17:50, edited 2 times in total.
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

Exactly - actually, i'm almost there, it's so great to learn form others and then be able to do it myself! :grinking:
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

I forgot: If you only saw the list of directors you probably opened the exported .html file in your browser. To see the correct result you should open it with a text editor (notepad or whatever, I recommend using a free, better one like notepad++ http://notepad-plus.sourceforge.net/ ).
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

Yeah, i'm using notepad++ for the xml.

The thing is, AMC does not recognise (of course...) the tags from the XML so i did this template:

Code: Select all

<tiltviewergallery>
  <photos>
    $$ITEM_BEGIN<BR />
photo<BR />
imgs/$$ITEM_NUMBER.jpg<BR />
http://suavemelancolia.com/wm/$$ITEM_FILEINDIV<BR />
title<BR />
$$ITEM_ORIGINALTITLE<BR />
director<BR />
$$ITEM_DIRECTOR - $$ITEM_DESCRIPTION<BR />
$$ITEM_END<BR />
  </photos>
</tiltviewergallery>
Then, on Notepad++ i replaced photo with <photo imageurl=", title with ><title>, etc, etc.

But then (of course!) i get xml errors - not related to AMC, of course.
It seems im on a dead end :(

Anyways, thanks for your help!
wm
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Send me the .xml file that you did manually and that works for you when you upload it to your webspace .. I need to have a look on it to see what exactly you need from AMC. See private message pls.
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

great, will do it!
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

wicker_man wrote: The thing is, AMC does not recognise (of course...) the tags from the XML
But it does not has to recognize these tags, it just has to replace text between tags... (the $$ITEM...)
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

Exactly!

Well, bad4u was completely right and it worked like a charm!

I'll post later a complete guide to dummies (like me!) who would like to have its list as i have it on http://suavemelancolia.com/wm/tiltviewer/ - it looks GREAT!!!!

:grinking:

Thanks all!
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

;)
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

wicker_man wrote: it looks GREAT!!!!
Indeed, it is a nice way to list movies :) It is probably better looking than easy to use, though.
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

Yeah, it's just for show off, not really the best way to list them, but it does shine, methinks! :hihi:
Post Reply