Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Extra field in album table and conqequences  (Read 3736 times)

0 Members and 1 Guest are viewing this topic.

flogghe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • MaritimeDigital Archive
Extra field in album table and conqequences
« 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
« Last Edit: July 29, 2005, 08:45:39 am by GauGau »
Logged
Kind regards,

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Extra field in album table and conqequences
« Reply #1 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.
Logged

flogghe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • MaritimeDigital Archive
Re: Extra field in album table and conqequences
« Reply #2 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
Logged
Kind regards,

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Extra field in album table and conqequences
« Reply #3 on: July 14, 2005, 09:43:48 pm »

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

flogghe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • MaritimeDigital Archive
Re: Extra field in album table and conqequences
« Reply #4 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
Logged
Kind regards,

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Extra field in album table and conqequences
« Reply #5 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/
Logged

flogghe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • MaritimeDigital Archive
Re: Extra field in album table and conqequences
« Reply #6 on: July 18, 2005, 07:15:00 pm »

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

Frederic
Logged
Kind regards,

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

flogghe

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • MaritimeDigital Archive
Re: Extra field in album table and conqequences
« Reply #7 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
Logged
Kind regards,

Frederic Logghe
Webmaster MaritimeDigital Archive
http://www.ibiblio.org/maritime
Pages: [1]   Go Up
 

Page created in 0.086 seconds with 20 queries.