Groups
Groups

Where are the captions stored?

83 views
Skip to first unread message

Andrew L

unread,
Oct 28, 2024, 10:47:32 AM10/28/24
to Gallery 3 Users
I have come across an old Gallery 2 install on one of my CPanel hosts with many albums.

I can retrieve the photos and upload them to some other gallery and cloud photo storage, but where can I find the captions? And are they linked easily to the photos?

I'd like to write a Python script to rename the photos from e.g. aaa.jpg to the <caption.jpg>


Thanks.

David and Jackie Armstrong

unread,
Oct 28, 2024, 11:41:23 AM10/28/24
to gallery...@googlegroups.com
Andrew,

The details of the albums and photos that they contain will be in the database. In the database for the gallery 2 library that I inherited and migrated to gallery 3, the album and photo details were in the g2_Item table with the album and photo title in the g_title field.

In gallery 2 the photo path name is not included in the g2_Item table, whereas it is in the items table in gallery 3, so it may be worth importing the gallery into gallery 3 first of all.

Regards,

David Armstrong.

--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gallery-3-users/0b751c0f-f269-4ab6-a594-9d3c2f20160dn%40googlegroups.com.

J.R.

unread,
Oct 29, 2024, 2:16:05 PM10/29/24
to gallery...@googlegroups.com
Andrew,

The short answer is yes, you can retrieve your photos from the old Gallery 2 installation so long as you have access to the Cpanel where it is located. I believe the image storage location is the same  in Gallery 3 (in a sub-folder named "/var") so try that first. They will most likely be the sub-folder of the gallery root installation called " var " as in:

gallery/var

All of your images should there, in their original size and format, probably in several sub-folders of /var

The captions are different issue. I have never used captions but they must be stored somewhere in the database (but not in an actual sub-directory as the images are). Again, with CPanel you should be able to access the various tables in the database and somewhere in there you should find each caption in a field, stored as plain text, and also a field with some text pointing to the location of the image the caption belongs to. Extracting them from the database? I'm sure it can be done but don't know to do that myself.

-- J.R.

Adrian London

unread,
Oct 29, 2024, 7:17:13 PM10/29/24
to Gallery 3 Users
This will help you understand the table/column names where things like photo descriptions are kept in G2.


--
Adrian

Andrew L

unread,
Nov 1, 2024, 7:20:47 PM11/1/24
to Gallery 3 Users
Thanks. I have managed to find the captions and links through to the albums (directories) and their files - essentially I can link the ID to a file in a directory. I've also got some Python code to iterate files and rename the aaa.jpg to caption text.jpg and even some Python to write Exif and IPTC into the jpg, so I could trabsfer the images to Flickr.

However, I am now wondering about transferring to Piwigo, as the Perl code suggests someone has done that.

Is there a Piwigo plug-in already that would to that?

I have another CPanel host where I can set the PHP version so I could move the files and the database into a Gallery 2 install there and then try to upgrade to Gallery 3. How tricky would that be?

David and Jackie Armstrong

unread,
Nov 4, 2024, 5:51:14 PM11/4/24
to gallery...@googlegroups.com
The best route is to install gallery 3 and then use the g2_import module to import the database and images into Gallery 3. I’ve used this route, and also modified the transfer manually via phpmyadmin to keep the album summary and album description separate (these are merged in the import module).

Full documentation is available at:


Piwigo has an import extension, which appears form the GitHub page to be compatible with both gallery2 and gallery3. I have not used this extension so I’m not certain of the scope of the migration - for example if it transfers the images in the correct hierarchy or if the database is also transferred.

Regards,

David Armstrong.


Sent from Gmail on iPad


--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.

J.R.

unread,
Nov 6, 2024, 12:02:14 AM11/6/24
to gallery...@googlegroups.com
Andrew,

I know that at one point several years ago there was a script/program to import Gallery 3 images into Piwigo, but as far as I know that is no longer an available option. I believe you would have to start from scratch and manually upload the images you retrieve from your Gallery into Piwigo.

There are a lot of posts on migrating an old Gallery 2 installation into Gallery 3. It is something of a tricky process, but I know many people have successfully completed it. At this group's website you can search on keywords like migration and Gallery 2 and find details.

A key starting point is that you must be running PHP 5.4 when you attempt the migration. And you must use the 3.0.9 version of Gallery 3 as well. The migration module simply will not work under anything higher version of PHP. Once you get everything into Gallery 3.0.9 then stay with the same version of PHP and upgrade 3.0.9 to the latest Revival version of Gallery3 (then you can switch over to using PHP 7+)

-- J.R.
--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted

Andrew L

unread,
Nov 8, 2024, 9:10:46 AM11/8/24
to Gallery 3 Users
Thanks.

Here's what I have found and achieved...

I have a Piwigo 15.0.0 install on a different CPanel host from the one where I had my old Gallery2 install (which will run mostly if I rewind the PHP version, but that breaks my other sites, e.g. WordPress, and is obviously risky).

On the Piwigo 15.0.0 I was able to install the Menalto2Piwigo plug-in. This is a PHP conversion of the old Perl script that people were talking about.

The plug-in has simple instructions saying where to put the photos and how to import from the database.

