Post by slade45rpm on May 12, 2023 6:18:54 GMT
Can anyone (Doug?) help ammend the pick of the day entry on the explorer page so that it only will choose an album that have audio files attached?
This is what I have currently in my index.xls
<!-- Pick of the day -->
<xsl:if test="count(database/pickoftheday) = 1">
<table class="index_table" cellspacing="0" cellpadding="0">
<tr>
<td class="index_table_heading">Pick of the day</td>
</tr>
<tr>
<td class="index_table_heading_padding"></td>
</tr>
<tr>
<td>
<table class="index_table2" cellspacing="0" cellpadding="0">
<tr>
<td width="125" valign="top">
<xsl:choose>
<xsl:when test="database/pickoftheday/albumdata/@audioattached='True'">
<a href="PLAYALL:{database/pickoftheday/albumdata/albumid/@unformatted}"><img border="0" width="120" src="{database/pickoftheday/albumdata/image1/filename}"/></a>
</xsl:when>
<xsl:otherwise>
<img border="0" width="120" src="{database/pickoftheday/albumdata/image1/filename}"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td valign="top">
<div style="font-size: medium; font-weight: bold;">
<xsl:call-template name="format-artist">
<xsl:with-param name="artists" select="database/pickoftheday/albumdata/artists"/>
<xsl:with-param name="newline" select="'False'"/>
</xsl:call-template>
</div>
<div style="margin-top: 1px; font-size: medium; font-weight: bold;">
<a href="Album.xsl?ID={database/pickoftheday/albumdata/albumid/@unformatted}">
<xsl:value-of select="database/pickoftheday/albumdata/title"/>
</a>
<xsl:if test="database/pickoftheday/albumdata/@audioattached='True'">
<a href="PLAYALL:{database/pickoftheday/albumdata/albumid/@unformatted}"><img src="PlayAlbum.gif" border="0" style="margin-left: 3px;"/></a>
</xsl:if>
</div>
<div style="margin-top: 5px;">
<xsl:if test="database/pickoftheday/albumdata/released/@year!=''">
<a href="AlbumList.xsl?Released={database/pickoftheday/albumdata/released/@year}@xslparam:doctitle=Released: {database/pickoftheday/albumdata/released/@year}">
<xsl:value-of select="database/pickoftheday/albumdata/released/@year"/>
</a>
</xsl:if>
<xsl:if test="database/pickoftheday/albumdata/format!=''">
<xsl:if test="database/pickoftheday/albumdata/released/@year!=''">
<xsl:text>, </xsl:text>
</xsl:if>
<a href="AlbumList.xsl?Format={database/pickoftheday/albumdata/format}@xslparam:doctitle=Format: {database/pickoftheday/albumdata/format}">
<xsl:value-of select="database/pickoftheday/albumdata/format"/>
</a>
</xsl:if>
<xsl:if test="database/pickoftheday/albumdata/label!=''">
<xsl:text>, </xsl:text>
<a href="AlbumList.xsl?Label={database/pickoftheday/albumdata/label}@xslparam:doctitle=Label: {database/pickoftheday/albumdata/label}">
<xsl:value-of select="database/pickoftheday/albumdata/label"/>
</a>
<xsl:if test="database/pickoftheday/albumdata/catalognumber!=''">
<xsl:text>, </xsl:text>
<xsl:value-of select="database/pickoftheday/albumdata/catalognumber"/>
</xsl:if>
</xsl:if>
</div>
<xsl:if test="count(database/pickoftheday/albumdata/genrelist/genre) > 0">
<div style="margin-top: 3px;">
<xsl:call-template name="format-genre">
<xsl:with-param name="genrelist" select="database/pickoftheday/albumdata/genrelist"/>
<xsl:with-param name="templatefile" select="'AlbumList.xsl'"/>
<xsl:with-param name="newline" select="'False'"/>
</xsl:call-template>
</div>
</xsl:if>
<div style="margin-top: 3px; vertical-align: middle;">
<xsl:if test="database/pickoftheday/albumdata/personalrating/@image!=''">
<a href="AlbumList.xsl?PersonalRating={database/pickoftheday/albumdata/personalrating}@xslparam:doctitle=Rating: {database/pickoftheday/albumdata/personalrating}">
<img src="{database/pickoftheday/albumdata/personalrating/@image}" border="0" style="margin-right:3px;"/>
</a>
</xsl:if>
<a href="CMD:SETRATING:Album,PersonalRating,{database/pickoftheday/albumdata/albumid/@unformatted}">
<img src="SetRating.gif" border="0"/>
</a>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<xsl:apply-templates select="database/pickoftheday/trackdata"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
<!-- Tasks -->
<xsl:if test="general/window='No'">
<table class="index_table" cellspacing="0" cellpadding="0">
<tr>
<td class="index_table_heading">Tasks</td>
</tr>
<tr>
<td class="index_table_heading_padding"></td>
</tr>
<tr>
This is what I have currently in my index.xls
<!-- Pick of the day -->
<xsl:if test="count(database/pickoftheday) = 1">
<table class="index_table" cellspacing="0" cellpadding="0">
<tr>
<td class="index_table_heading">Pick of the day</td>
</tr>
<tr>
<td class="index_table_heading_padding"></td>
</tr>
<tr>
<td>
<table class="index_table2" cellspacing="0" cellpadding="0">
<tr>
<td width="125" valign="top">
<xsl:choose>
<xsl:when test="database/pickoftheday/albumdata/@audioattached='True'">
<a href="PLAYALL:{database/pickoftheday/albumdata/albumid/@unformatted}"><img border="0" width="120" src="{database/pickoftheday/albumdata/image1/filename}"/></a>
</xsl:when>
<xsl:otherwise>
<img border="0" width="120" src="{database/pickoftheday/albumdata/image1/filename}"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td valign="top">
<div style="font-size: medium; font-weight: bold;">
<xsl:call-template name="format-artist">
<xsl:with-param name="artists" select="database/pickoftheday/albumdata/artists"/>
<xsl:with-param name="newline" select="'False'"/>
</xsl:call-template>
</div>
<div style="margin-top: 1px; font-size: medium; font-weight: bold;">
<a href="Album.xsl?ID={database/pickoftheday/albumdata/albumid/@unformatted}">
<xsl:value-of select="database/pickoftheday/albumdata/title"/>
</a>
<xsl:if test="database/pickoftheday/albumdata/@audioattached='True'">
<a href="PLAYALL:{database/pickoftheday/albumdata/albumid/@unformatted}"><img src="PlayAlbum.gif" border="0" style="margin-left: 3px;"/></a>
</xsl:if>
</div>
<div style="margin-top: 5px;">
<xsl:if test="database/pickoftheday/albumdata/released/@year!=''">
<a href="AlbumList.xsl?Released={database/pickoftheday/albumdata/released/@year}@xslparam:doctitle=Released: {database/pickoftheday/albumdata/released/@year}">
<xsl:value-of select="database/pickoftheday/albumdata/released/@year"/>
</a>
</xsl:if>
<xsl:if test="database/pickoftheday/albumdata/format!=''">
<xsl:if test="database/pickoftheday/albumdata/released/@year!=''">
<xsl:text>, </xsl:text>
</xsl:if>
<a href="AlbumList.xsl?Format={database/pickoftheday/albumdata/format}@xslparam:doctitle=Format: {database/pickoftheday/albumdata/format}">
<xsl:value-of select="database/pickoftheday/albumdata/format"/>
</a>
</xsl:if>
<xsl:if test="database/pickoftheday/albumdata/label!=''">
<xsl:text>, </xsl:text>
<a href="AlbumList.xsl?Label={database/pickoftheday/albumdata/label}@xslparam:doctitle=Label: {database/pickoftheday/albumdata/label}">
<xsl:value-of select="database/pickoftheday/albumdata/label"/>
</a>
<xsl:if test="database/pickoftheday/albumdata/catalognumber!=''">
<xsl:text>, </xsl:text>
<xsl:value-of select="database/pickoftheday/albumdata/catalognumber"/>
</xsl:if>
</xsl:if>
</div>
<xsl:if test="count(database/pickoftheday/albumdata/genrelist/genre) > 0">
<div style="margin-top: 3px;">
<xsl:call-template name="format-genre">
<xsl:with-param name="genrelist" select="database/pickoftheday/albumdata/genrelist"/>
<xsl:with-param name="templatefile" select="'AlbumList.xsl'"/>
<xsl:with-param name="newline" select="'False'"/>
</xsl:call-template>
</div>
</xsl:if>
<div style="margin-top: 3px; vertical-align: middle;">
<xsl:if test="database/pickoftheday/albumdata/personalrating/@image!=''">
<a href="AlbumList.xsl?PersonalRating={database/pickoftheday/albumdata/personalrating}@xslparam:doctitle=Rating: {database/pickoftheday/albumdata/personalrating}">
<img src="{database/pickoftheday/albumdata/personalrating/@image}" border="0" style="margin-right:3px;"/>
</a>
</xsl:if>
<a href="CMD:SETRATING:Album,PersonalRating,{database/pickoftheday/albumdata/albumid/@unformatted}">
<img src="SetRating.gif" border="0"/>
</a>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<xsl:apply-templates select="database/pickoftheday/trackdata"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:if>
<!-- Tasks -->
<xsl:if test="general/window='No'">
<table class="index_table" cellspacing="0" cellpadding="0">
<tr>
<td class="index_table_heading">Tasks</td>
</tr>
<tr>
<td class="index_table_heading_padding"></td>
</tr>
<tr>