|
Navigation: CATraxx FAQ > Upgrading to the latest version > Version 8.00 > Explorer templates > Manual update |
|
Another options is to install the new templates, and then re-apply your customizations to the standard templates (remember to backup your own templates first!).
If you would like to download the new templates and compare them with your existing templates, download catraxx8_xsl.zip.
To automatically display the new rating images in the explorer you have to replace the call to "format-albumrating" and "format-trackrating".
In Album.xsl, AlbumBrowse.xsl, AlbumBrowse_Right.xsl, AlbumList.xsl, AlbumList_Cover.xsl and AlbumList_Thumbnail.xsl replace
<xsl:call-template name="format-albumrating">
<xsl:with-param name="rating" select="personalrating"/>
</xsl:call-template>
with
<IMG SRC="{personalrating/@image}" BORDER="0"/>
To be able to set the personal rating from the explorer, you must add this code after the code to display the rating image:
<A HREF="CMD:SETRATING:Album,PersonalRating,{albumid/@unformatted}">
<IMG SRC="SetRating.gif" BORDER="0"/>
</A>
For example in AlbumBrowse.xsl:
<!-- Personal Rating -->
<TR CLASS="fieldrowprevpane">
<TD CLASS="fieldnameprevpane" NOWRAP="">
Rating:
</TD>
<TD CLASS="fieldvalueprevpane" WIDTH="100%">
<xsl:if test="personalrating/@image!=''">
<A HREF="AlbumList.xsl?PersonalRating={personalrating}@xmltitle={/data/fld/album/personalrating/@name}: {personalrating}" TARGET="_BLANK">
<IMG SRC="{personalrating/@image}" BORDER="0"/>
</A>
<A HREF="CMD:SETRATING:Album,PersonalRating,{albumid/@unformatted}">
<IMG SRC="SetRating.gif" BORDER="0"/>
</A>
</xsl:if>
</TD>
</TR>
In Album_Tracks.xsl, Track.xsl, TrackBrowse.xsl and TrackBrowse_Right.xsl replace
<xsl:call-template name="format-trackrating">
<xsl:with-param name="rating" select="trackrating"/>
</xsl:call-template>
with
<IMG SRC="{personalrating/@image}" BORDER="0"/>
To be able to set the personal rating from the explorer, you must add this code after the code to display the rating image:
<A HREF="CMD:SETRATING:Track,PersonalRating,{trackid/@unformatted}">
<IMG SRC="SetRating.gif" BORDER="0"/>
</A>
For example in TrackBrowse.xsl:
<!-- Rating -->
<xsl:if test="personalrating/@image!=''">
<TR CLASS="fieldrowprevpane">
<TD CLASS="fieldnameprevpane" NOWRAP="">
Rating:
</TD>
<TD CLASS="fieldvalueprevpane" WIDTH="100%">
<A HREF="TrackList.xsl?PersonalRating={personalrating}@xmltitle={/data/fld/track/personalrating/@name}: {personalrating}" TARGET="_BLANK">
<IMG SRC="{personalrating/@image}" BORDER="0"/>
</A>
<A HREF="CMD:SETRATING:Track,PersonalRating,{trackid/@unformatted}">
<IMG SRC="SetRating.gif" BORDER="0"/>
</A>
</TD>
</TR>
</xsl:if>
In addition, you can delete the "Common-FormatRating.xsl" file, and remove all references ("<xsl:include href="Common-FormatRating.xsl"/>") to this file in the other templates, and finally delete "TrackRating.xsl" and "TrackRatingBrowse.xsl" since they are no longer needed.
You must replace all references to
Artist.xsl
with
ArtistPerson.xsl
and all references to
Person.xsl
with
ArtistPerson.xsl
In the AlbumCredits.xsl, Album_Tracks.xsl and Track_Credits.xsl templates, replace
Person_Album.xsl
with
ArtistPerson_Albums_Credits.xsl
In the Index.xsl template, remove this code:
<B>Persons: </B><xsl:value-of select="recordcount/person"/>
<BR/>
Then replace
<B>Artists: </B><xsl:value-of select="recordcount/artist"/>
with
<B>Artists/Persons: </B><xsl:value-of select="recordcount/artistperson"/>
For the "browse by" links to work, you need to apply the following changes (multiple occurrences):
Replace
Artist.ArtistID
with
ArtistPerson.ArtistPersonID
Replace
Artist.SortBy
with
ArtistPerson.SortBy
Replace
Person.PersonID
with
ArtistPerson.ArtistPersonID
Replace
Person.SortBy
with
ArtistPerson.SortBy
And to display the favorite playlists, insert this code
<xsl:if test="count(favoriteplaylists/playlist) > 0">
<!-- Favorite playlists -->
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="2" BGCOLOR="#000000">
<TR>
<TD CLASS="indexheading3">Favorite playlists</TD>
</TR>
<TR>
<TD CLASS="tablecellbgwhite">
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="1">
<xsl:for-each select="favoriteplaylists/playlist">
<TR>
<TD VALIGN="TOP">
<A HREF="PLAYPLAYLIST:{@id}"><IMG SRC="PlayAlbum.gif" BORDER="0"/></A>
</TD>
<TD WIDTH="100%">
<A HREF="CMD:EDIT:Playlist,{@id}"><B><xsl:value-of select="title"/></B></A>
<xsl:if test="count(artists/artist) > 0">
<xsl:text> (</xsl:text>
<xsl:call-template name="format-artist">
<xsl:with-param name="artists" select="artists"/>
<xsl:with-param name="newline" select="false"/>
<xsl:with-param name="hyperlink" select="false"/>
</xsl:call-template>
<xsl:text>)</xsl:text>
</xsl:if>
</TD>
</TR>
</xsl:for-each>
</TABLE>
</TD>
</TR>
</TABLE>
<BR/>
</xsl:if>
right before "<xsl:if test="count(newrecords/record) > 0">".
To be able to set the genre from the explorer, you must add some code that will call the "SETGENRE" command (right after the code to display the genre).
In Album.xsl, AlbumBrowse.xsl and AlbumBrowse_Right.xsl:
<A HREF="CMD:SETGENRE:Album,Genre,{albumid/@unformatted}">
<IMG SRC="SetGenre.gif" BORDER="0"/>
</A>
In Track.xsl, TrackBrowse.xsl and TrackBrowse_Right.xsl:
<A HREF="CMD:SETGENRE:Track,Genre,{trackid/@unformatted}">
<IMG SRC="SetGenre.gif" BORDER="0"/>
</A>
The following files are no longer needed and can be deleted: Artist.xsl, Artist_Albums.xsl, ArtistBrowse.xsl, Artist_Image1-9.xsl, ArtistList.xsl, Person.xsl, Person_Albums.xsl, Person_Image1-9.xsl, PersonBrowse.xsl and PersonList.xsl.
That's it. Contact support@fnprg.com if you have any questions.