These forums are provided for community interactions only. For official support please submit a support ticket.

You are not logged in.

  • Index
  •  »  / API
  •  » smart gallery as images with tags or get gallery as images method

#1 2012-03-19 02:20:45

samhendel
New Member
From: sydney australia
Registered: 2012-02-09
Posts: 1
Website

smart gallery as images with tags or get gallery as images method

hello !

i am trying to get images from all albums to fall into categories and display as images only.


currently i am using this method below which is working for getting a specific album

<?php
    # Include DirectorAPI class file
    # and create a new instance of the class
    # Be sure to have entered your API key and path in the DirectorPHP.php file.
    include('/home/classes/DirectorPHP.php');
    $director = new Director('xxx', 'samhendel.com/ssp');
    
    $director->cache->set('myrandomstring', '+30 minutes');

    $director->format->add(array('name' => 'large', 'width' => '900', 'height' => '600', 'crop' => 0, 'quality' => 95, 'sharpening' => 1));

    # Make API call using get_album method. Replace "1" with the numerical ID for your album
    $album = $director->album->get(5);

    # Set images variable for easy access
    $contents = $album->contents[0];
   
?>

        <div id="img-container">
        <?php foreach ($contents as $image): ?>
            <img class="image" src="<?php echo $image->large->url ?>" width="<?php echo $image->large->width ?>" height="<?php echo $image->large->height ?>" />
        <?php endforeach ?>
        </div>


but i am encountering trouble when trying to apply the

"# Returns content that contains any one of the following tags: water, daytime and vacation

$tags = array('water,daytime,vacation', 'one');" method

or get all images from a specific gallery method

i.e $gallery = $director->gallery->get(1);

is there a way someone could help me out with this please using the method above and formatting for images i am using.

would be much appreciated thanx SAM

Offline

 
  • Index
  •  »  / API
  •  » smart gallery as images with tags or get gallery as images method

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson