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: Building a plugin best practices  (Read 28163 times)

0 Members and 1 Guest are viewing this topic.

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Building a plugin best practices
« on: November 29, 2005, 09:11:52 pm »

  • Create a short name for your plugin
  • Prepend functions and variables that exist outside of functions with that shortname.
    This prevents name collisions amongst other plugins. ie two plugins naming  functions 'displayimage'; The second function to use the same name will cause an abort as PHP is unable to declare the second 'displayimage' function.
  • Keep files lowercase
  • Use Coppermine $CONFIG variables where applicable.
    Your plugin might work on YOUR system if you hardcode the fullpath, but it may not work on everybody elses system.

Feel free to add on lessons learned creating plugins to this thread, I'll move the good ones up to the bulleted list.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Building a plugin best practices
« Reply #1 on: January 05, 2006, 04:20:51 pm »

Has anyone started on official plugin documentation yet?  If not or even if so, I'd like to help out.  How would I go about creating or adding such documentation?  Should I post here?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Building a plugin best practices
« Reply #2 on: January 05, 2006, 04:43:58 pm »

yes, please post it - would be very welcome.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Building a plugin best practices
« Reply #3 on: June 07, 2006, 08:33:32 pm »

waiting for official plugin documentatin  ::)
please paver post it!
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Building a plugin best practices
« Reply #4 on: June 07, 2006, 10:22:44 pm »

waiting for official plugin documentatin  ::)

You and me both.   :P

A large chunk of it is written.  But it's still not fleshed out (sections here & there are blank).  I have been working fairly non-stop on another Coppermine project, and I do realize this is hanging over my head.  I chip away at it when I can, but I need to find a block of time to hammer out the last sections.

With my previous accuracy in giving an expected date, I must not give another projected date.

I really, really want to get this done, so that's my incentive - to hand it off and let others read & hopefully learn & maybe even contribute with more examples or sample code to add.

All I can say is: soon . . .  :-\
« Last Edit: June 08, 2006, 08:58:46 pm by Paver »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Building a plugin best practices
« Reply #5 on: June 08, 2006, 06:41:32 am »

Thank you Pavar, we all see that you work hard on some vulnerability issue and some other CPG project , take your time , as joachim said we are human  ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Dr Preacox

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 122
  • Is the Matrix...
    • Dynamic Creations
Re: Building a plugin best practices
« Reply #6 on: June 08, 2006, 08:29:47 am »

That would be a very handy doc, as I also am trying with difficulty to create my plugin
Logged
My Mods:
Making Memberlist Public - VIEW
Different Way of Displaying Categories - VIEW
Coming Soon - Automated Sub Domains -MOD

etienne_sf

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 908
    • Wiki
Re: Building a plugin best practices
« Reply #7 on: January 26, 2007, 12:46:23 pm »

Has anyone started on official plugin documentation yet?  If not or even if so, I'd like to help out.  How would I go about creating or adding such documentation?  Should I post here?

Did you had time to work on this one ?

  I'm building a plugin (jupload, an upload mod). Several users had problems using it, because they used functions I didn't know or check.


A idea, to build this doc, is to create a wiki. Every one could give the information he has.

It would be really nice to build a documentation this way! Would it be possible to create one on the coppermine web site ?


Etienne
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Building a plugin best practices
« Reply #8 on: January 26, 2007, 02:18:38 pm »

Creating a wiki has been discussed many times over, and several efforts have been started (in vain alas) to build one. Should be discussed in another thread imo.
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: Building a plugin best practices
« Reply #9 on: August 07, 2008, 02:43:14 am »

...
A large chunk of it is written. 

...

All I can say is: soon . . .  :-\
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 21 queries.