New Template

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
turtle

Post by turtle »

I did
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

in the template I only see <picture>$$ITEM_PICTUREFILENAME</picture>, so what do you have in it ?
*Guest* - Frau Holle
Posts: 46
Joined: 2002-12-14 19:24:59

Post by *Guest* - Frau Holle »

Okay your template must be something, like this:

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" ?>
<movies>
  <filmegesamt>$$TOTALMOVIES</filmegesamt>
	$$ITEM_BEGIN
	<movie>
		<number>$$ITEM_NUMBER</number>
		<date>$$ITEM_DATEADD</date>
		<media><![CDATA[$$ITEM_TYPE]]></media>
		<title><![CDATA[$$ITEM_TRANSLATEDTITLE]]></title>
		<year>$$ITEM_YEAR</year>
		<length>$$ITEM_LENGTH</length>
		<category>$$ITEM_CATEGORY</category>
		<director>$$ITEM_DIRECTOR</director>
		<description><![CDATA[$$ITEM_DESCRIPTION]]></description>
		<picture>$$ITEM_PICTUREFILENAME</picture>
    <cdanzahl><![CDATA[$$ITEM_DISKS]]></cdanzahl>
    <picture>$$ITEM_PICTUREFILENAME</picture>
    <actors><![CDATA[$$ITEM_ACTORS]]></actors>
    <rating>$$ITEM_RATING</rating>
    <bigness>$$ITEM_SIZE</bigness>

	</movie>
	$$ITEM_END
</movies>
Try it.
turtle

Post by turtle »

using this template I only get these three boxes on the left of my screen:
-Suche
-Genre
-Graupelistiken

Nothing else ! :( I even don't get a list of my movies :cry:
*Guest* - Frau Holle
Posts: 46
Joined: 2002-12-14 19:24:59

Post by *Guest* - Frau Holle »

This sounds that you have downloaded Willspo's template on my homepage. This template is in german. The original is in english.

Code: Select all

If you can't understand german {
   please download the original template, not the modified. And try it again.
else 
   contact me on my side, so we can speak german and you can mail me your template, movies.xml, transform.xml, style.css and index.html. Than I can watch for an error.
ben__001
Posts: 12
Joined: 2003-03-05 02:49:32

ben__001

Post by ben__001 »

i like yer template. its pretty cool. but i would like to have move information when a movie is clicked on. in the windowed part. such as:

resolution
framerate
size
video format

can this be done?
*Guest* - Frau Holle
Posts: 46
Joined: 2002-12-14 19:24:59

Post by *Guest* - Frau Holle »

Sure it can be done.

1. Step: At first you have to add thr information in your template.

f.e.:

Code: Select all


<size>$$ITEM_SIZE</size>

2. Step: You have to configure your transform.xml.

Search in the tramsform.xml for: <xsl:template match="movie" mode="info_view">

In the Division: <div class="infoViewText"> you can find the other, existing entries, like <b>Year:</b> <xsl:value-of select="year" />
<br class="infoViewTable" />

At the position, where you want to show your new information you have to add something like that:

Code: Select all

<b>Size:</b> <xsl:value-of select="bigness" /> MB
			<br class="infoViewTable" />
ben__001
Posts: 12
Joined: 2003-03-05 02:49:32

didnt work

Post by ben__001 »

ok. i did what u said but now all i get is the headings for the stuff i added and no value. but the values are in the movies.xml so it must be something with transform.xml
*Guest* - Frau Holle
Posts: 46
Joined: 2002-12-14 19:24:59

Post by *Guest* - Frau Holle »

Yes, you're right! I've forgotten to change the Tag. Please change in your transform.xml:

Code: Select all

<b>Size:</b> <xsl:value-of select="bigness" /> MB 
      <br class="infoViewTable" />
TO

Code: Select all

<b>Size:</b> <xsl:value-of select="size" /> MB 
      <br class="infoViewTable" />
ben__001
Posts: 12
Joined: 2003-03-05 02:49:32

Post by ben__001 »

ok. that worked except i can't get the video and audio kbps to show up. its something to do with my template. im not sure what code ant movie needs to extract the kbps.
ben__001
Posts: 12
Joined: 2003-03-05 02:49:32

Post by ben__001 »

nevermind i got it. looked in the read me:P
mrego

won't work online???

Post by mrego »

i know it wasn't designed for the net but it would be so nice...

it all works offline, but when i upload everything it doesn't work. the data/movies.xml is up and so is the transform.xml.

http://www.egotripp.com/dvd/

when you follow the above link, it seems to load some of the index.html file. the header can be seen and it all looks fine in the source, if you load

http://www.egotripp.com/dvd/data/movies.xml it's all there.

i'm no xml coder - can anyone please help me here... i have no idea how to get this working online and would like for friends to see my db

thanks - by the way, great app and great template
ben__001
Posts: 12
Joined: 2003-03-05 02:49:32

Post by ben__001 »

It all worked for me when online. but i uploaded all of the files in the wilspo's template.... make sure u include the images folder.
Paramount Jay

Post by Paramount Jay »

There is a little mistake in the script, the last actor is never showed in the list of actors! So you have to modify the transform.xml script like this (search the first line of the script and replace all the template tag):

Code: Select all

	<xsl:template name="commas_to_br">
		<xsl:param name="src" />
		<xsl:choose> 
		   <xsl:when test="contains($src, ',')"> 
			   <xsl:value-of select="substring-before($src, ',')" />
				<br />
				<xsl:call-template name="commas_to_br">
					<xsl:with-param name="src" select="substring-after($src, ',')" />
				</xsl:call-template> 
		   </xsl:when> 
		   <xsl:otherwise> 
			  <xsl:value-of select="$src" /> 
		   </xsl:otherwise> 
		</xsl:choose>
	</xsl:template>
Ok, let's talk now about the famous html line break! To make it visible in your page replace

Code: Select all

<xsl:value-of select="description" />
by

Code: Select all

		<xsl:call-template name="html_br">
				<xsl:with-param name="src" select="description" />
			</xsl:call-template>
and add this

Code: Select all

   <xsl:template name="html_br">
		<xsl:param name="src" />
		<xsl:choose> 
		   <xsl:when test="contains($src, '<br>')"> 
			   <xsl:value-of select="substring-before($src, '<br>')" />
				<br />
				<xsl:call-template name="html_br">
					<xsl:with-param name="src" select="substring-after($src, '<br>')" />
				</xsl:call-template> 
		   </xsl:when> 
		   <xsl:otherwise> 
			  <xsl:value-of select="$src" /> 
		   </xsl:otherwise> 
		</xsl:choose>
	</xsl:template>
just before this line:

Code: Select all

	<xsl:template name="commas_to_br">
This will replace the <br> in the description by a REAL line break! :)
ben__001
Posts: 12
Joined: 2003-03-05 02:49:32

