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: Changing permissions on multiple categories  (Read 5049 times)

0 Members and 1 Guest are viewing this topic.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Changing permissions on multiple categories
« on: January 17, 2014, 02:03:05 pm »

Due to the site outage we lost an already solved thread which could be useful for other people, that's why I post it again.

It's currently still available in Google's cache: http://webcache.googleusercontent.com/search?q=cache:yEYhzWPIEIUJ:forum.coppermine-gallery.net/index.php%3Ftopic%3D77007.0+&cd=2&hl=de&ct=clnk&gl=de&client=firefox-a


Question:
Quote from: Trickydicky
Just installed my first gallery. Have created a number of categories using mass import. Is there a way to permission all the categories in one go? I want to allow registered users to create albums in all of them.


Solution:
Quote from: Αndré
There's no interface to do that. If you want to do it in batch, you'd need to run an appropriate SQL query (e.g. with phpMyAdmin). This should work:
Code: [Select]
INSERT IGNORE INTO `cpg15x_categorymap` (SELECT cid, '2' FROM `cpg15x_categories` WHERE cid > 1);


Additional question:
Quote from: Trickydicky
Many thanks I'll try that when I have access.

One more unrelated question - we bulk imported some albums (empty) but have changed our minds about the structure - is there a way to delete them in bulk?


Solution:
Quote from: Αndré
SQL query:
Code: [Select]
DELETE FROM `cpg15x_albums` WHERE aid NOT IN (SELECT DISTINCT aid FROM `cpg15x_pictures`)
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.