Author Topic: APP: Online Gallery Creator... with FTP!  (Read 251 times)

Jingo

  • Super Hero
  • ****
  • Posts: 1164
APP: Online Gallery Creator... with FTP!
« on: September 20, 2019, 11:46:06 PM »
    Hi All... I've been tinkering with the idea of a gallery app for IMatch for awhile now and finally had the time to get one up and running.  My goal for the app was to
    • Create a selection of images in IMatch
    • Build a subdirectory on my drive with those images
    • FTP that subdirectory of images to my server
    • Use open source gallery software to auto-build a gallery with albums by subdirectory

    I'm happy to report that I have pulled all the pieces together for such an app and it appears to be working quite well (surprisingly!) after some beta testing.  I want to add a few more "features" before releasing it to the wild... but hopefully by this weekend, I'll share the app.

    There is some setup that needs to be done on the "backend" such as setting up the open source gallery software on your server (simple upload of the code), installing the freeware WINSCP FTP software (used for its amazing command line ability) and modifying a .bat file script that does the heavy lifting of connecting via FTP to your server and uploading your exported gallery.

    Some screenshots to show how things currently look:

    App Interface (may change if I can get some time to learn Vue instead of JQuery):




The all important APP ICON  :-) 




A sample Gallery I created on my web host via the APP:




A subAlbum off the main album page...



Some ideas I have to work on....
 
  • allowing you to list the galleries (folders) on your webhost so the files don't need to remain local to add to existing galleries
  • a method to keep track of which images have been uploaded and which galleries they are in (visual display in IMatch perhaps)
  • Vue implementation (I really need to learn how to use it as the apps look so much better!!)
  • passing through metadata such as description and keyword info to the album script for display online
  • integrating FTP server username/password into IMatch so it isn't just sitting in the open .bat file

This was a fun project and I learned a great deal along the way.... so, hopefully even if you have no interest in running an online gallery, the code (with generous commenting of course) might be helpful to others.

Stay tuned!! - Andy.
[/list]
« Last Edit: September 20, 2019, 11:50:28 PM by Jingo »

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 23018
Re: APP: Online Gallery Creator... with FTP!
« Reply #1 on: September 21, 2019, 08:58:40 AM »
Looks nice. Thanks for sharing  :)

sinus

  • Global Moderator
  • *****
  • Posts: 3699
  • IMatch-User since 2001 (IMatch 3.6)
Re: APP: Online Gallery Creator... with FTP!
« Reply #2 on: September 23, 2019, 08:19:33 AM »
Cool, what can be done with scripting!
Congratulations, Jingo, does look great.  :)
Best wishes from Switzerland! :-)
Markus

Jingo

  • Super Hero
  • ****
  • Posts: 1164
Re: APP: Online Gallery Creator... with FTP!
« Reply #3 on: September 23, 2019, 12:58:37 PM »
Thx Markus... that ability use industry standard code and open source software from within IM is a huge achievement.... it allows for all sorts of neat ways to interact with the database since Mario has provided such fantastic endpoints. 

I'm still tweaking this a bit but should have it up soon... Thx - Andy!

Jingo

  • Super Hero
  • ****
  • Posts: 1164
Re: APP: Online Gallery Creator... with FTP!
« Reply #4 on: October 04, 2019, 05:01:05 PM »
COMING SOON... still making a few last minute edits...  ;D 8)


Jingo

  • Super Hero
  • ****
  • Posts: 1164
Re: APP: Online Gallery Creator... with FTP!
« Reply #5 on: October 06, 2019, 04:48:27 PM »
Ok... I'm done with Version 1 of this APP so figured now is the time to share it and let others provide feedback/Test (or ignore!) while I made some further enhancements to Version #2!  So, I proudly present to you... The Gallery Creator!

As mentioned in the posts above, this app will allow you to create an online gallery from images within your database.. either for viewing locally on your machine (with proper server setup) or for one click upload to your hosting service...  in order the make the magic happen, there are a few setup items to do ahead of time [only once].

