Merge pull request #1345 from nupplaphil/feat/addons_load

[various] Move `addon` config
This commit is contained in:
Hypolite Petovan 2023-01-04 22:36:36 -05:00 committed by GitHub
commit 7827be89c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 34 deletions

View file

@ -30,12 +30,13 @@ Gravatar lets users self-rate their images to be used at appropriate audiences.
See more information at [Gravatar][1].
## Alternative Configuration
Open the `config/local.config.php` file and add "gravatar" to the list of activated addons:
Open the `config/node.config.php` file and add "gravatar" to the list of activated addons:
'system' => [
...
'addon' => '...,gravatar'
'addons' => [
...
'gravatar' => [
admin => true,
],
]
You can add two configuration variables for the addon to the `config/gravatar.config.php` file:

View file

@ -93,7 +93,7 @@ function gravatar_addon_admin (App $a, string &$o)
];
// Check if Libravatar is enabled and show warning
if (DBA::exists('addon', ['name' => 'libravatar', 'installed' => true])) {
if (!empty(DI::config()->get('addons', 'libravatar'))) {
$o = '<h5>' .DI::l10n()->t('Information') .'</h5><p>' .DI::l10n()->t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'</p><br><br>';
}

View file

@ -23,13 +23,14 @@ If no avatar was found for an email Libravatar can create some pseudo-random gen
See examples at [Libravatar][1].
## Alternative Configuration
Open the `config/local.config.php` file and add "libravatar" to the list of activated addons:
Open the `config/node.config.php` file and add "libravatar" to the list of activated addons:
'system' => [
...
'addon' => '...,libravatar'
...
]
'addons' => [
...
'libravatar' => [
admin => true,
],
]
You can add one configuration variables for the addon to the `config/libravatar.config.php` file:

View file

@ -21,13 +21,14 @@ In case you want to use the CDN you can try the following URL as a quick start
http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
In case you don't want or can use the admin panel of Friendica you can activate
the addon by adding _mathjax_ to the list in your `config/local.config.php` file
the addon by adding _mathjax_ to the list in your `config/node.config.php` file
'system' => [
...
'addon' => '...,mathjax'
...
]
'addons' => [
...
'mathjax' => [
admin => true,
],
]
and then providing the base URL after that in the `config/mathjax.config.php` file

View file

@ -34,13 +34,14 @@ zoom level available.
## Alternative Configuration
Open the `config/local.config.php` file and add "openstreetmap" to the list of activated addons.
Open the `config/node.config.php` file and add "openstreetmap" to the list of activated addons.
'system' => [
...
'addon' => '...,openstreetmap'
...
]
'addons' => [
...
'openstreetmap' => [
admin => true,
],
]
You can set configuration variables for the addon in the `config/openstreetmap.config.php` file:

View file

@ -22,13 +22,14 @@ The easiest way to configure this addon is by activating the admin panels of you
If you don't want to use the admin panel, you can configure the addon through the `config/local.config.php` file.
Open the `config/local.config.php` file and add "piwik" to the list of activated addons.
Open the `config/node.config.php` file and add "piwik" to the list of activated addons.
'system' => [
...
'addon' => '...,piwik'
...
]
'addons' => [
...
'piwik' => [
admin => true,
],
]
You can change 4 more configuration variables for the addon in the `config/piwik.config.php` file:

View file

@ -18,11 +18,12 @@ After the registration please enter the values for "Consumer Key" and "Consumer
Open the `config/local.config.php` file and add "twitter" to the list of activated addons:
'system' => [
...
'addon' => '...,twitter'
...
]
'addons' => [
...
'twitter' => [
admin => true,
],
]
Add your key pair to your `config/twitter.config.php` file.