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: remove user galleries  (Read 5925 times)

0 Members and 1 Guest are viewing this topic.

LuthienMoss

  • Guest
remove user galleries
« on: September 04, 2007, 10:16:06 pm »

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?
« Last Edit: September 09, 2007, 11:56:34 am by Sami »
Logged

LuthienMoss

  • Guest
Re: remove user galleries
« Reply #1 on: September 04, 2007, 10:19:55 pm »

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

Quote
Wrong 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 ...
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: remove user galleries
« Reply #2 on: September 04, 2007, 11:40:26 pm »

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

LuthienMoss

  • Guest
Re: remove user galleries
« Reply #3 on: September 05, 2007, 12:47:41 am »

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.

Quote
User 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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: remove user galleries
« Reply #4 on: September 05, 2007, 09:16:34 am »

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.
Logged

LuthienMoss

  • Guest
Re: remove user galleries
« Reply #5 on: September 05, 2007, 01:04:07 pm »

... 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: remove user galleries
« Reply #6 on: September 05, 2007, 01:19:18 pm »

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

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: remove user galleries
« Reply #7 on: September 05, 2007, 03:48:59 pm »

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 !
Logged
‍I don't answer to PM with support question
Please post your issue to related board

LuthienMoss

  • Guest
Re: remove user galleries
« Reply #8 on: September 05, 2007, 04:36:02 pm »

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.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: remove user galleries
« Reply #9 on: September 05, 2007, 04:53:11 pm »

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
Code: [Select]
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
« Last Edit: September 05, 2007, 04:59:48 pm by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

LuthienMoss

  • Guest
Re: remove user galleries
« Reply #10 on: September 05, 2007, 05:57:26 pm »

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:
Quote
DELETE 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:
Quote
Deleted rows: 0 (Query took 0.0009 sec)

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

Quote
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
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!
Logged

LuthienMoss

  • Guest
Re: remove user galleries
« Reply #11 on: September 05, 2007, 06:20:03 pm »

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

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: remove user galleries
« Reply #12 on: September 05, 2007, 11:29:22 pm »

So it means that the owner of those albums is you  :)
run this query to find out which albums are empty
Code: [Select]
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:
Code: [Select]
DELETE FROM xxx_albums WHERE aid = {Album that has PicNum=0}

Quote
out 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
« Last Edit: September 05, 2007, 11:34:27 pm by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: remove user galleries
« Reply #13 on: September 06, 2007, 07:53:10 am »

@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.
Logged

LuthienMoss

  • Guest
Re: remove user galleries
« Reply #14 on: September 09, 2007, 11:26:02 am »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.