Unoffical empeg BBS

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

Topic Options
#99521 - 14/06/2002 14:56 hijack khttpd wish
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
Hi,

I was wondering if it'd be possible to implement a means of having a GET request that defines what XSL template file is used for the XML output of khttpd? I was thinking the easiest would perhaps be adding another config.ini directive like 'khttpd_style_path=/path/to/styles' and then, to use a specific XSL file within that defined directory, make a GET request like /?fid=940&ext=.xml&style=filename.xsl.

Reason being, I'd like to be able to change style sheets on the fly. Plus, I have an idea to add to CharcoalGray99 so that clicking a link for more information on a certain track will popup a window with full track info... length, size, bitrate, sample rate, etc.

Would this be a possibility, Mark?


Thanks,
Aragon

Top
#99522 - 14/06/2002 16:36 Re: hijack khttpd wish [Re: Aragon]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Well, apart from the "master style directory" thingie, can you not do this already using the "&style=xxxxxx" feature of khttpd?

Top
#99523 - 14/06/2002 16:37 Re: hijack khttpd wish [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Or were you suggesting "changing style directories" by editing config.ini and then rebooting, rather than a true "on the fly" capability?

Cheers

Top
#99524 - 14/06/2002 16:40 Re: hijack khttpd wish [Re: mlord]
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
Ah, I wasn't aware of this. How does it work? &style=/full/path/to/style.xsl ?


Thanks,
Aragon

Top
#99525 - 14/06/2002 16:43 Re: hijack khttpd wish [Re: Aragon]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Yeah, I think that's the syntax.

(Keep in mind that being a non-MicroSoft user, I cannot see or test any of this stuff, since everyone's existing XML scripts are MicroSoft-specific).

Cheers

Top
#99526 - 14/06/2002 16:48 Re: hijack khttpd wish [Re: mlord]
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
I just tried it out. It works! Awesome, that's exactly what I had in mind *goes to make more mods to CharcoalGray99*

My idea behind the config.ini directive was to save having to specifiy the full path in the &style variable. But, far from serious. This works perfectly.

Have you considered loading windows via vmware? You really should check this out


Regards,
Aragon

Top
#99527 - 14/06/2002 16:50 Re: hijack khttpd wish [Re: Aragon]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
I have VMWare (since the early betas..), thanks.

I use it for evaluating new versions of Linux distros.

(and yes, I'll confess, I also use it for PhotoShop under win98se).

-ml

Top
#99528 - 14/06/2002 16:51 Re: hijack khttpd wish [Re: Aragon]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Good to hear it works. Chalk another one up to clairvoyance.

Top
#99529 - 14/06/2002 17:39 Re: hijack khttpd wish [Re: mlord]
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
Hi,

Have been playing with what I'm trying to do and am having difficulty. When doing a get on a tune (not a playlist) with &ext=.xml, an m3u playlist is output. Is it possible to change this behaviour so that the XML information of just that tune is output?

Perhaps in the form:

<item stylesheet="/path/to/style.xsl" host="hostname" allow_files="1" allow_commands="1" type="tune" tagfid="tagfid" fid="fid" year="year" options="options" genre="genre" title="title" artist="artist" source="source" comment="comment" length="length" tracknr="tracknr" bitrate="bitrate" samplerate="samplerate" codec="codec" duration="duration" offset="offset"/>

with no other <playlist> or <items> tags.

OR

In the regular format of "<playlist ...> <items> <item> ... </item> </items> </playlist>" but with that single tune being the only <item>.


Thanks,
Aragon

Top
#99530 - 14/06/2002 20:31 Re: hijack khttpd wish [Re: Aragon]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Mmm.. sounds reasonable.

Remind me in a week or so, or send me a patch.

Cheers

Top
#99531 - 11/07/2002 17:55 Re: hijack khttpd wish [Re: mlord]
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
HI Mark,

Here's the very delayed reminder. I think if the feature were added, the former output syntax would be most sensible :

<item stylesheet="/path/to/style.xsl" host="hostname" allow_files="1" allow_commands="1" type="tune" tagfid="tagfid" fid="fid" year="year" options="options" genre="genre" title="title" artist="artist" source="source" comment="comment" length="length" tracknr="tracknr" bitrate="bitrate" samplerate="samplerate" codec="codec" duration="duration" offset="offset"/>


Thanks,
Aragon

Top
#99532 - 28/07/2002 10:14 Re: hijack khttpd wish [Re: Aragon]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Okay, this is in Hijack v286. Note that the request should be formatted for the tags file rather than the .mp3 tune file -- the fid=xxxxx must end in "1".

Cheers

Top
#99533 - 28/07/2002 17:31 Re: hijack khttpd wish [Re: mlord]
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
One minor problem. The single <item> tag needs to be ended with /> to comply with XML standards. Single tags (those without <tag> contents </tag>) must be in the form:

<tag param="value" param="value"/>


Thanks,
Aragon


Top
#99534 - 29/07/2002 15:29 Re: hijack khttpd wish [Re: Aragon]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Thanks, the '/' got lost somehow, it's back in for v287.

Cheers

Top
#99535 - 29/07/2002 16:08 Re: hijack khttpd wish [Re: mlord]
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
Wooohoo, thank you Mark!

Top
#99536 - 30/07/2002 01:27 Re: hijack khttpd wish [Re: Aragon]
frog51
pooh-bah

Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
Aragon, this sounds cool. Could you post your altered html page here? I'd quite like to have this functionality as well, and I'm sure others could use it.

Cheers
_________________________
Rory
MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi
MkII, 240Gb in Mark Lord dock
MkII, 80Gb SSD in dock

Top
#99537 - 30/07/2002 01:59 Re: hijack khttpd wish [Re: frog51]
Aragon
member

Registered: 17/05/2002
Posts: 148
Loc: Cape Town, South Africa
Hi,

I haven't written anything to take advantage of the new feature yet. However, a new version of CharcoalGray99 should be out soon with code that uses it.


Regards,
Aragon

Top