rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: forthehandyman on November 29, 2007, 04:46:08 PM

Title: %item-folder% and %encoded-folder%
Post by: forthehandyman on November 29, 2007, 04:46:08 PM
I have been experiencing something different in build 146 while using Live 2.

I have vars set up for fileurl="%item-url%", folderpath="%item-folder%", and filename="%item-name%" in the template.

In filetypes.js, under case'.mp3', I have the href value set to href="mms://someipaddress'+folderpath+filename+'".

I know there are issues with mms://, but in all previous builds, this href worked perfectly for me.  However, in build 146, when you are in the folder containing the file, this href only returns the ip address and the filename (mms://1.2.3.4somefile.mp3), but if I do a search for "mp3", this href returns the ip address, folderpath, and the filename (mms://1.2.3.4/some folder/some file.mp3).

What's even more confusing to me is that if I replace %item-folder% in the var with %encoded-folder%, the opposite occurs.  In build 146, when you are in the folder containing the file, this href returns the ip address, folderpath, and filename(mms://1.2.3.4/some folder/some file.mp3), but if I do a search for "mp3", this href returns only the ip address and filename (mms://1.2.3.4some file.mp3).

Like I said, this worked perfectly in all builds prior to 146, but it does not work now.  This is just one example of this.  Even if you change mms:// in the above examples to http://, I still get the same results.  I have some href's set up this way because I use an alternate ip address for certain files and filetypes, so I need to specify the links as such.

If this is a bug, then I'm reporting it here.  If it is not a bug, but a problem with the code in Live 2, does anyone have any idea how to fix this?

JEFF

Title: Re: %item-folder% and %encoded-folder%
Post by: Mars on November 29, 2007, 08:11:46 PM
Quote
In filetypes.js, under case'.mp3', I have the href value set to href="mms://someipaddress'+folderpath+filename+'".

href="mms://someipaddress'+folderpath+filename'".

href="mms://someipaddress/"+folderpath+"/"+filename
Title: Re: %item-folder% and %encoded-folder%
Post by: forthehandyman on November 30, 2007, 08:25:53 AM

href="mms://someipaddress'+folderpath+filename'".

href="mms://someipaddress/"+folderpath+"/"+filename

Neither of these worked.  Any other ideas or suggestions?  Is this a new bug introduced in build 146, or do you think it is something in the template code?

JEFF
Title: Re: %item-folder% and %encoded-folder%
Post by: rejetto on November 30, 2007, 04:26:22 PM
consider that %encode-folder% will report just the folder where the search was done, that in most cases is just "/".
that's why i introduced %item-folder%, and you are supposed to use it.
yes, there's a bug in #146, it will work perfectly in #147.
Title: Re: %item-folder% and %encoded-folder%
Post by: forthehandyman on November 30, 2007, 06:43:19 PM
consider that %encode-folder% will report just the folder where the search was done, that in most cases is just "/".
that's why i introduced %item-folder%, and you are supposed to use it.
yes, there's a bug in #146, it will work perfectly in #147.
Thanks Rejetto, that's the way I thought it was supposed to work, but I've been dealing with so many other issues with the Live 2 template, I wasn't sure.

JEFF