IMMEDIATE TODO'S:
- Detect which plugins are available
- Add an enable/disable front-end for available plugins
- Build plugin options interface so that configuration comes out of config.inc.php
BACKGROUND:
To make TT truly multi-service and enable users to build their own features into it, it's got to be pluggable. There should be allowances for both webapp plugins (data visualizations and custom listings, etc) as well as crawler plugins (new data sources like Facebook and Buzz).
As we build TT plugins, we will continue to refine the plugin architecture.
Here's an update on the current state of the pluggable architecture:
Files
- All plugin files are now located in a single place, common/plugins/.
- Each individual plugin has its own subfolder there, so the Twitter plugin is in common/plugins/twitter/.
- Templates for rendering plugin-specific things on the frontend are in a templates subdirectory, ie, common/plugins/twitter/templates/.
- Classes the plugin requires should be in a lib subdirectory, ie, common/plugins/twitter/lib/.
- Right now the only webapp plugin that's working is the configuration screen.
Database
- There are now tt_plugins and tt_plugin_options tables
- By default, the Twitter plugin is inserted and set to active in the tt_plugins table.
Future plans:
My vision is that ThinkTank plugins will work like WordPress: you drop a folder into the common/plugins/ directory, and it gets listed in the webapp as "Inactive." Click a link to activate the plugin (insert its row into the db, set is_active to 1, run any relevant installation routines) and the crawler and webapp will execute the methods it registers from there on in.
A hooks wishlist is underway here:
http://wiki.github.com/ginatrapani/thinktank/thinktank-plugin-hooks-wish-list