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: Plugin and modification of database  (Read 4414 times)

0 Members and 1 Guest are viewing this topic.

round-planet

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 11
Plugin and modification of database
« on: October 27, 2009, 10:42:43 pm »

Heelo;
just downloaded the Coppermine (terrific software), and starting to create a plugin for my need; trying to not do hacking at all; for my plugin, I need a couple of new fields in the database tables for picture and Ratings; is adding these fields to the table considered as a regular plugion action, or is it considered as hacking, and should we create only additional tables to respect the orthodoxy?

Thanks
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Plugin and modification of database
« Reply #1 on: October 27, 2009, 10:56:42 pm »

Although this is for the forthcoming cpg1.5 release, it might be worth reading the following documentation.

http://documentation.coppermine-gallery.net/en/dev_plugins.htm

I am looking forward to your plugin and hope that you can contribute it to the project.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Plugin and modification of database
« Reply #2 on: October 29, 2009, 08:55:43 am »

Adding a table is OK. Adding records to the config table is OK as well. Just make sure not to hardcode the table name into your code, but respect the usage of the table prefix that exists in the $CONFIG array. See how other plugins do that: take the "who is online" plugin as an example.
Logged

round-planet

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 11
Re: Plugin and modification of database
« Reply #3 on: October 29, 2009, 07:37:46 pm »

Thanks to all; I'm struggling against the desire for hacking, but still resisting    ;D

Pascal
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.