From beae3db41375879e725af053edf8041bbd76ac8c Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 3 Sep 2009 14:58:50 -0400 Subject: Pluginize the URL shorteners --- lib/plugin.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/plugin.php') 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); + } } -- cgit v1.2.3-54-g00ecf