|
Navigation: CATVids FAQ > Upgrading to the latest version > Version 8 > Explorer templates > Manual update |
|
Another option 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 catvids8_xsl.zip.
To automatically display the new rating images in the explorer you have to replace the call to "format-personalrating".
In Contents.xsl, ContentsBrowse.xsl, ContentsBrowse_Right.xsl, ContentsList.xsl, ContentsList_Award.xsl, ContentsList_Nomination.xsl, ContentsList_Series.xsl, Person_Credits.xsl, Video_Contents.xsl, VideoBrowse.xsl and VideoBrowse_Right.xsl replace:
<xsl:call-template name="format-personalrating">
<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:Contents,PersonalRating,{contentsid/@unformatted}">
<IMG SRC="SetRating.gif" BORDER="0"/>
</A>
For example in Contents.xsl:
<!-- FIELD: Personal Rating -->
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/contents/personalrating/@name"/></TD>
<TD CLASS="fieldvalue">
<xsl:if test="personalrating/@image!=''">
<A HREF="ContentsList.xsl?PersonalRating={personalrating}@xmltitle={/data/fld/contents/personalrating/@name}: {personalrating}" TARGET="_BLANK">
<IMG SRC="{personalrating/@image}" BORDER="0"/>
</A>
<A HREF="CMD:SETRATING:Contents,PersonalRating,{contentsid/@unformatted}">
<IMG SRC="SetRating.gif" BORDER="0"/>
</A>
</xsl:if>
</TD>
</TR
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.
You must remove all references to the Category and Sub-Category fields, and instead add code to display the new Genre field.
First, delete these 4 template files: Category.xsl, Category_Browse.xsl, SubCategory.xsl and SubCategory_Browse.xsl.
In the Video.xsl template, remove this code:
<!-- FIELD: Category -->
<xsl:if test="category!=''">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/video/category/@name"/></TD>
<TD CLASS="fieldvalue">
<A HREF="VideoList.xsl?Category={category}@xmltitle={/data/fld/video/category/@name}: {category}">
<xsl:value-of select="category"/>
</A>
</TD>
</TR>
</xsl:if>
<!-- FIELD: Sub-Category -->
<xsl:if test="subcategory!=''">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/video/subcategory/@name"/></TD>
<TD CLASS="fieldvalue">
<A HREF="VideoList.xsl?SubCategory={subcategory}@xmltitle={/data/fld/video/subcategory/@name}: {subcategory}">
<xsl:value-of select="subcategory"/>
</A>
</TD>
</TR>
</xsl:if>
In Contents.xsl, replace this code:
<!-- FIELD: Category -->
<xsl:if test="category!=''">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/contents/category/@name"/></TD>
<TD CLASS="fieldvalue">
<A HREF="ContentsList.xsl?Category={category}@xmltitle={/data/fld/contents/category/@name}: {category}">
<xsl:value-of select="category"/>
</A>
</TD>
</TR>
</xsl:if>
<!-- FIELD: Sub-Category -->
<xsl:if test="subcategory!=''">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/contents/subcategory/@name"/></TD>
<TD CLASS="fieldvalue">
<A HREF="ContentsList.xsl?SubCategory={subcategory}@xmltitle={/data/fld/contents/subcategory/@name}: {subcategory}">
<xsl:value-of select="subcategory"/>
</A>
</TD>
</TR>
</xsl:if>
with
<!-- FIELD: Genre -->
<xsl:if test="count(genrelist/genre)>0">
<TR CLASS="fieldrow">
<TD CLASS="fieldname" NOWRAP=""><xsl:value-of select="/data/fld/contents/genre/@name"/></TD>
<TD CLASS="fieldvalue">
<xsl:call-template name="format-genre">
<xsl:with-param name="genrelist" select="genrelist"/>
<xsl:with-param name="newline" select="'False'"/>
<xsl:with-param name="separator1" select="'; '"/>
<xsl:with-param name="separator2" select="'; '"/>
</xsl:call-template>
</TD>
</TR>
</xsl:if>
In ContentsBrowse.xsl, replace
<!-- Category/SubCategory -->
<xsl:if test="category!=''">
<TR CLASS="fieldrowprevpane">
<TD CLASS="fieldnameprevpane" NOWRAP="">
<xsl:value-of select="/data/fld/contents/category/@name"/>:
</TD>
<TD CLASS="fieldvalueprevpane" WIDTH="100%">
<A HREF="ContentsList.xsl?Category={category}@xmltitle=Category: {category}" TARGET="_BLANK"><xsl:value-of select="category"/></A>
<xsl:if test="subcategory!=''">
<xsl:text> / </xsl:text>
<A HREF="ContentsList.xsl?SubCategory={subcategory}@xmltitle=Sub-Category: {subcategory}" TARGET="_BLANK"><xsl:value-of select="subcategory"/></A> </xsl:if>
</TD>
</TR>
</xsl:if>
with
<!-- Genre -->
<xsl:if test="count(genrelist/genre)>0">
<TR CLASS="fieldrowprevpane">
<TD CLASS="fieldnameprevpane" NOWRAP="">
<xsl:value-of select="/data/fld/contents/genre/@name"/>:
</TD>
<TD CLASS="fieldvalueprevpane" WIDTH="100%">
<xsl:call-template name="format-genre">
<xsl:with-param name="genrelist" select="genrelist"/>
<xsl:with-param name="newwindow" select="'True'"/>
<xsl:with-param name="newline" select="'False'"/>
<xsl:with-param name="separator1" select="'; '"/>
<xsl:with-param name="separator2" select="'; '"/>
</xsl:call-template>
</TD>
</TR>
</xsl:if>
In ContentsBrowse_Right.xsl, replace
<!-- Category/SubCategory -->
<xsl:if test="category!=''">
<TR CLASS="fieldrowprevpane_v">
<TD CLASS="fieldnameprevpane_v" NOWRAP="">
<xsl:value-of select="/data/fld/contents/category/@name"/>:
</TD>
<TD CLASS="fieldvalueprevpane_v" WIDTH="100%">
<A HREF="ContentsList.xsl?Category={category}@xmltitle=Category: {category}" TARGET="_BLANK"><xsl:value-of select="category"/></A>
<xsl:if test="subcategory!=''">
<xsl:text> / </xsl:text>
<A HREF="ContentsList.xsl?SubCategory={subcategory}@xmltitle=Sub-Category: {subcategory}" TARGET="_BLANK"><xsl:value-of select="subcategory"/></A>
</xsl:if>
</TD>
</TR>
</xsl:if>
with
<!-- Genre -->
<xsl:if test="count(genrelist/genre)>0">
<TR CLASS="fieldrowprevpane_v">
<TD CLASS="fieldnameprevpane_v" NOWRAP="">
<xsl:value-of select="/data/fld/contents/genre/@name"/>:
</TD>
<TD CLASS="fieldvalueprevpane_v" WIDTH="100%">
<xsl:call-template name="format-genre">
<xsl:with-param name="genrelist" select="genrelist"/>
<xsl:with-param name="newwindow" select="'True'"/>
<xsl:with-param name="newline" select="'True'"/>
<xsl:with-param name="separator1" select="'; '"/>
<xsl:with-param name="separator2" select="'; '"/>
</xsl:call-template>
</TD>
</TR>
</xsl:if>
Update all code to display the certification (previously rating) in Contents.xsl, ContentsBrowse.xsl, ContentsBrowse_Right.xsl, VideoBrowse.xsl and VideoBrowse_Right.xsl:
Replace
count(ratings/rating)
with
count(certificationlist/certification)
Replace
rating/@name
with
certification/@name
And replace
<xsl:call-template name="format-rating">
<xsl:with-param name="ratings" select="ratings"/>
</xsl:call-template>
with
<xsl:call-template name="format-certification">
<xsl:with-param name="certificationlist" select="certificationlist"/>
</xsl:call-template>
Update code to display the aspect ratio: Contents.xsl, ContentsBrowse.xsl, ContentsBrowse_Right.xsl, ContentsList.xsl, ContentsList_Award.xsl, ContentsList_Nomination.xsl, ContentsList_Series.xsl, Video_Contents.xsl, VideoBrowse.xsl and VideoBrowse.xsl:
Replace
<xsl:if test="count(aspectratiolist/aspectratio)>0">
with
<xsl:if test="aspectratio!=''">
and replace
<xsl:call-template name="format-aspectratio">
<xsl:with-param name="aspectratiolist" select="aspectratiolist"/>
</xsl:call-template>
with
<A HREF="ContentsList.xsl?AspectRatio={aspectratio}@xmltitle={/data/fld/contents/aspectratio/@name}: {aspectratio}">
<xsl:value-of select="aspectratio"/>
</A>
That's it. Contact support@fnprg.com if you have any questions.