mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-21 20:03:40 +00:00
Merge remote-tracking branch 'upstream/develop' into no-mod-item
This commit is contained in:
commit
008eeeea4e
49 changed files with 225 additions and 284 deletions
|
@ -5,15 +5,16 @@
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# Bjoessi <torbjorn.andersson@syte.se>, 2019
|
# Bjoessi <torbjorn.andersson@syte.se>, 2019
|
||||||
|
# Viktor Nilsson, 2022
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:13-0500\n"
|
"POT-Creation-Date: 2022-05-11 08:54-0400\n"
|
||||||
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
|
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
|
||||||
"Last-Translator: Bjoessi <torbjorn.andersson@syte.se>, 2019\n"
|
"Last-Translator: Viktor Nilsson, 2022\n"
|
||||||
"Language-Team: Swedish (https://www.transifex.com/Friendica/teams/12172/sv/)\n"
|
"Language-Team: Swedish (https://www.transifex.com/Friendica/teams/12172/sv/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -49,6 +50,10 @@ msgid ""
|
||||||
"For a complete reference of the available operations and variables, check "
|
"For a complete reference of the available operations and variables, check "
|
||||||
"the help page."
|
"the help page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Lägg till och hantera dina personliga regler för innehållsfilter i det här "
|
||||||
|
"fönstret. Regler har ett namn och ett filteruttryck som jämförs mot "
|
||||||
|
"inläggets innehåll. Förteckning över alla operander och variabler finns att "
|
||||||
|
"hitta på <a href=\"advancedcontentfilter/help\">hjälpsidan</a>."
|
||||||
|
|
||||||
#: advancedcontentfilter.php:229
|
#: advancedcontentfilter.php:229
|
||||||
msgid "Your rules"
|
msgid "Your rules"
|
||||||
|
@ -118,42 +123,46 @@ msgstr "Regeluttryck"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Avbryt"
|
msgstr "Avbryt"
|
||||||
|
|
||||||
#: advancedcontentfilter.php:312 advancedcontentfilter.php:323
|
#: advancedcontentfilter.php:295
|
||||||
#: advancedcontentfilter.php:334 advancedcontentfilter.php:370
|
msgid "This addon requires this node having at least one post"
|
||||||
#: advancedcontentfilter.php:401 advancedcontentfilter.php:424
|
msgstr "Detta tillägg kräver att denna nod har åtminstone ett inlägg"
|
||||||
|
|
||||||
|
#: advancedcontentfilter.php:325 advancedcontentfilter.php:336
|
||||||
|
#: advancedcontentfilter.php:347 advancedcontentfilter.php:383
|
||||||
|
#: advancedcontentfilter.php:414 advancedcontentfilter.php:437
|
||||||
msgid "You must be logged in to use this method"
|
msgid "You must be logged in to use this method"
|
||||||
msgstr "Du måste vara inloggad för att använda den här funktionen"
|
msgstr "Du måste vara inloggad för att använda den här funktionen"
|
||||||
|
|
||||||
#: advancedcontentfilter.php:338 advancedcontentfilter.php:374
|
#: advancedcontentfilter.php:351 advancedcontentfilter.php:387
|
||||||
#: advancedcontentfilter.php:405
|
#: advancedcontentfilter.php:418
|
||||||
msgid "Invalid form security token, please refresh the page."
|
msgid "Invalid form security token, please refresh the page."
|
||||||
msgstr "Felaktigt säkerhetsformulärstecken, vänligen uppdatera sidan."
|
msgstr "Felaktigt säkerhetsformulärstecken, vänligen uppdatera sidan."
|
||||||
|
|
||||||
#: advancedcontentfilter.php:350
|
#: advancedcontentfilter.php:363
|
||||||
msgid "The rule name and expression are required."
|
msgid "The rule name and expression are required."
|
||||||
msgstr "Regelns namn och uttryck krävs."
|
msgstr "Regelns namn och uttryck krävs."
|
||||||
|
|
||||||
#: advancedcontentfilter.php:364
|
#: advancedcontentfilter.php:377
|
||||||
msgid "Rule successfully added"
|
msgid "Rule successfully added"
|
||||||
msgstr "Regeln kunde läggas till"
|
msgstr "Regeln kunde läggas till"
|
||||||
|
|
||||||
#: advancedcontentfilter.php:378 advancedcontentfilter.php:409
|
#: advancedcontentfilter.php:391 advancedcontentfilter.php:422
|
||||||
msgid "Rule doesn't exist or doesn't belong to you."
|
msgid "Rule doesn't exist or doesn't belong to you."
|
||||||
msgstr "Regeln finns inte eller tillhör inte dig."
|
msgstr "Regeln finns inte eller tillhör inte dig."
|
||||||
|
|
||||||
#: advancedcontentfilter.php:395
|
#: advancedcontentfilter.php:408
|
||||||
msgid "Rule successfully updated"
|
msgid "Rule successfully updated"
|
||||||
msgstr "Uppdatering av regel lyckades"
|
msgstr "Uppdatering av regel lyckades"
|
||||||
|
|
||||||
#: advancedcontentfilter.php:418
|
#: advancedcontentfilter.php:431
|
||||||
msgid "Rule successfully deleted"
|
msgid "Rule successfully deleted"
|
||||||
msgstr "Borttagning av regel lyckades"
|
msgstr "Borttagning av regel lyckades"
|
||||||
|
|
||||||
#: advancedcontentfilter.php:428
|
#: advancedcontentfilter.php:441
|
||||||
msgid "Missing argument: guid."
|
msgid "Missing argument: guid."
|
||||||
msgstr "Argument saknas: guid."
|
msgstr "Argument saknas: guid."
|
||||||
|
|
||||||
#: advancedcontentfilter.php:436
|
#: advancedcontentfilter.php:449
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Unknown post with guid: %s"
|
msgid "Unknown post with guid: %s"
|
||||||
msgstr "Okänt inlägg med guid: %s"
|
msgstr "Okänt inlägg med guid: %s"
|
||||||
|
|
|
@ -10,6 +10,7 @@ $a->strings['Advanced Content Filter'] = 'Avancerat innehållsfiter';
|
||||||
$a->strings['Back to Addon Settings'] = 'TIllbaka till Tilläggsinställningar';
|
$a->strings['Back to Addon Settings'] = 'TIllbaka till Tilläggsinställningar';
|
||||||
$a->strings['Add a Rule'] = 'Lägg till en regel';
|
$a->strings['Add a Rule'] = 'Lägg till en regel';
|
||||||
$a->strings['Help'] = 'Hjälp';
|
$a->strings['Help'] = 'Hjälp';
|
||||||
|
$a->strings['Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page.'] = 'Lägg till och hantera dina personliga regler för innehållsfilter i det här fönstret. Regler har ett namn och ett filteruttryck som jämförs mot inläggets innehåll. Förteckning över alla operander och variabler finns att hitta på <a href="advancedcontentfilter/help">hjälpsidan</a>.';
|
||||||
$a->strings['Your rules'] = 'Dina regler';
|
$a->strings['Your rules'] = 'Dina regler';
|
||||||
$a->strings['You have no rules yet! Start adding one by clicking on the button above next to the title.'] = 'Du har inga regler än! Lägg till regler genom att klicka på knappen ovanför, bredvid överskriften.';
|
$a->strings['You have no rules yet! Start adding one by clicking on the button above next to the title.'] = 'Du har inga regler än! Lägg till regler genom att klicka på knappen ovanför, bredvid överskriften.';
|
||||||
$a->strings['Disabled'] = 'Inaktiverad';
|
$a->strings['Disabled'] = 'Inaktiverad';
|
||||||
|
@ -26,6 +27,7 @@ $a->strings['Add new rule'] = 'Lägg till ny regel';
|
||||||
$a->strings['Rule Name'] = 'Regelnamn';
|
$a->strings['Rule Name'] = 'Regelnamn';
|
||||||
$a->strings['Rule Expression'] = 'Regeluttryck';
|
$a->strings['Rule Expression'] = 'Regeluttryck';
|
||||||
$a->strings['Cancel'] = 'Avbryt';
|
$a->strings['Cancel'] = 'Avbryt';
|
||||||
|
$a->strings['This addon requires this node having at least one post'] = 'Detta tillägg kräver att denna nod har åtminstone ett inlägg';
|
||||||
$a->strings['You must be logged in to use this method'] = 'Du måste vara inloggad för att använda den här funktionen';
|
$a->strings['You must be logged in to use this method'] = 'Du måste vara inloggad för att använda den här funktionen';
|
||||||
$a->strings['Invalid form security token, please refresh the page.'] = 'Felaktigt säkerhetsformulärstecken, vänligen uppdatera sidan.';
|
$a->strings['Invalid form security token, please refresh the page.'] = 'Felaktigt säkerhetsformulärstecken, vänligen uppdatera sidan.';
|
||||||
$a->strings['The rule name and expression are required.'] = 'Regelns namn och uttryck krävs.';
|
$a->strings['The rule name and expression are required.'] = 'Regelns namn och uttryck krävs.';
|
||||||
|
|
|
@ -145,7 +145,7 @@ function diaspora_hook_fork(App $a, array &$b)
|
||||||
$post = $b['data'];
|
$post = $b['data'];
|
||||||
|
|
||||||
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
||||||
!strstr($post['postopts'], 'diaspora') || ($post['parent'] != $post['id'])) {
|
!strstr($post['postopts'] ?? '', 'diaspora') || ($post['parent'] != $post['id'])) {
|
||||||
$b['execute'] = false;
|
$b['execute'] = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,12 @@ Use [Geonames service](https://www.geonames.org) to resolve nearest populated lo
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Pre-requisite: Register a username at https://www.geonames.org/login and set it in `config/addon.config.php`
|
Pre-requisite: Register a username at https://www.geonames.org/login and set it in `config/geonames.config.php`:
|
||||||
|
|
||||||
'geonames' => [
|
return [
|
||||||
'username' => 'your_username'
|
'geonames' => [
|
||||||
],
|
'username' => 'your_username'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
Also visit https://geonames.org/manageaccount and enable access to the free web services.
|
Also visit https://geonames.org/manageaccount and enable access to the free web services.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/geonames.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'geonames' => [
|
'geonames' => [
|
||||||
|
|
|
@ -35,7 +35,7 @@ function geonames_install()
|
||||||
|
|
||||||
function geonames_load_config(App $a, ConfigFileLoader $loader)
|
function geonames_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('geonames'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function geonames_post_hook(App $a, array &$item)
|
function geonames_post_hook(App $a, array &$item)
|
||||||
|
|
|
@ -38,11 +38,13 @@ Open the `config/local.config.php` file and add "gravatar" to the list of activa
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
You can add two configuration variables for the addon to the `config/addon.config.php` file:
|
You can add two configuration variables for the addon to the `config/gravatar.config.php` file:
|
||||||
|
|
||||||
'gravatar' => [
|
return [
|
||||||
'default_avatar' => 'identicon',
|
'gravatar' => [
|
||||||
'rating' => 'g',
|
'default_avatar' => 'identicon',
|
||||||
],
|
'rating' => 'g',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
[1]: http://www.gravatar.com/site/implement/images/ "See documentation at Gravatar for more information"
|
[1]: http://www.gravatar.com/site/implement/images/ "See documentation at Gravatar for more information"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/gravatar.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'gravatar' => [
|
'gravatar' => [
|
||||||
|
|
|
@ -28,7 +28,7 @@ function gravatar_install() {
|
||||||
|
|
||||||
function gravatar_load_config(App $a, ConfigFileLoader $loader)
|
function gravatar_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('gravatar'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('gravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,14 +16,16 @@ Simply fill in the fields in the impressium settings page in the addons area of
|
||||||
|
|
||||||
Manual Configuration
|
Manual Configuration
|
||||||
--------------------
|
--------------------
|
||||||
If you for any reason you prefer to use a configuration file instead, you can set the following variables in the `config/addon.config.php` file
|
If you for any reason you prefer to use a configuration file instead, you can set the following variables in the `config/impressum.config.php` file
|
||||||
|
|
||||||
'impressum' => [
|
return [
|
||||||
'owner' => '', This is the Name of the Operator
|
'impressum' => [
|
||||||
'ownerprofile' => '', This is an optional Friendica account where the above owner name will link to
|
'owner' => '', // This is the Name of the Operator
|
||||||
'email' => '', A contact email address (optional)
|
'ownerprofile' => '', // This is an optional Friendica account where the above owner name will link to
|
||||||
Will be displayed slightly obfuscated as name(at)example(dot)com
|
'email' => '', // A contact email address (optional)
|
||||||
'postal' => '', Should contain a postal address where you can be reached at (optional)
|
// Will be displayed slightly obfuscated as name(at)example(dot)com
|
||||||
'notes' => '', Additional informations that should be displayed in the Impressum block
|
'postal' => '', // Should contain a postal address where you can be reached at (optional)
|
||||||
'footer_text' => '', Text that will be displayed at the bottom of the pages.
|
'notes' => '', // Additional informations that should be displayed in the Impressum block
|
||||||
],
|
'footer_text' => '', // Text that will be displayed at the bottom of the pages.
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/impressum.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'impressum' => [
|
'impressum' => [
|
||||||
|
|
|
@ -56,7 +56,7 @@ function impressum_footer(App $a, string &$body)
|
||||||
|
|
||||||
function impressum_load_config(App $a, ConfigFileLoader $loader)
|
function impressum_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('impressum'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('impressum'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function impressum_show(App $a, string &$body)
|
function impressum_show(App $a, string &$body)
|
||||||
|
|
|
@ -5,14 +5,15 @@
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# Tim Stahel <transifex@swedneck.xyz>, 2019
|
# Tim Stahel <transifex@swedneck.xyz>, 2019
|
||||||
# Torbjörn Andersson <torbjorn.andersson@syte.se>, 2019
|
# Bjoessi <torbjorn.andersson@syte.se>, 2019
|
||||||
|
# Viktor Nilsson, 2022
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-04-01 11:11-0400\n"
|
"POT-Creation-Date: 2021-11-21 19:15-0500\n"
|
||||||
"PO-Revision-Date: 2019-03-21 18:01+0000\n"
|
"PO-Revision-Date: 2015-07-25 08:05+0000\n"
|
||||||
"Last-Translator: Torbjörn Andersson <torbjorn.andersson@syte.se>\n"
|
"Last-Translator: Viktor Nilsson, 2022\n"
|
||||||
"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n"
|
"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
@ -20,62 +21,58 @@ msgstr ""
|
||||||
"Language: sv\n"
|
"Language: sv\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
#: langfilter.php:58
|
#: langfilter.php:49
|
||||||
msgid "Language Filter"
|
|
||||||
msgstr "Språkfilter"
|
|
||||||
|
|
||||||
#: langfilter.php:59
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"This addon tries to identify the language posts are written in. If it does "
|
"This addon tries to identify the language posts are written in. If it does "
|
||||||
"not match any language specified below, posts will be hidden by collapsing "
|
"not match any language specified below, posts will be hidden by collapsing "
|
||||||
"them."
|
"them."
|
||||||
msgstr "Detta tillägg försöker identifiera vilket språk inlägg är skrivna i. Om det inte matchar ett språk specifierat nedan så göms inlägg genom att kollapsa dem."
|
msgstr "Detta tillägg försöker identifiera vilket språk inlägg är skrivna i. Om det inte matchar ett språk specificerat nedan så göms inlägget genom att kollapsa det."
|
||||||
|
|
||||||
#: langfilter.php:60
|
#: langfilter.php:50
|
||||||
msgid "Use the language filter"
|
msgid "Use the language filter"
|
||||||
msgstr "Använd språkfiltret"
|
msgstr "Använd språkfiltret"
|
||||||
|
|
||||||
#: langfilter.php:61
|
#: langfilter.php:51
|
||||||
msgid "Able to read"
|
msgid "Able to read"
|
||||||
msgstr "Kan läsa"
|
msgstr "Kan läsa"
|
||||||
|
|
||||||
#: langfilter.php:61
|
#: langfilter.php:51
|
||||||
msgid ""
|
msgid ""
|
||||||
"List of abbreviations (iso2 codes) for languages you speak, comma separated."
|
"List of abbreviations (ISO 639-1 codes) for languages you speak, comma "
|
||||||
" For example \"de,it\"."
|
"separated. For example \"de,it\"."
|
||||||
msgstr "Lista av förkortningar (iso2 koder) för spåk du pratar, separerade av kommatecken. Exempel: \"de, it\"."
|
msgstr "Lista över förkortningar (ISO 639-1-koder) för språk du använder, separerade med kommatecken. Exempel: \"de, it\"."
|
||||||
|
|
||||||
#: langfilter.php:62
|
#: langfilter.php:52
|
||||||
msgid "Minimum confidence in language detection"
|
msgid "Minimum confidence in language detection"
|
||||||
msgstr "Minsta förtroende i språkigenkänning"
|
msgstr "Minsta förtroende i språkigenkänning"
|
||||||
|
|
||||||
#: langfilter.php:62
|
#: langfilter.php:52
|
||||||
msgid ""
|
msgid ""
|
||||||
"Minimum confidence in language detection being correct, from 0 to 100. Posts"
|
"Minimum confidence in language detection being correct, from 0 to 100. Posts"
|
||||||
" will not be filtered when the confidence of language detection is below "
|
" will not be filtered when the confidence of language detection is below "
|
||||||
"this percent value."
|
"this percent value."
|
||||||
msgstr "Minsta förtroende i att språkigenkänningen är korrekt, från 0 till 100.\nInlägg filtreras inte när förtroendet i språkigenkänningen är under detta procentvärde."
|
msgstr "Minsta förtroende i att språkigenkänningen är korrekt, från 0 till 100.\nInlägg filtreras inte när förtroendet i språkigenkänningen är under detta procentvärde."
|
||||||
|
|
||||||
#: langfilter.php:63
|
#: langfilter.php:53
|
||||||
msgid "Minimum length of message body"
|
msgid "Minimum length of message body"
|
||||||
msgstr "Minsta längd på meddelandetext"
|
msgstr "Minsta längd på meddelandetext"
|
||||||
|
|
||||||
#: langfilter.php:63
|
#: langfilter.php:53
|
||||||
msgid ""
|
msgid ""
|
||||||
"Minimum number of characters in message body for filter to be used. Posts "
|
"Minimum number of characters in message body for filter to be used. Posts "
|
||||||
"shorter than this will not be filtered. Note: Language detection is "
|
"shorter than this will not be filtered. Note: Language detection is "
|
||||||
"unreliable for short content (<200 characters)."
|
"unreliable for short content (<200 characters)."
|
||||||
msgstr "Minsta antal tecken i meddelande text för att ett filter ska användas. Inlägg kortare än detta kommer inte filtreras. Notera: Språkigenkänning är inte tillförlitligt på korta texter (<200 tecken)."
|
msgstr "Minsta antal tecken i meddelandetext för att ett filter ska användas. Inlägg kortare än detta kommer inte att filtreras. Notera: Språkigenkänning är inte tillförlitligt på korta texter (<200 tecken)."
|
||||||
|
|
||||||
#: langfilter.php:64
|
#: langfilter.php:58
|
||||||
|
msgid "Language Filter"
|
||||||
|
msgstr "Språkfilter"
|
||||||
|
|
||||||
|
#: langfilter.php:60
|
||||||
msgid "Save Settings"
|
msgid "Save Settings"
|
||||||
msgstr "Spara inställningar"
|
msgstr "Spara inställningar"
|
||||||
|
|
||||||
#: langfilter.php:105
|
#: langfilter.php:193
|
||||||
msgid "Language Filter Settings saved."
|
|
||||||
msgstr "Inställningar för språkfilter sparade."
|
|
||||||
|
|
||||||
#: langfilter.php:182
|
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Filtered language: %s"
|
msgid "Filtered language: %s"
|
||||||
msgstr "Filtrerat språk: %s"
|
msgstr "Filtrerat språk: %s"
|
||||||
|
|
|
@ -5,16 +5,15 @@ function string_plural_select_sv($n){
|
||||||
$n = intval($n);
|
$n = intval($n);
|
||||||
return intval($n != 1);
|
return intval($n != 1);
|
||||||
}}
|
}}
|
||||||
$a->strings['Language Filter'] = 'Språkfilter';
|
$a->strings['This addon tries to identify the language posts are written in. If it does not match any language specified below, posts will be hidden by collapsing them.'] = 'Detta tillägg försöker identifiera vilket språk inlägg är skrivna i. Om det inte matchar ett språk specificerat nedan så göms inlägget genom att kollapsa det.';
|
||||||
$a->strings['This addon tries to identify the language posts are written in. If it does not match any language specified below, posts will be hidden by collapsing them.'] = 'Detta tillägg försöker identifiera vilket språk inlägg är skrivna i. Om det inte matchar ett språk specifierat nedan så göms inlägg genom att kollapsa dem.';
|
|
||||||
$a->strings['Use the language filter'] = 'Använd språkfiltret';
|
$a->strings['Use the language filter'] = 'Använd språkfiltret';
|
||||||
$a->strings['Able to read'] = 'Kan läsa';
|
$a->strings['Able to read'] = 'Kan läsa';
|
||||||
$a->strings['List of abbreviations (iso2 codes) for languages you speak, comma separated. For example "de,it".'] = 'Lista av förkortningar (iso2 koder) för spåk du pratar, separerade av kommatecken. Exempel: "de, it".';
|
$a->strings['List of abbreviations (ISO 639-1 codes) for languages you speak, comma separated. For example "de,it".'] = 'Lista över förkortningar (ISO 639-1-koder) för språk du använder, separerade med kommatecken. Exempel: "de, it".';
|
||||||
$a->strings['Minimum confidence in language detection'] = 'Minsta förtroende i språkigenkänning';
|
$a->strings['Minimum confidence in language detection'] = 'Minsta förtroende i språkigenkänning';
|
||||||
$a->strings['Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.'] = 'Minsta förtroende i att språkigenkänningen är korrekt, från 0 till 100.
|
$a->strings['Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.'] = 'Minsta förtroende i att språkigenkänningen är korrekt, från 0 till 100.
|
||||||
Inlägg filtreras inte när förtroendet i språkigenkänningen är under detta procentvärde.';
|
Inlägg filtreras inte när förtroendet i språkigenkänningen är under detta procentvärde.';
|
||||||
$a->strings['Minimum length of message body'] = 'Minsta längd på meddelandetext';
|
$a->strings['Minimum length of message body'] = 'Minsta längd på meddelandetext';
|
||||||
$a->strings['Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).'] = 'Minsta antal tecken i meddelande text för att ett filter ska användas. Inlägg kortare än detta kommer inte filtreras. Notera: Språkigenkänning är inte tillförlitligt på korta texter (<200 tecken).';
|
$a->strings['Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).'] = 'Minsta antal tecken i meddelandetext för att ett filter ska användas. Inlägg kortare än detta kommer inte att filtreras. Notera: Språkigenkänning är inte tillförlitligt på korta texter (<200 tecken).';
|
||||||
|
$a->strings['Language Filter'] = 'Språkfilter';
|
||||||
$a->strings['Save Settings'] = 'Spara inställningar';
|
$a->strings['Save Settings'] = 'Spara inställningar';
|
||||||
$a->strings['Language Filter Settings saved.'] = 'Inställningar för språkfilter sparade.';
|
|
||||||
$a->strings['Filtered language: %s'] = 'Filtrerat språk: %s';
|
$a->strings['Filtered language: %s'] = 'Filtrerat språk: %s';
|
||||||
|
|
|
@ -12,38 +12,4 @@ However, it's possible with an option to automate the creation of a Friendica ba
|
||||||
Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
|
Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
|
||||||
ldap.conf file to the signing cert for your LDAP server.
|
ldap.conf file to the signing cert for your LDAP server.
|
||||||
|
|
||||||
The configuration options for this module may be set in the `config/addon.config.php` file
|
The configuration options for this module are described in the `config/ldapauth.config.php` file.
|
||||||
e.g.:
|
|
||||||
|
|
||||||
'ldapauth' => [
|
|
||||||
// ldap hostname server - required
|
|
||||||
'ldap_server' => '',
|
|
||||||
|
|
||||||
// admin dn - optional - only if ldap server dont have anonymous access
|
|
||||||
'ldap_binddn' => '',
|
|
||||||
|
|
||||||
// admin password - optional - only if ldap server dont have anonymous access
|
|
||||||
'ldap_bindpw' => '',
|
|
||||||
|
|
||||||
// dn to search users - required
|
|
||||||
'ldap_searchdn' => '',
|
|
||||||
|
|
||||||
// attribute to find username - required
|
|
||||||
'ldap_userattr' => '',
|
|
||||||
|
|
||||||
// DN of the group whose member can auth on Friendica - optional
|
|
||||||
'ldap_group' => '',
|
|
||||||
|
|
||||||
// To create Friendica account if user exists in ldap
|
|
||||||
// Requires an email and a simple (beautiful) nickname on user ldap object
|
|
||||||
// active account creation - optional - default true
|
|
||||||
'ldap_autocreateaccount' => true,
|
|
||||||
|
|
||||||
// attribute to get email - optional - default : 'mail'
|
|
||||||
'ldap_autocreateaccount_emailattribute' => 'mail',
|
|
||||||
|
|
||||||
// attribute to get nickname - optional - default : 'givenName'
|
|
||||||
'ldap_autocreateaccount_nameattribute' => 'givenName',
|
|
||||||
],
|
|
||||||
|
|
||||||
...etc.
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/ldapauth.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'ldapauth' => [
|
'ldapauth' => [
|
||||||
|
|
|
@ -26,32 +26,7 @@
|
||||||
* Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
|
* Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
|
||||||
* ldap.conf file to the signing cert for your LDAP server.
|
* ldap.conf file to the signing cert for your LDAP server.
|
||||||
*
|
*
|
||||||
* The configuration options for this module may be set in the config/addon.config.php file
|
* The configuration options for this module are described in the config/ldapauth.config.php file
|
||||||
* e.g.:
|
|
||||||
*
|
|
||||||
* [ldapauth]
|
|
||||||
* ; ldap hostname server - required
|
|
||||||
* ldap_server = host.example.com
|
|
||||||
* ; dn to search users - required
|
|
||||||
* ldap_searchdn = ou=users,dc=example,dc=com
|
|
||||||
* ; attribute to find username - required
|
|
||||||
* ldap_userattr = uid
|
|
||||||
*
|
|
||||||
* ; admin dn - optional - only if ldap server dont have anonymous access
|
|
||||||
* ldap_binddn = cn=admin,dc=example,dc=com
|
|
||||||
* ; admin password - optional - only if ldap server dont have anonymous access
|
|
||||||
* ldap_bindpw = password
|
|
||||||
*
|
|
||||||
* ; for create Friendica account if user exist in ldap
|
|
||||||
* ; required an email and a simple (beautiful) nickname on user ldap object
|
|
||||||
* ; active account creation - optional - default none
|
|
||||||
* ldap_autocreateaccount = true
|
|
||||||
* ; attribute to get email - optional - default : 'mail'
|
|
||||||
* ldap_autocreateaccount_emailattribute = mail
|
|
||||||
* ; attribute to get nickname - optional - default : 'givenName'
|
|
||||||
* ldap_autocreateaccount_nameattribute = cn
|
|
||||||
*
|
|
||||||
* ...etc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
@ -70,7 +45,7 @@ function ldapauth_install()
|
||||||
|
|
||||||
function ldapauth_load_config(App $a, ConfigFileLoader $loader)
|
function ldapauth_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('ldapauth'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('ldapauth'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ldapauth_hook_authenticate(App $a, array &$b)
|
function ldapauth_hook_authenticate(App $a, array &$b)
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
Leistungsschutzrecht Addon
|
Leistungsschutzrecht Addon
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
Main author Michael Vogel
|
Main author: Michael Vogel
|
||||||
|
|
||||||
This addon handles legal problems with the German link tax, named "Leistungsschutzrecht" by shortening preview texts.
|
This addon handles legal problems with the German link tax, named "Leistungsschutzrecht" by shortening preview texts.
|
||||||
Additionally it is possibly to suppress preview pictures completely to avoid any legal problems.
|
Additionally, it is possibly to suppress preview pictures completely to avoid any legal problems.
|
||||||
|
|
||||||
## configuration
|
## Configuration
|
||||||
|
|
||||||
If you want to suppress pictures in previews, add this to your global `config/addon.config.php`:
|
If you want to suppress pictures in previews, add this to your global `config/leistungsschutzrecht.config.php`:
|
||||||
|
|
||||||
'leistungsschutzrecht' => [
|
|
||||||
'suppress_photos' => true,
|
|
||||||
],
|
|
||||||
|
|
||||||
|
return [
|
||||||
|
'leistungsschutzrecht' => [
|
||||||
|
'suppress_photos' => true,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
|
@ -31,10 +31,12 @@ Open the `config/local.config.php` file and add "libravatar" to the list of acti
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
You can add one configuration variables for the addon to the `config/addon.config.php` file:
|
You can add one configuration variables for the addon to the `config/libravatar.config.php` file:
|
||||||
|
|
||||||
'libravatar' => [
|
return [
|
||||||
'default_avatar' => 'identicon',
|
'libravatar' => [
|
||||||
],
|
'default_avatar' => 'identicon',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
[1]: http://wiki.libravatar.org/api/ "See API documentation at Libravatar for more information"
|
[1]: http://wiki.libravatar.org/api/ "See API documentation at Libravatar for more information"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/libravatar.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'libravatar' => [
|
'libravatar' => [
|
||||||
|
|
|
@ -26,7 +26,7 @@ function libravatar_install()
|
||||||
|
|
||||||
function libravatar_load_config(App $a, ConfigFileLoader $loader)
|
function libravatar_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('libravatar'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('libravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,11 +29,13 @@ the addon by adding _mathjax_ to the list in your `config/local.config.php` file
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
and then providing the base URL after that in the `config/addon.config.php` file
|
and then providing the base URL after that in the `config/mathjax.config.php` file
|
||||||
|
|
||||||
'mathjax' => [
|
return [
|
||||||
'baseurl' => '[the URL to your MathJax installation]',
|
'mathjax' => [
|
||||||
],
|
'baseurl' => '[the URL to your MathJax installation]',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
|
|
|
@ -40,15 +40,17 @@ function notifyall_post(App $a)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$condition = ['account_removed' => false, 'account_expired' => false];
|
||||||
|
|
||||||
// if this is a test, send it only to the admin(s)
|
// if this is a test, send it only to the admin(s)
|
||||||
// admin_email might be a comma separated list, but we need "a@b','c@d','e@f
|
// admin_email might be a comma separated list, but we need "a@b','c@d','e@f
|
||||||
if (intval($_REQUEST['test'])) {
|
if (intval($_REQUEST['test'])) {
|
||||||
$email = DI::config()->get('config', 'admin_email');
|
$adminEmails = \Friendica\Model\User::getAdminListForEmailing(['email']);
|
||||||
$email = "'" . str_replace([" ",","], ["","','"], $email) . "'";
|
|
||||||
}
|
|
||||||
$sql_extra = ((intval($_REQUEST['test'])) ? sprintf(" AND `email` in ( %s )", $email) : '');
|
|
||||||
|
|
||||||
$recipients = DBA::p("SELECT DISTINCT `email` FROM `user` WHERE `verified` AND NOT `account_removed` AND NOT `account_expired` $sql_extra");
|
$condition['email'] = array_column($adminEmails, 'email');
|
||||||
|
}
|
||||||
|
|
||||||
|
$recipients = DBA::p("SELECT DISTINCT `email` FROM `user`" . DBA::buildCondition($condition));
|
||||||
|
|
||||||
if (! $recipients) {
|
if (! $recipients) {
|
||||||
DI::sysmsg()->addNotice(DI::l10n()->t('No recipients found.'));
|
DI::sysmsg()->addNotice(DI::l10n()->t('No recipients found.'));
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:15-0500\n"
|
"POT-Creation-Date: 2022-11-18 11:57-0500\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -34,7 +34,9 @@ msgid "Comma separated list of keywords to hide"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nsfw.php:67
|
#: nsfw.php:67
|
||||||
msgid "Use /expression/ to provide regular expressions"
|
msgid ""
|
||||||
|
"Use /expression/ to provide regular expressions, #tag to specfically match "
|
||||||
|
"hashtags (case-insensitive), or regular words (case-sensitive)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nsfw.php:72
|
#: nsfw.php:72
|
||||||
|
|
|
@ -64,7 +64,7 @@ function nsfw_addon_settings(App &$a, array &$data)
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
'$info' => DI::l10n()->t('This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'),
|
'$info' => DI::l10n()->t('This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'),
|
||||||
'$enabled' => ['nsfw-enable', DI::l10n()->t('Enable Content filter'), $enabled],
|
'$enabled' => ['nsfw-enable', DI::l10n()->t('Enable Content filter'), $enabled],
|
||||||
'$words' => ['nsfw-words', DI::l10n()->t('Comma separated list of keywords to hide'), $words, DI::l10n()->t('Use /expression/ to provide regular expressions')],
|
'$words' => ['nsfw-words', DI::l10n()->t('Comma separated list of keywords to hide'), $words, DI::l10n()->t('Use /expression/ to provide regular expressions, #tag to specfically match hashtags (case-insensitive), or regular words (case-sensitive)')],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
@ -125,7 +125,7 @@ function nsfw_prepare_body_content_filter(App $a, &$hook_data)
|
||||||
$found = nsfw_find_word_in_item_tags($hook_data['item']['hashtags'], substr($word, 1));
|
$found = nsfw_find_word_in_item_tags($hook_data['item']['hashtags'], substr($word, 1));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$found = stripos($body, $word) !== false || nsfw_find_word_in_item_tags($hook_data['item']['tags'], $word);
|
$found = strpos($body, $word) !== false || nsfw_find_word_in_item_tags($hook_data['item']['tags'], $word);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,18 +42,20 @@ Open the `config/local.config.php` file and add "openstreetmap" to the list of a
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
You can set configuration variables for the addon in the `config/addon.config.php` file:
|
You can set configuration variables for the addon in the `config/openstreetmap.config.php` file:
|
||||||
|
|
||||||
'openstreetmap' => [
|
return [
|
||||||
'tmsserver' => 'https://www.openstreetmap.org',
|
'openstreetmap' => [
|
||||||
'nomserver' => 'https://nominatim.openstreetmap.org/search.php',
|
'tmsserver' => 'https://www.openstreetmap.org',
|
||||||
'zoom' => 16,
|
'nomserver' => 'https://nominatim.openstreetmap.org/search.php',
|
||||||
'marker' => 0,
|
'zoom' => 16,
|
||||||
],
|
'marker' => 0,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
The *tmsserver* points to the tile server you want to use. Use the full URL,
|
The *tmsserver* points to the tile server you want to use. Use the full URL,
|
||||||
with protocol (http/s) and trailing slash. You can configure the default zoom
|
with protocol (http/s) and trailing slash. You can configure the default zoom
|
||||||
level on the map with *zoom*. 1 will show the whole world and 18 is the highest
|
level on the map with *zoom*. 1 will show the whole world and 18 is the highest
|
||||||
zoom level available.
|
zoom level available.
|
||||||
|
|
||||||
Please see provided `config/openstreetmap.php` file for explanation on the additional configuration keys.
|
Please see provided `config/openstreetmap.php` file for explanation on the additional configuration keys.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/openstreetmap.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'openstreetmap' => [
|
'openstreetmap' => [
|
||||||
|
|
|
@ -37,7 +37,7 @@ function openstreetmap_install()
|
||||||
|
|
||||||
function openstreetmap_load_config(App $a, ConfigFileLoader $loader)
|
function openstreetmap_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function openstreetmap_alterheader(App $a, &$navHtml)
|
function openstreetmap_alterheader(App $a, &$navHtml)
|
||||||
|
|
|
@ -8,45 +8,7 @@ This addon replaces the default `mail()` function by the `PHPMailer` library, al
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
You can override the default value of the following config keys in your base Friendica install `config/addon.config.php` file:
|
The configuration options for this module are described in the `config/phpmailer.config.php` file.
|
||||||
|
|
||||||
'phpmailer' => [
|
|
||||||
// smtp (Boolean)
|
|
||||||
// Enables SMTP relaying for outbound emails
|
|
||||||
'smtp' => false,
|
|
||||||
|
|
||||||
// smtp_server (String)
|
|
||||||
// SMTP server host name
|
|
||||||
'smtp_server' => 'smtp.example.com',
|
|
||||||
|
|
||||||
// smtp_port (Integer)
|
|
||||||
// SMTP server port number
|
|
||||||
'smtp_port' => 25,
|
|
||||||
|
|
||||||
// smtp_secure (String)
|
|
||||||
// What kind of encryption to use on the SMTP connection.
|
|
||||||
// Options: '', 'ssl' or 'tls'.
|
|
||||||
'smtp_secure' => '',
|
|
||||||
|
|
||||||
// smtp_port_s (Integer)
|
|
||||||
// Secure SMTP server port number
|
|
||||||
'smtp_port_s' => 465,
|
|
||||||
|
|
||||||
// smtp_username (String)
|
|
||||||
// SMTP server authentication user name
|
|
||||||
// Empty string disables authentication
|
|
||||||
'smtp_username' => '',
|
|
||||||
|
|
||||||
// smtp_password (String)
|
|
||||||
// SMTP server authentication password
|
|
||||||
// Empty string disables authentication
|
|
||||||
'smtp_password' => '',
|
|
||||||
|
|
||||||
// smtp_from (String)
|
|
||||||
// From address used when using the SMTP server
|
|
||||||
// Example: no-reply@example.com
|
|
||||||
'smtp_from' => '',
|
|
||||||
],
|
|
||||||
|
|
||||||
License
|
License
|
||||||
=======
|
=======
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/phpmailer.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'phpmailer' => [
|
'phpmailer' => [
|
||||||
|
|
|
@ -25,7 +25,7 @@ function phpmailer_install()
|
||||||
|
|
||||||
function phpmailer_load_config(App $a, ConfigFileLoader $loader)
|
function phpmailer_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('phpmailer'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,14 +30,16 @@ Open the `config/local.config.php` file and add "piwik" to the list of activated
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
You can change 4 more configuration variables for the addon in the `config/addon.config.php` file:
|
You can change 4 more configuration variables for the addon in the `config/piwik.config.php` file:
|
||||||
|
|
||||||
'piwik' => [
|
return [
|
||||||
'baseurl' => 'example.com/piwik/',
|
'piwik' => [
|
||||||
'sideid' => 1,
|
'baseurl' => 'example.com/piwik/',
|
||||||
'optout' => true,
|
'sideid' => 1,
|
||||||
'async' => false,
|
'optout' => true,
|
||||||
],
|
'async' => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
Configuration fields
|
Configuration fields
|
||||||
---------------------
|
---------------------
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/piwik.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'piwik' => [
|
'piwik' => [
|
||||||
|
|
|
@ -16,14 +16,17 @@
|
||||||
*
|
*
|
||||||
* Configuration:
|
* Configuration:
|
||||||
* Use the administration panel to configure the Piwik tracking addon, or
|
* Use the administration panel to configure the Piwik tracking addon, or
|
||||||
* in case you don't use this add the following lines to your config/addon.config.php
|
* in case you don't use this, add the following lines to your config/piwik.config.php
|
||||||
* file:
|
* file:
|
||||||
*
|
*
|
||||||
* [piwik]
|
* return [
|
||||||
* baseurl = example.com/piwik/
|
* 'piwik' => [
|
||||||
* sideid = 1
|
* 'baseurl' => '',
|
||||||
* optout = true ;set to false to disable
|
* 'sideid' => '',
|
||||||
* async = false ;set to true to enable
|
* 'optout' => true,
|
||||||
|
* 'async' => false,
|
||||||
|
* ],
|
||||||
|
* ];
|
||||||
*
|
*
|
||||||
* Change the siteid to the ID that the Piwik tracker for your Friendica
|
* Change the siteid to the ID that the Piwik tracker for your Friendica
|
||||||
* installation has. Alter the baseurl to fit your needs, don't care
|
* installation has. Alter the baseurl to fit your needs, don't care
|
||||||
|
@ -47,7 +50,7 @@ function piwik_install() {
|
||||||
|
|
||||||
function piwik_load_config(App $a, ConfigFileLoader $loader)
|
function piwik_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('piwik'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('piwik'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function piwik_analytics(App $a, string &$b)
|
function piwik_analytics(App $a, string &$b)
|
||||||
|
@ -60,7 +63,7 @@ function piwik_analytics(App $a, string &$b)
|
||||||
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/piwik/piwik.css' . '" media="all" />';
|
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/piwik/piwik.css' . '" media="all" />';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the configuration variables from the config/addon.config.php file.
|
* Get the configuration values.
|
||||||
*/
|
*/
|
||||||
$baseurl = DI::config()->get('piwik', 'baseurl');
|
$baseurl = DI::config()->get('piwik', 'baseurl');
|
||||||
$siteid = DI::config()->get('piwik', 'siteid');
|
$siteid = DI::config()->get('piwik', 'siteid');
|
||||||
|
|
|
@ -6,21 +6,23 @@ Public Server is a Friendica addon which implements automatic account & post exp
|
||||||
|
|
||||||
This is a modified version of the testdrive addon, DO NOT ACTIVATE AT THE SAME TIME AS THE TESTDRIVE ADDON.
|
This is a modified version of the testdrive addon, DO NOT ACTIVATE AT THE SAME TIME AS THE TESTDRIVE ADDON.
|
||||||
|
|
||||||
'public_server' => [
|
return [
|
||||||
// When an account is created on the site, it is given a hard expiration date of. 0 to disable.
|
'public_server' => [
|
||||||
'expiredays' => 0,
|
// When an account is created on the site, it is given a hard expiration date of. 0 to disable.
|
||||||
// Set the default days for posts to expire here. 0 to disable.
|
'expiredays' => 0,
|
||||||
'expireposts' => 0,
|
// Set the default days for posts to expire here. 0 to disable.
|
||||||
// Remove users who have never logged in after nologin days. 0 to disable.
|
'expireposts' => 0,
|
||||||
'nologin' => 0,
|
// Remove users who have never logged in after nologin days. 0 to disable.
|
||||||
// Remove users who last logged in over flagusers days ago. 0 to disable.
|
'nologin' => 0,
|
||||||
'flagusers' => 0,
|
// Remove users who last logged in over flagusers days ago. 0 to disable.
|
||||||
// For users who last logged in over flagposts days ago set post expiry days to flagpostsexpire. 0 to disable.
|
'flagusers' => 0,
|
||||||
'flagposts' => 0,
|
// For users who last logged in over flagposts days ago set post expiry days to flagpostsexpire. 0 to disable.
|
||||||
'flagpostsexpire' => 0,
|
'flagposts' => 0,
|
||||||
],
|
'flagpostsexpire' => 0,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
Set these in your `config/addon.config.php` file. By default nothing is defined in case the addon is activated accidentally.
|
Set these in your `config/public_server.config.php` file. By default, nothing is defined in case the addon is activated accidentally.
|
||||||
They can be ommitted or set to 0 to disable each option.
|
They can be ommitted or set to 0 to disable each option.
|
||||||
The default values are those used by friendica.eu, change these as desired.
|
The default values are those used by friendica.eu, change these as desired.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/public_server.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'public_server' => [
|
'public_server' => [
|
||||||
|
|
|
@ -29,7 +29,7 @@ function public_server_install()
|
||||||
|
|
||||||
function public_server_load_config(App $a, ConfigFileLoader $loader)
|
function public_server_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('public_server'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('public_server'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function public_server_register_account(App $a, $b)
|
function public_server_register_account(App $a, $b)
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
To let the connector work properly you should define an application name in `config/addon.config.php`:
|
To let the connector work properly you should define an application name in `config/pumpio.config.php`:
|
||||||
|
|
||||||
'pumpio' => [
|
return [
|
||||||
'application_name' => '',
|
'pumpio' => [
|
||||||
// Displays forwarded posts like "wall-to-wall" posts.
|
'application_name' => '',
|
||||||
'wall-to-wall_share' => false,
|
// Displays forwarded posts like "wall-to-wall" posts.
|
||||||
// Given in minutes
|
'wall-to-wall_share' => false,
|
||||||
'poll_interval' => 5,
|
// Given in minutes
|
||||||
],
|
'poll_interval' => 5,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
This name appears at pump.io and is important for not mirroring back posts that came from Friendica.
|
This name appears at pump.io and is important for not mirroring back posts that came from Friendica.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/pumpio.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'pumpio' => [
|
'pumpio' => [
|
||||||
|
|
|
@ -99,10 +99,10 @@ function pumpio_registerclient(App $a, $host)
|
||||||
$application_name = DI::baseUrl()->getHostname();
|
$application_name = DI::baseUrl()->getHostname();
|
||||||
}
|
}
|
||||||
|
|
||||||
$adminlist = explode(',', str_replace(' ', '', DI::config()->get('config', 'admin_email')));
|
$firstAdmin = User::getFirstAdmin(['email']);
|
||||||
|
|
||||||
$params['type'] = 'client_associate';
|
$params['type'] = 'client_associate';
|
||||||
$params['contacts'] = $adminlist[0];
|
$params['contacts'] = $firstAdmin['email'];
|
||||||
$params['application_type'] = 'native';
|
$params['application_type'] = 'native';
|
||||||
$params['application_name'] = $application_name;
|
$params['application_name'] = $application_name;
|
||||||
$params['logo_url'] = DI::baseUrl()->get() . '/images/friendica-256.png';
|
$params['logo_url'] = DI::baseUrl()->get() . '/images/friendica-256.png';
|
||||||
|
@ -320,7 +320,7 @@ function pumpio_settings_post(App $a, array &$b)
|
||||||
|
|
||||||
function pumpio_load_config(App $a, ConfigFileLoader $loader)
|
function pumpio_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('pumpio'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pumpio_hook_fork(App $a, array &$b)
|
function pumpio_hook_fork(App $a, array &$b)
|
||||||
|
|
|
@ -108,7 +108,7 @@ function saml_is_configured()
|
||||||
DI::config()->get('saml', 'idp_cert');
|
DI::config()->get('saml', 'idp_cert');
|
||||||
}
|
}
|
||||||
|
|
||||||
function saml_sso_initiate(App $a, array &$b)
|
function saml_sso_initiate(App $a, string &$body)
|
||||||
{
|
{
|
||||||
if (!saml_is_configured()) {
|
if (!saml_is_configured()) {
|
||||||
Logger::warning('SAML SSO tried to trigger, but the SAML addon is not configured yet!');
|
Logger::warning('SAML SSO tried to trigger, but the SAML addon is not configured yet!');
|
||||||
|
@ -173,7 +173,7 @@ function saml_sso_reply(App $a)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function saml_slo_initiate(App $a, array &$b)
|
function saml_slo_initiate(App $a)
|
||||||
{
|
{
|
||||||
if (!saml_is_configured()) {
|
if (!saml_is_configured()) {
|
||||||
Logger::warning('SAML SLO tried to trigger, but the SAML addon is not configured yet!');
|
Logger::warning('SAML SLO tried to trigger, but the SAML addon is not configured yet!');
|
||||||
|
|
|
@ -6,12 +6,14 @@ Testdrive is a Friendica addon which implements automatic account expiration so
|
||||||
|
|
||||||
When an account is created on the site, it is given a hard expiration date of
|
When an account is created on the site, it is given a hard expiration date of
|
||||||
|
|
||||||
'testdrive' => [
|
return [
|
||||||
'expiredays' => 30,
|
'testdrive' => [
|
||||||
],
|
'expiredays' => 30,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
Set this in your `config/addon.config.php` file to allow a 30 day test drive period.
|
Set this in your `config/testdrive.config.php` file to allow a 30-day test drive period.
|
||||||
By default no expiration period is defined in case the addon is activated accidentally.
|
By default, no expiration period is defined in case the addon is activated accidentally.
|
||||||
|
|
||||||
There is no opportunity to extend an expired account using this addon.
|
There is no opportunity to extend an expired account using this addon.
|
||||||
Expiration is final.
|
Expiration is final.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/testdrive.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'testdrive' => [
|
'testdrive' => [
|
||||||
|
|
|
@ -27,7 +27,7 @@ function testdrive_install()
|
||||||
|
|
||||||
function testdrive_load_config(App $a, ConfigFileLoader $loader)
|
function testdrive_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('testdrive'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('testdrive'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testdrive_globaldir_update(App $a, array &$b)
|
function testdrive_globaldir_update(App $a, array &$b)
|
||||||
|
|
|
@ -266,7 +266,7 @@ function tumblr_hook_fork(App $a, array &$b)
|
||||||
$post = $b['data'];
|
$post = $b['data'];
|
||||||
|
|
||||||
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
||||||
!strstr($post['postopts'], 'tumblr') || ($post['parent'] != $post['id'])) {
|
!strstr($post['postopts'] ?? '', 'tumblr') || ($post['parent'] != $post['id'])) {
|
||||||
$b['execute'] = false;
|
$b['execute'] = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -442,4 +442,3 @@ function tumblr_send(App $a, array &$b) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,12 +24,14 @@ Open the `config/local.config.php` file and add "twitter" to the list of activat
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
Add your key pair to your global `config/addon.config.php`.
|
Add your key pair to your `config/twitter.config.php` file.
|
||||||
|
|
||||||
'twitter' => [
|
return [
|
||||||
'consumerkey' => 'your consumer_key here',
|
'twitter' => [
|
||||||
'consumersecret' => 'your consumer_secret here',
|
'consumerkey' => 'your consumer_key here',
|
||||||
],
|
'consumersecret' => 'your consumer_secret here',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
After this, users can configure their Twitter account settings from "Settings -> Addon Settings".
|
After this, users can configure their Twitter account settings from "Settings -> Addon Settings".
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||||
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
|
// Instead, copy this file to config/twitter.config.php in your Friendica directory and set the correct values there
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'twitter' => [
|
'twitter' => [
|
||||||
|
|
|
@ -48,12 +48,14 @@
|
||||||
* we do not need "Twitter as login". When you've registered the app you get the
|
* we do not need "Twitter as login". When you've registered the app you get the
|
||||||
* OAuth Consumer key and secret pair for your application/site.
|
* OAuth Consumer key and secret pair for your application/site.
|
||||||
*
|
*
|
||||||
* Add this key pair to your global config/addon.config.php or use the admin panel.
|
* Add this key pair to your config/twitter.config.php file or use the admin panel.
|
||||||
*
|
*
|
||||||
* 'twitter' => [
|
* return [
|
||||||
* 'consumerkey' => '',
|
* 'twitter' => [
|
||||||
* 'consumersecret' => '',
|
* 'consumerkey' => '',
|
||||||
* ],
|
* 'consumersecret' => '',
|
||||||
|
* ],
|
||||||
|
* ];
|
||||||
*
|
*
|
||||||
* To activate the addon itself add it to the system.addon
|
* To activate the addon itself add it to the system.addon
|
||||||
* setting. After this, your user can configure their Twitter account settings
|
* setting. After this, your user can configure their Twitter account settings
|
||||||
|
@ -123,7 +125,7 @@ function twitter_install()
|
||||||
|
|
||||||
function twitter_load_config(App $a, ConfigFileLoader $loader)
|
function twitter_load_config(App $a, ConfigFileLoader $loader)
|
||||||
{
|
{
|
||||||
$a->getConfigCache()->load($loader->loadAddonConfig('twitter'));
|
$a->getConfigCache()->load($loader->loadAddonConfig('twitter'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
function twitter_check_item_notification(App $a, array &$notification_data)
|
function twitter_check_item_notification(App $a, array &$notification_data)
|
||||||
|
@ -440,7 +442,7 @@ function twitter_hook_fork(App $a, array &$b)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($post['app'], 0, 7) == 'Twitter') {
|
if (substr($post['app'] ?? '', 0, 7) == 'Twitter') {
|
||||||
DI::logger()->info('No Twitter app');
|
DI::logger()->info('No Twitter app');
|
||||||
$b['execute'] = false;
|
$b['execute'] = false;
|
||||||
return;
|
return;
|
||||||
|
@ -455,7 +457,7 @@ function twitter_hook_fork(App $a, array &$b)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Comments are never exported when we don't import the twitter timeline
|
// Comments are never exported when we don't import the twitter timeline
|
||||||
if (!strstr($post['postopts'], 'twitter') || ($post['parent'] != $post['id']) || $post['private']) {
|
if (!strstr($post['postopts'] ?? '', 'twitter') || ($post['parent'] != $post['id']) || $post['private']) {
|
||||||
DI::logger()->info('Comments are never exported when we don\'t import the twitter timeline');
|
DI::logger()->info('Comments are never exported when we don\'t import the twitter timeline');
|
||||||
$b['execute'] = false;
|
$b['execute'] = false;
|
||||||
return;
|
return;
|
||||||
|
@ -1582,7 +1584,7 @@ function twitter_auto_follow(int $uid, object $data)
|
||||||
// We only probe on Mastodon style URL to reduce the number of unsuccessful probes
|
// We only probe on Mastodon style URL to reduce the number of unsuccessful probes
|
||||||
twitter_add_contact($url->expanded_url, strpos($url->expanded_url, '@'), $uid);
|
twitter_add_contact($url->expanded_url, strpos($url->expanded_url, '@'), $uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -107,7 +107,7 @@ function wppost_hook_fork(App $a, array &$b)
|
||||||
$post = $b['data'];
|
$post = $b['data'];
|
||||||
|
|
||||||
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
||||||
!strstr($post['postopts'], 'wppost') || ($post['parent'] != $post['id'])) {
|
!strstr($post['postopts'] ?? '', 'wppost') || ($post['parent'] != $post['id'])) {
|
||||||
$b['execute'] = false;
|
$b['execute'] = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue