Page 3 of 6 pages « First < 1 2 3 4 5 > Last »
Debra’s Dynamic Gallery
Putting it all Together
Main Gallery Template ("gallery") - The Form
To collect data from your users, use EE’s Stand Alone Entry Form (SAEF). In order to use this, users must be members of your site, and they must be logged in. Each user gets one Flickr ID. If they’ve entered one, they can edit it. Use the Form Helper Plugin for this part. If they haven’t entered one, they get the entry form.
I’m not going to post the exact code for the form here, because a) it’s all in the EE user docs, and b) the purpose of this little tutorial is for you to learn to use EE better. (I have considered asking for a small fee for a complete download of all the code I’ve used to put this thing together, but then, I’d have to support it. And I have less than zero time for that, sorry.)
Some tips, though.
IF the user is logged in, and they’ve already created an entry, show it to them. If there are NO RESULTS, show them the new entry form. If they’re not logged in, they can register or log in. If you tried it out, that’s what you probably experienced yourself.
Gallery Template - Thumbnail Display
Here’s where the eeFlickr module comes into play. Our code says, “if it’s a group ID get the Group ID to get the first image. If it’s a User ID, then use that to return just the first image. (per page="1") I’m using some CSS rules in my stylesheet to float the images left.
Code fragment provided: gallery-thumbs.txt
I’m hardcoding in the weblog which in my case is “eegallery”. Two key things to notice here.
The URL to the image uses the entry_id path variable. This means that it’s going to pass the entry ID number of the weblog entry that contains the flickr ID to the template that displays the slideshow in the URL. That’s our unique identifier, and we’ll be grabbing that to display the slide show on the gallery detail page with our Flash movie.
We’re specifiying a URL to an EE template, which in our case is a template called “gallery-flickr” that’s in my “site” template group. Doing this will automagically display our slideshow AND generate its XML dynamically!
Next: The Slide Show Display