FIRST:
  Download and install WinSCP [freeware] (https://winscp.net/eng/index.php).  WinSCP is a complete FTP solution that provides an easy interface... but most importantly, a robust command line which we will leverage to perform folder uploads from within the APP!

SECOND:
  Setup the nangallery2 gallery on your host (https://nanogallery2.nanostudio.org/).  Nanogallery2 is a freeware javascript library which allows you to build galleries of images.  Install instructions are located on their website but only takes a few steps.

THIRD:
  Setup the nanoPhotosProvider2 php script on your host (https://nanophotosprovider2.nanostudio.org/).  nanoPhotoProvider2 is a free php script that publishes photos automatically to the nanogallery. Once again, easy to setup with a few steps.

FORTH:
  Write down your FTP login info... You will need to know your: Hostname, FTP Username, FTP Password and the URL where you setup NanoGallery.  The FTP info should take you directly to the remote directory where the Nanophotosprovider2 content is located.


Once all these steps are complete, you should now have a gallery located on your host that you can navigate to and see the sample images (ie: www.mysite.com/gallery)!

Step 1 is to fill out your FTP Server login info in order to utilize the FTP feature.  Note, this only needs to be done the first time and then any time changes are made to your FTP info (rare - but if you change your FTP password for example). Once you have added the information, click the File Credentials button.  You can show/hide the credentials using the Show/Hide Button.  Once this is complete, you are ready to move on to Step 2.



Step 2 presents you with 2 options... you can either create a new album (folder) with the selected images or add the selected images to an existing album (folder).  The first time, you'll want to create a new album.  Select your images, enter an album name and click the Create New Album button <i>(the results box will show success and error information)</i>.  This will create a subfolder with your images in a C:\Gallery_Temp folder.

You can also add selected images to an existing Album by clicking the Choose Existing Album Button whcih will allow you to select an existing subfolder to add images to.




Step 3
allows you to FTP an album of images to your gallery.  This is done by clicking the FTP Files Button... if your credentials and items are setup correctly, the ftp.bat script will get called and your selected folder will be added to your gallery.  You can now click the Launch Gallery Website button to open a new browser tab and see your gallery! 



Rinse and Repeat Steps 2 and 3 to build out a fully functional gallery with albums and images!!



There are a few items I would like to see if I can accomplish in Version 2 to make this even better:
 
  • a user definable Gallery Location on your local system
  • an option to include some basic metadata into the gallery for each image file (description/keywords)
  • an attribute or other database element to tracks images that have been added to the gallery and the album they are located in
  • the ability to create sub-albums
  • the ability to upload multiple folders
  • being able to remove images from the gallery

In any event... I do hope this is useful to the community... I am using this currently for my family album and it works quite well.  It is lightweight and relatively fast once the thumbnails and images have been processed on the server.  I'm happy to help anyone that is having trouble with the initial setup so please just send me a PM or respond to this string... always happy to help!

To install, just unzip the attached Gallery.zip file and place the app folder into your C:\ProgramData\photools.com\imatch6\webroot\user path.  The app will appear in the app manager and can also be used from the browser.  As always.. use with caution... I've tested it and use it.. but what works for me might not work for you. 

And.. finally.. Enjoy!   8)
« Last Edit: October 06, 2019, 05:02:39 PM by Jingo »

Jingo

  • Super Hero
  • ****
  • Posts: 1164
Re: APP: Online Gallery Creator... with FTP!
« Reply #6 on: October 08, 2019, 03:28:00 PM »
No downloads of the zip file yet (except my own!) but I suppose not everyone checks the APP board regularly like I do... or perhaps - no one is interested (or I scared you off with the 4 step setup..  :P )

In any event - I realized I didn't include the subfolder in the zip file and that is important because it has to be named "Gallery" in order for the FTP function to work ... (ask me how I know that!?  DOH!).....

I added a NEW Gallery.zip to this thread that includes the subfolder - but... if anyone chooses the other zip file instead, just be sure to:
Extract the Gallery.zip file to: C:\ProgramData\photools.com\imatch6\webroot\user\Gallery

BTW: I just used the App to create a mini gallery for a local skating club..... selected about 300 images in total from my database (~30 images per album), create the albums, ftp the albums to host...  voila... instant online gallery with 10 albums for the group to view... they can download the images and/or share the gallery with family and friends.  All done from Imatch and the App.... another example of the power of IMatch and the JS scripting ability Mario provided!!

Thx Mario!

sinus

  • Global Moderator
  • *****
  • Posts: 3699
  • IMatch-User since 2001 (IMatch 3.6)
Re: APP: Online Gallery Creator... with FTP!
« Reply #7 on: October 08, 2019, 04:22:40 PM »
Hey Jingo
Although I think, at the moment I have no use for your app (I am about to set up in the next few weeks a new homepage with integrated galleries and slideshows, based on wordpress), I want to thank you for your effort!  :D
It's really not self-evident that someone puts so much work into an app that comes out so great and then puts everything online for download!
A big thank you from my side, by the way also for your other apps (I use Fancy Search quite often).
Thanks, Andy!

Best wishes from Switzerland! :-)
Markus

Jingo

  • Super Hero
  • ****
  • Posts: 1164
Re: APP: Online Gallery Creator... with FTP!
« Reply #8 on: October 08, 2019, 07:33:50 PM »
Thanks Markus... always happy to create and share to extend the functionality of the product.  The actual base code for the Gallery app can be used for any gallery.... the folder export from selected image is useful in your case and from there you can just FTP the images using the Wordpress gallery location... you can probably even modify the app to FTP to the exact place your gallery will look for the image folders!

Glad Fancy Search is useful for you... I too use it a lot and am quite pleased with that one!

Thx again - Andy.