Automatically Creating Album Name/Category Via HTML Link Automatically Creating Album Name/Category Via HTML Link
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Automatically Creating Album Name/Category Via HTML Link

Started by Hirsch, June 24, 2012, 04:08:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hirsch

Greetings --

Having searched the documentation and the forums, I cannot see a way to do this (it is completely possible my search parameters were wrong when searching the forum, but I did try):

I would like to create a link on a page that allows a user to
  a) create an album using the name I provide, and the category
  b) if the album exists, allow them to add to it

Something like:
   mysite/Coppermine/upload.php?album_name="2012_SomeAlbum"&category="Events"

I do not see how to do this. It would make it easier to keep everything organized if I can keep the name/category set automatically.

Thanks in advance for any help.

Hirsch

Having done more work with this, it appears that I (as the Admin) have to create all albums before users can upload photos to them. If that is what it takes, then I guess this question is closed. I was hoping for an automated means of handling this ... but I guess not. Thanks for even reading this message.

Αndré

In the category manager you can set which user groups are allowed to create albums within that category. So it's possible that non-admins create albums in public categories.

Hirsch

Thanks. This isn't quite what I was hoping for, but that's okay. I appreciate hearing your suggestion.

Αndré

It should be possible with a custom file that accepts the album title and category ID as parameters. That file has to check if the album already exists. If so, redirect the user to the upload form. If not, create the album and redirect the user to the upload form. Of course it also has to check if the user is allowed to create albums and upload files at all. I assume this is a quite easy modification, but it has a big disadvantage. Malicious users may post links (e.g. in the picture's comments, title or description), that will automatically create albums if a user with sufficient privileges loads that links (for exactly that reason the BBCode tags url and img have been disabled in cpg1.4.x.