forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: round-planet on October 27, 2009, 10:42:43 pm

Title: Plugin and modification of database
Post by: round-planet 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
Title: Re: Plugin and modification of database
Post by: phill104 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.
Title: Re: Plugin and modification of database
Post by: Joachim Müller 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.
Title: Re: Plugin and modification of database
Post by: round-planet on October 29, 2009, 07:37:46 pm
Thanks to all; I'm struggling against the desire for hacking, but still resisting    ;D

Pascal