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

You are not logged in.

  • Index
  •  »  / API
  •  » Someone have a valid example of gallery page or album list?

#1 2012-03-09 19:16:51

francorodrigues
Member
Registered: 2011-03-23
Posts: 20

Someone have a valid example of gallery page or album list?

Someone can gelp me?

I looking for a example (valid) of a list of albuns page oe gallery page. I didn't found in the forum and the api pack have only a album page example. I need make a page with thumbs and links for each album of a gallery.

In the Wiki, for gallery methods, say:

""""""
get(gallery_id, options)

Returns a single gallery along with its member albums and content. The options parameter is optional and can include the following parameters:

limit The number of member albums to return. Defaults to all member albums.

order Using this parameter, you can override the album order setting for the gallery. Options are "display" (current order set in Director), "created_on" and "modified_on".

with_content Whether or not to return the member albums' content. Defaults to true.


<?php

include('classes/DirectorPHP.php');
$director = new Director('your-api-key', 'your-api-path');

$gallery = $director->gallery->get(1);

echo $gallery->name;

?>
""""""""""

But return a blank page..

Would be very fine if SlideshowPro have a valid samples for your users.

Offline

 

#2 2012-03-09 19:25:16

francorodrigues
Member
Registered: 2011-03-23
Posts: 20

Re: Someone have a valid example of gallery page or album list?

I'm tryng this code:

First:

<?php
error_reporting(0);
   
    include('classes/DirectorPHP.php');
    $director = new Director('myapi', 'mypath');
   
$gallery = $director->gallery->get(3);
echo $gallery->name;   
?>


And after:

  <?php foreach($gallery->albums->album as $album): ?>
<li><a href="gallery.php?albumId=<?php echo $album->id ?>"><?php echo $album->name ?></a></li>
<?php endforeach ?>


Return a blank page,

Offline

 

#3 2012-03-12 20:18:14

kitalpha
Member
Registered: 2007-11-06
Posts: 38

Re: Someone have a valid example of gallery page or album list?

is this any help ?

<?php
  $gallery = $director->gallery->get(6,array('list_only' => true));   

        foreach($gallery->albums as $album) {             
echo '<a href="galleryshow.php?name=' . $album->id . '"><img src="' . $album->preview->url . '" /><span><h1>' . $album->name . '</h1></span></a>';

            }
?>

the above code is used here
http://www.hot-rat.com/gallery.php

Last edited by kitalpha (2012-03-12 20:28:02)

Offline

 

#4 2012-03-12 21:40:08

francorodrigues
Member
Registered: 2011-03-23
Posts: 20

Re: Someone have a valid example of gallery page or album list?

Tk you for your reply.

Can u help me a little bit more?

The code that u send, i put inside the body or with the slideshopro connect above the head ?

If you could send me th 2 codes (above the head and into the body) i will aprecciate so much!

Tks again!

Offline

 

#5 2012-03-13 21:13:11

kitalpha
Member
Registered: 2007-11-06
Posts: 38

Re: Someone have a valid example of gallery page or album list?

this is in the head section.....

<?php
    # Include DirectorAPI class file

    include('classes/DirectorPHP.php');
    $director = new Director(**********,**********);
   
    $director->format->add(array('name' => 'thumb', 'width' => '100', 'height' => '100', 'crop' => 1, 'quality' => 75, 'sharpening' => 1));
    $director->format->add(array('name' => 'large', 'width' => '800', 'height' => '450', 'crop' => 0, 'quality' => 95, 'sharpening' => 1));
   
    # We can also request the album preview at a certain size
    $director->format->preview(array('width' => '200', 'height' => '100', 'crop' => 1, 'quality' => 85, 'sharpening' => 1));
   
?>

and the body code is as last post

Offline

 

#6 2012-08-07 15:34:00

francorodrigues
Member
Registered: 2011-03-23
Posts: 20

Re: Someone have a valid example of gallery page or album list?

Tk u soo much kitalpa (and sorry for delay)

My problem is solved!!!

Offline

 
  • Index
  •  »  / API
  •  » Someone have a valid example of gallery page or album list?

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson