Announcement

#1 2011-02-24 13:44:12

Sugar888
Translation Team
Zurich
2009-11-29
54

[resolved] How to arrange photos with FTP without losing comments and ratings?

Hi guys

I’m currently trying to bring some order in the gallery. All my photos are uploaded with the FTP method. If I want to move a photo from one folder to another then of course it loses the information on the site, because you delete the photo in one folder and then create it in the new one.

What I’d like to know is if there is a possibility to move the information like comments and ratings too.

Any suggestions?

Sugar888

Offline

 

#2 2011-02-24 13:57:55

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

Hi Sugar888,

Personnaly, I would "virtualize" my albums (in fact, I did it on my own gallery), ie converting the "galleries/*" filetree into the "upload/year/month/day" structure + virtual albums. But I understand you may want to keep your photos into "galleries".

Another option is to have text file with "old_path new_path" and then you perform an SQL query to update all your images.path but you would also have to care about images.storage_category_id :-/

Offline

 

#3 2011-02-24 18:39:42

Sugar888
Translation Team
Zurich
2009-11-29
54

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

Looks like a lot to do :-P

Thanks plg for the answer. I'll see what I can do.

Offline

 

#4 2011-02-24 18:59:45

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

Sugar888 wrote:

Looks like a lot to do :-P

I have a script for virtualization. I've used it on my own gallery and I've used it on Piwigo.com accounts that were importing an existing database.

Offline

 

#5 2011-02-24 22:31:23

Sugar888
Translation Team
Zurich
2009-11-29
54

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

plg wrote:

I have a script for virtualization. I've used it on my own gallery and I've used it on Piwigo.com accounts that were importing an existing database.

Sounds interesting. ^^

Would it be possible to have it (with a little instruction)?

Offline

 

#6 2011-02-24 22:35:52

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

I release Piwigo 2.2.0RC3 + Community plugin and I prepare that.

Offline

 

#7 2011-02-26 09:28:43

pab
Translation Team
Czech republic, Ostrava
1970-01-01
11

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

plg wrote:

Hi Sugar888,

    Another option is to have text file with "old_path new_path" and then you perform an SQL query to update all your images.path but you would also have to care about images.storage_category_id :-/

Hi plg, please can you tell me how to use the text file to update all images.path?
I want to move one subcategory one level up and keep all information (mainly image.date_available - because I don't want mark pictures as recent ones).
Thank you, Pavel

Offline

 

#8 2011-03-07 11:13:02

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

Sugar888 wrote:

plg wrote:

I have a script for virtualization. I've used it on my own gallery and I've used it on Piwigo.com accounts that were importing an existing database.

Sounds interesting. ^^

Would it be possible to have it (with a little instruction)?

Sorry for the delay Sugar888, I wanted to make it more simple to use. I've converted my Perl script into a Piwigo plugin : [extension by plg] Virtualize

Offline

 

#9 2011-03-07 14:12:02

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

pab wrote:

Hi plg, please can you tell me how to use the text file to update all images.path?
I want to move one subcategory one level up and keep all information (mainly image.date_available - because I don't want mark pictures as recent ones).

If you just want to move a physical category without turning it into a virtual category, I suggest :

1) move the directory on your filesystem
2) know the category numeric id and the new parent category id
3) perform the following SQL query (replace the <variable> with the right values:

update piwigo_categories set id_uppercat = <new parent category id> where id = <category id>;

for example :

update piwigo_categories set id_uppercat = 123 where id = 234;

4) go to [Administration > Tools > Maintenance] and perform an Update categories information and then a Update images information

Of course, backup your database before any such operation.

Offline

 

#10 2011-03-07 17:17:16

Sugar888
Translation Team
Zurich
2009-11-29
54

Re: [resolved] How to arrange photos with FTP without losing comments and ratings?

plg wrote:

Sugar888 wrote:

plg wrote:

I have a script for virtualization. I've used it on my own gallery and I've used it on Piwigo.com accounts that were importing an existing database.

Sounds interesting. ^^

Would it be possible to have it (with a little instruction)?

Sorry for the delay Sugar888, I wanted to make it more simple to use. I've converted my Perl script into a Piwigo plugin : [extension by plg] Virtualize

Thank you very much plg :-)

-----

edit: I'll upload a translation in german and italian this evening ;-)

Last edited by Sugar888 (2011-03-07 18:53:04)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact