Browse Source

Moved widgets and remote permissions to the deprecated addons

master
Michael 9 months ago
parent
commit
6d2a6408e8
  1. 8
      remote_permissions/README.md
  2. 60
      remote_permissions/lang/C/messages.po
  3. 14
      remote_permissions/lang/ca/strings.php
  4. 71
      remote_permissions/lang/cs/messages.po
  5. 20
      remote_permissions/lang/cs/strings.php
  6. 65
      remote_permissions/lang/de/messages.po
  7. 18
      remote_permissions/lang/de/strings.php
  8. 5
      remote_permissions/lang/eo/strings.php
  9. 70
      remote_permissions/lang/es/messages.po
  10. 20
      remote_permissions/lang/es/strings.php
  11. 71
      remote_permissions/lang/fi-fi/messages.po
  12. 13
      remote_permissions/lang/fi-fi/strings.php
  13. 14
      remote_permissions/lang/fr/strings.php
  14. 62
      remote_permissions/lang/hu/messages.po
  15. 18
      remote_permissions/lang/hu/strings.php
  16. 5
      remote_permissions/lang/is/strings.php
  17. 63
      remote_permissions/lang/it/messages.po
  18. 18
      remote_permissions/lang/it/strings.php
  19. 14
      remote_permissions/lang/nb-no/strings.php
  20. 70
      remote_permissions/lang/nl/messages.po
  21. 12
      remote_permissions/lang/nl/strings.php
  22. 70
      remote_permissions/lang/pl/messages.po
  23. 20
      remote_permissions/lang/pl/strings.php
  24. 14
      remote_permissions/lang/pt-br/strings.php
  25. 69
      remote_permissions/lang/ro/messages.po
  26. 20
      remote_permissions/lang/ro/strings.php
  27. 14
      remote_permissions/lang/ru/strings.php
  28. 5
      remote_permissions/lang/sv/strings.php
  29. 14
      remote_permissions/lang/zh-cn/strings.php
  30. 205
      remote_permissions/remote_permissions.php
  31. 16
      remote_permissions/settings.css
  32. 3
      remote_permissions/templates/admin.tpl
  33. 8
      remote_permissions/templates/settings.tpl
  34. 57
      widgets/lang/C/messages.po
  35. 10
      widgets/lang/ca/strings.php
  36. 10
      widgets/lang/cs/strings.php
  37. 10
      widgets/lang/de/strings.php
  38. 10
      widgets/lang/eo/strings.php
  39. 10
      widgets/lang/es/strings.php
  40. 10
      widgets/lang/fr/strings.php
  41. 10
      widgets/lang/is/strings.php
  42. 10
      widgets/lang/it/strings.php
  43. 10
      widgets/lang/nb-no/strings.php
  44. 10
      widgets/lang/pl/strings.php
  45. 10
      widgets/lang/pt-br/strings.php
  46. 10
      widgets/lang/ru/strings.php
  47. 3
      widgets/lang/sv/strings.php
  48. 10
      widgets/lang/zh-cn/strings.php
  49. 19
      widgets/templates/settings.tpl
  50. 5
      widgets/templates/widget_like.tpl
  51. 49
      widgets/widget_friendheader.php
  52. 48
      widgets/widget_friends.php
  53. 73
      widgets/widget_like.php
  54. 37
      widgets/widgets.js
  55. 172
      widgets/widgets.php

8
remote_permissions/README.md

@ -0,0 +1,8 @@
The Remote Permissions addon enables recipients of private posts to see who else has received the post. This can be beneficial on community servers where people may want to modify the way they speak depending on who can see their comments to the post.
Note that since Friendica is federated, the local hub may have posts that originated elsewhere. In that case, the addon has no way of knowing all the recipients of the post, and it must settle for finding out who else can see it on the local hub.
The hub admin can specify one of two behaviors for this addon:
* **Global:** every private post on the local hub will show all recipients (or at least the ones it can discover) of the post to any other users on the local hub
* **Individual:** only private posts from those users on the local hub who "opt-in" will show the post recipients. None of the private posts that originated elsewhere will show even partial lists of post recipients

60
remote_permissions/lang/C/messages.po

@ -0,0 +1,60 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: remote_permissions.php:44
msgid "Remote Permissions Settings"
msgstr ""
#: remote_permissions.php:45
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr ""
#: remote_permissions.php:47 remote_permissions.php:196
msgid "Save Settings"
msgstr ""
#: remote_permissions.php:124
msgid "Visible to:"
msgstr ""
#: remote_permissions.php:178
msgid "Visible to"
msgstr ""
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr ""
#: remote_permissions.php:197
msgid "Global"
msgstr ""
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr ""
#: remote_permissions.php:198
msgid "Individual"
msgstr ""
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr ""

14
remote_permissions/lang/ca/strings.php

@ -0,0 +1,14 @@
<?php
$a->strings["Remote Permissions Settings"] = "";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "";
$a->strings["Submit"] = "Enviar";
$a->strings["Remote Permissions settings updated."] = "";
$a->strings["Visible to:"] = "Visible per a:";
$a->strings["Visible to"] = "";
$a->strings["may only be a partial list"] = "";
$a->strings["Global"] = "";
$a->strings["The posts of every user on this server show the post recipients"] = "";
$a->strings["Individual"] = "";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "";
$a->strings["Settings updated."] = "Ajustos actualitzats.";

71
remote_permissions/lang/cs/messages.po

@ -0,0 +1,71 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2018-06-13 18:01+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: remote_permissions.php:45
msgid "Remote Permissions Settings"
msgstr "Nastavení Vzdálených oprávnění"
#: remote_permissions.php:46
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Umožnit příjemcům Vašich soukromých příspěvků vidět ostatní příjemce příspěvků"
#: remote_permissions.php:48 remote_permissions.php:196
msgid "Submit"
msgstr "Odeslat"
#: remote_permissions.php:58
msgid "Remote Permissions settings updated."
msgstr "Nastavení Vzdálených opravnění aktualizováno."
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Viditelné pro:"
#: remote_permissions.php:178
msgid "Visible to"
msgstr "Viditelné pro"
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr "pouze pro část seznamu"
#: remote_permissions.php:197
msgid "Global"
msgstr "Globální"
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr "Příspěvek každého uživatele na tomto serveru zobrazuje příjemce příspěvků"
#: remote_permissions.php:198
msgid "Individual"
msgstr "Individuálové"
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr "Každý uživatel si zvolí, zda-li jeho/její příspěvek zobrazí příjemce příspěvku."
#: remote_permissions.php:205
msgid "Settings updated."
msgstr "Nastavení aktualizováno."

20
remote_permissions/lang/cs/strings.php

@ -0,0 +1,20 @@
<?php
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
;
$a->strings["Remote Permissions Settings"] = "Nastavení Vzdálených oprávnění";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Umožnit příjemcům Vašich soukromých příspěvků vidět ostatní příjemce příspěvků";
$a->strings["Submit"] = "Odeslat";
$a->strings["Remote Permissions settings updated."] = "Nastavení Vzdálených opravnění aktualizováno.";
$a->strings["Visible to:"] = "Viditelné pro:";
$a->strings["Visible to"] = "Viditelné pro";
$a->strings["may only be a partial list"] = "pouze pro část seznamu";
$a->strings["Global"] = "Globální";
$a->strings["The posts of every user on this server show the post recipients"] = "Příspěvek každého uživatele na tomto serveru zobrazuje příjemce příspěvků";
$a->strings["Individual"] = "Individuálové";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Každý uživatel si zvolí, zda-li jeho/její příspěvek zobrazí příjemce příspěvku.";
$a->strings["Settings updated."] = "Nastavení aktualizováno.";

65
remote_permissions/lang/de/messages.po

@ -0,0 +1,65 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# Steffen K9, 2021
# Till Mohr <tmtrfx@till-mohr.de>, 2021
# Tobias Diekershoff <tobias.diekershoff@gmx.net>, 2014-2015
# Ulf Rompe <transifex.com@rompe.org>, 2019
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2021-05-23 19:46+0000\n"
"Last-Translator: Till Mohr <tmtrfx@till-mohr.de>\n"
"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: remote_permissions.php:44
msgid "Remote Permissions Settings"
msgstr "Entfernte Privatsphäreneinstellungen"
#: remote_permissions.php:45
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Erlaube Empfängern deiner privaten Nachrichten, zu sehen, wer die anderen Empfänger sind"
#: remote_permissions.php:47 remote_permissions.php:196
msgid "Save Settings"
msgstr "Einstellungen speichern"
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Sichtbar für:"
#: remote_permissions.php:178
msgid "Visible to"
msgstr "Sichtbar für"
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr "ist womöglich nur eine teilweise Liste"
#: remote_permissions.php:197
msgid "Global"
msgstr "Global"
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr "Die Beiträge jedes Nutzers dieses Servers werden die Empfänger des Beitrags anzeigen"
#: remote_permissions.php:198
msgid "Individual"
msgstr "Individuell"
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr "Jede/r Nutzer/in kann wählen, ob die Empfänger der Beiträge angezeigt werden sollen oder nicht"

18
remote_permissions/lang/de/strings.php

@ -0,0 +1,18 @@
<?php
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
$n = intval($n);
return intval($n != 1);
}}
;
$a->strings["Remote Permissions Settings"] = "Entfernte Privatsphäreneinstellungen";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Erlaube Empfängern deiner privaten Nachrichten, zu sehen, wer die anderen Empfänger sind";
$a->strings["Save Settings"] = "Einstellungen speichern";
$a->strings["Visible to:"] = "Sichtbar für:";
$a->strings["Visible to"] = "Sichtbar für";
$a->strings["may only be a partial list"] = "ist womöglich nur eine teilweise Liste";
$a->strings["Global"] = "Global";
$a->strings["The posts of every user on this server show the post recipients"] = "Die Beiträge jedes Nutzers dieses Servers werden die Empfänger des Beitrags anzeigen";
$a->strings["Individual"] = "Individuell";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Jede/r Nutzer/in kann wählen, ob die Empfänger der Beiträge angezeigt werden sollen oder nicht";

5
remote_permissions/lang/eo/strings.php

@ -0,0 +1,5 @@
<?php
$a->strings["Submit"] = "Sendi";
$a->strings["Visible to:"] = "Videbla al:";
$a->strings["Settings updated."] = "Agordoj ĝisdatigita.";

70
remote_permissions/lang/es/messages.po

@ -0,0 +1,70 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# Albert, 2016
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2016-11-17 22:30+0000\n"
"Last-Translator: Albert\n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: remote_permissions.php:45
msgid "Remote Permissions Settings"
msgstr "Ajustes de Permisos Remotos"
#: remote_permissions.php:46
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Permitir a los destinatarios de sus publicaciones privadas ver a los otros destinatarios de sus publicaciones"
#: remote_permissions.php:48 remote_permissions.php:196
msgid "Submit"
msgstr "Enviar"
#: remote_permissions.php:58
msgid "Remote Permissions settings updated."
msgstr "Ajustes de Permisos Remotos actualizados."
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Visible para:"
#: remote_permissions.php:178
msgid "Visible to"
msgstr "Visible para"
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr "puede ser sólo una lista parcial"
#: remote_permissions.php:197
msgid "Global"
msgstr "Global"
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr "Las entradas de cada usuario de este servidor muestran a los destinatarios de la entrada"
#: remote_permissions.php:198
msgid "Individual"
msgstr "Individuo"
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr "Cada usuario elige si sus entradas muestran a los destinatarios de la entrada"
#: remote_permissions.php:205
msgid "Settings updated."
msgstr "Ajustes actualizados."

20
remote_permissions/lang/es/strings.php

@ -0,0 +1,20 @@
<?php
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
$n = intval($n);
return intval($n != 1);
}}
;
$a->strings["Remote Permissions Settings"] = "Ajustes de Permisos Remotos";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Permitir a los destinatarios de sus publicaciones privadas ver a los otros destinatarios de sus publicaciones";
$a->strings["Submit"] = "Enviar";
$a->strings["Remote Permissions settings updated."] = "Ajustes de Permisos Remotos actualizados.";
$a->strings["Visible to:"] = "Visible para:";
$a->strings["Visible to"] = "Visible para";
$a->strings["may only be a partial list"] = "puede ser sólo una lista parcial";
$a->strings["Global"] = "Global";
$a->strings["The posts of every user on this server show the post recipients"] = "Las entradas de cada usuario de este servidor muestran a los destinatarios de la entrada";
$a->strings["Individual"] = "Individuo";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Cada usuario elige si sus entradas muestran a los destinatarios de la entrada";
$a->strings["Settings updated."] = "Ajustes actualizados.";

71
remote_permissions/lang/fi-fi/messages.po

@ -0,0 +1,71 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# Kris, 2018
# Kris, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2018-04-16 16:05+0000\n"
"Last-Translator: Kris\n"
"Language-Team: Finnish (Finland) (http://www.transifex.com/Friendica/friendica/language/fi_FI/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fi_FI\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: remote_permissions.php:45
msgid "Remote Permissions Settings"
msgstr "Remote Permissions -asetukset"
#: remote_permissions.php:46
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr ""
#: remote_permissions.php:48 remote_permissions.php:196
msgid "Submit"
msgstr "Lähetä"
#: remote_permissions.php:58
msgid "Remote Permissions settings updated."
msgstr "Remote Pemissions -asetukset päivitetty."
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Näkyvyys:"
#: remote_permissions.php:178
msgid "Visible to"
msgstr ""
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr ""
#: remote_permissions.php:197
msgid "Global"
msgstr ""
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr ""
#: remote_permissions.php:198
msgid "Individual"
msgstr ""
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr ""
#: remote_permissions.php:205
msgid "Settings updated."
msgstr "Asetukset päivitetty."

13
remote_permissions/lang/fi-fi/strings.php

@ -0,0 +1,13 @@
<?php
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
$n = intval($n);
return intval($n != 1);
}}
;
$a->strings["Remote Permissions Settings"] = "Remote Permissions -asetukset";
$a->strings["Submit"] = "Lähetä";
$a->strings["Remote Permissions settings updated."] = "Remote Pemissions -asetukset päivitetty.";
$a->strings["Visible to:"] = "Näkyvyys:";
$a->strings["Settings updated."] = "Asetukset päivitetty.";

14
remote_permissions/lang/fr/strings.php

@ -0,0 +1,14 @@
<?php
$a->strings["Remote Permissions Settings"] = "Permissions distantes";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Autoriser les destinataires de vos messages privés a voir les autres destinataires du message";
$a->strings["Submit"] = "Envoyer";
$a->strings["Remote Permissions settings updated."] = "Permissions distantes mises-à-jour.";
$a->strings["Visible to:"] = "Visible par:";
$a->strings["Visible to"] = "Visibilité";
$a->strings["may only be a partial list"] = "peut être une liste partielle";
$a->strings["Global"] = "Global";
$a->strings["The posts of every user on this server show the post recipients"] = "Les publications de tous les utilisateurs de ce serveur afficheront leurs destinataires";
$a->strings["Individual"] = "Individuel";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Chaque utilisateur du serveur pourra choisir si ses publications affichent leurs destinataires";
$a->strings["Settings updated."] = "Réglages mis à jour.";

62
remote_permissions/lang/hu/messages.po

@ -0,0 +1,62 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# Balázs Úr, 2020-2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2021-03-26 00:01+0000\n"
"Last-Translator: Balázs Úr\n"
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: remote_permissions.php:44
msgid "Remote Permissions Settings"
msgstr "Távoli jogosultságok beállításai"
#: remote_permissions.php:45
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Engedélyezés a személyes bejegyzések címzettjei számára, hogy láthassák a bejegyzések egyéb címzettjeit"
#: remote_permissions.php:47 remote_permissions.php:196
msgid "Save Settings"
msgstr "Beállítások mentése"
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Látható nekik:"
#: remote_permissions.php:178
msgid "Visible to"
msgstr "Látható nekik"
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr "esetleg csak részleges lista lehet"
#: remote_permissions.php:197
msgid "Global"
msgstr "Globális"
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr "Ezen a kiszolgálón lévő összes felhasználó bejegyzései megjelenítik a bejegyzés címzettjeit"
#: remote_permissions.php:198
msgid "Individual"
msgstr "Egyéni"
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr "Minden felhasználó kiválaszthatja, hogy a bejegyzéseik megjelenítsék-e a bejegyzés címzettjeit"

18
remote_permissions/lang/hu/strings.php

@ -0,0 +1,18 @@
<?php
if(! function_exists("string_plural_select_hu")) {
function string_plural_select_hu($n){
$n = intval($n);
return intval($n != 1);
}}
;
$a->strings["Remote Permissions Settings"] = "Távoli jogosultságok beállításai";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Engedélyezés a személyes bejegyzések címzettjei számára, hogy láthassák a bejegyzések egyéb címzettjeit";
$a->strings["Save Settings"] = "Beállítások mentése";
$a->strings["Visible to:"] = "Látható nekik:";
$a->strings["Visible to"] = "Látható nekik";
$a->strings["may only be a partial list"] = "esetleg csak részleges lista lehet";
$a->strings["Global"] = "Globális";
$a->strings["The posts of every user on this server show the post recipients"] = "Ezen a kiszolgálón lévő összes felhasználó bejegyzései megjelenítik a bejegyzés címzettjeit";
$a->strings["Individual"] = "Egyéni";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Minden felhasználó kiválaszthatja, hogy a bejegyzéseik megjelenítsék-e a bejegyzés címzettjeit";

5
remote_permissions/lang/is/strings.php

@ -0,0 +1,5 @@
<?php
$a->strings["Submit"] = "Senda inn";
$a->strings["Visible to:"] = "Sýnilegt eftirfarandi:";
$a->strings["Settings updated."] = "Stillingar uppfærðar";

63
remote_permissions/lang/it/messages.po

@ -0,0 +1,63 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# fabrixxm <fabrix.xm@gmail.com>, 2014-2015
# Sylke Vicious <silkevicious@gmail.com>, 2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2021-02-16 12:47+0000\n"
"Last-Translator: Sylke Vicious <silkevicious@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: remote_permissions.php:44
msgid "Remote Permissions Settings"
msgstr "Impostazioni Permissi Remoti"
#: remote_permissions.php:45
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Permetti ai destinatari dei tuoi messaggi privati di vedere gli altri destinatari del messaggio"
#: remote_permissions.php:47 remote_permissions.php:196
msgid "Save Settings"
msgstr "Salva Impostazioni"
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Visibile a:"
#: remote_permissions.php:178
msgid "Visible to"
msgstr "Visibile a"
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr "può essere solo una lista parziale"
#: remote_permissions.php:197
msgid "Global"
msgstr "Globale"
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr "I messaggi di tutti gli utenti di questo server mostrano i destinatari"
#: remote_permissions.php:198
msgid "Individual"
msgstr "Individuale"
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr "Ogni utente sceglie se i suoi messaggi mostreranno i destinatari"

18
remote_permissions/lang/it/strings.php

@ -0,0 +1,18 @@
<?php
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
$n = intval($n);
return intval($n != 1);
}}
;
$a->strings["Remote Permissions Settings"] = "Impostazioni Permissi Remoti";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Permetti ai destinatari dei tuoi messaggi privati di vedere gli altri destinatari del messaggio";
$a->strings["Save Settings"] = "Salva Impostazioni";
$a->strings["Visible to:"] = "Visibile a:";
$a->strings["Visible to"] = "Visibile a";
$a->strings["may only be a partial list"] = "può essere solo una lista parziale";
$a->strings["Global"] = "Globale";
$a->strings["The posts of every user on this server show the post recipients"] = "I messaggi di tutti gli utenti di questo server mostrano i destinatari";
$a->strings["Individual"] = "Individuale";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Ogni utente sceglie se i suoi messaggi mostreranno i destinatari";

14
remote_permissions/lang/nb-no/strings.php

@ -0,0 +1,14 @@
<?php
$a->strings["Remote Permissions Settings"] = "";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "";
$a->strings["Submit"] = "Lagre";
$a->strings["Remote Permissions settings updated."] = "";
$a->strings["Visible to:"] = "Synlig for:";
$a->strings["Visible to"] = "";
$a->strings["may only be a partial list"] = "";
$a->strings["Global"] = "";
$a->strings["The posts of every user on this server show the post recipients"] = "";
$a->strings["Individual"] = "";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "";
$a->strings["Settings updated."] = "Innstillinger oppdatert.";

70
remote_permissions/lang/nl/messages.po

@ -0,0 +1,70 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# Jeroen De Meerleer <me@jeroened.be>, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2018-08-24 13:51+0000\n"
"Last-Translator: Jeroen De Meerleer <me@jeroened.be>\n"
"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: remote_permissions.php:45
msgid "Remote Permissions Settings"
msgstr "Instellingen voor toegang op afstand"
#: remote_permissions.php:46
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Ontvangers van private berichten toestaan andere ontvangers te bekijken"
#: remote_permissions.php:48 remote_permissions.php:196
msgid "Submit"
msgstr ""
#: remote_permissions.php:58
msgid "Remote Permissions settings updated."
msgstr "Toegang op afstand instellingen opgeslagen"
#: remote_permissions.php:124
msgid "Visible to:"
msgstr ""
#: remote_permissions.php:178
msgid "Visible to"
msgstr ""
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr ""
#: remote_permissions.php:197
msgid "Global"
msgstr ""
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr ""
#: remote_permissions.php:198
msgid "Individual"
msgstr ""
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr ""
#: remote_permissions.php:205
msgid "Settings updated."
msgstr "Instellingen opgeslagen"

12
remote_permissions/lang/nl/strings.php

@ -0,0 +1,12 @@
<?php
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
return intval($n != 1);
}}
;
$a->strings["Remote Permissions Settings"] = "Instellingen voor toegang op afstand";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Ontvangers van private berichten toestaan andere ontvangers te bekijken";
$a->strings["Remote Permissions settings updated."] = "Toegang op afstand instellingen opgeslagen";
$a->strings["Settings updated."] = "Instellingen opgeslagen";

70
remote_permissions/lang/pl/messages.po

@ -0,0 +1,70 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
# Waldemar Stoczkowski <waldemar.stoczkowski@gmail.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2018-03-31 20:21+0000\n"
"Last-Translator: Waldemar Stoczkowski <waldemar.stoczkowski@gmail.com>\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#: remote_permissions.php:45
msgid "Remote Permissions Settings"
msgstr "Ustawienia uprawnień zdalnych"
#: remote_permissions.php:46
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Zezwalaj odbiorcom prywatnych wpisów na wyświetlanie innych adresatów postów"
#: remote_permissions.php:48 remote_permissions.php:196
msgid "Submit"
msgstr "Wyślij"
#: remote_permissions.php:58
msgid "Remote Permissions settings updated."
msgstr "Zaktualizowano ustawienia uprawnień zdalnych."
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Widoczny dla:"
#: remote_permissions.php:178
msgid "Visible to"
msgstr "Widoczny dla"
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr "mogą być tylko częściowe listy"
#: remote_permissions.php:197
msgid "Global"
msgstr "Ogólnoświatowy"
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr "Wpisy każdego użytkownika na tym serwerze pokazują odbiorców wiadomości"
#: remote_permissions.php:198
msgid "Individual"
msgstr "Indywidualny"
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr "Każdy użytkownik wybiera, czy jego/jej posty pokazują odbiorców postów"
#: remote_permissions.php:205
msgid "Settings updated."
msgstr "Zaktualizowano ustawienia."

20
remote_permissions/lang/pl/strings.php

@ -0,0 +1,20 @@
<?php
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
;
$a->strings["Remote Permissions Settings"] = "Ustawienia uprawnień zdalnych";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Zezwalaj odbiorcom prywatnych wpisów na wyświetlanie innych adresatów postów";
$a->strings["Submit"] = "Wyślij";
$a->strings["Remote Permissions settings updated."] = "Zaktualizowano ustawienia uprawnień zdalnych.";
$a->strings["Visible to:"] = "Widoczny dla:";
$a->strings["Visible to"] = "Widoczny dla";
$a->strings["may only be a partial list"] = "mogą być tylko częściowe listy";
$a->strings["Global"] = "Ogólnoświatowy";
$a->strings["The posts of every user on this server show the post recipients"] = "Wpisy każdego użytkownika na tym serwerze pokazują odbiorców wiadomości";
$a->strings["Individual"] = "Indywidualny";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Każdy użytkownik wybiera, czy jego/jej posty pokazują odbiorców postów";
$a->strings["Settings updated."] = "Zaktualizowano ustawienia.";

14
remote_permissions/lang/pt-br/strings.php

@ -0,0 +1,14 @@
<?php
$a->strings["Remote Permissions Settings"] = "";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "";
$a->strings["Submit"] = "Enviar";
$a->strings["Remote Permissions settings updated."] = "";
$a->strings["Visible to:"] = "Visível para:";
$a->strings["Visible to"] = "";
$a->strings["may only be a partial list"] = "";
$a->strings["Global"] = "";
$a->strings["The posts of every user on this server show the post recipients"] = "";
$a->strings["Individual"] = "";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "";
$a->strings["Settings updated."] = "As configurações foram atualizadas.";

69
remote_permissions/lang/ro/messages.po

@ -0,0 +1,69 @@
# ADDON remote_permissions
# Copyright (C)
# This file is distributed under the same license as the Friendica remote_permissions addon package.
#
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2014-07-08 12:05+0000\n"
"Last-Translator: Arian - Cazare Muncitori <arianserv@gmail.com>\n"
"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ro_RO\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
#: remote_permissions.php:45
msgid "Remote Permissions Settings"
msgstr "Configurări Permisiuni la Distanță"
#: remote_permissions.php:46
msgid ""
"Allow recipients of your private posts to see the other recipients of the "
"posts"
msgstr "Permite destinatarilor, posturile dvs. private, să-i vadă și pe ceilalți destinatari ai postărilor"
#: remote_permissions.php:48 remote_permissions.php:196
msgid "Save Settings"
msgstr "Salvare Configurări"
#: remote_permissions.php:58
msgid "Remote Permissions settings updated."
msgstr "Configurările Permisiunilor la Distanță, au fost actualizate."
#: remote_permissions.php:124
msgid "Visible to:"
msgstr "Vizibil pentru :"
#: remote_permissions.php:178
msgid "Visible to"
msgstr "Vizibil pentru"
#: remote_permissions.php:178
msgid "may only be a partial list"
msgstr "poate fi doar o listă parțială"
#: remote_permissions.php:197
msgid "Global"
msgstr "Global"
#: remote_permissions.php:197
msgid "The posts of every user on this server show the post recipients"
msgstr "Postările fiecărui utilizator de pe acest server, afișează destinatarii mesajului"
#: remote_permissions.php:198
msgid "Individual"
msgstr "Individual"
#: remote_permissions.php:198
msgid "Each user chooses whether his/her posts show the post recipients"
msgstr "Fiecare utilizator alege dacă postările lui/ei, afișează și destinatarii mesajului"
#: remote_permissions.php:205
msgid "Settings updated."
msgstr "Configurări actualizate."

20
remote_permissions/lang/ro/strings.php

@ -0,0 +1,20 @@
<?php
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
$n = intval($n);
if ($n==1) { return 0; } else if ((($n%100>19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; }
}}
;
$a->strings["Remote Permissions Settings"] = "Configurări Permisiuni la Distanță";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "Permite destinatarilor, posturile dvs. private, să-i vadă și pe ceilalți destinatari ai postărilor";
$a->strings["Save Settings"] = "Salvare Configurări";
$a->strings["Remote Permissions settings updated."] = "Configurările Permisiunilor la Distanță, au fost actualizate.";
$a->strings["Visible to:"] = "Vizibil pentru :";
$a->strings["Visible to"] = "Vizibil pentru";
$a->strings["may only be a partial list"] = "poate fi doar o listă parțială";
$a->strings["Global"] = "Global";
$a->strings["The posts of every user on this server show the post recipients"] = "Postările fiecărui utilizator de pe acest server, afișează destinatarii mesajului";
$a->strings["Individual"] = "Individual";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "Fiecare utilizator alege dacă postările lui/ei, afișează și destinatarii mesajului";
$a->strings["Settings updated."] = "Configurări actualizate.";

14
remote_permissions/lang/ru/strings.php

@ -0,0 +1,14 @@
<?php
$a->strings["Remote Permissions Settings"] = "";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "";
$a->strings["Submit"] = "Подтвердить";
$a->strings["Remote Permissions settings updated."] = "";
$a->strings["Visible to:"] = "Кто может видеть:";
$a->strings["Visible to"] = "";
$a->strings["may only be a partial list"] = "";
$a->strings["Global"] = "";
$a->strings["The posts of every user on this server show the post recipients"] = "";
$a->strings["Individual"] = "";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "";
$a->strings["Settings updated."] = "Настройки обновлены.";

5
remote_permissions/lang/sv/strings.php

@ -0,0 +1,5 @@
<?php
$a->strings["Submit"] = "Spara";
$a->strings["Visible to:"] = "Synlig f&ouml;r:";
$a->strings["Settings updated."] = "Inst&auml;llningarna har uppdaterats.";

14
remote_permissions/lang/zh-cn/strings.php

@ -0,0 +1,14 @@
<?php
$a->strings["Remote Permissions Settings"] = "对外批准设置";
$a->strings["Allow recipients of your private posts to see the other recipients of the posts"] = "允许您私人文章接受者看别接受者。";
$a->strings["Submit"] = "提交";
$a->strings["Remote Permissions settings updated."] = "对外批准设置更新了。";
$a->strings["Visible to:"] = "可见给:";
$a->strings["Visible to"] = "可见的给";
$a->strings["may only be a partial list"] = "可能部分的单";
$a->strings["Global"] = "综合";
$a->strings["The posts of every user on this server show the post recipients"] = "这网站所有用户的文章表示接受者";
$a->strings["Individual"] = "一个人的";
$a->strings["Each user chooses whether his/her posts show the post recipients"] = "各用户选择他问上是否表示接受者";
$a->strings["Settings updated."] = "设置跟新了";

205
remote_permissions/remote_permissions.php

@ -0,0 +1,205 @@
<?php
/**
* Name: Remote Permissions
* Description: Allow the recipients of private posts to see who else can see the post by clicking the lock icon
* Version: 1.0
* Author: Zach <https://f.shmuz.in/profile/techcity>
* Status: Unsupported
*/
use Friendica\Core\Hook;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Util\Strings;
function remote_permissions_install() {
Hook::register('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
Hook::register('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
Hook::register('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
}
function remote_permissions_settings(&$a,&$o) {
if(! local_user())
return;
$global = DI::config()->get("remote_perms", "global");
if($global == 1)
return;
/* Add our stylesheet to the page so we can make our settings look nice */
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/remote_permissions/settings.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */
$remote_perms = DI::pConfig()->get(local_user(),'remote_perms','show');
/* Add some HTML to the existing form */
// $t = file_get_contents("addon/remote_permissions/settings.tpl" );
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/remote_permissions/" );
$o .= Renderer::replaceMacros($t, [
'$remote_perms_title' => DI::l10n()->t('Remote Permissions Settings'),
'$remote_perms_label' => DI::l10n()->t('Allow recipients of your private posts to see the other recipients of the posts'),
'$checked' => (($remote_perms == 1) ? 'checked="checked"' : ''),
'$submit' => DI::l10n()->t('Save Settings')
]);
}
function remote_permissions_settings_post($a,$post) {
if(! local_user() || empty($_POST['remote-perms-submit']))
return;
DI::pConfig()->set(local_user(),'remote_perms','show',intval($_POST['remote-perms']));
}
function remote_permissions_content($a, $item_copy) {
if($item_copy['uid'] != local_user())
return;
if(DI::config()->get('remote_perms','global') == 0) {
// Admin has set Individual choice. We need to find
// the original poster. First, get the contact's info
$r = q("SELECT nick, url FROM contact WHERE id = %d LIMIT 1",
intval($item_copy['contact-id'])
);
if(! $r)
return;
// Find out if the contact lives here
$baseurl = DI::baseUrl()->get();
$baseurl = substr($baseurl, strpos($baseurl, '://') + 3);
if(strpos($r[0]['url'], $baseurl) === false)
return;
// The contact lives here. Get his/her user info
$nick = $r[0]['nick'];
$r = q("SELECT uid FROM user WHERE nickname = '%s' LIMIT 1",
DBA::escape($nick)
);
if(! $r)
return;
if(DI::pConfig()->get($r[0]['uid'],'remote_perms','show') == 0)
return;
}
if(($item_copy['private'] == 1) && (! strlen($item_copy['allow_cid'])) && (! strlen($item_copy['allow_gid']))
&& (! strlen($item_copy['deny_cid'])) && (! strlen($item_copy['deny_gid']))) {
$allow_names = [];
// Check for the original post here -- that's the only way
// to definitely get all of the recipients
if($item_copy['uri'] === $item_copy['parent-uri']) {
// Lockview for a top-level post
$r = q("SELECT allow_cid, allow_gid, deny_cid, deny_gid FROM item WHERE uri = '%s' AND type = 'wall' LIMIT 1",
DBA::escape($item_copy['uri'])
);
}
else {
// Lockview for a comment
$r = q("SELECT allow_cid, allow_gid, deny_cid, deny_gid FROM item WHERE uri = '%s'
AND parent = ( SELECT id FROM item WHERE uri = '%s' AND type = 'wall' ) LIMIT 1",
DBA::escape($item_copy['uri']),
DBA::escape($item_copy['parent-uri'])
);
}
if($r) {
$item = $r[0];
$aclFormatter = DI::aclFormatter();
$allowed_users = $aclFormatter->expand($item['allow_cid']);
$allowed_groups = $aclFormatter->expand($item['allow_gid']);
$deny_users = $aclFormatter->expand($item['deny_cid']);
$deny_groups = $aclFormatter->expand($item['deny_gid']);
$o = DI::l10n()->t('Visible to:') . '<br />';
$allow = [];
$deny = [];
if(count($allowed_groups)) {
$r = q("SELECT DISTINCT `contact-id` FROM group_member WHERE gid IN ( %s )",
DBA::escape(implode(', ', $allowed_groups))
);
foreach($r as $rr)
$allow[] = $rr['contact-id'];
}
$allow = array_unique($allow + $allowed_users);
if(count($deny_groups)) {
$r = q("SELECT DISTINCT `contact-id` FROM group_member WHERE gid IN ( %s )",
DBA::escape(implode(', ', $deny_groups))
);
foreach($r as $rr)
$deny[] = $rr['contact-id'];
}
$deny = $deny + $deny_users;
if($allow)
{
$r = q("SELECT name FROM contact WHERE id IN ( %s )",
DBA::escape(implode(', ', array_diff($allow, $deny)))
);
foreach($r as $rr)
$allow_names[] = $rr['name'];
}
}
else {
// We don't have the original post. Let's try for the next best thing:
// checking who else has the post on our own server. Note that comments
// that were sent to Diaspora and were relayed to others on our server
// will have different URIs than the original. We can match the GUID for
// those
$r = q("SELECT `uid` FROM item WHERE uri = '%s' OR guid = '%s'",
DBA::escape($item_copy['uri']),
DBA::escape($item_copy['guid'])
);
if(! $r)
return;
$allow = [];
foreach($r as $rr)
$allow[] = $rr['uid'];
$r = q("SELECT username FROM user WHERE uid IN ( %s )",
DBA::escape(implode(', ', $allow))
);
if(! $r)
return;
$o = DI::l10n()->t('Visible to') . ' (' . DI::l10n()->t('may only be a partial list') . '):<br />';
foreach($r as $rr)
$allow_names[] = $rr['username'];
}
// Sort the names alphabetically, case-insensitive
natcasesort($allow_names);
echo $o . implode(', ', $allow_names);
exit();
}
return;
}
function remote_permissions_addon_admin(&$a, &$o){
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/remote_permissions/" );
$o = Renderer::replaceMacros($t, [
'$submit' => DI::l10n()->t('Save Settings'),
'$global' => ['remotepermschoice', DI::l10n()->t('Global'), 1, DI::l10n()->t('The posts of every user on this server show the post recipients'), DI::config()->get('remote_perms', 'global') == 1],
'$individual' => ['remotepermschoice', DI::l10n()->t('Individual'), 2, DI::l10n()->t('Each user chooses whether his/her posts show the post recipients'), DI::config()->get('remote_perms', 'global') == 0]
]);
}
function remote_permissions_addon_admin_post(&$a){
$choice = (!empty($_POST['remotepermschoice']) ? Strings::escapeTags(trim($_POST['remotepermschoice'])) : '');
DI::config()->set('remote_perms','global',($choice == 1 ? 1 : 0));
}

16
remote_permissions/settings.css

@ -0,0 +1,16 @@
#remote-perms-label {
float: left;
width: 200px;
margin-bottom: 25px;
margin-right: 20px;
text-align: justify;
}
#remote-perms {
float: left;
}

3
remote_permissions/templates/admin.tpl

@ -0,0 +1,3 @@
{{include file="field_radio.tpl" field=$global}}
{{include file="field_radio.tpl" field=$individual}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

8
remote_permissions/templates/settings.tpl

@ -0,0 +1,8 @@
<div class="settings-block">
<h3>{{$remote_perms_title}}</h3>
<div id="remote-perms-wrapper">
<label id="remote-perms-label" for="remote-perms">{{$remote_perms_label}}</label>
<input id="remote-perms-input" type="checkbox" name="remote-perms" value="1" {{$checked}} />
</div><div class="clear"></div>
<div class="settings-submit-wrapper" ><input type="submit" name="remote-perms-submit" class="settings-submit" value="{{$submit}}" /></div></div>

57
widgets/lang/C/messages.po

@ -0,0 +1,57 @@
# ADDON widgets
# Copyright (C)
# This file is distributed under the same license as the Friendica widgets addon package.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-01 18:16+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: widget_friendheader.php:50
msgid "Get added to this list!"
msgstr ""
#: widget_friends.php:53
msgid "Connect on Friendica!"
msgstr ""
#: widget_like.php:56
#, php-format
msgid "%d person doesn't like this"
msgid_plural "%d people don't like this"
msgstr[0] ""
msgstr[1] ""
#: widget_like.php:66
#, php-format
msgid "%d person likes this"
msgid_plural "%d people like this"
msgstr[0] ""
msgstr[1] ""
#: widgets.php:59
msgid "Generate new key"
msgstr ""
#: widgets.php:61
msgid "Widgets key"
msgstr ""
#: widgets.php:63
msgid "Widgets available"
msgstr ""
#: widgets.php:124
msgid "Addon Settings"
msgstr ""

10
widgets/lang/ca/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Connectar en Friendica";
$a->strings["Generate new key"] = "Generar nova clau";
$a->strings["Widgets key"] = "Ginys clau";
$a->strings["Widgets available"] = "Ginys disponibles";
$a->strings["Addon Settings"] = "Ajustos de Addon";
$a->strings["Get added to this list!"] = "S'afegeixen a aquesta llista!";

10
widgets/lang/cs/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Připojit na Friendica!";
$a->strings["Generate new key"] = "Generovat nové klíče";
$a->strings["Widgets key"] = "Widgety klíč";
$a->strings["Widgets available"] = "Widgety k dispozici";
$a->strings["Addon Settings"] = "Nastavení doplňku";
$a->strings["Get added to this list!"] = "Nechte se přidat do tohoto listu!";

10
widgets/lang/de/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "In Friendica verbinden!";
$a->strings["Generate new key"] = "Neuen Schlüssel erstellen";
$a->strings["Widgets key"] = "Widgets Schlüssel";
$a->strings["Widgets available"] = "Verfügbare Widgets";
$a->strings["Addon Settings"] = "Addon-Einstellungen";
$a->strings["Get added to this list!"] = "Werde Mitglied dieser Liste";

10
widgets/lang/eo/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Konekti ĉe Friendica!";
$a->strings["Generate new key"] = "Generi novan ĉifroŝlosilon";
$a->strings["Widgets key"] = "Ŝlosilo por fenestraĵoj";
$a->strings["Widgets available"] = "Disponeblaj fenestraĵoj";
$a->strings["Addon Settings"] = "Kromprogramoagordoj";
$a->strings["Get added to this list!"] = "Iĝu membro de ĉi tiu listo!";

10
widgets/lang/es/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "¡Conéctate en Friendica!";
$a->strings["Generate new key"] = "Generar clave nueva";
$a->strings["Widgets key"] = "Clave de aplicaciones";
$a->strings["Widgets available"] = "Aplicaciones disponibles";
$a->strings["Addon Settings"] = "Configuración de los módulos";
$a->strings["Get added to this list!"] = "¡Añadido a la lista!";

10
widgets/lang/fr/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Se connecter sur Friendica!";
$a->strings["Generate new key"] = "Générer une nouvelle clé";
$a->strings["Widgets key"] = "Clé des widgets";
$a->strings["Widgets available"] = "Widgets disponibles";
$a->strings["Addon Settings"] = "Extensions";
$a->strings["Get added to this list!"] = "Ajoutez-vous à cette liste!";

10
widgets/lang/is/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Tengist á Friendica!";
$a->strings["Generate new key"] = "Búa til nýjan lykil";
$a->strings["Widgets key"] = "Lykill smáforrits ";
$a->strings["Widgets available"] = "Smáforrit til";
$a->strings["Addon Settings"] = "Eininga stillingar";
$a->strings["Get added to this list!"] = "Láta bæta þér við þennan lista!";

10
widgets/lang/it/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Connettiti su Friendica!";
$a->strings["Generate new key"] = "Genera una nuova chiave";
$a->strings["Widgets key"] = "Chiave Widget";
$a->strings["Widgets available"] = "Widget disponibili";
$a->strings["Addon Settings"] = "Impostazioni addon";
$a->strings["Get added to this list!"] = "Aggiungiti a questa lista!";

10
widgets/lang/nb-no/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "";
$a->strings["Generate new key"] = "Lag ny nøkkel";
$a->strings["Widgets key"] = "Nøkkel til småprogrammer";
$a->strings["Widgets available"] = "Småprogrammer er tilgjengelige";
$a->strings["Addon Settings"] = "Tilleggsinnstillinger";
$a->strings["Get added to this list!"] = "";

10
widgets/lang/pl/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Połączono z Friendica!";
$a->strings["Generate new key"] = "Stwórz nowy klucz";
$a->strings["Widgets key"] = "";
$a->strings["Widgets available"] = "Widgety są dostępne";
$a->strings["Addon Settings"] = "Ustawienia wtyczki";
$a->strings["Get added to this list!"] = "Zostań dodany do listy!";

10
widgets/lang/pt-br/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Conecte no Friendica!";
$a->strings["Generate new key"] = "Gerar nova chave";
$a->strings["Widgets key"] = "Chave de widgets";
$a->strings["Widgets available"] = "Widgets disponíveis";
$a->strings["Addon Settings"] = "Configurações do addon";
$a->strings["Get added to this list!"] = "";

10
widgets/lang/ru/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "Подключены к Friendica!";
$a->strings["Generate new key"] = "Сгенерировать новый ключ";
$a->strings["Widgets key"] = "Ключ виджетов";
$a->strings["Widgets available"] = "Виджеты доступны";
$a->strings["Addon Settings"] = "Настройки плагина";
$a->strings["Get added to this list!"] = "";

3
widgets/lang/sv/strings.php

@ -0,0 +1,3 @@
<?php
$a->strings["Addon Settings"] = "Inst&auml;llningar f&ouml;r insticksprogram";

10
widgets/lang/zh-cn/strings.php

@ -0,0 +1,10 @@
<?php
$a->strings["%d person likes this"] = "Array";
$a->strings["%d person doesn't like this"] = "Array";
$a->strings["Connect on Friendica!"] = "连接在Friendica!";
$a->strings["Generate new key"] = "造成新钥匙";
$a->strings["Widgets key"] = "小窗口钥匙";
$a->strings["Widgets available"] = "可用的小窗口";
$a->strings["Addon Settings"] = "插件设置";
$a->strings["Get added to this list!"] = "被在这个单子加入!";

19
widgets/templates/settings.tpl

@ -0,0 +1,19 @@
<div class="settings-block">
<h3 class="settings-heading">{{$title}}</h3>
<div class='field noedit'>
<label>{{$label}}</label>
<tt>{{$key}}</tt>
</div>
<div class="settings-submit-wrapper">
<input type="submit" value="{{$submit}}" class="settings-submit" name="widgets-submit" />
</div>
<h4>{{$widgets_h}}</h4>
<ul>
{{foreach $widgets as $w}}
<li><a href="{{$baseurl}}/widgets/{{$w.0}}/?k={{$key}}&p=1">{{$w.1}}</a></li>
{{/foreach}}
</ul>
</div>

5
widgets/templates/widget_like.tpl

@ -0,0 +1,5 @@
<style>body {font-size: 0.8em; margin: 0px; padding: 0px;}</style>
<span class='f9k_like' title="{{$strlike}}">{{$like}} <img src="{{$baseurl}}/images/like.gif" alt="like"/></span>
{{if $dislike}}
<span class='f9k_dislike' title="{{$strdislike}}">{{$dislike}} <img src="{{$baseurl}}/images/dislike.gif" alt="dislike"/></span>
{{/if}}

49
widgets/widget_friendheader.php

@ -0,0 +1,49 @@
<?php
use Friendica\Content\Text\HTML;
use Friendica\Content\Widget\ContactBlock;
use Friendica\DI;
use Friendica\Model\User;
function friendheader_widget_name()
{
return "Shows friends as a bar";
}
function friendheader_widget_help()
{
return "";
}
function friendheader_widget_args()
{
return [];
}
function friendheader_widget_size()
{
return ['780px','140px'];
}
function friendheader_widget_content(&$a, $conf)
{
$owner = User::getOwnerDataById($conf['uid']);
if (empty($owner)) {
return;
}
$o = "";
$o .= "<style>
body {font-size: 0.8em; margin: 0px; padding: 0px;}
#contact-block { overflow: hidden; height: auto; }
.contact-block-h4 { float: left; margin: 0px; }
.allcontact-link { float: right; margin: 0px; }
.contact-block-content { clear:both; }
.contact-block-div { display: block !important; float: left!important; width: 50px!important; height: 50px!important; margin: 2px!important;}
</style>";
$o .= _abs_url(ContactBlock::getHTML($owner));
$o .= "<a href='".DI::baseUrl()->get().'/profile/'.$owner['nickname']."' target=new>". DI::l10n()->t('Get added to this list!') ."</a>";
return $o;
}

48
widgets/widget_friends.php

@ -0,0 +1,48 @@
<?php
use Friendica\Content\Widget\ContactBlock;
use Friendica\DI;
use Friendica\Model\User;
function friends_widget_name()
{
return "Shows profile contacts";
}
function friends_widget_help()
{
return "";
}