Due to enormous amounts of spam, the forum has been set to read-only mode.



Reply to topic  [ 7 posts ] 
Catraxx - AlbumBrowse - Open Video Folder Needed 
Author Message

Joined: Mon Mar 03, 2003 11:52 am
Posts: 31
Post Catraxx - AlbumBrowse - Open Video Folder Needed

Hello,

I tried to add some logic to show the folder of attached video files in the AlbumBrowse.xsl template.
I modified the related code for audio file folder below album title (see below).

Code:
          <!-- Title -->
          <TR CLASS="fieldrowprevpane">
            <TD CLASS="fieldnameprevpane" NOWRAP="">
              <xsl:value-of select="/data/fld/album/title/@name"/>         
            </TD>
            <TD CLASS="fieldvalueprevpane" WIDTH="100%">
              <A HREF="Album.xsl" TARGET="_BLANK"><xsl:value-of select="title"/></A>
              <!-- Add play album link -->
              <xsl:if test="@audioattached='True'">
                <xsl:text> </xsl:text>
                <A HREF="PLAYALL:{/data/record/@id}"><IMG SRC="PlayAlbum.gif" BORDER="0"/></A>
                <xsl:text> </xsl:text>
                <A HREF="CMD:GOTOFOLDER:{@audiofolder}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
                <xsl:text> </xsl:text>
                <A HREF="CMD:ADDTOPLAYLIST:Album,{/data/record/@id}"><IMG SRC="AddToPlaylist.gif" BORDER="0"/></A>
              </xsl:if>
              <xsl:if test="@videoattached='True'">
                 <A HREF="CMD:GOTOFOLDER:{@videofolder}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
                <xsl:text> </xsl:text>
              </xsl:if>
            </TD>
          </TR>


But that does not work.
What am I doing wrong ? Is there a simple solution ?

Any help is appreciated. Thanks.

_________________
Kind regards
gs999999

Using Windows XP Professional and CATraxx 9.41


Sat Jul 21, 2012 6:09 pm
Profile
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: Catraxx - AlbumBrowse - Open Video Folder Needed

"@videoattached" and "@videofolder" does not exist.
Therefore it doesn't work.

The name (and folder) can be found on tracklevel under <videosample>.
But you have to manipulate the filename yourself.

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Sun Jul 22, 2012 9:43 am
Profile WWW
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Catraxx - AlbumBrowse - Open Video Folder Needed

gs999999 wrote:
Hello,

I tried to add some logic to show the folder of attached video files in the AlbumBrowse.xsl template.
I modified the related code for audio file folder below album title (see below).

Code:
          <!-- Title -->
          <TR CLASS="fieldrowprevpane">
            <TD CLASS="fieldnameprevpane" NOWRAP="">
              <xsl:value-of select="/data/fld/album/title/@name"/>         
            </TD>
            <TD CLASS="fieldvalueprevpane" WIDTH="100%">
              <A HREF="Album.xsl" TARGET="_BLANK"><xsl:value-of select="title"/></A>
              <!-- Add play album link -->
              <xsl:if test="@audioattached='True'">
                <xsl:text> </xsl:text>
                <A HREF="PLAYALL:{/data/record/@id}"><IMG SRC="PlayAlbum.gif" BORDER="0"/></A>
                <xsl:text> </xsl:text>
                <A HREF="CMD:GOTOFOLDER:{@audiofolder}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
                <xsl:text> </xsl:text>
                <A HREF="CMD:ADDTOPLAYLIST:Album,{/data/record/@id}"><IMG SRC="AddToPlaylist.gif" BORDER="0"/></A>
              </xsl:if>
              <xsl:if test="@videoattached='True'">
                 <A HREF="CMD:GOTOFOLDER:{@videofolder}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
                <xsl:text> </xsl:text>
              </xsl:if>
            </TD>
          </TR>


But that does not work.
What am I doing wrong ? Is there a simple solution ?

Any help is appreciated. Thanks.

Try with this code:

Code:
<xsl:if test="../trackdata/disc/side/track/videosample/filename!=''">
   <A HREF="CMD:GOTOFOLDER:{../trackdata/disc/side/track/videosample/filename}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
  <xsl:text> </xsl:text>
</xsl:if>

_________________
Fredrik Nordbakke
www.fnprg.com


Sun Jul 22, 2012 4:14 pm
Profile WWW
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: Catraxx - AlbumBrowse - Open Video Folder Needed

FredrikN wrote:
Try with this code:

Code:
<xsl:if test="../trackdata/disc/side/track/videosample/filename!=''">
   <A HREF="CMD:GOTOFOLDER:{../trackdata/disc/side/track/videosample/filename}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
  <xsl:text> </xsl:text>
</xsl:if>


I think this code will only work, if the first track in the album has a video attached.
Or am I mistaken?

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Sun Jul 22, 2012 6:32 pm
Profile WWW
Site Admin
User avatar

Joined: Fri Nov 22, 2002 3:52 pm
Posts: 13748
Post Re: Catraxx - AlbumBrowse - Open Video Folder Needed

hamsen wrote:
FredrikN wrote:
Try with this code:

Code:
<xsl:if test="../trackdata/disc/side/track/videosample/filename!=''">
   <A HREF="CMD:GOTOFOLDER:{../trackdata/disc/side/track/videosample/filename}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
  <xsl:text> </xsl:text>
</xsl:if>


I think this code will only work, if the first track in the album has a video attached.
Or am I mistaken?

No, this is correct. This code will use the folder from the first track on the album with a video link:

Code:
<xsl:if test="../trackdata/disc/side/track[videosample/filename!='']/videosample/filename!=''">
   <A HREF="CMD:GOTOFOLDER:{../trackdata/disc/side/track[videosample/filename!='']/videosample/filename}"><IMG SRC="gotofolder.gif" BORDER="0"/></A>
  <xsl:text> </xsl:text>
</xsl:if>

_________________
Fredrik Nordbakke
www.fnprg.com


Mon Jul 23, 2012 8:55 am
Profile WWW

Joined: Mon Mar 03, 2003 11:52 am
Posts: 31
Post Re: Catraxx - AlbumBrowse - Open Video Folder Needed

@ Fredrik
@ Thomas

Thanks for your help.
Both codes work well for me, as I normally have only on video file attached (mpg, avi, mkv)

I'm learning everyday analyzing your little tricks.

_________________
Kind regards
gs999999

Using Windows XP Professional and CATraxx 9.41


Mon Jul 23, 2012 1:08 pm
Profile
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: Catraxx - AlbumBrowse - Open Video Folder Needed

gs999999 wrote:
I'm learning everyday analyzing your little tricks.


If you are interested in expanding this subject, as you can see on the attached image, please let me know.
Attachment:
Capture.PNG


You do not have the required permissions to view the files attached to this post.

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Tue Jul 24, 2012 6:16 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.