Is there a way to move users upload album? Is there a way to move users upload album?
 

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

Is there a way to move users upload album?

Started by Phalanx, August 02, 2004, 06:50:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Phalanx

Is it possible or there's a way to move users upload album into the main category? There are alot of users album I like to move but, it seem the only way is to move them manual by ftp and re-batchadd.

Casper

There is no normal method.

You can do it in the database, by changing the category the album is in there.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Phalanx

Hi,
Thanks for reply. Which sql table field should I look for the users upload albums? I don't think it's cms_cpg_albums .

Assuming that I can move it. Do you know if the author of the users will retain in the album info? Once the albums is now in a different category?

Casper

Yes the table you need to edit is the albums table.

The album will now be 'owned' by the admin, and if uploads to it are allowed, ALL members with upload permissions will be able to upload to it.  If uploads to it are not allowed, only you, the admin, will be able to upload to it.

The pics will still be shown as being uploaded by the original owner, and will display as his in his profile.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Phalanx

When you mean "and if uploads to it are allowed" , you mean for the users to upload to the main category?

If it is, this was my purpose as I don't want to them to have permission to upload, cause users tend to mess things up alot, and not upload by the order I like.

Thats why I like to be able to move to main category by myself from their users galleries album, with their permission of course.

So in final what you mean is that, if I move their albums by mysql in albums table. The author of that album will now be show as uploaded by admin?

Phalanx

Casper

If you want to restrict uploads, then yes, this will do as you ask.

The owner of the album will now be you, BUT the pics will still be shown as uploaded by the original owner.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Phalanx

Thank you. I tried to follow this and move by mysql and its prove to be difficult and monotomous task. It's ok to do this when there's a few albums but I have over 400 albums in main category and who know how many in users galleries. Its quite impossible to search a select albums in so many pages.

Is there a way to move an albums by its aid into a new pos (category) by just using the command prompt? I'm not an expert on mysql and I don't want to screw things up. Thanks alot if you can assist me on this, this is my last question.
Thanks.

Nibbler

You can enter the queries manually:

UPDATE cpg_albums set category = 5 WHERE aid = 2
UPDATE cpg_albums set category = 5 WHERE aid > 56
UPDATE cpg_albums set category = 5 WHERE aid IN ('3','7','123')
UPDATE cpg_albums set category = 5 WHERE aid BETWEEN 50 AND 65


just a few examples, change cpg_ to the prefix you are actually using

Phalanx

So I would enter these queries from phyadmin in:

Click on Query tabs

where it said SQL-query on database Mytable:

I type this in: UPDATE cpg_albums set category = 5 WHERE aid = 2

then click on Submit Query leave everything else as is? Just to verify.

Thanks.

Joachim Müller

be sure to understand what you're doing with a tool like phpMyAdmin, I recommend doing a backup (dump) of your mySQL tables before actually running any queries like that.

GauGau

Phalanx

Yea I realize this and take the precautions.

But is the steps I ask above is the correct way of entering the query? Can you verify, thanks.

Joachim Müller

yes, by clicking on the "query" tab you get a textarea field where you can type your query or copy-n-paste it in.

GauGau

Phalanx

What does it mean by this when I submit query..

You have to choose at least one Column to display

with only cpg_albums table selected

Do I need to select Add Field Columns to something?

Phalanx

This moving albums process is harder than I thought :(

Casper

Please tell us, are you wanting to move ALL the user albums, and what is the category id you want to put them in?
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

I strongly recommend you don't use phpMyAdmin at all, since you appear not to be experienced enough. You should at least post the query you entered and the full error message.

GauGau

Phalanx

Right. What I want is move the users galleries albums into the one of the main category of my choice.

This is the query I used: UPDATE cms_cpg_albums set category = 17 WHERE aid = 319  you can also see this from the screenshot

Query screenshot: http://www.909ms.com/images/jpn/cpg_query.jpg

Query error: http://www.909ms.com/images/jpn/cpg_error.jpg

Query cpg_albums: http://www.909ms.com/images/jpn/cpg_albums.jpg

If you look on the right, the 17 is the main category and 10654 is the user category. One other things that curious me is that all of the main category have a sequence for their albums, you can see ex: blueeyes 1-6 have pos of 0-5. If I were able to move aid 319 into category 17, wouldn't the 2 pos have the same number conflict? would this result in anything? just a curiuos. I hope this is some help to make me these albums :(

Joachim Müller

your site is blocked for me, can't look at it. Does it contain adult content (if yes: you should always post a warning with adulkt links)?

GauGau

Casper

Try running this query from within the table.  This query works fine for me.

If you are going to do them 1 at a time, you may as well just click on the edit icon next to each album row.  But I agree with gaugau, you could end up ruining your site if you make an error.  Make a dump before you do any work, so you can restore if you need to.
There will be no conflict when the albums move, the database will just change the position within the category accordingly.

@ gaugau, it's not an adult site, so no warning needed.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Phalanx

Thank you guys  :). I guess i will just do this manually 1 by 1 by clicking on icons. If I need any more help from this, guess I will just come back here and bother you agains  ;D.
Thanks.