These forums are provided for community interactions only. For official support please submit a support ticket.
You are not logged in.
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
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
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
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
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
Tk u soo much kitalpa (and sorry for delay)
My problem is solved!!!
Offline