Advanced search  

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

Pages: [1]   Go Down

Author Topic: Changing permissions on multiple categories  (Read 5004 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.016 seconds with 19 queries.