Not logged in. · Lost password · Register
Forum: Skins RSS
Xml Skin Beta
Page:  1  2  next 
Keefy #1
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Hi Folks,

Well, thanks to Henry's new betas for BrowseAmp, we now have XML control. I present to you the first skin based on this. You'll proabably need I.E. > 5 to view it, cross browser compatiability is a while away.

Install the skin as normal, but you must go to the XML/Client/index.html file and edit it manually to set the server IP and port addresses in the "server" variable. In the final, there will be a GUI to do this, and the value will be stored in a cookie. Don't forget to activate the skin in BrowseAmp as well!

You can see what it does by using it in the normal BrowseAmp way. However, what is unique is that you can copy the files in the Client directory to any system, and you can use it normally from there. Minimal bandwidth is the key, see the readme.txt file for details on how to see what the XML messages look like. BrowseAmp commands are executed as normal.

Feedback is always welcome, as are offers to come up with a better interface. I'm a programmer, not a web designer!

What do you all think of the speed? No page refreshes are required anywhere.
The author has attached one file to this post:
XML.zip 17.7 kBytes
You have no permission to open this file.
Keefy #2
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Oops, should have mentioned that you'll need the BrowseAmp 2.0 beta 2 for this, it's available in the main forum.
Avatar
Saxtus (Administrator) #3
Member since Jan 2003 · 147 posts · Location: Athens, Greece
Group memberships: Administrators, Members
Show profile · Link to this post
It works but I don't see the current song counter.
I get this error (I use MSIE 6.0.2800.1106):

Line: 155
Char: 4
Error: 'RESULTS' is undefined
Code: 0
URL: http://127.0.0.1:1214/Client/index.html


I've edit the line at Client/index.html as follow:
server = "http://127.0.0.1:1214";

Users! Be cureful when you editing the server line that 127.0.0.1 & localhost isn't the same!
Saxtus
Avatar
Henry (Administrator) #4
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I also get this error!

Another problem: large playlists(I tried 700 tracks) are not displayed. The playlist stays empty.


Good work so far!

 :smart: <- this one is for you!
Keefy #5
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Cheers guys. The RESULTS object is a span in the HTML file that I use for logging to the screen etc. Pretty handy as I don't have a Javascript debugger, so it's the only way to use watches on the variables for me. Anything added in log(myString); will get printed there.

If you uncomment the tag <span id="RESULTS> </span>, this will recreate the area and the errors should go away. I commented it out in the beta, but I must have left a bit behind that referenced it.

Henry, I'll look into the large playlist problem. I hope I'm not pushing IE a bit too much...maybe a java applet client might be the way to go. Bit more complicated though, I'd rather have it as Javascript if possible.
Keefy #6
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Henry, I can't repeat the large playlist error, I've successfully tried it with over 1000 entries. The attached playlist will allow anyone who wants to confirm this works for them as well.

It may be an invalid character in the display. I've found three characters that cause a problem so far; if either of these is in a URL or filename, then they will cause the problem you see.

The three are the degrees symbol, and both of the quotation marks " and '

Is there anyway to escape these in the output from BrowseAmp, like is already done in the the URL encoded paths with spaces etc? I think the problem is that they aren't valid XML, but I've not looked into it yet.
The author has attached one file to this post:
long_playlist.zip 2.5 kBytes
You have no permission to open this file.
Avatar
Henry (Administrator) #7
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Yes, that is the character problem ("Alizée").
I also found that you cannot add a file from the browser window that contains such a bad character.

I'll check that!
Avatar
Henry (Administrator) #8
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I have added two new tags:
<#playlist_enc_songtitle>
<#enc_songtitle>


and build a new gen_brow2.dll (unrar to %winampdir%\plugins) for your testing purposes!
I have modified your XML files to test it and now it displays all my songs w/o problems.


