add default plugins and load them
This commit is contained in:
parent
6ae6fb7a35
commit
2c33e61b94
@ -238,6 +238,27 @@ function __autoload($cls)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load default plugins
|
||||||
|
|
||||||
|
foreach ($config['plugins']['default'] as $name => $params) {
|
||||||
|
if (is_null($params)) {
|
||||||
|
addPlugin($name);
|
||||||
|
} else if (is_array($params)) {
|
||||||
|
if (count($params) == 0) {
|
||||||
|
addPlugin($name);
|
||||||
|
} else {
|
||||||
|
$keys = array_keys($params);
|
||||||
|
if (is_string($keys[0])) {
|
||||||
|
addPlugin($name, $params);
|
||||||
|
} else {
|
||||||
|
foreach ($params as $paramset) {
|
||||||
|
addPlugin($name, $paramset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// XXX: how many of these could be auto-loaded on use?
|
// XXX: how many of these could be auto-loaded on use?
|
||||||
// XXX: note that these files should not use config options
|
// XXX: note that these files should not use config options
|
||||||
// at compile time since DB config options are not yet loaded.
|
// at compile time since DB config options are not yet loaded.
|
||||||
|
@ -230,4 +230,21 @@ $default =
|
|||||||
array('timeout' => 5), // HTTP request timeout in seconds when contacting remote hosts for OMB updates
|
array('timeout' => 5), // HTTP request timeout in seconds when contacting remote hosts for OMB updates
|
||||||
'logincommand' =>
|
'logincommand' =>
|
||||||
array('disabled' => true),
|
array('disabled' => true),
|
||||||
|
'plugins' =>
|
||||||
|
array('default' => array('LilUrl' => array('shortenerName'=>'ur1.ca',
|
||||||
|
'freeService' => true,
|
||||||
|
'serviceUrl'=>'http://ur1.ca/'),
|
||||||
|
'PtitUrl' => array('shortenerName' => 'ptiturl1.com',
|
||||||
|
'serviceUrl' => 'http://ptiturl.com/?creer=oui&action=Reduire&url=%1$s'),
|
||||||
|
'SimpleUrl' => array(array('shortenerName' => 'is.gd', 'serviceUrl' => 'http://is.gd/api.php?longurl=%1$s'),
|
||||||
|
array('shortenerName' => 'snipr.com', 'serviceUrl' => 'http://snipr.com/site/snip?r=simple&link=%1$s'),
|
||||||
|
array('shortenerName' => 'metamark.net', 'serviceUrl' => 'http://metamark.net/api/rest/simple?long_url=%1$s'),
|
||||||
|
array('shortenerName' => 'tinyurl.com', 'serviceUrl' => 'http://tinyurl.com/api-create.php?url=%1$s')),
|
||||||
|
'TightUrl' => array('shortenerName' => '2tu.us', 'freeService' => true,'serviceUrl'=>'http://2tu.us/?save=y&url=%1$s'),
|
||||||
|
'Geonames' => null,
|
||||||
|
'Mapstraction' => null,
|
||||||
|
'Linkback' => null,
|
||||||
|
'WikiHashtags' => null,
|
||||||
|
'OpenID' => null),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user