Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#74337 - 23/02/2002 14:29 A cool (?) idea for hosting stylesheets
crocklobster
member

Registered: 19/12/2001
Posts: 108
Hi all. Glad to see we're busting out some very cool stylesheets already. I have an idea for hosting them so people can see the work of others. I have a prototype working on my system right now, let me know what you think of this...

People submit stylesheets to a web server, and they get hosted there.
Anyone that wanted to use this system, puts one file on their empeg, it's an index.html that contains two iframes. One iframe goes to an asp page that lists links to all stylesheets available on the hosting server. The other iframe is where the last selected stylesheet is applied to the xml.

When I was testing this in IE 5, I noticed that I had to change a security setting. I normally keep my security level at Medium. I had to either change it to Low, or (my preferred solution) use a custom security level, where I used Medium as a starting point and changed one option. "Access Data Sources Across Domains" under Miscellaneous. I changed that to "Enable" Medium has it at "Disable", medium-low has it at "Prompt". If you don't do this (or the equivalent in your browser), the stylesheet won't be applied to the xml, because you're getting the xml from one machine and asking for the stylesheet from another machine.

Note that this is mainly an idea for testing stylesheets and seeing if you like them, if you do, you should download the stylesheet and put in on your empeg.

Also, to make this work (or, even to test out stylesheets on your own empeg), the Playlist navigation links should be written like this (or similar)...

<td>
<xsl:choose>
<xsl:when test="(type[.='tune']) and (/playlist/@allow_files[.='1'])">
<a>
<xsl:attribute name="href"><xsl:value-of select="fid"/></xsl:attribute>
<xsl:value-of select="title"/>
</a>
</xsl:when>
<xsl:when test="type[.='tune']">
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<a>
<xsl:choose>
<xsl:when test="/playlist/@stylesheet[.='/default.xsl']">
<xsl:attribute name="href"><xsl:value-of select="tagfid"/>?.xml</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href"><xsl:value-of select="tagfid"/>?STYLE=<xsl:value-of select="/playlist/@stylesheet"/>.xml</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="title"/>
</a>
</xsl:otherwise>
</xsl:choose>
</td>

This is to make sure the link to all the other playlists on your machine continue to use the custom stylesheet you've selected. You can see what's happening in the nested <xsl:otherwise>

I have one more thing to work through before this can go primetime though... I'm not sure how to alter the ?SERIAL links to continue to accept the custom stylesheet. Has anyone done this yet? I'll have to test it, or contact Mark to see what the format is with ?SERIAL and ?STYLE...

So, let me know what you think of this. It's an idea so everyone can quickly take a look at other people's navigation work. By the way, this is what it looks like right now.



Chris

Top
#74338 - 23/02/2002 14:45 Re: A cool (?) idea for hosting stylesheets [Re: crocklobster]
crazymelki
enthusiast

Registered: 16/02/2001
Posts: 373
Loc: Switzerland
Hello Chris,

This is what I was looking for today... And I am sure there is also a way to put more than one stylesheet to the empeg!

bye
_________________________
crazymelki.com

Top
#74339 - 23/02/2002 16:59 Re: A cool (?) idea for hosting stylesheets [Re: crocklobster]
muzza
Pooh-Bah

Registered: 21/07/1999
Posts: 1765
Loc: Brisbane, Queensland, Australi...
If the style sheets were being hosted, could there be a preview function within the site. A graphic preview of the style is presented and you have an option to preview it with a dummy set of data you can then download it as you wish.
_________________________
-- Murray I What part of 'no' don't you understand? Is it the 'N', or the 'Zero'?

Top
#74340 - 24/02/2002 00:20 Re: A cool (?) idea for hosting stylesheets [Re: muzza]
crocklobster
member

Registered: 19/12/2001
Posts: 108
I don't see why not. Or at least some kind of textual description. Thing is, the idea is that this would make it trivial to just go ahead and try a stylesheet. No downloading before trying. You could just click on a link and see _your_ playlists in the particular stylesheet. If you liked it, then you could download it for normal use on your player. We wouldn't need any dummy data, the preview could be an actual view of your data.

I'll try to get this ?SERIAL thing nailed down and post a link and instructions tomorrow (well, technically later today).

Chris

Top