Now it's on you to decode the strings!  :-D
The author has attached one file to this post:
gen_brow2.rar 274.9 kBytes
You have no permission to open this file.
Keefy #9
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Cool, I can now display the file names, thanls, although they'll be URL encoded as you point out. When I'm running the XSL transforms, the output is actually put in a string, so all I need to do is to run a javascript translation on this. I'll leave that til later though!

I'll need a similar trick done on the Browser tags as well, if possible, as well as the current track name. Basically, any tag that could possibly contain that kind of data. Perhaps a secondary option for the tag, e.g. <#SongTitle urlsafe=yes> kind of idea would make this both easier to implement, as well as work with?

Are the problems unique to my XML stuff, or is it a generic problem here? If it's an XML only thing, it's probably a given that this should be done on every string used here. Pandora's box here...   :unsure:

In another post, you mentioned how the "play now if not already playing" thing works...can you remember which post it was in? I've spent the last while trying to find it here, including a few searches, but I can't find it at all!
Keefy #10
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Had a look, Javascript has an "unescape(string)" function to do exactly what I need here! That was pretty easy!! However, the spaces are still shown as + symbols, I take it they aren't %20 then? Any possibility of doing that instead?
Avatar
Henry (Administrator) #11
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It's only a problem with the XSL stuff. The browser has no problems with the special chars.
I think an additional parameter would be the best way for everyone. I'm on it!

In another post, you mentioned how the "play now if not already playing" thing works...
I didn't mention how it works in a thread before, I guess. Only a request for that feature can be found here. Detailed info in the BrowseAmp help. Anyway it does exactly what it sounds like... :)


I'll check the spaces problem...
Avatar
Henry (Administrator) #12
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I have worked out the following code snippet (thanks to Dreamweaver  :-D ). I think that's what you need!

  <script language="JavaScript" type="text/JavaScript">
function htmlUnencodeString (inputString)
{
  return unescape(inputString);
}

function replaceCharacters(conversionString,inChar,outChar)
{
  var convertedString = conversionString.split(inChar);
  convertedString = convertedString.join(outChar);
  return convertedString;
}

// example decoding
 document.write(replaceCharacters(htmlUnencodeString("aha+%2D+You%27ll+Never+Get+Over+Me"),'+',' '));
  </script>
Keefy #13
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Perfect, cheers! I'll need to check out that Dreamweaver sometime!! I'm still writing HTML in vi & notepad!!  ;)

My final function was:

function decodeString(conversionString)
{
    var convertedString = unescape(conversionString).split("+");
    convertedString = convertedString.join(" ");
    return convertedString;
 }

so, should any other conversions be required, I can just drop them in here.
Avatar
Henry (Administrator) #14
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I've just added URL encoding functionality to all tags!
I think you may need this feature so I attached a new gen_brow2.dll just for you.  :smart:

here is the description:

URL encode a tag
<#tagname urlencoded=true>

Most XML parser really hate special characters. So you can URL-encode every tag. Just add this parameter to the html-tag.
You don't need to set its value to "true". Just don't leave it blank.

Examples
<#CurrentBrowserDirectory urlencoded=true>
<#CurrentBrowserDirectory urlencoded=1>
<#CurrentBrowserDirectory urlencoded=yes>
<#CurrentBrowserDirectory urlencoded=yeah>


does always the same ;-)
The author has attached one file to this post:
gen_brow2.rar 274.9 kBytes
You have no permission to open this file.
Keefy #15
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Great work, thanks!!

I'm now much closer to having something that you guys can have a play with. I'm a bit busy on other things right now (work work work), but I'll try and check it out later tonight, or some point over the weekend. Hopefully I'll have something presentable quite soon.

PS, are you going to depreciate <#playlist_enc_songtitle> and <#enc_songtitle> now? Essentially, this new functionality makes them obselete.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next 
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 210.6 ms (124.1 ms) · 109 database queries in 86.6 ms
Current time: 2018-07-17, 09:40:26 (UTC +00:00)