Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Senior Member meep's Avatar
    Join Date
    Aug 2007
    Location
    Ireland
    Posts
    183

    path to images in plugin HTML directory?

    Hi

    I have an image in my plugin HTML directory that I want to include in my basic.html but cannot figure out what the path should be;

    eg.

    \HTML\EN\plugins\Alexa\settings\wheels.gif

    I've tried all kinds of combinations including prepending [% webroot %] but can't get this image to showup on the settings page (basic.html is in the same dir)

    Pointers appreciated.

    Peter


    ALEXA LMS SKILL: http://www.hab-tunes.com | Twitter: #habtunes
    Personal HA BLOG: http://mediaserver8.blogspot.com

    Squeezebox | Squeezebox Radio x 2 | Squeezebox Duet

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,538

    path to images in plugin HTML directory?

    > I have an image in my plugin HTML directory that I want to include in my
    > basic.html but cannot figure out what the path should be;
    >
    > \HTML\EN\plugins\Alexa\settings\wheels.gif


    You need to put it in an html (lower-case) sub-folder. LMS is assuming
    that folder to be the static files. Anything else needs to be
    implemented as a page handler on the server.

    Move your file to:

    HTML/EN/plugins/Alexa/html/wheels.gif

    and reference it as

    [% webroot %]plugins/Alexa/html/wheels.gif

    That would hopefully work :-).

    --

    Michael

  3. #3
    Senior Member meep's Avatar
    Join Date
    Aug 2007
    Location
    Ireland
    Posts
    183
    Hi Michael

    Thanks for the quick response.

    I'd actually worked that out in the meantime from looking at other plugins but it's still not working out for me.

    Here's the test code fragment I have in my basic.html file;

    Code:
     [% WRAPPER setting title="PLUGIN_ALEXA" desc="" %]
      <div class="prefDesc">[% "PLUGIN_ALEXA_DESC" | string %] version [% prefs.version %]</div>
      The Alexa Squeezebox skill needs to know how to access your local LMS from the cloud. Enter your settings here. See <a href="http://www.hab-tunes.com"> the skill homepage</a> for more details.</br>
      [% webroot %]</br>
      <img  src="[% webroot %]plugins/Alexa/html/wheels.gif">
     [% END %]

    Attached is a screenshot of the relevant folder on the server;
    Name:  image_location.PNG
Views: 34
Size:  108.6 KB


    You'll see from the code above, I included a [% webroot %] in the clear. This is resolving to simply '/'. That doesn't look right, is it? Here's what I see in LMS, showing source code as well. I've tried all kinds of edits to that path in the browser but none get the wheels.gif image to load.

    Name:  lmscapture.PNG
Views: 34
Size:  71.9 KB


    ALEXA LMS SKILL: http://www.hab-tunes.com | Twitter: #habtunes
    Personal HA BLOG: http://mediaserver8.blogspot.com

    Squeezebox | Squeezebox Radio x 2 | Squeezebox Duet

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,538

    path to images in plugin HTML directory?

    > You'll see from the code above, I included a [% webroot %] in the clear.
    > This is resolving to simply '/'. That doesn't look right, is it? Here's


    That's perfectly fine: that variable is only different if you override
    the skin, eg. /EN/settings/something. In this case webroot would be /EN/.

    > what I see in LMS, showing source code as well. I've tried all kinds of
    > edits to that path in the browser but none get the wheels.gif image to
    > load.


    That seems fine to me. Please enable debugging for network.http then
    load the image _only_. What would you get?

    --

    Michael

  5. #5
    Senior Member meep's Avatar
    Join Date
    Aug 2007
    Location
    Ireland
    Posts
    183
    Hmm

    It works (the image displays) when I strip everything out of the basic.html apart from;

    Code:
    <img  src="[% webroot %]plugins/Alexa/html/wheels.gif">
    I'll start adding parts back in piece by piece to see if I can identify what's tripping it up....


    ALEXA LMS SKILL: http://www.hab-tunes.com | Twitter: #habtunes
    Personal HA BLOG: http://mediaserver8.blogspot.com

    Squeezebox | Squeezebox Radio x 2 | Squeezebox Duet

  6. #6
    Senior Member meep's Avatar
    Join Date
    Aug 2007
    Location
    Ireland
    Posts
    183
    Well, I rebuilt the basic.html file block by block and it worked each time.

    I installed the plugin on a different LMS and it worked there too.

    I can only surmise there was some kind of invisible character in that file messing things up.

    Thanks for your time on this, Michael


    ALEXA LMS SKILL: http://www.hab-tunes.com | Twitter: #habtunes
    Personal HA BLOG: http://mediaserver8.blogspot.com

    Squeezebox | Squeezebox Radio x 2 | Squeezebox Duet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •