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]. See more information at [Gravatar][1].
## Alternative Configuration ## 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' => [ 'addons' => [
...
'addon' => '...,gravatar'
... ...
'gravatar' => [
admin => true,
],
] ]
You can add two configuration variables for the addon to the `config/gravatar.config.php` file: 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 // 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>'; $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,12 +23,13 @@ If no avatar was found for an email Libravatar can create some pseudo-random gen
See examples at [Libravatar][1]. See examples at [Libravatar][1].
## Alternative Configuration ## 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' => [ 'addons' => [
...
'addon' => '...,libravatar'
... ...
'libravatar' => [
admin => true,
],
] ]
You can add one configuration variables for the addon to the `config/libravatar.config.php` file: You can add one configuration variables for the addon to the `config/libravatar.config.php` file:

View file

@ -21,12 +21,13 @@ 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 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 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' => [ 'addons' => [
...
'addon' => '...,mathjax'
... ...
'mathjax' => [
admin => true,
],
] ]
and then providing the base URL after that in the `config/mathjax.config.php` file and then providing the base URL after that in the `config/mathjax.config.php` file

View file

@ -34,12 +34,13 @@ zoom level available.
## Alternative Configuration ## 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' => [ 'addons' => [
...
'addon' => '...,openstreetmap'
... ...
'openstreetmap' => [
admin => true,
],
] ]
You can set configuration variables for the addon in the `config/openstreetmap.config.php` file: You can set configuration variables for the addon in the `config/openstreetmap.config.php` file:

View file

@ -22,12 +22,13 @@ 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. 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' => [ 'addons' => [
...
'addon' => '...,piwik'
... ...
'piwik' => [
admin => true,
],
] ]
You can change 4 more configuration variables for the addon in the `config/piwik.config.php` file: You can change 4 more configuration variables for the addon in the `config/piwik.config.php` file:

View file

@ -18,10 +18,11 @@ 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: Open the `config/local.config.php` file and add "twitter" to the list of activated addons:
'system' => [ 'addons' => [
...
'addon' => '...,twitter'
... ...
'twitter' => [
admin => true,
],
] ]
Add your key pair to your `config/twitter.config.php` file. Add your key pair to your `config/twitter.config.php` file.