Hi everyone,

I've been playing around with the Google Api in combination with
Drupal to get my albums and the albums's content displayed on my
website. I didn't find any good modules, so I created my own code with
the API. The problem I encounter since today is that the userfeed I
query takes too long. In the album are about 250 pictures. The php
execution time is reached. I know you can increase this, but it's not
user friendly. I use the following code:


$query = $gp->newAlbumQuery();
$query->setUser("jitsejan");
$query->setAlbumName($albumName);
$query->setMaxResults("50");

$albumFeed = $gp->getAlbumFeed($query);

foreach($userFeed as $key => $photoEntry){
           $srcLink = $photoEntry->content->src;
                $thumbLink = $photoEntry->mediaGroup->thumbnail[1]->url;
                $mediaContentArray = $photoEntry->getMediaGroup()->getContent();
                $contentUrl = $mediaContentArray[0]->getUrl();
                $contentHeight = $mediaContentArray[0]->getHeight();
                $contentWidth = $mediaContentArray[0]->getWidth();
                $ratio = $contentWidth / $contentHeight;
                if($ratio == 4/3){
                        $type = 'landscape';
                }elseif($ratio == 3/4){
                        $type = 'portrait';
                }else{
                        $type = 'widescreen';
                }
                        echo '<a class="'.$type.'" href="'.$srcLink.'"
rel="lightshow[recent]"><img src="'.$thumbLink.'"></a>';
     }

I've set it to 50 max so it works, but the other 200 pictures aren't
shown. I was thinking about an min-max on the userfeed, but I don't
know if this is possible. The problem is getting and processing the
userfeed.

Do any of you know if you can i.e. query for picture 40 to 80 out of
the 250 pictures?

I hope my question is clear, my english isn't that good =)

Best regards,
-JQ

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to