Note that there are some explanatory texts on larger screens.

plurals
  1. POflickr phpflickr api
    text
    copied!<p><strong>Overview</strong><br> I am trying to get a photo feed on to my site using Flickr's api and the phpflickr library. I can successfully get the photoset on to my site, but it shows all the photos from every photoset, what I was hoping to achieve was to show the primary photo from each photoset, and then if the user clicked on the image it would show the full photoset in a lightbox/shadowbox. </p> <p><strong>My Code</strong> </p> <pre><code>&lt;div id="images" class="tabnav"&gt; &lt;ul class="items"&gt; &lt;?php $count = 1; ?&gt; &lt;?php foreach ($photosets['photoset'] as $ph_set): ?&gt; &lt;?php $parentID = $ph_set['parent']; ?&gt; &lt;?php $photoset_id = $ph_set['id']; $photos = $f-&gt;photosets_getPhotos($photoset_id); foreach ($photos['photoset']['photo'] as $photo): ?&gt; &lt;li&gt; &lt;a rel="shadowbox['&lt;?=$count;?&gt;']" href="&lt;?= $f-&gt;buildPhotoURL($photo, 'medium') ?&gt;" title="&lt;?= $photo['title'] ?&gt;"&gt; &lt;img src="&lt;?= $f-&gt;buildPhotoURL($photo, 'rectangle') ?&gt;" alt="&lt;?= $photo['title'] ?&gt;" width="210" height="160" title="&lt;?= $photo['title'] ?&gt;" /&gt; &lt;h3&gt;&lt;?=$ph_set['title']?&gt;&lt;/h3&gt; &lt;p&gt;&lt;?=$ph_set['description'];?&gt;&lt;/p&gt; &lt;/a&gt; &lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;?php $count++; ?&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p><strong>Another Attempt</strong> </p> <p>I have also tried calling the getPhotos function differently, instead of sending it without any parameters I sent it with parameters</p> <pre><code>$photos = $f-&gt;photosets_getPhotos($photoset_id, NULL, NULL, 1, NULL); </code></pre> <p>The above code stopped the showing all the photos from each photoset and started showing just the primary image, but it also stopped making the rest of the photos accesible to me.</p> <p>Is there something I can do to make this work? I am totally out iof ideas.</p> <p>Regards and thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload