Extra field in album table and conqequences Extra field in album table and conqequences
 

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

Extra field in album table and conqequences

Started by flogghe, July 13, 2005, 06:11:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

flogghe

Hello

If I would add an extra field in the 'albums' table, will that field be deleted when upgrading to 1.4?
How could I let appear that extra field in the user's view, while he is browing the categories and albums?

Thanks in advance,
Frederic
Kind regards,

Frederic Logghe
Webmaster MaritimeDigital Archive
http://www.ibiblio.org/maritime

Joachim Müller

The upgrade won't delete your extra field, although you should always backup before doing an update/upgrade. How to add it depends on what you want to do with it. Did you look at the custom fields that already are there (available in coppermine's config, when used visible in the info section of individual pics) - maybe they can be used instead (although they don't apply to albums, but pics). Post more details what the extra field is suppossed to hold and what you're going to use it for.

flogghe

Well, my site holds photos of vessels. Every category is a type of vessel. For each vessel, I have an album. In a seperate table, I keep the data of all the vessels. I would like to have an extra field in the 'albums' table, with a key or a link  that corresponds to the 'shipdata' table. So, if the users clicks on that link, a new windows should appear in coppermine with the data of that vessel.

Frederic
Kind regards,

Frederic Logghe
Webmaster MaritimeDigital Archive
http://www.ibiblio.org/maritime

Joachim Müller

what's wrong with the album description field? Why not use it?

flogghe

I do use it, but I'm not able to put all the vessels information into it. I put the most important specs in the album field, but all the rest (detailed information and history) will not fit into it. It doesn't look good anymore if you put to much text into the album field.

Frederic
Kind regards,

Frederic Logghe
Webmaster MaritimeDigital Archive
http://www.ibiblio.org/maritime

Joachim Müller

then just add a link to the album description field (using bbcode) to link to another file that has the full specs. Another option is the "miniCMS mod" that allows you to add content to your coppermine pages. The most advanced version of this mod comes as a plugin for the (unsupported beta software) cpg1.4.1. View demo and details here: http://cpg-contrib.org/

flogghe

Thanks for that tip about the cms. I will check it out and test it!

Frederic
Kind regards,

Frederic Logghe
Webmaster MaritimeDigital Archive
http://www.ibiblio.org/maritime

flogghe

I solved it with adding some bbcode to the album description field. It seemed to be the easiest solution... I added the code with an sql-script:


update cpg132_albums
set description = concat(description,'\r\n','[URL=http://www.ibiblio.org/maritime/photolibrary/data.php?varid=',aid,']Specifications[/URL]')
where description not like '%www.ibiblio.org%'


I also created a file called data.php and a table with the data of the vessels. That table also contained a column with the album id.

Kind regards and many thanks for the help
Frederic
Kind regards,

Frederic Logghe
Webmaster MaritimeDigital Archive
http://www.ibiblio.org/maritime