We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

eeFlickr : Flickr photo gallery

Development and Programming

Richard Flynn's avatar
Richard Flynn
14 posts
17 years ago
Richard Flynn's avatar Richard Flynn
I’m currently trying to work out the best way to do a count within the {photos_search_loop): I'm trying to use a PHP numeric variable which is increased by 1 each time the loop is passed (like I used to do in WordPress), but can't work out where to put my while and endwhile statements in relation to the EE loop tags. In the Weblog module there's the {count} variable, which makes things very easy, since you can use a conditional statement based the current value of {count}. What I’m trying to do here (for now) is to show the six latest photos in my stream on my homepage, where the first photo (the most recent) is shown medium-size, and the others are square thumbnails. If anyone can give any ideas about how to achieve this, I’d be very grateful to hear them!

Phew, can’t help but feel like I’m in an echo-chamber in this thread. I’ve worked out how to do the counting in the photo loop thing. I think I was just being a bit dense when I tried before. If it helps anyone in the future, this is what my template code currently looks like for my homepage:



What you’ll see I’m also doing here is working out whether the first photo (of which the Medium size is being displayed) is portrait or landscape, and applying a CSS class appropriately—that way I can control how the other six photos (square thumbnails) are displayed. If the most recent photo is portrait, the squares float left next to it; if it’s landscape the squares always sit below the photo. (That’s all in my external CSS file, of course.)

Anyone got any ideas about the question of random photos taken from the photo stream?

Also, Lumis, if you’re reading this thread, it’d be really helpful to be able to paginate the display of sets, and to limit how many sets are shown at once. Of course I could hack together some more PHP for that but it’d be very elegant if it were provided by the module…

       
Simon Clayson's avatar
Simon Clayson
38 posts
17 years ago
Simon Clayson's avatar Simon Clayson

I’ll just chime in: If in doubt, delete the eeFlickr_cache directory

       
TT's avatar
TT
35 posts
17 years ago
TT's avatar TT

–Ok— I have the first part working, now trying to get the layout code for the individual image view page.

Thanks! Tim

Hello,

Thank you for spending your time on the eeeFlickr application.

I get an error on my site:

“Notice: unserialize() [function.unserialize]: Error at offset 0 of 22 bytes in /home/hawaiip/public_html/web/modules/eeflickr/mod.eeflickr.php on line 156”

http://www.hawaiiplantationpalace.com/index.php/bigisland/hawaii_photos/

Any idea what the problem is?

Thanks so much! Tim

       
TT's avatar
TT
35 posts
17 years ago
TT's avatar TT

Hi Everyone,

I have code working to list photo thumbnails.

http://www.hawaiiplantationpalace.com/index.php/bigisland/hawaii_photos/

But now I simply want to make a new template that will take you from the thumbnail view to the full picture view. I am just confused how to code up the template with the photo info and how to pull in the photo URL. Anyone have any sample code out there?

Thanks so much! Tim

       
TT's avatar
TT
35 posts
17 years ago
TT's avatar TT

Hi Everyone,

I have code working to list photo thumbnails.

http://www.hawaiiplantationpalace.com/index.php/bigisland/hawaii_photos/

But now I simply want to make a new template that will take you from the thumbnail view to the full picture view. I am just confused how to code up the template with the photo info and how to pull in the photo URL. Anyone have any sample code out there?

Thanks so much! Tim

       
Paul Frost (orienteer)'s avatar
Paul Frost (orienteer)
389 posts
17 years ago
Paul Frost (orienteer)'s avatar Paul Frost (orienteer)
I just tried using the {datetaken} in the {photos_search_loop}: this and some of the other documented variables appear not to work (they only show the tag name in the rendered template).

I think that you need to include the extras parameter: A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo, tags, machine_tags (taken from the userguide).

{exp:eeflickr:photos_search per_page="10" user_id="12345678@N00" extras="owner_name"}

Then you can use the {datetaken} or {ownername} etc. in your code:

