Custom field lengths Custom field lengths
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Custom field lengths

Started by treehstn, August 05, 2023, 03:34:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

treehstn

Is there a way to increase the field lengths on the custom fields on individual images?  I found the following thread but I'm guessing this didn't make it into any subsequent versions?

https://forum.coppermine-gallery.net/index.php/topic,11118.msg50239.html#msg50239

Also... Is there anywhere to get paid Coppermine support?

TY

406man

The custom fields are 255 bytes. What size do you need ?  Can you say a little about how you would use extra-large fields as there might be another way to achieve it.

treehstn

One of the custom fields I've set up is "Surnames".  This is a site with family photographs that people are identified.  People using the site can search on whatever surname they are looking for and it works fine. But some of the photos are big class or military photos that have dozens of peoples names on them.  It would be an option to use the description field for those but I'm really hoping to hire someone to pull the data from that custom field and write a few custom reports.  That won't work if part of them are in the description field.

406man

It's really helpful to understand what you're trying to achieve.

In theory you could change the data type of the custom user fields in the database from varchar(255) to "text". In practice this would need various changes to the PHP code where the field size of 255 is used. You would have to change the PHP code and create your own customised gallery system but it would be a nightmare to keep up to date with ongoing new versions.

On the other hand the caption field in the database is already of type "text" whose maximum length in MySQL is 65535 characters. This is called Description on the screens like editpics.php.  If you put all the surnames in here, separated by ";" for example you have plenty of space and wouldn't need to change any PHP code or database fields.  This would be my recommendation.

treehstn

Quote from: 406man on September 06, 2023, 05:40:56 PM
It's really helpful to understand what you're trying to achieve.

In theory you could change the data type of the custom user fields in the database from varchar(255) to "text". In practice this would need various changes to the PHP code where the field size of 255 is used. You would have to change the PHP code and create your own customised gallery system but it would be a nightmare to keep up to date with ongoing new versions.

On the other hand the caption field in the database is already of type "text" whose maximum length in MySQL is 65535 characters. This is called Description on the screens like editpics.php.  If you put all the surnames in here, separated by ";" for example you have plenty of space and wouldn't need to change any PHP code or database fields.  This would be my recommendation.

Thank you for your input!  We will try to use the Description field.