remove user galleries remove user galleries
 

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]

Main Menu

remove user galleries

Started by LuthienMoss, September 04, 2007, 10:16:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LuthienMoss

recently I re-installed coppermine and forgot to change the setting which allows users to have their own albums and upload pictures. Users have uploaded pics and as soon as I noticed I deleted the pictures and albums, but I can't seem to remove the "user galleries" category which is displayed justunder the categories I've (admin) created. I cant seem to get rid of the user gall category, even though I have indeed deleted all albums and pictures within the cat.

Help?

LuthienMoss

before someone bites my head off, I wanted to say I did use the search, found this

QuoteWrong answer: you can allow user registration (users could rate or comment if you allow them to do so). Just disallow your users to have personal galleries (groups panel). Then get rid of all existing user galleries. If the user gallery category is emtpy, it will disappear (i.e. it will not be displayed). Has been asked and answered often, please use the search.

As mentioned, I did delete all albums and pictures within the category, but it is still displayed ...

Sami

There is still 2 albums , delete them too
‍I don't answer to PM with support question
Please post your issue to related board

LuthienMoss

it's odd, cause when I enter the gallery (index) and it lists all the categories (overview) it says that there is one album in the "User Galleries", but when I click on the cat "User Galleries", clearly there is no album.

QuoteUser list
There are no user galleries 

Random files - User galleries
No image to display 

Last additions - User galleries
No image to display 

Did they go invisible?

Joachim Müller

They are invisible if they don't contain files uploaded to them. Delete the empty albums and your "users gallery" category will no longer be displayed.

LuthienMoss

... like mentioned, I see no albums whatsoever.


Category overview, it says I have 1 album and 0 files
http://img73.imageshack.us/img73/172/damn1hr1.jpg

But when clicking on "user galleries", I see no albums
http://img260.imageshack.us/img260/9567/damn12gp6.jpg

Joachim Müller

A link to your gallery would be more helpfull than a bunch of hotlinked screenshots...

Sami

AFAIK this is a missing feature ,
if those albums have been created by other users [and were empty] then you can't see them and you should manually delete them by phpmyadmin or any other mysql tool that you have
you should delete those albums that have category > 10000 from XXX_albums table

@GauGau:maybe we should mark this as a bug !
‍I don't answer to PM with support question
Please post your issue to related board

LuthienMoss

Thanks for shedding Some light on this mysterious problem.

I have never used phpmyadmin before (have access to it though), I don't want to mess something up, I got to ask, how can I delete the albums? In the meantime I'll try to google some tutorial on how to do this.

If I dont succeed with the phpmyadmin, is there any other way? Such as deleting the user who created the album? Am I able to see which user created which album? And is it possible for the user in question to delete it him/herself?

Quote@GauGau:maybe we should mark this as a bug !
That would be good, imo.

Sami

#9
the task is dead easy,
- create a backup of coppermine database either by control panel or export option of phpmyadmin
- select coppermine database and run this query [by selecting SQL under phpmyadmin] to remove those albums

DELETE FROM XXX_albums WHERE category > 10000

you should change XXX_ with your table prefix

Quote
If I dont succeed with the phpmyadmin, is there any other way? Such as deleting the user who created the album? Am I able to see which user created which album? And is it possible for the user in question to delete it him/herself?
owner of the albums can't see the empty albums neither , but if you know the user then you can ask him to first upload an image to his/her album and then delete that album
‍I don't answer to PM with support question
Please post your issue to related board

LuthienMoss

Thanks for the guideline. I did as described, not sure if it worked out. I pasted this into the little "SQL" box that popped up when selecting the SQL icon to run the query:
QuoteDELETE FROM cpg143_albums WHERE category > 10000
http://img255.imageshack.us/img255/5162/damnitcurmx9.jpg

I hit go, and when I returned to the main window I get this:
QuoteDeleted rows: 0 (Query took 0.0009 sec)

The user galleries are still there. Did I do something wrong?

Quoteowner of the albums can't see the empty albums neither , but if you know the user then you can ask him to first upload an image to his/her album and then delete that album
Have no idea who did it, and I guess there isn't a way of finding out?

Thanks for the help, it is much appreciated!

LuthienMoss

out of curiousity, how come I type in > 10000 ? How will that remove the user galleries?

Sami

#12
So it means that the owner of those albums is you  :)
run this query to find out which albums are empty

SELECT a.aid AS Album,COUNT(p.pid) AS PicNum FROM xxx_albums AS a LEFT JOIN xxx_pictures AS p ON a.aid = p.aid GROUP BY p.aid


Those that has 0 for PicNum are the empty albums so you can then put the Album id to this query:

DELETE FROM xxx_albums WHERE aid = {Album that has PicNum=0}


Quoteout of curiousity, how come I type in > 10000 ? How will that remove the user galleries?
category column of albums table for user's album created with 10000+user_id

I think it's better to do as suggested by GauGau , post a link to your gallery for more info
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

Quote from: Sami on September 05, 2007, 03:48:59 PM
@GauGau:maybe we should mark this as a bug !
Hehe, that's a known issue (or missing feature), but the wording is a matter of taste. There already are similar threads on the bugs board. For future versions, we'll have to make sure to display empty albums to the admin as well. Needs looking into for cpg1.5.x, but this very thread should not be moved to the bugs board, as there already are loads of threads that deal with this question. There are other ways to circumvent the problem and actually delete the leftover user galleries, see http://forum.coppermine-gallery.net/index.php?topic=4268.msg18499#msg18499 for example.

LuthienMoss

Sorry for the late reply, was out of town.

Just wanted to say the problem is now solved. GauGau I followed the link you posted and it worked splendid!! I know I made a search before posting (and saw a lot of people had the same problem) but never found a solution.

Thanks so much, it's really appreciated!  ;D