{eeflickr:photos_search_loop}  
<img src="http://farm{farm}.static.flickr.com/{server}/{id}_{secret}_s.jpg" alt=""  />

{ownername}
{/eeflickr:photos_search_loop}
       
Simon Clayson's avatar
Simon Clayson
38 posts
17 years ago
Simon Clayson's avatar Simon Clayson

Under the photos_search tag, it’s well worth using the refresh=”1” parameter. (Where 1 = minutes). This way, any changes won’t get “stuck” in the cache.

       
TT's avatar
TT
35 posts
17 years ago
TT's avatar TT

Does anyone have code for a single image eeFlickr Display Page?

I do not understand the URL segments and how to set up the code correctly to use “URL Segments” as the EE instructions seem a bit vague…????

So I need to go from here, to a page that shows the single Flickr image in an EE Template…

http://www.hawaiiplantationpalace.com/index.php/bigisland/hawaii_photos/

Thank you! Tim

       
TT's avatar
TT
35 posts
17 years ago
TT's avatar TT

Does anyone have code for a single image eeFlickr Display Page?

I do not understand the URL segments and how to set up the code correctly to use “URL Segments” as the EE instructions seem a bit vague…????

So I need to go from here, to a page that shows the single Flickr image in an EE Template…

http://www.hawaiiplantationpalace.com/index.php/bigisland/hawaii_photos/

Thank you! Tim

       
Simon Clayson's avatar
Simon Clayson
38 posts
17 years ago
Simon Clayson's avatar Simon Clayson

Tim, use the photos_getInfo tag on the single entry page

Your link from your photos_search tag would look something like this:

<a href="http://{path=site_index}{segment_1}/detail/{segment_3}/{id}">Go to biggerer version of this photo</a>

And your display page would look something like this (note segment_4 from the link):

{exp:eeflickr:photos_getInfo photo_id="{segment_4}" refresh="1"}
<img src="http://farm{farm}.static.flickr.com/{server}/{id}_{secret}.jpg" alt=""  />
   <div class="image_details">
        <h2>{title}</h2>
        {description}
    </div>
{/exp:eeflickr:photos_getInfo}
       
lumis's avatar
lumis
119 posts
17 years ago
lumis's avatar lumis

Flickr Video Example and some updates

I just posted a small update mainly fixed some stuff in the back end also added if no_results

also in the documentation for exp:eeflickr:photos_search there are a few new extras and a new param for media which lets you pull only video or photos

i added an example of how to embed video from exp:eeflickr:photos_search

       
lumis's avatar
lumis
119 posts
17 years ago
lumis's avatar lumis

Richard Flynn about the photo sets and the Random Photos. I am making it a point to stick with pretty much what flickr’s API provides as features

the flickr.photosets.getList does not have pagination and the flickr.photos.search does not have random it only allows date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, and relevance.

why do it that way? when flickr releases new features or output for a given API method it will automatically just work, you wont have to wait on the software to be updated

       
kimili's avatar
kimili
3 posts
17 years ago
kimili's avatar kimili

Hi Lumis -

I’m having trouble with getting authorization set up. I’ve added my API key and Secret to the modules preferences and set up an auth template with the following code:

{exp:eeflickr:auth perms="read"}

Each time I try to authorize, I’m getting an “Invalid Frob” error back, and consequently never getting my API Signature. Can you shed a little more light on how to set this Authorization successfully? For instance, when I set up my Flickr API key, what should the callback URL be? Does it matter? Am I just missing something?

Thanks, Michael

       
lumis's avatar
lumis
119 posts
17 years ago
lumis's avatar lumis

kimili do you have version 0.6.7 ? with 0.6.7 you should not have a call back URL set

       
kimili's avatar
kimili
3 posts
17 years ago
kimili's avatar kimili

Brilliant!!!

Yes, 0.67 it is. I removed the callback URL and all is well! Thanks for the speedy response and the sweet plugin.

       
First 4 5 6 7 8 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.