Automate categories config with SQL commands?

Phoca Gallery - image gallery extension
trinkel
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 29 Jun 2009, 19:43

Automate categories config with SQL commands?

Post by trinkel »

I am building a photogallery for a skating team. I'm setting up a hierarchy of subcategories similar to [Year->Team->Competition->Skater]. Each year has 4 teams, each team has 6-10 competitions, each competition has 12-20 skaters. Skaters are allowed to upload pictures to the skater folders within each competition. I have uploaded the entire folder structure to create the categories and then go in to manually configure the setting.

[Sidebar]: A great new feature would be to allow for the duplication of some of this structure within Phoca Gallery. Right now, doing it manually for each subcategory is a bit of a pain. Another nice feature would be the ability to include a text file in the folder when it is uploaded which would include the category configuration information. Actually, thinking about it, that would be really cool.

The category configuration that I'm doing is:
  • All categories except skaters:
    Access Level: Registered
    Access User rights: All Registered
    Upload and Add User Rights: Administrator
    Delete and Publish User Rights: Administrator

    The title of the competition categories get a minor change and the description gets information about the event
  • All skater categories:
    Access Level: Registered
    Access User rights: All Registered
    Upload and Add User Rights: All Registered
    Delete and Publish User Rights: All Registered
    Set upload folder to current directory
Is there any way I can automate some of this process, maybe with external SQL commands or a script outside of the web based interface? I imagine the non-skater categories wouldn't be worth the trouble, but if I could do something about the skater categories it would sure make life much easier.

Thanks!

Tim
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Automate categories config with SQL commands?

Post by Jan »

Hi,
"Another nice feature would be the ability to include a text file in the folder when it is uploaded which would include the category configuration information"


this is not possible :( as the category can be independent to folder :-(

You can automate the process as you will enable the folder structure e.g. on your pc and then you will copy it to server. Phoca Gallery will automatically create categories (from folders), subcategories (from subfolders) and will create thumbnails.

For setting rights, there is no automated process possible yet :-(

Jan
If you find Phoca extensions useful, please support the project
trinkel
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 29 Jun 2009, 19:43

Re: Automate categories config with SQL commands?

Post by trinkel »

Thanks for the information Jan. I am happy that you said "yet". :)

If they aren't already in there, please log one or both of these as feature requests:
  • The ability to duplicate a category structure
  • The ability to include category settings information in a "structured" upload (ie: your ftp upload scenario). It could be done with XML or key:value lists in each directory for the settings - maybe?
Thanks, again it's a great looking product.
Post Reply