Post by ben__001 »

Is there a way to make a movie go into 2 different categorys?
*Guest* - Frau Holle
Posts: 46
Joined: 2002-12-14 19:24:59

Post by *Guest* - Frau Holle »

@Paramount Jay: Thx a lot!!! It works great! Please tell us, if you've add/change some other things. :)
@Antoine: I've changed the german "Willspo-Template". Tomorrow I will upload this. Can you change it also in the original Template in your next version? That are really important fixes!
@ben__001: Sry, I see no way, if you don't want to see your categories like: "Action, Comedy".
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

*Guest* - Frau Holle wrote: @Antoine: I've changed the german "Willspo-Template". Tomorrow I will upload this. Can you change it also in the original Template in your next version? That are really important fixes!
Sure, I'll probably update the program this week since I have to correct problems with IMDB scripts.
Willspo
Posts: 61
Joined: 2002-08-14 15:50:23

Yes there is Ben

Post by Willspo »

Actually a movie can go into 2 differnet categories. Just separate the categories by /
There is also a script for it somewhere around that automatically reads all the categories from IMDB.


I'm sorry for not posting the update like I said but I really have lot in school right now. :/

/w
Willspo
Posts: 61
Joined: 2002-08-14 15:50:23

mrego it works

Post by Willspo »

mrego http://www.egotripp.com/dvd/ works fine for me.
Maybe your connection is too slow?

/w
Okipa
Posts: 12
Joined: 2003-03-08 17:15:15

Post by Okipa »

Willspo, i need you to change your template...
i don't understand anything about xml...

sorry the topic is in french...

if you want to contact me, i tell you my icq UIN : #69472146

is is the url of the topic :
viewtopic.php?t=518

Thanks...
Post Reply