-
Notifications
You must be signed in to change notification settings - Fork 674
Plugins: How to Build a ThinkUp Plugin
finn edited this page Nov 1, 2010
·
3 revisions
Check the Twitter and Facebook plugins for examples of the state of the art of a ThinkUp plugin.
A plugin is located in /path/to/thinkup/webapp/plugin/pluginname/
. Some notes on directories within a plugin directory:
-
assets
: Like the main webapp, assets is where you store images, CSS, and JS for your plugin. -
controller
: This directory contains the guts of your plugin, and all PHP files in this directory get auto-included in ThinkUp at runtime. Here you define the functions that run your plugin, and register them with theCrawler
andWebapp
objects. -
tests
: All your plugin's model and controller methods should have regression tests. Include the tests in this directory, and any test data in thetestdata
directory. -
view
: Your plugin's Smarty templates live here. - Any other files in your plugin's directory will be available as regular web pages, like authorization callback URLs.