So, I transferred the old Gallery2 albums into the Piwigo directory it specified, and clicked Synchronise. Then I exported the Gallery2 MySQL database as SQL from the old server and created a new MySQL database on the new server, imported the SQL, and then entered the database details in the Menalto2Piwigo plug-in, and clicked the button. It also tells you to install the ExtendedDescription plug-in and then the captions appear.

It worked! I can see the captions - the user interface is differeent but I'll get used to it. The only issue I have found so far is that  of the photos are on their side and need to be rotated, I think Exif problem for the early days of digital cameras. I believe there is a Piwigo plug-in that will do that.

I might still try the Gallery2 to Gallery3 conversion as suggested, and possibly try to install on the original server, but I am happy that I now have my old Gallery working on a maintained photo gallery package, and that I've still got the captions. The gallery is only for family members.

Andrew L

unread,
Nov 8, 2024, 9:10:52 AM11/8/24
to Gallery 3 Users
Thanks.

Here's what I have found and achieved...

I have a Piwigo 15.0.0 install on a different CPanel host from the one where I had my old Gallery2 install (which will run mostly if I rewind the PHP version, but that breaks my other sites, e.g. WordPress, and is obviously risky).

On the Piwigo 15.0.0 I was able to install the Menalto2Piwigo plug-in. This is a PHP conversion of the old Perl script that people were talking about.

The plug-in has simple instructions saying where to put the photos and how to import from the database.

So, I transferred the old Gallery2 albums into the Piwigo directory it specified, and clicked Synchronise. Then I exported the Gallery2 MySQL database as SQL from the old server and created a new MySQL database on the new server, imported the SQL, and then entered the database details in the Menalto2Piwigo plug-in, and clicked the button. It also tells you to install the ExtendedDescription plug-in and then the captions appear.

It worked! I can see the captions - the user interface is differeent but I'll get used to it. The only issue I have found so far is that  of the photos are on their side and need to be rotated, I think Exif problem for the early days of digital cameras. I believe there is a Piwigo plug-in that will do that.

I might still try the Gallery2 to Gallery3 conversion as suggested, and possibly try to install on the original server, but I am happy that I now have my old Gallery working on a maintained photo gallery package, and that I've still got the captions. The gallery is only for family members. I may now start to add to it again, and in particular I want to move albums out of Zenfolio, which I have been using but has got expensive and unreliable.

Reply all
Reply to author
Forward


On Wednesday 6 November 2024 at 05:02:14 UTC J.R. wrote:

Andrew L

unread,
Nov 8, 2024, 9:10:56 AM11/8/24
to Gallery 3 Users
Thanks.

Here's what I have found and achieved...

I have a Piwigo 15.0.0 install on a different CPanel host from the one where I had my old Gallery2 install (which will run mostly if I rewind the PHP version, but that breaks my other sites, e.g. WordPress, and is obviously risky).

On the Piwigo 15.0.0 I was able to install the Menalto2Piwigo plug-in. This is a PHP conversion of the old Perl script that people were talking about.

The plug-in has simple instructions saying where to put the photos and how to import from the database.

So, I transferred the old Gallery2 albums into the Piwigo directory it specified, and clicked Synchronise. Then I exported the Gallery2 MySQL database as SQL from the old server and created a new MySQL database on the new server, imported the SQL, and then entered the database details in the Menalto2Piwigo plug-in, and clicked the button. It also tells you to install the ExtendedDescription plug-in and then the captions appear.

It worked! I can see the captions - the user interface is differeent but I'll get used to it. The only issue I have found so far is that  of the photos are on their side and need to be rotated, I think Exif problem for the early days of digital cameras. I believe there is a Piwigo plug-in that will do that.

I might still try the Gallery2 to Gallery3 conversion as suggested, and possibly try to install on the original server, but I am happy that I now have my old Gallery working on a maintained photo gallery package, and that I've still got the captions. The gallery is only for family members. I may now start to add to it again, and in particular I want to move albums out of Zenfolio, which I have been using but has got expensive and unreliable.

On Wednesday 6 November 2024 at 05:02:14 UTC J.R. wrote:

Andrew Laughland

unread,
Nov 8, 2024, 9:10:59 AM11/8/24
to gallery...@googlegroups.com
I’ve tried twice to post my update on how I solved the problem which I thought would help others but the posts have been deleted. Am I violating the guidelines?



J.R.

unread,
Nov 8, 2024, 11:14:26 PM11/8/24
to gallery...@googlegroups.com
Andrew,

No, nothing I have seen posted by you violates any guidelines. On occasion the googlegroups server gets quirky... but I think I've seen all of the posts on our success showed up in my inbox.

-- J.R.

Andrew L

unread,
Nov 9, 2024, 7:02:35 AM11/9/24
to Gallery 3 Users
Yes, quirky. The posts didn't appear and I just saw "Message has been Deleted"

A couple of additional notes...

Not all images were on their side, just a few, so I can fix that.

The Piwigo plug-in is:

Menalto2Piwigo - although 10 years old it seems to work :-)

J.R.

unread,
Nov 13, 2024, 2:35:17 PM11/13/24
to gallery...@googlegroups.com
Andrew,

Thanks for the link. I just downloaded it and will run some experiments on how to work with it -- not that I'm about to move my massive 15,000 separate images Gallery installation over. But I'd like to see how customizable it is compared to Gallery.

-- J.R.
Reply all
Reply to author
Forward
0 new messages
Search
Clear search
Close search
Google apps
Main menu