Contact Lifestream



Coppermine tidying

So I realized a while back that I had bungled up the albums/ coppermine subfolder. Specifically I had batch uploaded to albums/userpics/*. Apparently the devs, because of some bug, decided that batch uploads can only go into albums/* and this was ages ago but apparently someone forgot to tell me that. So I’ve been hanging over phpMyAdmin and FTP, editing image paths and moving images. I thought I would clean up some of the messy subfolders as well while I’m at it.

Thankfully mySQL is a big help, just look at the nifty replace feature.

[mysql]UPDATE `cpg11d_pictures` SET `filepath` = replace(`filepath`,’userpics/’,”);[/mysql]

… or for cleaning up other mistakes …

[mysql]UPDATE `cpg11d_pictures` SET `filepath` = replace(`filepath`,’10003/’,'wp_anime/’) WHERE `aid` = 15;[/mysql]

And presto! No more extra subfolder. Moving the files using FTP is a piece of cake after that.