New Template
-
- Posts: 46
- Joined: 2002-12-14 19:24:59
Okay your template must be something, like this:
Try it.
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>
-
- Posts: 46
- Joined: 2002-12-14 19:24:59
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.
-
- Posts: 46
- Joined: 2002-12-14 19:24:59
Sure it can be done.
1. Step: At first you have to add thr information in your template.
f.e.:
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:
1. Step: At first you have to add thr information in your template.
f.e.:
Code: Select all
<size>$$ITEM_SIZE</size>
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" />
didnt work
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
-
- Posts: 46
- Joined: 2002-12-14 19:24:59
Yes, you're right! I've forgotten to change the Tag. Please change in your transform.xml:
TO
Code: Select all
<b>Size:</b> <xsl:value-of select="bigness" /> MB
<br class="infoViewTable" />
Code: Select all
<b>Size:</b> <xsl:value-of select="size" /> MB
<br class="infoViewTable" />
won't work online???
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
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
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):
Ok, let's talk now about the famous html line break! To make it visible in your page replace
by
and add this
just before this line:
This will replace the <br> in the description by a REAL line break!
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>
Code: Select all
<xsl:value-of select="description" />
Code: Select all
<xsl:call-template name="html_br">
<xsl:with-param name="src" select="description" />
</xsl:call-template>
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>
Code: Select all
<xsl:template name="commas_to_br">
-
- Posts: 46
- Joined: 2002-12-14 19:24:59
@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".
@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".
Sure, I'll probably update the program this week since I have to correct problems with IMDB scripts.*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!
Yes there is Ben
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
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, 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...
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...