Advanced search  

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

Pages: [1]   Go Down

Author Topic: Custom field lengths  (Read 6593 times)

0 Members and 1 Guest are viewing this topic.

treehstn

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 106
Custom field lengths
« on: August 05, 2023, 03:34:32 am »

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
Logged

406man

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: Custom field lengths
« Reply #1 on: August 20, 2023, 06:09:41 pm »

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.
Logged

treehstn

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 106
Re: Custom field lengths
« Reply #2 on: September 04, 2023, 01:29:24 am »

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.
Logged

406man

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: Custom field lengths
« Reply #3 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.
Logged

treehstn

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 106
Re: Custom field lengths
« Reply #4 on: October 06, 2023, 12:23:58 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.