Page 2 of 11

Posted: 2002-12-23 16:36:35
by Willspo
It's a good idea aCCuReRaS. I might do a version with individual templates later.

An even better aproach for the Internet though would be to move the xslt-transformations (javascript) to the server side. That way you would would'nt need hundreds of xml files and the page would still only load as much data as it displays. And also you could make it work on Netscape and other browsers by just modifying the stylesheets. It would not be so much work because most of the code can be reused (at least on IIS).

Anyways I will not make any updates for at least 2 weeks. :cool:

/w

Posted: 2002-12-24 05:03:34
by jan_hut
first of all I love this template! modified it a bit to my personal taste and it looks fabulous! The only thing really wanted to change was the inablity of using linebreaks in description.

Sometimes I have added a boxset to my catalog as being 1 item and I would like to be able to make a list what is on what CD. Somewhat like this:
Description:
All Season episodes of Blackadder
Season 1 (3 CD's)
The Foretelling, Born to be King
The archbishop
The queen of Spain's beard
The Witchsmeller Pursuivant
The Black Seal

I'm no XML wizard but looking at transform.xml got me a bit further. I added a similar template as commas_to_br and it looks like this:
<xsl:template name="puntcommas_to_br">
<xsl:param name="src" />
<xsl:if test="contains($src, ';')">
<xsl:value-of select="substring-before($src, ';')" />
<br />
<xsl:call-template name="puntcommas_to_br">
<xsl:with-param name="src" select="substring-after($src, ';')" />
</xsl:call-template>
</xsl:if>
</xsl:template>
It's displayed by using this:
<p class="infoView">
<b>Description:</b><br />
<xsl:call-template name="puntcommas_to_br">
<xsl:with-param name="src" select="description" />
</xsl:call-template>
</p>
Very similar to the commas_to_br template. And better yet, it works. My only problem is that though this works just fine. Descriptions for all other movies are not displayed at all! Anyone have any idea why?[/quote]

Posted: 2002-12-25 01:02:52
by aCCuReRaS
An even better aproach for the Internet though would be to move the xslt-transformations (javascript) to the server side. That way you would would'nt need hundreds of xml files and the page would still only load as much data as it displays. And also you could make it work on Netscape and other browsers by just modifying the stylesheets. It would not be so much work because most of the code can be reused (at least on IIS).
and how should I do this?

Posted: 2003-01-01 01:21:43
by jan_hut
as ANT exports linebreaks as <b> would it be possible to make it like this:

[quote]<xsl:template name="<br>_to_br">
<xsl:param name="src" />
<xsl:if test="contains($src, '<br>')">
<xsl:value-of select="substring-before($src, '<br>')" />
<br />
<xsl:call-template name="<br>_to_br">
<xsl:with-param name="src" select="substring-after($src, '<br>')" />
</xsl:call-template>
</xsl:if>
</xsl:template>[/quote]

Since I know nothinbg about xml and xsl does $src need to be 1 character?

Posted: 2003-01-01 18:12:38
by Willspo
You want to change <br> to <br /> right?
It looks ok but i don't think that you can have <> symbols int the template name.

$src is just a variable that i made up and it can contain as many characters as you want. When you call the template you write:

Code: Select all

<xsl:call-template name="<br>_to_br"> 
<xsl:with-param name="src" select="substring-after($src, '<br>')" /> 
</xsl:call-template>
That is go to the template with the parameter src as select="substring-after($src, '<br>')" = a substring of src after the first <br>.

Since you have an if statement in the beginning (checkin if src contains <br>) you probably want an else statement also so that descriptions that don't contains <br> will be displayed as well. To do this in xsl you have to change it to:

Code: Select all

<xsl:choose>
   <xsl:when test="contains($src, '<br>')">
       your code
   </xsl:when>
   <xsl:otherwise>
      <xsl:value-of select="$src" />
   </xsl:otherwise>
</xsl:choose>
/w

Posted: 2003-01-01 18:19:11
by antp
Willspo wrote:You want to change <br> to <br /> right?
There is an option for that in AMC : Tools -> Preferences -> Export, there is a field where you can enter something else than <br> as separator.

Posted: 2003-01-01 18:22:34
by Willspo
Sounds like a better idea :lol:

Posted: 2003-01-02 19:16:50
by notebook
Looks WONDERFULL :-)))))

ist there any chance to run under opera ??

i dont like IE.xx :(

Posted: 2003-01-03 02:50:05
by *Guest* - Frau Holle
I get your point. I love Opera. But in Version 6.05 there is no way. This version doesn't support xml. But Opera 7.0 should be support XML. I've tested the Opera 7.0 beta. But it doesn't function. Maybe it works with the final. I hope so.

Posted: 2003-01-03 09:51:45
by Willspo
I LOVE IE! :hihi: and I don't have the time to make the template work with anything else.

:fish: /w

Posted: 2003-01-03 17:17:38
by *Guest* - Frau Holle
Look at http://www.opera.com/whyopera/ why we love Opera. The most important thing is that IE is so fucking slow.

Hmm, time. I've got an idea: I can answer the questions about your template, then you don't have to look in this forum and you have more time for programming. Okay one disadvantage is, that because of my answers, in one month you are the most hated person all over the net. But that is no problem for me :) How do you feel about this nice idea? :)

Posted: 2003-01-03 17:30:04
by antp
Please do not start a brower war, it is always and endless discussion since everbody has different preferences.

PS: we all know that Mozilla & Opera are better than IE :hihi:

Posted: 2003-01-05 13:45:54
by kojiro
est ce que quelqu'un pourrait m'expliquer en français comment installer ce templates.
parce que j'y arrive pas en anglais :/
merci beaucoup

Posted: 2003-01-05 13:51:19
by antp
kojiro wrote:est ce que quelqu'un pourrait m'expliquer en français comment installer ce templates.
parce que j'y arrive pas en anglais :/
merci beaucoup
Crée plutôt un nouveau sujet pour ça, pour ne pas encombrer celui-ci ;)

Posted: 2003-01-08 21:51:36
by jan_hut
Hi ant...unfortunately that does not work (bug??).
"Line breaks will be automatically converted to:"
is what you meant right? I can change this to <br /> but if I click ok and go back into preferences it's set back to <br>.

Using version 3.4.1

gonna try willspo's suggestion for now :)

Posted: 2003-01-08 22:15:05
by Jev
Very nice template

I tried it works great but I have couple of movies in Russian
for some reason your template does not support Russian at all.
Do you have any idea what needs to be done to enable this support ?

thank you

Jev

Posted: 2003-01-09 04:54:02
by jan_hut
hmmm getting a stylesheet error? weird

Posted: 2003-01-09 09:00:56
by antp
I think that for that you have to change all the "encoding" values (xml header, html meta tags, etc.)

Posted: 2003-01-09 16:13:17
by Guest
hello @all

english (bad english :o)
can a have a step by step guide for the template ...
i understand the readme.txt ...
i want to use it .. but i can`t

german
kann mir bitte jemand mal erklären wie ich das template benutze .. mit der readme.txt komme ich irgendwie nicht klar :o(

mfg
ich

Posted: 2003-01-10 18:54:17
by RedScorpion
Same story -- quite a few movies in Russian.
Very nice template

I tried it works great but I have couple of movies in Russian
for some reason your template does not support Russian at all.
Do you have any idea what needs to be done to enable this support ?

thank you

Jev
An easy work-around. Open your XML template that you use to export the DB to movies.xml -- at the top change the encoding to this

Code: Select all

<?xml version="1.0" encoding="windows-1251" ?>
that should take care of it. You don't have to change anything else.