diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-15 21:01:18 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-15 21:01:18 -0700 |
commit | 964e461e092b15a66da891a0a4c155323e8391e1 (patch) | |
tree | c7f476d61c7cd03d4f4707e6f9b84d4d9577f148 | |
parent | 7db515b77cc17be545358ac1aba9b6b21c460507 (diff) | |
download | volse-hubzilla-964e461e092b15a66da891a0a4c155323e8391e1.tar.gz volse-hubzilla-964e461e092b15a66da891a0a4c155323e8391e1.tar.bz2 volse-hubzilla-964e461e092b15a66da891a0a4c155323e8391e1.zip |
allow plugins to provide module handlers for arbitrary modules that haven't been installed on the system.
-rw-r--r-- | include/widgets.php | 2 | ||||
-rwxr-xr-x | index.php | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php index 888e56733..032b1c67e 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -381,6 +381,7 @@ function widget_categories($arr) { $srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl); return categories_widget($srchurl, $cat); + } function widget_tagcloud_wall($arr) { @@ -409,6 +410,7 @@ function widget_catcloud_wall($arr) { $limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50); return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL); + } @@ -199,6 +199,17 @@ if(strlen($a->module)) { } } + /** + * This provides a place for plugins to register module handlers which don't otherwise exist on the system. + * If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if + * there is no specific module file or matching plugin name. + * The plugin should catch at least one of the module hooks for this URL. + */ + + $x = array('module' => $a->module, 'installed' => false); + call_hooks('module_loaded', $x); + if($x['installed']) + $a->module_loaded = true; /** * The URL provided does not resolve to a valid module. |