Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    I need to build and output my collection and album and thumb paths and I'm not sure how to do it. I've spotted the generate_url function and had a look into how the plogger_get_picture_thumb function uses this one, but it is all too complicated for me...

    I need to output the following dynamically depending on the querystring (as plogger does, but without the base url):

    [collection-name]/[album-name]/
    [collection-name]/[album-name]/[thumb-size]/

    I've tried copying and altering the functions, but alas to no avail.

    Any ideas?
    •  
      CommentAuthorsidtheduck
    • CommentTimeMay 21st 2009 edited
     
    designermonkey,

    I guess I'm a little confused as to what you are trying to get this for. Did you want a list /array of albums or just a single response back? I'm guessing you want to code a new function that you can ask like plogger_get_relative_path('album', 3) or something? I guess I need to know a little more of what you are trying to accomplish or how you plan on using the function. Is it in the header, footer, or the body of the gallery or in a completely separate area of your site in order to get relative paths to link to? It would help to know this and then I can try to help you out.
  2.  
    I'm trying to build a theme using airtight interactive's simpleviewer, which uses an xml file for it's image locations. Within the settings for this xml are relative paths to the images and thumbs. I need this to be dynamic based on the url querystring.

    It's going to be a separate file, but I figure if I link the plogger.php file to it, then it would understand the global settings etc and be able to use functions correctly.

    So, yes. I need to do a function just like you stated: plogger_get_relative_path('album', 3) 3 being the id.

    Thanks for your response on this...
    •  
      CommentAuthorsidtheduck
    • CommentTimeMay 22nd 2009 edited
     
    Well, for album paths you can use the get_album_by_id() function like so:
    <?php
    $album = get_album_by_id(4);
    $album['relative_path'] = $album['collection_path'].'/'.$album['album_path'].'/';
    ?>


    And for picture paths you can use the get_picture_by_id() function:
    <?php
    $picture = get_picture_by_id(19);
    $picture['relative_path'] = $picture['path'];
    ?>


    I think those should work for you.