Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Automatically Creating Album Name/Category Via HTML Link  (Read 2648 times)

0 Members and 1 Guest are viewing this topic.

Hirsch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Automatically Creating Album Name/Category Via HTML Link
« on: June 24, 2012, 04:08:52 pm »

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.
Logged

Hirsch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Automatically Creating Album Name/Category Via HTML Link
« Reply #1 on: June 25, 2012, 12:24:15 am »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Automatically Creating Album Name/Category Via HTML Link
« Reply #2 on: June 25, 2012, 11:05:53 am »

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.
Logged

Hirsch

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Automatically Creating Album Name/Category Via HTML Link
« Reply #3 on: July 04, 2012, 08:27:24 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Automatically Creating Album Name/Category Via HTML Link
« Reply #4 on: July 05, 2012, 08:25:42 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.