summaryrefslogtreecommitdiff
path: root/lib/plugin.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-09-03 14:58:50 -0400
committerCraig Andrews <candrews@integralblue.com>2009-09-03 14:58:50 -0400
commitbeae3db41375879e725af053edf8041bbd76ac8c (patch)
tree6460b3b09f8d008e3be9e5fede3a5ba0511cadac /lib/plugin.php
parent5db43f465543a24facc299be5d7301d9dd6b019e (diff)
Pluginize the URL shorteners
Diffstat (limited to 'lib/plugin.php')
-rw-r--r--lib/plugin.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/plugin.php b/lib/plugin.php
index 87d7be5a7..59bf3ba9d 100644
--- a/lib/plugin.php
+++ b/lib/plugin.php
@@ -76,4 +76,18 @@ class Plugin
{
return true;
}
+
+ /*
+ * the name of the shortener
+ * shortenerInfo associative array with additional information. One possible element is 'freeService' which can be true or false
+ * shortener array, first element is the name of the class, second element is an array to be passed as constructor parameters to the class
+ */
+ function registerUrlShortener($name, $shortenerInfo, $shortener)
+ {
+ global $_shorteners;
+ if(!is_array($_shorteners)){
+ $_shorteners=array();
+ }
+ $_shorteners[$name]=array('info'=>$shortenerInfo, 'callInfo'=>$shortener);
+ }
}