ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

plugin system

September 04, 2011 5:15pm

Subscribe [5]
  • #1 / Sep 04, 2011 5:15pm

    predat0r

    99 posts

    Anybody has some material on “Add-on development with Codeigniter” by Adam Fairholm ?

    EDIT: finally I solved it , made a simple plugin system for my cms

  • #2 / Sep 25, 2011 1:59am

    Timothy_

    100 posts

    Hi there,

    I am also trying to figure out how to make a simple plugin system for an application I am writing.

    Are you willing to share your code? Does anyone else have a good plugin system?

    Thanks,

    Tim

  • #3 / Sep 25, 2011 7:31am

    predat0r

    99 posts

    Hi,

    I used this library to build my simple plugin:
    https://github.com/bl00dshooter/Plugin-Codeigniter-Library

    You can grab from the example how it works..

    But if not, how it works for me, in short?

    If a plugin is enabled, register an event, then trigger it in a special place in you code. Event is a function in your plugin’s code.

    I’ve made a config file, with plugin name, desc, version, position (left), and an array of parameters - info, the controller reads this into the DB, and stores.
    On an admin page you can enable/disable the plugins.
    In your left colunm view you trigger the ‘left’ event, so the enabled plugins, and where positions set to left will show up in your left column.

  • #4 / Oct 02, 2011 4:50am

    Vheissu

    278 posts

    I wrote a plugin system myself for Codeigniter. I based it on how Wordpress’s plugin system works. It might require some tweaks to accommodate peoples tastes, but it works and I use it in all of my personal projects.

    https://github.com/Vheissu/CI-Plugin-System

  • #5 / Oct 02, 2011 11:46am

    predat0r

    99 posts

    I wrote a plugin system myself for Codeigniter. I based it on how Wordpress’s plugin system works. It might require some tweaks to accommodate peoples tastes, but it works and I use it in all of my personal projects.

    https://github.com/Vheissu/CI-Plugin-System

    Great library! Can you tell me how could you implement the following simple plugin task: i have a twitter plugin, that outputs 5 twitter feeds. Switching on/off the plugin on frontend works.
    1. How do you skin the plugin with css, where do you place the css?
    2. How do you handle on an admin page the feed’s username, and count? How do you validate the input fields in the plugin system? (Of course I dont ask about CI form validation..).

    Is it a solution to split a plugin to frontend and backend part, what do you mean?
    Thanks 😊

  • #6 / Mar 18, 2012 7:11am

    vee

    13 posts

    I wrote a plugin system myself for Codeigniter. I based it on how Wordpress’s plugin system works. It might require some tweaks to accommodate peoples tastes, but it works and I use it in all of my personal projects.

    https://github.com/Vheissu/CI-Plugin-System

    there are errors:

    A PHP Error was encountered

    Severity: Notice

    Message: Object of class CI could not be converted to int

    Filename: libraries/Plugins.php

    Line Number: 60

    A PHP Error was encountered

    Severity: Notice

    Message: Trying to get property of non-object

    Filename: libraries/Plugins.php

    Line Number: 62

    Fatal error: Call to a member function database() on a non-object in application\libraries\Plugins.php on line 62

    codeigniter 2.1.0

    just load library plugins. not call method/function/or anything

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases