proxy_password: Password to use for authenticating to the HTTP proxy. Default null.
proxy_auth_scheme: Scheme to use for authenticating to the HTTP proxy. Default null.
+plugins
+-------
+
+default: associative array mapping plugin name to array of arguments. To disable
+ a default plugin, unset its value in this array.
+locale_path: path for finding plugin locale files. In the plugin's directory
+ by default.
+server: Server to find static files for a plugin when the page is plain old HTTP.
+ Defaults to site/server (same as pages). Use this to move plugin CSS and
+ JS files to a CDN.
+sslserver: Server to find static files for a plugin when the page is HTTPS. Defaults
+ to site/server (same as pages). Use this to move plugin CSS and JS files
+ to a CDN.
+path: Path to the plugin files. defaults to site/path + '/plugins/'. Expects that
+ each plugin will have a subdirectory at plugins/NameOfPlugin. Change this
+ if you're using a CDN.
+
Plugins
=======
'RSSCloud' => null,
'OpenID' => null),
'locale_path' => false, // Set to a path to use *instead of* each plugin's own locale subdirectories
+ 'server' => null,
+ 'sslserver' => null,
+ 'path' => null,
),
'admin' =>
array('panels' => array('design', 'site', 'user', 'paths', 'access', 'sessions', 'sitenotice', 'license')),
{
$this->log(LOG_DEBUG, $msg);
}
+
+ function name()
+ {
+ $cls = get_class($this);
+ return mb_substr($cls, 0, -6);
+ }
function onPluginVersion(&$versions)
{
- $cls = get_class($this);
- $name = mb_substr($cls, 0, -6);
+ $name = $this->name();
$versions[] = array('name' => $name,
// TRANS: Displayed as version information for a plugin if no version information was found.
return true;
}
+
+ function path($relative)
+ {
+ return self::staticPath($this->name(), $relative);
+ }
+
+ static function staticPath($plugin, $relative)
+ {
+ $isHTTPS = StatusNet::isHTTPS();
+
+ if ($isHTTPS) {
+ $server = common_config('plugins', 'sslserver');
+ } else {
+ $server = common_config('plugins', 'server');
+ }
+
+ if (is_null($server)) {
+ if ($isHTTPS) {
+ $server = common_config('site', 'sslserver');
+ } else {
+ $server = common_config('site', 'server');
+ }
+ }
+
+ $path = common_config('plugins', 'path');
+
+ if (is_null($path)) {
+ $path = common_config('site', 'path') . '/plugins/';
+ }
+
+ $protocol = ($isHTTPS) ? 'https' : 'http';
+
+ return $protocol.'://'.$server.$path.$plugin.'/'.$relative;
+ }
}