forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: flogghe on July 13, 2005, 06:11:36 pm

Title: Extra field in album table and conqequences
Post by: flogghe on July 13, 2005, 06:11:36 pm
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
Title: Re: Extra field in album table and conqequences
Post by: Joachim Müller on July 14, 2005, 10:49:35 am
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.
Title: Re: Extra field in album table and conqequences
Post by: flogghe on July 14, 2005, 01:01:24 pm
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
Title: Re: Extra field in album table and conqequences
Post by: Joachim Müller on July 14, 2005, 09:43:48 pm
what's wrong with the album description field? Why not use it?
Title: Re: Extra field in album table and conqequences
Post by: flogghe on July 17, 2005, 03:38:57 pm
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
Title: Re: Extra field in album table and conqequences
Post by: Joachim Müller on July 18, 2005, 08:40:41 am
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/
Title: Re: Extra field in album table and conqequences
Post by: flogghe on July 18, 2005, 07:15:00 pm
Thanks for that tip about the cms. I will check it out and test it!

Frederic
Title: Re: Extra field in album table and conqequences
Post by: flogghe on July 28, 2005, 08:17:39 pm
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:

Code: [Select]
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