ubd-frog / frog

A server and client solution to viewing and filtering large image and video collections
MIT License
50 stars 8 forks source link

Simple plugin #81

Closed theiviaxx closed 12 years ago

theiviaxx commented 12 years ago

Add a way for other apps to add functionality to frog.

Provide a class for other apps to subclass that will add to the list of plugins for frog to include. The hooks will be:

Each hook will be a method on the class and will return a dict:

{ 'label': 'My Hook', 'icon': 'myapp/i/icon.png', 'js': ['myapp/j/script.js'], 'css': ['myapp/c/style.css'], 'function': 'myapp.doit', }

Frog will get all plugins, call each method and include the static files in the template. It will also add the appropriate controls based on the hook being invoked.

This way someone can add a simple button to the toolbar that does whatever the app wants.