hosannahighertech / yii2-yiiboard

Yii2 Forum Module
http://hosannahighertech.co.tz/forum
Apache License 2.0
14 stars 8 forks source link

Plugin Infrastructure #2

Open DaSourcerer opened 9 years ago

DaSourcerer commented 9 years ago

Bulletinboard-style forums are very likely to be modified through their maintainers. We should leverage that through a plugin infrastructure leveraging modifications through hooks.

Ideally we would implement this through the existing event system, which is probably the cleanest way to do this atm. As a bonus, using composer/packagist as a distribution channel would get a lot of problems off our back.

To be discussed: Flesh out some of our core code into separate plugins. Possible candidates are upvotes, private messaging, and polls.

mtangoo commented 9 years ago

Now that we have advantage of Yii2 event system, are we going to have a global component (let say pluginMgr) that will give access to plugins to register to events as defined by API? If Yes:

  1. how are we going to manage location of plugins and load them?
  2. How are we going to deal with plugins that changes theme/appearance (let say it attaches a sidebar with list of recent posts)?

Do you have any idea of rough Plugin architecture? I will have to check how many others does!