allow plugins to provide module handlers for arbitrary modules that haven't been installed on the system.
This commit is contained in:
parent
7db515b77c
commit
964e461e09
@ -381,6 +381,7 @@ function widget_categories($arr) {
|
|||||||
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
||||||
|
|
||||||
return categories_widget($srchurl, $cat);
|
return categories_widget($srchurl, $cat);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function widget_tagcloud_wall($arr) {
|
function widget_tagcloud_wall($arr) {
|
||||||
@ -409,6 +410,7 @@ function widget_catcloud_wall($arr) {
|
|||||||
$limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
|
$limit = ((array_key_exists('limit',$arr)) ? intval($arr['limit']) : 50);
|
||||||
|
|
||||||
return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
|
return catblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
11
index.php
11
index.php
@ -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.
|
* The URL provided does not resolve to a valid module.
|
||||||
|
Reference in New Issue
Block a user