CMS & Slideshow Pro (LR2)

25 posts by 7 authors in: Forums > CMS Builder
Last Post: June 6, 2010   (RSS)

By Dave - November 2, 2009

Hi sublmnl,

You'd have to have fields for the album title, description, thumbnails, and path in the CMS so you could load those as well. Or some sort of naming convention so it knew what to output there. But basically if you had all your upload fields in one record you could loop over them and display albums like this:

<gallery>

<?php foreach ($photosRecord as $field): ?>
<?php if (!is_array($field)) { continue; } // Skip non upload fields - we know they are all arrays or lists of images ?>

<album title="Title of the Album" description=Short description goes here for all to see" tnpath="/images/gallery/thumb/"
tn="/images/gallery/thumb/3591690865_4e254e3132_o.jpg" lgpath="/images/gallery/">
<?php foreach ( $photosRecord[$field] as $upload): ?>
<img src="<?php echo $upload['filename'] ?>" caption="<?php echo $upload['info1'] ?>" />
<?php endforeach ?>
</album>

<?php endforeach ?>
</gallery>


You'd have to experiment to get the other fields in there, though.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] CMS & Slideshow Pro (LR2)

By sublmnl - March 13, 2010

Hey gang, back again.
I've had a few clients that won't need more albums that often but one we have now.... I'm sure will need to add a bunch. Probably one or two a month.

So to avoid having to go back in there all the time, may I reopen this can of worms?

Dave, I think I follow what you're saying.
Basically put all the images within one upload, but have a checkbox or list to pick what album they belong in. (do I have that right?)

That may get kind of heavy, with our client having anywhere between 20 and 50 photos per album.

Also I've thought about this a lot....with as much (little) knowledge as you and a few others have taught me about PHP.
I'm at a loss as to how to go about writing this so it works and I've done some pretty complex stuff with you guys' help.

see categories
which I have used a bunch for product pages.... thx btw.

By Chris - March 15, 2010

Hi sublmnl,

Let me make sure I understand:

Your client needs multiple galleries, each of which has one or more albums, each of which has one or more uploaded images, each of which has a caption (in addition to its URL)?

Or is there only ever one "gallery"?
All the best,
Chris

Re: [chris] CMS & Slideshow Pro (LR2)

By sublmnl - March 15, 2010 - edited: March 17, 2010

Close!

For us There is always one Gallery but multiple Albums will be added over time.

thus the <gallery> tag in the XML
and mulptiple <album> tags.

The way it stands now we have to create the upload in the section in the CMS and then add the entry with Title, Description, Thumbnail, Thumbnail pathway and Large image Pathway in the XML.php, then the section editor code pulls in the images and the captions from Info1 or Info2.

It would be nice if all we had to do has create the upload in the section in the CMS, and somewhere along the line, the TN, Title Description and pathways would just write themselves in the xml.php, I guess like an array or loop. (?)

(edited to fix incorrect literal syntax [;)] )

By Chris - March 17, 2010

Hi sublmnl,

So, you create a section for each album?

Why not use only one section (called Albums) and create a record for each album? Each record can have an unlimited number of uploaded images. Would that work? If not, why not?

I'd like to help you come up with a better way to manage these albums. :)
All the best,
Chris

Re: [chris] CMS & Slideshow Pro (LR2)

By sublmnl - March 17, 2010

oh so sorry just re-read that.
Yeah we don';t do that. (section)
we have one section and a bunch of uploads.

By Chris - March 18, 2010

Sublmnl and I have switched over to email to figure out a solution.
All the best,
Chris

By Jason - April 28, 2010

Hi,

If you can attach the file multi_photos.php I can take a look at why that error is coming up.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] CMS & Slideshow Pro (LR2)

By sublmnl - April 28, 2010

Well thanks Jason.

Here is the last iteration of my PHP file.
Attachments:

multi_photos_it.php 4K