PDA

View Full Version : Plugin html files location in 7.0



GoCubs
2007-03-23, 09:54
I'm trying to migrate a plugin from 6.5 to 7.0 that has a custom index.html file for access to it via the Internet Radio menu.

For some reason I keep getting:
404 Not Found: plugins/SiriusRadio/index.html

I don't have any non-included 7.0 plugins that have a custom index to use as an example and I've checked the 7.0 wiki and searched the forums for any clues. The 7.0 plugins included with SS appear to be using \Slim\Plugin\pluginname\HTML\EN but I doubt plugin developers should be polluting any folders outside of their \plugins\pluginname folders.

In 6.5 I had:
Plugins\pluginname\HTML\EN\plugins\pluginname\inde x.html

In 7.0 this doesnt work.
The new settings html in 7.0 is located at:
Plugins\pluginname\HTML\EN\plugins\pluginname\sett ings\basic.html
which works fine...

Any help would be greatly appreciated. I've tried putting the index.html in countless places with no luck.

-Greg

mherger
2007-03-23, 10:14
> For some reason I keep getting:
> 404 Not Found: plugins/SiriusRadio/index.html

This is not a problem of templates not being found, but of a page not
registered in SlimServer. Do you have a webPages sub or do you add the
pages manually in init()?

--

Michael

-----------------------------------------------------------------
http://www.herger.net/SlimCD - your SlimServer on a CD
http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR

GoCubs
2007-03-23, 10:44
> For some reason I keep getting:
> 404 Not Found: plugins/SiriusRadio/index.html

This is not a problem of templates not being found, but of a page not
registered in SlimServer. Do you have a webPages sub or do you add the
pages manually in init()?

Michael-

Thanks for the quick reply. I have a webPages sub. In there I do a:
Slim::Web::Pages->addPageLinks('radio', { 'PLUGIN_SIRIUSRADIO' => 'plugins/SiriusRadio/index.html' });

I'm guessing I also need something like:
Slim::Web::HTTP::addPageFunction("plugins/SiriusRadio/index.html", \&Plugins::SiriusRadio::Plugin::handleIndex);

I tried adding that, and now I get 3 not founds:
plugins/SiriusRadio/home.html
plugins/SiriusRadio/status_header.html
plugins/SiriusRadio/playlist.html

Not sure if that helped or what... :)
Is this stuff a new requirement in 7.0? Is it documented/mentioned at all anywhere?

Thanks again for your help.

-Greg

mherger
2007-03-23, 10:58
> Thanks for the quick reply. I have a webPages sub. In there I do a:
> Slim::Web::Pages->addPageLinks('radio', { 'PLUGIN_SIRIUSRADIO' =>
> 'plugins/SiriusRadio/index.html' });
>
> I'm guessing I also need something like:
> Slim::Web::HTTP::addPageFunction("plugins/SiriusRadio/index.html",
> \&Plugins::SiriusRadio::Plugin::handleIndex);

Correct. The first only creates the link, the second tells the server what
to do with it. Do this first. Just to be sure.

> I tried adding that, and now I get 3 not founds:

You have to do it for all these files.

> Is this stuff a new requirement in 7.0? Is it documented/mentioned at
> all anywhere?

Not much yet. What do you mean by the "requirement"?

Here's what one of mine is looking like:

sub webPages {
my $class = shift;
Slim::Web::HTTP::addPageFunction("plugins/AlbumReview/index\.html",
\&handleWebIndex);
Slim::Web::HTTP::addPageFunction("plugins/AlbumReview/pure\.html",
\&handleWebIndex);
Slim::Web::Pages->addPageLinks('plugins', { 'PLUGIN_ALBUMREVIEW' =>
'plugins/AlbumReview/index.html' });
}

I'm sorry, have to leave...

--

Michael

-----------------------------------------------------------------
http://www.herger.net/SlimCD - your SlimServer on a CD
http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR

GoCubs
2007-03-23, 11:24
OK, I got it working. Something must have been cached somewhere as I wiped the cache directory and cleared my browser cache and it pulled up my index.html. All my pages are created from the index.html template so I only have to register that one.



Not much yet. What do you mean by the "requirement"?


I was just saying that since my plugin worked in 6.5 without registering the pages, something must have changed in 7.0 that "requires" each page to be registered with SS.

Thanks again for your help!

-Greg

kdf
2007-03-23, 11:46
There is a wiki page in progress for slimserver 7 plugins:

http://wiki.slimdevices.com/index.cgi?SlimServer7Plugins

still to come: prefs handling/validation

-kdf

mherger
2007-03-23, 23:11
> http://wiki.slimdevices.com/index.cgi?SlimServer7Plugins

Thanks again for the pointer. I seem to forget faster than I can write...

--

Michael

-----------------------------------------------------------------
http://www.herger.net/SlimCD - your SlimServer on a CD
http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR