News:

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

AuthorTopic: Move user albums to public category (Read 38602 times)

Because so many people ask how they can move user albums to public categories, I made a little plugin.

Just install it like every other plugin. A new button will appear in the admin menu.

Version 1.0 (2008-11-28):- [new] plugin- list all user albums (for admins only) - move the selected album to the latest category (with the highest 'cid')- [new] choose if the user can edit his files after moving or not-> after moving to public, you can move it to a category you want, as you can do it with every other public album

Version 1.1.0 (2008-12-11):- [bugfix] new owner name will be applied- [improvement] choose where to move the selected album- [improvement] choose which user will be the new owner of the moved files (or just leave the current user as owner)- [new] move more than 1 album at a time- [new] status page which lists the moving status and some links, relating to the moved album

Version 1.1.1 (2009-02-23):- [improvement] show name of parent category in category list

cpg_db_query("UPDATE {$CONFIG['TABLE_ALBUMS']} SET category = (SELECT cid FROM {$CONFIG['TABLE_CATEGORIES']} ORDER BY cid DESC LIMIT 1) WHERE aid = {$_GET['move']} AND category > 10000");(should be line 10 if you have nothing modified)

cpg_db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET owner_id = 1 WHERE aid = {$_GET['move']}");This will only work, if you have a user with user-id 1 (this is the admin in most cases). Change the user-id if you want to assign the pictures to another user(-id). Make sure, that this user exist. Otherwise the uploader can edit their albums further on.

Hi There, would it be possible to see the entire catagory path. Because I have a lot of catagories and some off them are returning names in differend categories so I Only can see 'Lezingen' but I can't see if this is the catagory under the catagory 2008 or category 'Lezingen' under category 2007.

I just uploaded version 1.1.1 - it's a simple change which shows the name of the parent category (just one level higher, not the whole category path). I hope this is what you wanted. If not. let me know

Yes!!!! This wil make the choice for moving an album a lot easyer.Did you also think about the same tool but then from public to user gallery. Because I also use this but i can only fix this with phpmyadmin into the database. That would also be a great plugin.Based on this. (see Below)

To move an album from a public category into the user galleries, first open the db _users table, to find the user you want to own the album. Note down their id (the original admin will be 1).

Now open your _albums table in your db. Browse to the row for the album you want to move and click edit. Now change the cat from its current setting to user id number +10000 (so for admin it will be 10001).

save the settings, and away you go.

To move an album from the user galleries to a public category, simply change the setting from its 10000+ number, to the cat id number.