Search

Haloo,

I'm looking for some advise on the best approach for creating a means for my client to upload their own images via ftp in bulk and have call the gallery onto a Symphony page template somehow.

Has anyone tackled this in the past? Is this best as an extension?

I have done something similar. Which should satisfy your client.

I have a section with an image upload field, Album Name(select box, this is another section), and comments. I also have the mass upload utility extension installed, so I can select multiple images in the upload dialog, set the album name and leave the comment field blank. The mass upload utility will make an entry for each image that was uploaded. So then I can go back and add comments to certain images if I want. All these photos will be apart of the same album.

Then I have an xsl utility to build a table with rows of 4. I use this utility on the album page, where I would pass in the album name parameter depending on what album cover photo the user clicked on.

So basically the users steps are:

  1. Create a new album(skip this step if adding to an old album)
  2. Select photos to upload and select the album from a drop down.
  3. Than symphony will do the rest of the work for you.

Here's the code for the xsl utility.

<xsl:template match="gallery-photos/entry" mode="group">
    <tr>
        <xsl:apply-templates select=". | following-sibling::entry[position() &lt; 4]" mode="content" />
    </tr>
</xsl:template>


<xsl:template match="gallery-photos/entry" mode="content">
    <td>
<div class="image">
<a class="group1" href="{$root}/image{photo/@path}/{photo/filename}" alt="{album/item}" title="{album/item}"><img src="{$root}/image/1/220/0{photo/@path}/{photo/filename}" /></a></div>
    </td>
</xsl:template>

Mono might not be the cleanest way but if that's how you'd like to work and you're decent with PHP, just make sure you get the client to define the folder(s) to be used. Then customize a datasource and iterate over every image contained in the file and generate the XML datasource with the images.

Never did it but should work - I would suggest you would cache this DataSource so its not too heavy. (something like cacheable datasource could help you do the trick)

Was looking at modifying the uploadselectbox filed to be able to select a folder, limit the files to images, traverse the folders and insert a series of entries into a DB table..

That way, I can define the top level tree and create a recursive list of file and folder structures.. then as you say, spit out the XML into a datasource.

Was looking at modifying the uploadselectbox filed to be able to select a folder, limit the files to images, traverse the folders and insert a series of entries into a DB table.. That way, I can define the top level tree and create a recursive list of file and folder structures.. then as you say, spit out the XML into a datasource.

@moonoo2 - have you ever finished that and maybe could share your solution? Sounds like exactly what I need for an upcoming project.

Hi Roman,

Didn't get around to it in the end.. I just defined a section called Galleries and SBL linked images to the galleries and then used Johns blog post as a catalist to use the Ninja technique to show clients how to insert a gallery or Image into their content textarea to be transformed on the front end.

{gallery-tag:styling}

kind of approach.

Still on the table as a plan for the near future as my team have some time to explore different approaches over the coming 2 weeks, so we may make some headway after all.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details