rejetto forum

%item-folder% and %encoded-folder%

0 Members and 1 Guest are viewing this topic.

Offline forthehandyman

  • Occasional poster
  • *
    • Posts: 27
    • View Profile
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



Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
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


Offline forthehandyman

  • Occasional poster
  • *
    • Posts: 27
    • View Profile

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
« Last Edit: November 30, 2007, 05:54:57 PM by forthehandyman »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.


Offline forthehandyman

  • Occasional poster
  • *
    • Posts: 27
    • View Profile
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