Hi All!
I would love to take my G2 installation and migrate it to Piwigo, but how? I have about 4500 images / 200 albums with captions.
Obviously there is no way I could manually recreate all the captions ... any suggestions?
Rudolf
Offline
Hi frumpel,
I confirm there is currently no migration tool to convert a Menalto Gallery into Piwigo.
As far as I know, Menalto Gallery has a remote API, so it means that Piwigo may import data from Menalto. It could be a good plugin for Piwigo! (since a few Menalto Gallery users are switching to Piwigo)
Offline
I'm working on a small Perl script to migrate my >8000 picture album from G2 to Piwigo. I have extensive captions and titles (no way I'm redoing that manually). If anyone is still interested or finds this through google (like me) just message me. The script accesses the G2 and piwigo sql databases and updates piwigo after a local quick sync (first copy the contents of g2data/albums to piwigo/galleries, then syncronize in the piwigo admin panel to seed the db).
Hi DSchwen,
Yes, I'm highly interested, and I read Perl fluently :-)
The request "how can I migrate from Menalto Gallery to Piwigo?" occurs at least once a week!
Offline
Ok, worked on it a bit more last night. It can set names and descriptions for the images. Next up, titles for the folders. One problem I have yet to solve is that gallery2 has
title,description AND a summary field (for both images and folders)
while piwigo only has
name (for folders)
name,description (for images)
Did i see that right? My wife frequently added little taglines to folders (such as dates) in the summary tag, and she has been a bit inconsistent as whether she put the caption is description or summary (sometimes both). So I'll have to merge some fields. Or do you plan on adding a summary field and descriptions for folders? Or is there a plugin already? Is that straight forward to implement as a plugin?
on albums, you can have a name and a description and with plugin Extended Description you can set description as :
short description <!--complete--> long description
(see http://piwigo.com/blog/2011/11/24/album … ne-tuning/ )
For photos, you only have name + description.
Offline
Ok, gere we go:
https://github.com/dschwen/g2piwigo
Still work in progress. So far it converts image and folder descriptions (retaining all data by utilizing the "Extended Description" plugin.
Next I'll work on converting the "representative image" for each album.
Quick question, you have rank and global_rank columns in the db. Can I just dump arbitrary numbers into rank, or do I have to update the global_rank column accordingly?
In the latest version album sort order and album thumbnails (Highlights/representative picture) are converted as well. Get it at
https://github.com/dschwen/g2piwigo
Next up may be the conversion of posted user comments.
I don't code so be gentle....
I believe that a change by PLG to the script has broken it. Referring below, gallery2 table column names have a g_ prefix thus the $opt{'menalto-prefix'} (referring to the table name prefix) substitution is wrong. I did not get things working by changing $opt{'menalto-prefix'} where it seemed appropriate (knowing appropriate is the issue:-) but the script runs by copying back dschwen's original block o' code. There are 3 points in the script where this error exists.
- SELECT - f.g_id, i.g_title, i.g_summary, i.g_description, i.g_canContainChildren, a.g_orderWeight, a.g_viewCount - FROM - g2_FileSystemEntity f, g2_ChildEntity c, g2_Item i, g2_ItemAttributesMap a - WHERE - i.g_id = f.g_id AND - f.g_id = c.g_id AND - i.g_id = a.g_itemId AND - c.g_parentId = ".$db1->quote($parentId)." AND - f.g_pathComponent=".$db1->quote($path[$level-1])."; - "; +SELECT + f.".$opt{'menalto-prefix'}."id, + i.".$opt{'menalto-prefix'}."title, + i.".$opt{'menalto-prefix'}."summary, + i.".$opt{'menalto-prefix'}."description, + i.".$opt{'menalto-prefix'}."canContainChildren, + a.".$opt{'menalto-prefix'}."orderWeight, + a.".$opt{'menalto-prefix'}."viewCount, + FROM_UNIXTIME(e.".$opt{'menalto-prefix'}."creationTimestamp) + FROM ".$opt{'menalto-prefix'}."Item i + JOIN ".$opt{'menalto-prefix'}."FileSystemEntity f ON i.".$opt{'menalto-prefix'}."id = f.".$opt{'menalto-prefix'}."id + JOIN ".$opt{'menalto-prefix'}."ChildEntity c ON f.".$opt{'menalto-prefix'}."id = c.".$opt{'menalto-prefix'}."id + JOIN ".$opt{'menalto-prefix'}."ItemAttributesMap a ON i.".$opt{'menalto-prefix'}."id = a.".$opt{'menalto-prefix'}."itemId + JOIN ".$opt{'menalto-prefix'}."Entity e ON e.".$opt{'menalto-prefix'}."id = i.".$opt{'menalto-prefix'}."id + WHERE c.".$opt{'menalto-prefix'}."parentId = ".$db1->quote($parentId)." + AND f.".$opt{'menalto-prefix'}."pathComponent=".$db1->quote($path[$level-1])." +;";
Offline
Great work. Quite some effort put into this.
But the beauty of Gallery2 is: the original files and dirs are preserved, so migrating by a clean install is also very well possible. The reason why I like /piwigo/galleries/ more than the /piwigo/upload/ : you can also easily access and find your photos outside Piwigo.
So what will make Gallery2 completely obsolete?
Gallery2 URLs securing/authenticating logged in users like:
http://myhost.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=47392&g2_serialNumber=4
Hope to see this also in Piwigo, like:
http://myhost.com/piwigo/action.php?id=123456&part=th
or
http://myhost.com/piwigo/i.php?id=123456&part=th
with proper authentication.
So in the end Piwigo is as secure as Gallery2!
Offline
I have to give a huge credit to the people on this thread working hard on this problem. Menalto2/3 just announced shutdown of the project so this will be a popular item on everyone's mind if they haven't seen this coming for the past 2+ years like me.
My case might be even more complicated as I will try to unwind Gallery which was integrated via the modules into the Drupal.
Again, thanks for the hard work. I'll be sure to provide feedback on my success using this tool!
Hi,
I've been following the steps outlined in the Menalto2Piwigo plugin. Upon executing the last Import step, it results in the following page with a bunch of warnings and errors. Could someone take a look and let me know if you need anything else?
Notice: Undefined variable: piwig_id in /var/www/mysite.com/htdocs/piwigo/plugins/menalto2piwigo/admin.php on line 195
Error, is not an image and Menalto says it is an image
Notice: Undefined variable: piwig_id in /var/www/mysite.com/htdocs/piwigo/plugins/menalto2piwigo/admin.php on line 195
Error, is not an image and Menalto says it is an image
Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND f.g_pathComponent='Image01'' at line 16
SELECT
f.g_id,
i.g_title,
i.g_summary,
i.g_description,
i.g_canContainChildren,
a.g_orderWeight,
a.g_viewCount,
FROM_UNIXTIME(e.g_creationTimestamp)
FROM g2_Item i
JOIN g2_FileSystemEntity f ON i.g_id = f.g_id
JOIN g2_ChildEntity c ON f.g_id = c.g_id
JOIN g2_ItemAttributesMap a ON i.g_id = a.g_itemId
JOIN g2_Entity e ON e.g_id = i.g_id
WHERE c.g_parentId =
AND f.g_pathComponent='Image01'
; in /var/www/mysite.com/htdocs/piwigo/include/dblayer/functions_mysqli.inc.php on line 798
Fatal error: Call to a member function fetch_row() on a non-object in /var/www/mysite.com/htdocs/piwigo/include/dblayer/functions_mysqli.inc.php on line 186
Warning: [mysql error 1146] Table 'g2-to-g3.piwigo_sessions' doesn't exist
REPLACE INTO piwigo_sessions
(id,data,expiration)
VALUES('AC05de2lb0q7663npo3i18vl33jjr0','pwg_device|s:7:\"desktop\";pwg_mobile_theme|b:0;pwg_uid|i:1;need_update|b:0;extensions_need_update|a:0:{}',now())
; in /var/www/mysite.com/htdocs/piwigo/include/dblayer/functions_mysqli.inc.php on line 798
I want to move my Gallery2 database to Piwigo. Seems straightforward according to the instructions but I'm doing something wrong and I'm too close to the problem to recognize my error.
I did all the steps successfully up until the actual database conversion.
When I execute the conversion I get an error that appears to relate to accessing a column in the mysql database. My database was created using c-panel and it's hard to relate the prefixes for Tables and Columns to the requirements of Menalto2Piwigo.
database host: localhost
databse name: citrusor_gll2
database user: citrusor_gll2
database password:*****
table prefix: citrusor_gll2_gll
column prefix: gll_
Fatal error: Call to a member function fetch_row() on a non-object in /home/citrusor/public_html/CODGERCONSULTING.NET/Gallery_Piwigo/include/dblayer/functions_mysqli.inc.php on line 186
Any advice would be greatly appreciated.
Offline