Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 72

AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
05/01/13 12:20 PM (12 years ago)

Image Gallery Question

I'd like to have an image gallery in my app. The main requirement is to point to a remote directory (set up in the control panel) and have all the images in that directory load to the gallery. It doesn't need to cope with sub directories, (although that would however be an added bonus!). Is this do-able and if so, how please? With the existing plugins, I think the images are each individually referenced and loaded, which is an administrative overhead I'd like to avoid. Any ideas please?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/01/13 02:41 PM (12 years ago)
Well, if you're going to have the images on the internet, then it stands to reason that the app will need to be online to operate. If that's the case, you can use a php script just as easily as anything internal. I use a random image loading (php) script for my MenuWithImage, but I'm sure you can find something more to your desires somewhere with little or no mod needed. Cheers! -- Smug
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
05/01/13 02:46 PM (12 years ago)
Hi AlanMac, This could be done easily. If you're using The ThumbViewer Plugin you can use this script: https://dl.dropboxusercontent.com/u/3427464/BTA_thumbViewer/Dir%20script/imgdir.txt If you have a directory with images put this file in there and rename it to imgdir.php Change line 19 $urlToThisDirectory with the value/location of you imagedirectory In the advanced properties of the plugin go to the dataURL and give the address (url) where you did put this script. Your url should look something like this: http://www.yourdomain.com/your_image_directory/imgdir.php Make all the other settings in the controlpanel (like external image, album description etc) and your done. All this does is that it scans the directory for images (jpeg, jpg or png) and make the json file. Hope this helps. Best Regards, Danny
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
05/02/13 01:04 AM (12 years ago)
Good to know, thanks Danny will try this out.
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
05/02/13 04:45 PM (12 years ago)
Hi AlanMac, Some people are taking (their valuable) time to answer questions. It would be nice to let them know if their answer was valuable or not. Best Regards, Danny
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/03/13 01:24 AM (12 years ago)
Fair point well made Danny, I didn't mean to be rude - mea culpa, I distracted myself by watching football! My apologies to Smug as well. I liked the look of your plug-in a lot for Apple (I also need an Android solution) and the idea of using a php script on the server had not occurred to me. I am not proficient with php, so I rarely think of that first. The issue is that it puts a dependency outside the app that I may not be able to manage - for example if the user intend to use drop box for the images, can a script hosted on a different server to the images manage this scenario?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/03/13 03:12 AM (12 years ago)
As long as it's publicly 'reachable' then it's a viable resource. You could have 10 different URL's for 10 different resources. As long as they're available, they're good. Just remember if they're 'not' your images, you may be subject to rights/licensing, or they may just move abruptly. But if they're 'your' images, it doesn't matter 'where' they live, as long as they can be reached consistently. Cheers! -- Smug
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/03/13 04:54 AM (12 years ago)
Thanks Smug
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
05/03/13 12:00 PM (12 years ago)
HI AlanMAc, No problem friend! You have to decide for yourself what the best solution will be. As a note I can tell that dropbox is perfect to store files but if you have an app with (very) high traffic you could get in trouble with dropbox. Dropbox may shut you down cause they don't allow high traffic on your account. Just to let you know. Smug is also right (but keep my comment in mind). Best Regards, Danny
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/04/13 12:36 PM (12 years ago)
Do a search for Flickr on these forums. I vaguely remember somebody solving that problem with a plugin that was pointed towards Flickr. -- Niraj
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.