Jump to content

Building a Plugin System


Xeoncross

Recommended Posts

Good Afternoon!  ;D

 

Well, I have been working on blog system for the past few months and have arrived at the decision that I need to add a plugin system to the code as I find that more and more (optional) features seem to keep getting added to the core of this system. I don't want this system to be very complex as I am planning on staying "light" weight as much as possible.

 

Does anyone here have knowledge of the way that systems like Drupal or wordpress handle their plugin systems?

 

I want the plugins to have access too:

 

1) Their own pages like a "tumblelog" plugin that has it's own page on the site that shows tumblelogs.

(Everything will be done through .htaccess of course) like site.com/tumblelogs is really is site.com/plugins.php?plugin=tumblelog

 

2) Access to text that is submit (like blog posts) both before and after it is cleaned/handled by the core of the system.

 

3) Themes for something like a "recent posts" plugin that makes a recent posts box in the theme.

 

4) Other things that I haven't thought of yet...  ::)

 

So has can anyone help me with the logic of a plugin system?  :P

Is there any simple system that uses plugins that you can point me too?

 

http://www.w3style.co.uk/?p=9

 

Thank you very much!

David

Link to comment
Share on other sites

Hi there,

The best way to provide a very strong plugin support is to have events and callback functions. Such as onpost, ondelete etc. The plugins will register themselves in these events to be executed when they occur.

Just check wordpress or CMSMS to know how its done.

Link to comment
Share on other sites

Hi there,

The best way to provide a very strong plugin support is to have events and callback functions. Such as onpost, ondelete etc. The plugins will register themselves in these events to be executed when they occur.

Just check wordpress or CMSMS to know how its done.

 

Sorry, but would you mind giving a little bit more detailed explanation of what it is I am looking for in other systems? I have cracked open about 8 so far and I am having trouble finding the starting point of the Modules/plugins. ;)

 

I see their uses during different times, but I can't find the point where the module tells the script to 1) load it and 2) run it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.