Welcome Guest, Not a member yet? Register   Sign In
Best practises for creating a little image gallery ...
#1

[eluser]CARP[/eluser]
Hi CI people
I'm about to begin a little backend for managing an image gallery
I've been searching in the user_guide, but could not find a file management helper or something similar

- Should I use the standard php functions for creating folders and set permissions for each sub-gallery, or should I use some std. CI lib? (which?)

- Where should I store the images, data, thumbnails, etc. for each gallery? Inside 'system'?, inside 'application'?

EDIT1: regarding user_guide's example for creating thumbnails, should I load the image_lib library inside the for(;Wink loop for batch thumb creation? I say this because I'd need to change $config['source_image'] in each for loop and load the lib again... not optimum, right?

Thanks a lot in advance,
#2

[eluser]hvalente13[/eluser]
[quote author="CARP" date="1216167064"]Hi CI people
I'm about to begin a little backend for managing an image gallery
I've been searching in the user_guide, but could not find a file management helper or something similar

- Should I use the standard php functions for creating folders and set permissions for each sub-gallery, or should I use some std. CI lib? (which?)

- Where should I store the images, data, thumbnails, etc. for each gallery? Inside 'system'?, inside 'application'?

EDIT1: regarding user_guide's example for creating thumbnails, should I load the image_lib library inside the for(;Wink loop for batch thumb creation? I say this because I'd need to change $config['source_image'] in each for loop and load the lib again... not optimum, right?

Thanks a lot in advance,[/quote]

Hi CARP,

I'd put the image files in a folder outside the system folder, then you could reach it by using base_url()."gallery_files/".$my_file.

Another thing is if you want to use for... loop syntax, please conside using foreach(){} instead.

I guess that's a wiki page referring to multiple uploads and image manipulation... Give it a search...
#3

[eluser]CARP[/eluser]
Great tip!
PS: Yes, I use foreach (got wrong in the msg post)
Thanks hvalente13




Theme © iAndrew 2016 - Forum software by © MyBB