|
@@ -2,6 +2,7 @@ from flask import flash
|
|
from flaskbb.plugins import Plugin, hooks
|
|
from flaskbb.plugins import Plugin, hooks
|
|
|
|
|
|
#: The name of your plugin class
|
|
#: The name of your plugin class
|
|
|
|
+__version__ = "1.0.0"
|
|
__plugin__ = "ExamplePlugin"
|
|
__plugin__ = "ExamplePlugin"
|
|
|
|
|
|
|
|
|
|
@@ -14,13 +15,17 @@ def inject_hello_world():
|
|
|
|
|
|
|
|
|
|
class ExamplePlugin(Plugin):
|
|
class ExamplePlugin(Plugin):
|
|
- @property
|
|
|
|
- def description(self):
|
|
|
|
- return "Example plugin"
|
|
|
|
|
|
|
|
- @property
|
|
|
|
- def version(self):
|
|
|
|
- return "1.0.0"
|
|
|
|
|
|
+ name = "Example Plugin"
|
|
|
|
+
|
|
|
|
+ description = ("This plugin gives a quick insight on how you can write "
|
|
|
|
+ "plugins in FlaskBB.")
|
|
|
|
+
|
|
|
|
+ author = "sh4nks"
|
|
|
|
+
|
|
|
|
+ license = "BSD License. See LICENSE file for more information."
|
|
|
|
+
|
|
|
|
+ version = __version__
|
|
|
|
|
|
def enable(self):
|
|
def enable(self):
|
|
hooks.add("beforeIndex", hello_world)
|
|
hooks.add("beforeIndex", hello_world)
|