Page 1 of 1

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

Posted: 2008-04-24 18:11:22
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

Posted: 2008-04-24 18:51:30
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 ;)

Posted: 2008-04-24 19:02:07
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

Posted: 2008-04-24 19:09:54
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 ;)

Posted: 2008-04-24 19:13:48
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:

Posted: 2008-04-24 19:22:23
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/ ).

Posted: 2008-04-24 19:36:38
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

Posted: 2008-04-24 19:43:51
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.

Posted: 2008-04-24 19:49:33
by wicker_man
great, will do it!

Posted: 2008-04-25 07:57:46
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...)

Posted: 2008-04-25 14:45:08
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!

Posted: 2008-04-25 16:06:26
by bad4u
;)

Posted: 2008-04-25 17:10:00
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.

Posted: 2008-04-25 17:19:34
by wicker_man
Yeah, it's just for show off, not really the best way to list them, but it does shine, methinks! :hihi: