Compare commits
133 Commits
408a62a9a1
...
f922d69310
Author | SHA1 | Date | |
---|---|---|---|
|
f922d69310 | ||
|
f8295635c1 | ||
|
4cdd24c871 | ||
|
0f273b89ff | ||
|
71d9a42688 | ||
|
b64639dc4c | ||
|
361e5407cf | ||
|
0b0d555c69 | ||
|
239003fa6c | ||
|
b52c4fc04f | ||
|
cd620d2134 | ||
|
98dd4b537c | ||
|
784bdf82e2 | ||
|
348f9d5601 | ||
|
b6a384ce0b | ||
|
5953c2835f | ||
|
802c5ca87f | ||
|
12bd211516 | ||
|
8878d7c9d4 | ||
|
139e4384b1 | ||
|
f9661af3f7 | ||
|
6d3602f9c6 | ||
|
a2dde9cd24 | ||
|
cab20de6d1 | ||
|
e553b6cc9b | ||
|
b1442ebfd1 | ||
|
9524632cdc | ||
|
5da3cf67ce | ||
|
31cecfead3 | ||
|
a38b07fa34 | ||
|
d1d3c73d25 | ||
|
c6d09e5270 | ||
|
4e7da2799c | ||
|
07a11f6920 | ||
|
e4487c4876 | ||
|
d45004f44d | ||
|
efb98c8457 | ||
|
119a5ca8d8 | ||
|
1c5787946f | ||
|
2e4e7befe5 | ||
|
666d559e72 | ||
|
3b7d4ce600 | ||
|
25bcbabb58 | ||
|
8f59b8b951 | ||
|
6a2aa4c4a4 | ||
|
18783e11c7 | ||
|
2f0671ee6e | ||
|
6fb41f9429 | ||
|
7b58c02b1a | ||
|
7d252afddb | ||
|
b0d13ab09c | ||
|
d584196215 | ||
|
537ee2e656 | ||
|
1a5b19ff69 | ||
|
ae28f6ef01 | ||
|
f0baf18339 | ||
|
c18e0dc66a | ||
|
30329df0dd | ||
|
008eeeea4e | ||
|
7338b5de59 | ||
|
e213bb2216 | ||
|
2fc7356cf4 | ||
|
46d4d0b51e | ||
|
5b25b03ea3 | ||
|
a09dd57391 | ||
|
5e51a3f0ad | ||
|
6b32686443 | ||
|
f4130a9724 | ||
|
e8daa6b97d | ||
|
174fae82ac | ||
|
fada358607 | ||
|
ba6f6f11c5 | ||
|
91accba3b9 | ||
|
a5768ce402 | ||
|
53b1c9208a | ||
|
f840431d41 | ||
|
fc3222cd2d | ||
|
e800cf20cb | ||
|
f71b2bda38 | ||
|
18e7d5bfea | ||
|
50eef93272 | ||
|
e0ad3e0fc7 | ||
|
38ec8b3e3b | ||
|
9cee85c4d6 | ||
|
72679891af | ||
|
b9207f7e48 | ||
|
db3a36bd02 | ||
|
623b6ceecc | ||
|
f2ff1053b0 | ||
|
2643259a93 | ||
|
ecb9871f92 | ||
|
ddf87440b2 | ||
|
38977588b4 | ||
|
b84d05b602 | ||
|
2de97487f3 | ||
|
9f3cbad14f | ||
|
7522a8eb9a | ||
|
cf37ad5914 | ||
|
9a6a092518 | ||
|
ec060745e9 | ||
|
99e33145db | ||
|
97fcee53c0 | ||
|
6d2b7459b5 | ||
|
05fed0bd6f | ||
|
94b4ad6279 | ||
|
b0eb28143a | ||
|
8eca74cfab | ||
|
0f6ea75bb7 | ||
|
5d8129600d | ||
|
5f1028a535 | ||
|
1eb1b10348 | ||
|
7c3f602d12 | ||
|
346ad9a3e2 | ||
|
d267e7f0b7 | ||
|
47d54e82df | ||
|
b3195504f1 | ||
|
285079c12b | ||
|
e93260593a | ||
|
432d9097d2 | ||
|
592374b795 | ||
|
2e854ee108 | ||
|
101a22c0cd | ||
|
bca0943e19 | ||
|
897dbb30cf | ||
|
6c8a9bd461 | ||
|
57e9404729 | ||
|
e5842e83c7 | ||
|
de345228b5 | ||
|
26c6d501e0 | ||
|
8d2ddd8985 | ||
|
ce1a787bfb | ||
|
d75f4b30f3 | ||
|
5648924852 |
@ -45,7 +45,7 @@ pipeline:
|
|||||||
branch: [ develop, '*-rc' ]
|
branch: [ develop, '*-rc' ]
|
||||||
event: push
|
event: push
|
||||||
composer_install:
|
composer_install:
|
||||||
image: friendicaci/php7.4:php7.4.18
|
image: friendicaci/php7.4:php7.4.33
|
||||||
commands:
|
commands:
|
||||||
- export COMPOSER_HOME=.composer
|
- export COMPOSER_HOME=.composer
|
||||||
- composer validate
|
- composer validate
|
||||||
|
@ -42,7 +42,7 @@ pipeline:
|
|||||||
repo: friendica/friendica-addons
|
repo: friendica/friendica-addons
|
||||||
event: tag
|
event: tag
|
||||||
composer_install:
|
composer_install:
|
||||||
image: friendicaci/php7.4:php7.4.18
|
image: friendicaci/php7.4:php7.4.33
|
||||||
commands:
|
commands:
|
||||||
- export COMPOSER_HOME=.composer
|
- export COMPOSER_HOME=.composer
|
||||||
- composer validate
|
- composer validate
|
||||||
|
File diff suppressed because one or more lines are too long
@ -123,21 +123,21 @@ function advancedcontentfilter_prepare_body_content_filter(App $a, &$hook_data)
|
|||||||
$expressionLanguage = new ExpressionLanguage\ExpressionLanguage();
|
$expressionLanguage = new ExpressionLanguage\ExpressionLanguage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$vars = advancedcontentfilter_get_filter_fields($hook_data['item']);
|
$vars = advancedcontentfilter_get_filter_fields($hook_data['item']);
|
||||||
|
|
||||||
$rules = DI::cache()->get('rules_' . local_user());
|
$rules = DI::cache()->get('rules_' . DI::userSession()->getLocalUserId());
|
||||||
if (!isset($rules)) {
|
if (!isset($rules)) {
|
||||||
$rules = DBA::toArray(DBA::select(
|
$rules = DBA::toArray(DBA::select(
|
||||||
'advancedcontentfilter_rules',
|
'advancedcontentfilter_rules',
|
||||||
['name', 'expression', 'serialized'],
|
['name', 'expression', 'serialized'],
|
||||||
['uid' => local_user(), 'active' => true]
|
['uid' => DI::userSession()->getLocalUserId(), 'active' => true]
|
||||||
));
|
));
|
||||||
|
|
||||||
DI::cache()->set('rules_' . local_user(), $rules);
|
DI::cache()->set('rules_' . DI::userSession()->getLocalUserId(), $rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($rules) {
|
if ($rules) {
|
||||||
@ -165,7 +165,7 @@ function advancedcontentfilter_prepare_body_content_filter(App $a, &$hook_data)
|
|||||||
|
|
||||||
function advancedcontentfilter_addon_settings(App $a, array &$data)
|
function advancedcontentfilter_addon_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,12 +203,12 @@ function advancedcontentfilter_init(App $a)
|
|||||||
|
|
||||||
function advancedcontentfilter_content(App $a)
|
function advancedcontentfilter_content(App $a)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return Login::form('/' . implode('/', DI::args()->getArgv()));
|
return Login::form('/' . implode('/', DI::args()->getArgv()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'help') {
|
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'help') {
|
||||||
$user = User::getById(local_user());
|
$user = User::getById(DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
$lang = $user['language'];
|
$lang = $user['language'];
|
||||||
|
|
||||||
@ -272,9 +272,9 @@ function advancedcontentfilter_build_fields($data)
|
|||||||
|
|
||||||
if (!empty($data['expression'])) {
|
if (!empty($data['expression'])) {
|
||||||
// Using a dummy item to validate the field existence
|
// Using a dummy item to validate the field existence
|
||||||
$condition = ["(`uid` = ? OR `uid` = 0)", local_user()];
|
$condition = ["(`uid` = ? OR `uid` = 0)", DI::userSession()->getLocalUserId()];
|
||||||
$params = ['order' => ['uid' => true]];
|
$params = ['order' => ['uid' => true]];
|
||||||
$item_row = Post::selectFirstForUser(local_user(), [], $condition, $params);
|
$item_row = Post::selectFirstForUser(DI::userSession()->getLocalUserId(), [], $condition, $params);
|
||||||
|
|
||||||
if (!DBA::isResult($item_row)) {
|
if (!DBA::isResult($item_row)) {
|
||||||
throw new HTTPException\NotFoundException(DI::l10n()->t('This addon requires this node having at least one post'));
|
throw new HTTPException\NotFoundException(DI::l10n()->t('This addon requires this node having at least one post'));
|
||||||
@ -307,29 +307,29 @@ function advancedcontentfilter_build_fields($data)
|
|||||||
|
|
||||||
function advancedcontentfilter_get_rules()
|
function advancedcontentfilter_get_rules()
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => local_user()]));
|
$rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()]));
|
||||||
|
|
||||||
return json_encode($rules);
|
return json_encode($rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
|
function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => local_user()]);
|
$rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()]);
|
||||||
|
|
||||||
return json_encode($rule);
|
return json_encode($rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
function advancedcontentfilter_post_rules(ServerRequestInterface $request)
|
function advancedcontentfilter_post_rules(ServerRequestInterface $request)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
|
|||||||
throw new HTTPException\BadRequestException(DI::l10n()->t('The rule name and expression are required.'));
|
throw new HTTPException\BadRequestException(DI::l10n()->t('The rule name and expression are required.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields['uid'] = local_user();
|
$fields['uid'] = DI::userSession()->getLocalUserId();
|
||||||
$fields['created'] = DateTimeFormat::utcNow();
|
$fields['created'] = DateTimeFormat::utcNow();
|
||||||
|
|
||||||
if (!DBA::insert('advancedcontentfilter_rules', $fields)) {
|
if (!DBA::insert('advancedcontentfilter_rules', $fields)) {
|
||||||
@ -358,14 +358,14 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
|
|||||||
|
|
||||||
$rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => DBA::lastInsertId()]);
|
$rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => DBA::lastInsertId()]);
|
||||||
|
|
||||||
DI::cache()->delete('rules_' . local_user());
|
DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
return json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule]);
|
return json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
|
function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
|
|||||||
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
|
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => local_user()])) {
|
if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()])) {
|
||||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
|
throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -389,14 +389,14 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
|
|||||||
throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
|
throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::cache()->delete('rules_' . local_user());
|
DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]);
|
return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
|
function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request,
|
|||||||
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
|
throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => local_user()])) {
|
if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()])) {
|
||||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
|
throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,14 +412,14 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request,
|
|||||||
throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
|
throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::cache()->delete('rules_' . local_user());
|
DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]);
|
return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function advancedcontentfilter_get_variables_guid(ServerRequestInterface $request, ResponseInterface $response, $args)
|
function advancedcontentfilter_get_variables_guid(ServerRequestInterface $request, ResponseInterface $response, $args)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,9 +427,9 @@ function advancedcontentfilter_get_variables_guid(ServerRequestInterface $reques
|
|||||||
throw new HTTPException\BadRequestException(DI::l10n()->t('Missing argument: guid.'));
|
throw new HTTPException\BadRequestException(DI::l10n()->t('Missing argument: guid.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$condition = ["`guid` = ? AND (`uid` = ? OR `uid` = 0)", $args['guid'], local_user()];
|
$condition = ["`guid` = ? AND (`uid` = ? OR `uid` = 0)", $args['guid'], DI::userSession()->getLocalUserId()];
|
||||||
$params = ['order' => ['uid' => true]];
|
$params = ['order' => ['uid' => true]];
|
||||||
$item_row = Post::selectFirstForUser(local_user(), [], $condition, $params);
|
$item_row = Post::selectFirstForUser(DI::userSession()->getLocalUserId(), [], $condition, $params);
|
||||||
|
|
||||||
if (!DBA::isResult($item_row)) {
|
if (!DBA::isResult($item_row)) {
|
||||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Unknown post with guid: %s', $args['guid']));
|
throw new HTTPException\NotFoundException(DI::l10n()->t('Unknown post with guid: %s', $args['guid']));
|
||||||
@ -455,7 +455,7 @@ function advancedcontentfilter_prepare_item_row(array $item_row): array
|
|||||||
$item_row['tags'] = $tags['tags'];
|
$item_row['tags'] = $tags['tags'];
|
||||||
$item_row['hashtags'] = $tags['hashtags'];
|
$item_row['hashtags'] = $tags['hashtags'];
|
||||||
$item_row['mentions'] = $tags['mentions'];
|
$item_row['mentions'] = $tags['mentions'];
|
||||||
$item_row['attachments'] = Post\Media::splitAttachments($item_row['uri-id'], $item_row['guid'] ?? '');
|
$item_row['attachments'] = Post\Media::splitAttachments($item_row['uri-id']);
|
||||||
|
|
||||||
return $item_row;
|
return $item_row;
|
||||||
}
|
}
|
||||||
|
11894
advancedcontentfilter/asset/vue/dist/vue.js
vendored
Normal file
11894
advancedcontentfilter/asset/vue/dist/vue.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
advancedcontentfilter/asset/vue/dist/vue.min.js
vendored
Normal file
11
advancedcontentfilter/asset/vue/dist/vue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -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.';
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
3. Replace the render and staticRenderFns members in advancedcontentfilter.js by the contents of the anonymous() functions
|
3. Replace the render and staticRenderFns members in advancedcontentfilter.js by the contents of the anonymous() functions
|
||||||
-->
|
-->
|
||||||
<div id="rules">
|
<div id="rules">
|
||||||
<p><a href="settings/addon">🔙 {{ messages.backtosettings }}</a></p>
|
<p><a href="settings/addons">🔙 {{ messages.backtosettings }}</a></p>
|
||||||
<h1>
|
<h1>
|
||||||
{{ messages.title }}
|
{{ messages.title }}
|
||||||
|
|
||||||
|
@ -17,6 +17,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- JS -->
|
<!-- JS -->
|
||||||
<script src="{{$baseurl}}/view/asset/vue/dist/vue.min.js"></script>
|
<script src="{{$baseurl}}/addon/advancedcontentfilter/asset/vue/dist/vue.min.js"></script>
|
||||||
<script src="{{$baseurl}}/addon/advancedcontentfilter/advancedcontentfilter.js"></script>
|
<script src="{{$baseurl}}/addon/advancedcontentfilter/advancedcontentfilter.js"></script>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,14 +36,14 @@ function birdavatar_install()
|
|||||||
*/
|
*/
|
||||||
function birdavatar_addon_settings(App $a, array &$data)
|
function birdavatar_addon_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/birdavatar/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/birdavatar/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
'$uncache' => time(),
|
'$uncache' => time(),
|
||||||
'$uid' => local_user(),
|
'$uid' => DI::userSession()->getLocalUserId(),
|
||||||
'$setrandomize' => DI::l10n()->t('Set default profile avatar or randomize the bird.'),
|
'$setrandomize' => DI::l10n()->t('Set default profile avatar or randomize the bird.'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ function birdavatar_addon_settings(App $a, array &$data)
|
|||||||
'submit' => [
|
'submit' => [
|
||||||
'birdavatar-usebird' => DI::l10n()->t('Use Bird as Avatar'),
|
'birdavatar-usebird' => DI::l10n()->t('Use Bird as Avatar'),
|
||||||
'birdavatar-morebird' => DI::l10n()->t('More Random Bird!'),
|
'birdavatar-morebird' => DI::l10n()->t('More Random Bird!'),
|
||||||
'birdavatar-emailbird' => DI::pConfig()->get(local_user(), 'birdavatar', 'seed', false) ? DI::l10n()->t('Reset to email Bird') : null,
|
'birdavatar-emailbird' => DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'birdavatar', 'seed', false) ? DI::l10n()->t('Reset to email Bird') : null,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -64,50 +64,50 @@ function birdavatar_addon_settings(App $a, array &$data)
|
|||||||
*/
|
*/
|
||||||
function birdavatar_addon_settings_post(App $a, &$s)
|
function birdavatar_addon_settings_post(App $a, &$s)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['birdavatar-usebird'])) {
|
if (!empty($_POST['birdavatar-usebird'])) {
|
||||||
$url = DI::baseUrl()->get() . '/birdavatar/' . local_user() . '?ts=' . time();
|
$url = DI::baseUrl()->get() . '/birdavatar/' . DI::userSession()->getLocalUserId() . '?ts=' . time();
|
||||||
|
|
||||||
$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
|
$self = DBA::selectFirst('contact', ['id'], ['uid' => DI::userSession()->getLocalUserId(), 'self' => true]);
|
||||||
if (!DBA::isResult($self)) {
|
if (!DBA::isResult($self)) {
|
||||||
notice(DI::l10n()->t("The bird has not found itself."));
|
DI::sysmsg()->addNotice(DI::l10n()->t("The bird has not found itself."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Photo::importProfilePhoto($url, local_user(), $self['id']);
|
Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
|
||||||
|
|
||||||
$condition = ['uid' => local_user(), 'contact-id' => $self['id']];
|
$condition = ['uid' => DI::userSession()->getLocalUserId(), 'contact-id' => $self['id']];
|
||||||
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
|
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
|
||||||
if (!DBA::isResult($photo)) {
|
if (!DBA::isResult($photo)) {
|
||||||
notice(DI::l10n()->t('There was an error, the bird flew away.'));
|
DI::sysmsg()->addNotice(DI::l10n()->t('There was an error, the bird flew away.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => local_user()]);
|
DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => DI::userSession()->getLocalUserId()]);
|
||||||
|
|
||||||
$fields = ['profile' => true, 'album' => DI::l10n()->t('Profile Photos'), 'contact-id' => 0];
|
$fields = ['profile' => true, 'album' => DI::l10n()->t('Profile Photos'), 'contact-id' => 0];
|
||||||
DBA::update('photo', $fields, ['uid' => local_user(), 'resource-id' => $photo['resource-id']]);
|
DBA::update('photo', $fields, ['uid' => DI::userSession()->getLocalUserId(), 'resource-id' => $photo['resource-id']]);
|
||||||
|
|
||||||
Photo::importProfilePhoto($url, local_user(), $self['id']);
|
Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
|
||||||
|
|
||||||
Contact::updateSelfFromUserID(local_user(), true);
|
Contact::updateSelfFromUserID(DI::userSession()->getLocalUserId(), true);
|
||||||
|
|
||||||
// Update global directory in background
|
// Update global directory in background
|
||||||
Profile::publishUpdate(local_user());
|
Profile::publishUpdate(DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
info(DI::l10n()->t('Meow!'));
|
DI::sysmsg()->addInfo(DI::l10n()->t('Meow!'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['birdavatar-morebird'])) {
|
if (!empty($_POST['birdavatar-morebird'])) {
|
||||||
DI::pConfig()->set(local_user(), 'birdavatar', 'seed', time());
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'birdavatar', 'seed', time());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['birdavatar-emailbird'])) {
|
if (!empty($_POST['birdavatar-emailbird'])) {
|
||||||
DI::pConfig()->delete(local_user(), 'birdavatar', 'seed');
|
DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'birdavatar', 'seed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ function blackout_install() {
|
|||||||
function blackout_redirect (App $a, $b)
|
function blackout_redirect (App $a, $b)
|
||||||
{
|
{
|
||||||
// if we have a logged in user, don't throw her out
|
// if we have a logged in user, don't throw her out
|
||||||
if (local_user()) {
|
if (DI::userSession()->getLocalUserId()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2021-12-23 11:12+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:19+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -28,11 +28,11 @@ function blockem_install()
|
|||||||
|
|
||||||
function blockem_addon_settings(App $a, array &$data)
|
function blockem_addon_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$words = DI::pConfig()->get(local_user(), 'blockem', 'words', '');
|
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'blockem', 'words', '');
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/blockem/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/blockem/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -49,12 +49,12 @@ function blockem_addon_settings(App $a, array &$data)
|
|||||||
|
|
||||||
function blockem_addon_settings_post(App $a, array &$b)
|
function blockem_addon_settings_post(App $a, array &$b)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['blockem-submit'])) {
|
if (!empty($_POST['blockem-submit'])) {
|
||||||
DI::pConfig()->set(local_user(), 'blockem', 'words', trim($_POST['blockem-words']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'blockem', 'words', trim($_POST['blockem-words']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,14 +91,14 @@ function blockem_enotify_store(App $a, array &$b)
|
|||||||
|
|
||||||
function blockem_prepare_body_content_filter(App $a, array &$hook_data)
|
function blockem_prepare_body_content_filter(App $a, array &$hook_data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$profiles_string = null;
|
$profiles_string = null;
|
||||||
|
|
||||||
if (local_user()) {
|
if (DI::userSession()->getLocalUserId()) {
|
||||||
$profiles_string = DI::pConfig()->get(local_user(), 'blockem', 'words');
|
$profiles_string = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'blockem', 'words');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($profiles_string) {
|
if ($profiles_string) {
|
||||||
@ -132,11 +132,11 @@ function blockem_conversation_start(App $a, array &$b)
|
|||||||
{
|
{
|
||||||
global $blockem_words;
|
global $blockem_words;
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$words = DI::pConfig()->get(local_user(), 'blockem', 'words');
|
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'blockem', 'words');
|
||||||
|
|
||||||
if ($words) {
|
if ($words) {
|
||||||
$blockem_words = explode(',', $words);
|
$blockem_words = explode(',', $words);
|
||||||
@ -164,7 +164,7 @@ function blockem_item_photo_menu(App $a, array &$b)
|
|||||||
{
|
{
|
||||||
global $blockem_words;
|
global $blockem_words;
|
||||||
|
|
||||||
if (!local_user() || $b['item']['self']) {
|
if (!DI::userSession()->getLocalUserId() || $b['item']['self']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,11 +195,11 @@ function blockem_module() {}
|
|||||||
|
|
||||||
function blockem_init(App $a)
|
function blockem_init(App $a)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$words = DI::pConfig()->get(local_user(), 'blockem', 'words');
|
$words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'blockem', 'words');
|
||||||
|
|
||||||
if (array_key_exists('block', $_GET) && $_GET['block']) {
|
if (array_key_exists('block', $_GET) && $_GET['block']) {
|
||||||
if (strlen($words)) {
|
if (strlen($words)) {
|
||||||
@ -224,6 +224,6 @@ function blockem_init(App $a)
|
|||||||
$words = implode(',', $newarr);
|
$words = implode(',', $newarr);
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(), 'blockem', 'words', $words);
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'blockem', 'words', $words);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:13-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:13-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 11:13+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:20+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
24
buglink/lang/fr/messages.po
Normal file
24
buglink/lang/fr/messages.po
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# ADDON buglink
|
||||||
|
# Copyright (C)
|
||||||
|
# This file is distributed under the same license as the Friendica buglink addon package.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# StefOfficiel <pichard.stephane@free.fr>, 2015
|
||||||
|
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: 2014-06-22 11:27+0000\n"
|
||||||
|
"Last-Translator: StefOfficiel <pichard.stephane@free.fr>, 2015\n"
|
||||||
|
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#: buglink.php:20
|
||||||
|
msgid "Report Bug"
|
||||||
|
msgstr "Signaler un Bug"
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:09+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:27+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2018-03-30 17:07+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:27+0000\n"
|
||||||
"Last-Translator: Waldemar Stoczkowski\n"
|
"Last-Translator: Waldemar Stoczkowski, 2018\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -37,14 +37,14 @@ function catavatar_install()
|
|||||||
*/
|
*/
|
||||||
function catavatar_addon_settings(App $a, array &$data)
|
function catavatar_addon_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/catavatar/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/catavatar/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
'$uncache' => time(),
|
'$uncache' => time(),
|
||||||
'$uid' => local_user(),
|
'$uid' => DI::userSession()->getLocalUserId(),
|
||||||
'$setrandomize' => DI::l10n()->t('Set default profile avatar or randomize the cat.'),
|
'$setrandomize' => DI::l10n()->t('Set default profile avatar or randomize the cat.'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ function catavatar_addon_settings(App $a, array &$data)
|
|||||||
'submit' => [
|
'submit' => [
|
||||||
'catavatar-usecat' => DI::l10n()->t('Use Cat as Avatar'),
|
'catavatar-usecat' => DI::l10n()->t('Use Cat as Avatar'),
|
||||||
'catavatar-morecat' => DI::l10n()->t('Another random Cat!'),
|
'catavatar-morecat' => DI::l10n()->t('Another random Cat!'),
|
||||||
'catavatar-emailcat' => DI::pConfig()->get(local_user(), 'catavatar', 'seed', false) ? DI::l10n()->t('Reset to email Cat') : null,
|
'catavatar-emailcat' => DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'catavatar', 'seed', false) ? DI::l10n()->t('Reset to email Cat') : null,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -65,50 +65,50 @@ function catavatar_addon_settings(App $a, array &$data)
|
|||||||
*/
|
*/
|
||||||
function catavatar_addon_settings_post(App $a, &$s)
|
function catavatar_addon_settings_post(App $a, &$s)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['catavatar-usecat'])) {
|
if (!empty($_POST['catavatar-usecat'])) {
|
||||||
$url = DI::baseUrl()->get() . '/catavatar/' . local_user() . '?ts=' . time();
|
$url = DI::baseUrl()->get() . '/catavatar/' . DI::userSession()->getLocalUserId() . '?ts=' . time();
|
||||||
|
|
||||||
$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
|
$self = DBA::selectFirst('contact', ['id'], ['uid' => DI::userSession()->getLocalUserId(), 'self' => true]);
|
||||||
if (!DBA::isResult($self)) {
|
if (!DBA::isResult($self)) {
|
||||||
notice(DI::l10n()->t("The cat hadn't found itself."));
|
DI::sysmsg()->addNotice(DI::l10n()->t("The cat hadn't found itself."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Photo::importProfilePhoto($url, local_user(), $self['id']);
|
Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
|
||||||
|
|
||||||
$condition = ['uid' => local_user(), 'contact-id' => $self['id']];
|
$condition = ['uid' => DI::userSession()->getLocalUserId(), 'contact-id' => $self['id']];
|
||||||
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
|
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
|
||||||
if (!DBA::isResult($photo)) {
|
if (!DBA::isResult($photo)) {
|
||||||
notice(DI::l10n()->t('There was an error, the cat ran away.'));
|
DI::sysmsg()->addNotice(DI::l10n()->t('There was an error, the cat ran away.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => local_user()]);
|
DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => DI::userSession()->getLocalUserId()]);
|
||||||
|
|
||||||
$fields = ['profile' => true, 'album' => DI::l10n()->t('Profile Photos'), 'contact-id' => 0];
|
$fields = ['profile' => true, 'album' => DI::l10n()->t('Profile Photos'), 'contact-id' => 0];
|
||||||
DBA::update('photo', $fields, ['uid' => local_user(), 'resource-id' => $photo['resource-id']]);
|
DBA::update('photo', $fields, ['uid' => DI::userSession()->getLocalUserId(), 'resource-id' => $photo['resource-id']]);
|
||||||
|
|
||||||
Photo::importProfilePhoto($url, local_user(), $self['id']);
|
Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
|
||||||
|
|
||||||
Contact::updateSelfFromUserID(local_user(), true);
|
Contact::updateSelfFromUserID(DI::userSession()->getLocalUserId(), true);
|
||||||
|
|
||||||
// Update global directory in background
|
// Update global directory in background
|
||||||
Profile::publishUpdate(local_user());
|
Profile::publishUpdate(DI::userSession()->getLocalUserId());
|
||||||
|
|
||||||
info(DI::l10n()->t('Meow!'));
|
DI::sysmsg()->addInfo(DI::l10n()->t('Meow!'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['catavatar-morecat'])) {
|
if (!empty($_POST['catavatar-morecat'])) {
|
||||||
DI::pConfig()->set(local_user(), 'catavatar', 'seed', time());
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'catavatar', 'seed', time());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['catavatar-emailcat'])) {
|
if (!empty($_POST['catavatar-emailcat'])) {
|
||||||
DI::pConfig()->delete(local_user(), 'catavatar', 'seed');
|
DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'catavatar', 'seed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ use Friendica\App;
|
|||||||
use Friendica\Core\Cache\Enum\Duration;
|
use Friendica\Core\Cache\Enum\Duration;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Core\Session;
|
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Util\Proxy as ProxyUtils;
|
use Friendica\Util\Proxy as ProxyUtils;
|
||||||
|
|
||||||
@ -32,7 +31,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
|||||||
$now = new DateTime();
|
$now = new DateTime();
|
||||||
|
|
||||||
if (!is_null($cached)) {
|
if (!is_null($cached)) {
|
||||||
$cdate = DI::pConfig()->get(local_user(), 'curweather', 'last');
|
$cdate = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'last');
|
||||||
$cached = unserialize($cached);
|
$cached = unserialize($cached);
|
||||||
|
|
||||||
if ($cdate + $cachetime > $now->getTimestamp()) {
|
if ($cdate + $cachetime > $now->getTimestamp()) {
|
||||||
@ -44,7 +43,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
|||||||
$res = new SimpleXMLElement(DI::httpClient()->fetch($url));
|
$res = new SimpleXMLElement(DI::httpClient()->fetch($url));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if (empty($_SESSION['curweather_notice_shown'])) {
|
if (empty($_SESSION['curweather_notice_shown'])) {
|
||||||
notice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage()));
|
DI::sysmsg()->addNotice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage()));
|
||||||
$_SESSION['curweather_notice_shown'] = true;
|
$_SESSION['curweather_notice_shown'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +80,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
|||||||
'icon' => (string) $res->weather['icon'],
|
'icon' => (string) $res->weather['icon'],
|
||||||
];
|
];
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(), 'curweather', 'last', $now->getTimestamp());
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'last', $now->getTimestamp());
|
||||||
DI::cache()->set('curweather'.md5($url), serialize($r), Duration::HOUR);
|
DI::cache()->set('curweather'.md5($url), serialize($r), Duration::HOUR);
|
||||||
|
|
||||||
return $r;
|
return $r;
|
||||||
@ -89,7 +88,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
|||||||
|
|
||||||
function curweather_network_mod_init(App $a, string &$body)
|
function curweather_network_mod_init(App $a, string &$body)
|
||||||
{
|
{
|
||||||
if (!intval(DI::pConfig()->get(local_user(), 'curweather', 'curweather_enable'))) {
|
if (!intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_enable'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,11 +103,11 @@ function curweather_network_mod_init(App $a, string &$body)
|
|||||||
// those parameters will be used to get: cloud status, temperature, preassure
|
// those parameters will be used to get: cloud status, temperature, preassure
|
||||||
// and relative humidity for display, also the relevent area of the map is
|
// and relative humidity for display, also the relevent area of the map is
|
||||||
// linked from lat/log of the reply of OWMp
|
// linked from lat/log of the reply of OWMp
|
||||||
$rpt = DI::pConfig()->get(local_user(), 'curweather', 'curweather_loc');
|
$rpt = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_loc');
|
||||||
|
|
||||||
// Set the language to the browsers language or default and use metric units
|
// Set the language to the browsers language or default and use metric units
|
||||||
$lang = Session::get('language', DI::config()->get('system', 'language'));
|
$lang = DI::session()->get('language', DI::config()->get('system', 'language'));
|
||||||
$units = DI::pConfig()->get( local_user(), 'curweather', 'curweather_units');
|
$units = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_units');
|
||||||
$appid = DI::config()->get('curweather', 'appid');
|
$appid = DI::config()->get('curweather', 'appid');
|
||||||
$cachetime = intval(DI::config()->get('curweather', 'cachetime'));
|
$cachetime = intval(DI::config()->get('curweather', 'cachetime'));
|
||||||
|
|
||||||
@ -155,23 +154,23 @@ function curweather_network_mod_init(App $a, string &$body)
|
|||||||
|
|
||||||
function curweather_addon_settings_post(App $a, $post)
|
function curweather_addon_settings_post(App $a, $post)
|
||||||
{
|
{
|
||||||
if (!local_user() || empty($_POST['curweather-settings-submit'])) {
|
if (!DI::userSession()->getLocalUserId() || empty($_POST['curweather-settings-submit'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
|
||||||
DI::pConfig()->set(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
|
||||||
DI::pConfig()->set(local_user(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
|
||||||
}
|
}
|
||||||
|
|
||||||
function curweather_addon_settings(App $a, array &$data)
|
function curweather_addon_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$curweather_loc = DI::pConfig()->get(local_user(), 'curweather', 'curweather_loc');
|
$curweather_loc = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_loc');
|
||||||
$curweather_units = DI::pConfig()->get(local_user(), 'curweather', 'curweather_units');
|
$curweather_units = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_units');
|
||||||
$appid = DI::config()->get('curweather', 'appid');
|
$appid = DI::config()->get('curweather', 'appid');
|
||||||
|
|
||||||
if ($appid == '') {
|
if ($appid == '') {
|
||||||
@ -180,7 +179,7 @@ function curweather_addon_settings(App $a, array &$data)
|
|||||||
$noappidtext = '';
|
$noappidtext = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = intval(DI::pConfig()->get(local_user(), 'curweather', 'curweather_enable'));
|
$enabled = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_enable'));
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/curweather/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/curweather/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:18+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:34+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -11,8 +11,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-08 14:06+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:34+0000\n"
|
||||||
"Last-Translator: Piotr Strębski <strebski@gmail.com>\n"
|
"Last-Translator: Piotr Strębski <strebski@gmail.com>, 2022\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -14,7 +14,6 @@ use Friendica\Content\Text\BBCode;
|
|||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Core\Session;
|
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
@ -32,17 +31,17 @@ function diaspora_install()
|
|||||||
|
|
||||||
function diaspora_jot_nets(App $a, array &$jotnets_fields)
|
function diaspora_jot_nets(App $a, array &$jotnets_fields)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DI::pConfig()->get(local_user(), 'diaspora', 'post')) {
|
if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'diaspora', 'post')) {
|
||||||
$jotnets_fields[] = [
|
$jotnets_fields[] = [
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'field' => [
|
'field' => [
|
||||||
'diaspora_enable',
|
'diaspora_enable',
|
||||||
DI::l10n()->t('Post to Diaspora'),
|
DI::l10n()->t('Post to Diaspora'),
|
||||||
DI::pConfig()->get(local_user(), 'diaspora', 'post_by_default')
|
DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'diaspora', 'post_by_default')
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -50,23 +49,23 @@ function diaspora_jot_nets(App $a, array &$jotnets_fields)
|
|||||||
|
|
||||||
function diaspora_settings(App $a, array &$data)
|
function diaspora_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = DI::pConfig()->get(local_user(), 'diaspora', 'post', false);
|
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'diaspora', 'post', false);
|
||||||
$def_enabled = DI::pConfig()->get(local_user(), 'diaspora', 'post_by_default');
|
$def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'diaspora', 'post_by_default');
|
||||||
|
|
||||||
$handle = DI::pConfig()->get(local_user(), 'diaspora', 'handle');
|
$handle = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'diaspora', 'handle');
|
||||||
$password = DI::pConfig()->get(local_user(), 'diaspora', 'password');
|
$password = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'diaspora', 'password');
|
||||||
$aspect = DI::pConfig()->get(local_user(), 'diaspora', 'aspect');
|
$aspect = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'diaspora', 'aspect');
|
||||||
|
|
||||||
$info = '';
|
$info = '';
|
||||||
$error = '';
|
$error = '';
|
||||||
if (Session::get('my_address')) {
|
if (DI::session()->get('my_address')) {
|
||||||
$info = DI::l10n()->t('Please remember: You can always be reached from Diaspora with your Friendica handle <strong>%s</strong>. ', Session::get('my_address'));
|
$info = DI::l10n()->t('Please remember: You can always be reached from Diaspora with your Friendica handle <strong>%s</strong>. ', DI::session()->get('my_address'));
|
||||||
$info .= DI::l10n()->t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
|
$info .= DI::l10n()->t('This connector is only meant if you still want to use your old Diaspora account for some time. ');
|
||||||
$info .= DI::l10n()->t('However, it is preferred that you tell your Diaspora contacts the new handle <strong>%s</strong> instead.', Session::get('my_address'));
|
$info .= DI::l10n()->t('However, it is preferred that you tell your Diaspora contacts the new handle <strong>%s</strong> instead.', DI::session()->get('my_address'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$aspect_select = '';
|
$aspect_select = '';
|
||||||
@ -121,18 +120,18 @@ function diaspora_settings(App $a, array &$data)
|
|||||||
function diaspora_settings_post(App $a, array &$b)
|
function diaspora_settings_post(App $a, array &$b)
|
||||||
{
|
{
|
||||||
if (!empty($_POST['diaspora-submit'])) {
|
if (!empty($_POST['diaspora-submit'])) {
|
||||||
DI::pConfig()->set(local_user(),'diaspora', 'post' , intval($_POST['enabled']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'post' , intval($_POST['enabled']));
|
||||||
if (intval($_POST['enabled'])) {
|
if (intval($_POST['enabled'])) {
|
||||||
if (isset($_POST['handle'])) {
|
if (isset($_POST['handle'])) {
|
||||||
DI::pConfig()->set(local_user(),'diaspora', 'handle' , trim($_POST['handle']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'handle' , trim($_POST['handle']));
|
||||||
DI::pConfig()->set(local_user(),'diaspora', 'password' , trim($_POST['password']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'password' , trim($_POST['password']));
|
||||||
}
|
}
|
||||||
if (!empty($_POST['aspect'])) {
|
if (!empty($_POST['aspect'])) {
|
||||||
DI::pConfig()->set(local_user(),'diaspora', 'aspect' , trim($_POST['aspect']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'aspect' , trim($_POST['aspect']));
|
||||||
DI::pConfig()->set(local_user(),'diaspora', 'post_by_default', intval($_POST['post_by_default']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'post_by_default', intval($_POST['post_by_default']));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DI::pConfig()->delete(local_user(), 'diaspora', 'password');
|
DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'diaspora', 'password');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,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;
|
||||||
}
|
}
|
||||||
@ -158,7 +157,7 @@ function diaspora_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!local_user() || (local_user() != $b['uid'])) {
|
if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,11 +165,11 @@ function diaspora_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$diaspora_post = intval(DI::pConfig()->get(local_user(),'diaspora','post'));
|
$diaspora_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'diaspora','post'));
|
||||||
|
|
||||||
$diaspora_enable = (($diaspora_post && !empty($_REQUEST['diaspora_enable'])) ? intval($_REQUEST['diaspora_enable']) : 0);
|
$diaspora_enable = (($diaspora_post && !empty($_REQUEST['diaspora_enable'])) ? intval($_REQUEST['diaspora_enable']) : 0);
|
||||||
|
|
||||||
if ($b['api_source'] && intval(DI::pConfig()->get(local_user(),'diaspora','post_by_default'))) {
|
if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'diaspora','post_by_default'))) {
|
||||||
$diaspora_enable = 1;
|
$diaspora_enable = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +202,7 @@ function diaspora_send(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']);
|
$b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b));
|
||||||
|
|
||||||
// Dont't post if the post doesn't belong to us.
|
// Dont't post if the post doesn't belong to us.
|
||||||
// This is a check for forum postings
|
// This is a check for forum postings
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:19+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:39+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -38,11 +38,11 @@ function discourse_install()
|
|||||||
|
|
||||||
function discourse_settings(App $a, array &$data)
|
function discourse_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = intval(DI::pConfig()->get(local_user(), 'discourse', 'enabled'));
|
$enabled = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'discourse', 'enabled'));
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/discourse/');
|
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/discourse/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -60,11 +60,11 @@ function discourse_settings(App $a, array &$data)
|
|||||||
|
|
||||||
function discourse_settings_post(App $a)
|
function discourse_settings_post(App $a)
|
||||||
{
|
{
|
||||||
if (!local_user() || empty($_POST['discourse-submit'])) {
|
if (!DI::userSession()->getLocalUserId() || empty($_POST['discourse-submit'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(), 'discourse', 'enabled', intval($_POST['enabled']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'discourse', 'enabled', intval($_POST['enabled']));
|
||||||
}
|
}
|
||||||
|
|
||||||
function discourse_email_getmessage(App $a, &$message)
|
function discourse_email_getmessage(App $a, &$message)
|
||||||
|
@ -31,17 +31,17 @@ function dwpost_install()
|
|||||||
|
|
||||||
function dwpost_jot_nets(App $a, array &$jotnets_fields)
|
function dwpost_jot_nets(App $a, array &$jotnets_fields)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DI::pConfig()->get(local_user(), 'dwpost', 'post')) {
|
if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post')) {
|
||||||
$jotnets_fields[] = [
|
$jotnets_fields[] = [
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'field' => [
|
'field' => [
|
||||||
'dwpost_enable',
|
'dwpost_enable',
|
||||||
DI::l10n()->t('Post to Dreamwidth'),
|
DI::l10n()->t('Post to Dreamwidth'),
|
||||||
DI::pConfig()->get(local_user(), 'dwpost', 'post_by_default')
|
DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post_by_default')
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -50,13 +50,13 @@ function dwpost_jot_nets(App $a, array &$jotnets_fields)
|
|||||||
|
|
||||||
function dwpost_settings(App $a, array &$data)
|
function dwpost_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = DI::pConfig()->get(local_user(), 'dwpost', 'post', false);
|
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post', false);
|
||||||
$dw_username = DI::pConfig()->get(local_user(), 'dwpost', 'dw_username');
|
$dw_username = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'dw_username');
|
||||||
$def_enabled = DI::pConfig()->get(local_user(), 'dwpost', 'post_by_default');
|
$def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post_by_default');
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/dwpost/');
|
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/dwpost/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -79,10 +79,10 @@ function dwpost_settings(App $a, array &$data)
|
|||||||
function dwpost_settings_post(App $a, array &$b)
|
function dwpost_settings_post(App $a, array &$b)
|
||||||
{
|
{
|
||||||
if (!empty($_POST['dwpost-submit'])) {
|
if (!empty($_POST['dwpost-submit'])) {
|
||||||
DI::pConfig()->set(local_user(), 'dwpost', 'post', intval($_POST['dwpost']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'post', intval($_POST['dwpost']));
|
||||||
DI::pConfig()->set(local_user(), 'dwpost', 'post_by_default', intval($_POST['dw_bydefault']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'post_by_default', intval($_POST['dw_bydefault']));
|
||||||
DI::pConfig()->set(local_user(), 'dwpost', 'dw_username', trim($_POST['dw_username']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'dw_username', trim($_POST['dw_username']));
|
||||||
DI::pConfig()->set(local_user(), 'dwpost', 'dw_password', trim($_POST['dw_password']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'dw_password', trim($_POST['dw_password']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ function dwpost_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!local_user()) || (local_user() != $b['uid'])) {
|
if ((!DI::userSession()->getLocalUserId()) || (DI::userSession()->getLocalUserId() != $b['uid'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,11 +101,11 @@ function dwpost_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dw_post = intval(DI::pConfig()->get(local_user(),'dwpost','post'));
|
$dw_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'dwpost','post'));
|
||||||
|
|
||||||
$dw_enable = (($dw_post && !empty($_REQUEST['dwpost_enable'])) ? intval($_REQUEST['dwpost_enable']) : 0);
|
$dw_enable = (($dw_post && !empty($_REQUEST['dwpost_enable'])) ? intval($_REQUEST['dwpost_enable']) : 0);
|
||||||
|
|
||||||
if ($b['api_source'] && intval(DI::pConfig()->get(local_user(),'dwpost','post_by_default'))) {
|
if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'dwpost','post_by_default'))) {
|
||||||
$dw_enable = 1;
|
$dw_enable = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ function dwpost_send(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strstr($b['postopts'],'dwpost')) {
|
if (strpos($b['postopts'] ?? '', 'dwpost') === false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ function dwpost_send(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']);
|
$b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dreamwidth post in the LJ user's timezone.
|
* dreamwidth post in the LJ user's timezone.
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 18:31+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -11,8 +11,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-08 14:14+0000\n"
|
"PO-Revision-Date: 2014-06-22 11:41+0000\n"
|
||||||
"Last-Translator: Piotr Strębski <strebski@gmail.com>\n"
|
"Last-Translator: Piotr Strębski <strebski@gmail.com>, 2022\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
2
fancybox/.gitignore
vendored
Normal file
2
fancybox/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/dist/
|
||||||
|
/test/
|
27
fancybox/CHANGELOG.md
Normal file
27
fancybox/CHANGELOG.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
### Version 1.05
|
||||||
|
|
||||||
|
* Added ALT and TITLE of original IMG to fancybox popup.
|
||||||
|
|
||||||
|
### Version 1.04
|
||||||
|
|
||||||
|
* Update supporting upcoming imnagegrid in posts
|
||||||
|
|
||||||
|
### Version 1.03
|
||||||
|
|
||||||
|
* imgages in body-attach with title / alt attribute get them removed while adding fancy attributes
|
||||||
|
* Added fancybox to image inlined in posts. Un-hooked the old lightbox from frio and vier and excahnged that with fancybox hooks.
|
||||||
|
* Excluded images in "type-link" divs from being "fancied" as they have no images but pages linked to.
|
||||||
|
|
||||||
|
### Version 1.02
|
||||||
|
|
||||||
|
* [MrPetovan](https://github.com/MrPetovan) optimized my noob regular expression code.
|
||||||
|
|
||||||
|
### Version 1.01
|
||||||
|
|
||||||
|
* One gallery for each post
|
||||||
|
* All media attached to a post are added to the posts gallery.
|
||||||
|
* Loop scrolling: You can step from last media to first and vice versa.
|
||||||
|
### Version 1.00
|
||||||
|
|
||||||
|
* First test version released.
|
||||||
|
* One fancybox per page displaying first media of each post.
|
19
fancybox/README.md
Normal file
19
fancybox/README.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Post image gallery using fancybox
|
||||||
|
|
||||||
|
Addon author: [Grischa Brockhaus](https://brockha.us)
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This addon loads all media attachments of a post into a "fancybox" instead of linking directly to the media.
|
||||||
|
|
||||||
|
Each post gets its own attachment library, when there are more than one media attached you can scroll through them.
|
||||||
|
|
||||||
|
## Licenses
|
||||||
|
|
||||||
|
### Fancybox Library
|
||||||
|
|
||||||
|
This AddOn is using the jQuery library [fancybox](https://github.com/fancyapps/fancybox).
|
||||||
|
|
||||||
|
The fancyBox libryry is licensed under the GPLv3 license for all open source applications. A commercial license is required for all commercial applications (including sites, themes and apps you plan to sell).
|
||||||
|
|
||||||
|
[Read more about fancyBox license](https://github.com/fancyapps/fancybox).
|
62
fancybox/asset/fancybox/README.md
Normal file
62
fancybox/asset/fancybox/README.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# fancyBox 3.5.7
|
||||||
|
|
||||||
|
jQuery lightbox script for displaying images, videos and more.
|
||||||
|
Touch enabled, responsive and fully customizable.
|
||||||
|
|
||||||
|
See the [project page](http://fancyapps.com/fancybox/3/) for documentation and a demonstration.
|
||||||
|
|
||||||
|
Follow [@thefancyapps](//twitter.com/thefancyapps) for updates.
|
||||||
|
|
||||||
|
|
||||||
|
## Quick start
|
||||||
|
|
||||||
|
1\. Add latest jQuery and fancyBox files
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||||
|
|
||||||
|
<link href="/path/to/jquery.fancybox.min.css" rel="stylesheet">
|
||||||
|
<script src="/path/to/jquery.fancybox.min.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
2\. Create links
|
||||||
|
|
||||||
|
```html
|
||||||
|
<a data-fancybox="gallery" href="big_1.jpg">
|
||||||
|
<img src="small_1.jpg">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a data-fancybox="gallery" href="big_2.jpg">
|
||||||
|
<img src="small_2.jpg">
|
||||||
|
</a>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
3\. Enjoy!
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
fancyBox is licensed under the [GPLv3](http://choosealicense.com/licenses/gpl-3.0) license for all open source applications.
|
||||||
|
A commercial license is required for all commercial applications (including sites, themes and apps you plan to sell).
|
||||||
|
|
||||||
|
[Read more about fancyBox license](http://fancyapps.com/fancybox/3/#license).
|
||||||
|
|
||||||
|
## Bugs and feature requests
|
||||||
|
|
||||||
|
If you find a bug, please report it [here on Github](https://github.com/fancyapps/fancybox/issues).
|
||||||
|
|
||||||
|
Guidelines for bug reports:
|
||||||
|
|
||||||
|
1. Use the GitHub issue search — check if the issue has already been reported.
|
||||||
|
2. Check if the issue has been fixed — try to reproduce it using the latest master or development branch in the repository.
|
||||||
|
3. Isolate the problem — create a reduced test case and a live example. You can use CodePen to fork any demo found on documentation to use it as a template.
|
||||||
|
|
||||||
|
A good bug report shouldn't leave others needing to chase you up for more information.
|
||||||
|
Please try to be as detailed as possible in your report.
|
||||||
|
|
||||||
|
|
||||||
|
Feature requests are welcome. Please look for existing ones and use GitHub's "reactions" feature to vote.
|
||||||
|
|
||||||
|
Please do not use the issue tracker for personal support requests - use Stack Overflow ([fancybox-3](http://stackoverflow.com/questions/tagged/fancybox-3) tag) instead.
|
13
fancybox/asset/fancybox/fancybox.config.js
Normal file
13
fancybox/asset/fancybox/fancybox.config.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
$(document).ready(function() {
|
||||||
|
$.fancybox.defaults.loop = "true";
|
||||||
|
// this disables the colorbox hook found in frio/js/modal.js:34
|
||||||
|
$("body").off("click", ".wall-item-body a img");
|
||||||
|
|
||||||
|
// Adds ALT/TITLE text to fancybox
|
||||||
|
$('a[data-fancybox').fancybox({
|
||||||
|
afterLoad : function(instance, current) {
|
||||||
|
current.$image.attr('alt', current.opts.$orig.find('img').attr('alt') );
|
||||||
|
current.$image.attr('title', current.opts.$orig.find('img').attr('title') );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
895
fancybox/asset/fancybox/jquery.fancybox.css
vendored
Normal file
895
fancybox/asset/fancybox/jquery.fancybox.css
vendored
Normal file
@ -0,0 +1,895 @@
|
|||||||
|
body.compensate-for-scrollbar {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-active {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-is-hidden {
|
||||||
|
left: -9999px;
|
||||||
|
margin: 0;
|
||||||
|
position: absolute !important;
|
||||||
|
top: -9999px;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-container {
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
outline: none;
|
||||||
|
position: fixed;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
top: 0;
|
||||||
|
-ms-touch-action: manipulation;
|
||||||
|
touch-action: manipulation;
|
||||||
|
transform: translateZ(0);
|
||||||
|
width: 100%;
|
||||||
|
z-index: 99992;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-container * {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-outer,
|
||||||
|
.fancybox-inner,
|
||||||
|
.fancybox-bg,
|
||||||
|
.fancybox-stage {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-outer {
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-bg {
|
||||||
|
background: rgb(30, 30, 30);
|
||||||
|
opacity: 0;
|
||||||
|
transition-duration: inherit;
|
||||||
|
transition-property: opacity;
|
||||||
|
transition-timing-function: cubic-bezier(.47, 0, .74, .71);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-is-open .fancybox-bg {
|
||||||
|
opacity: .9;
|
||||||
|
transition-timing-function: cubic-bezier(.22, .61, .36, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-infobar,
|
||||||
|
.fancybox-toolbar,
|
||||||
|
.fancybox-caption,
|
||||||
|
.fancybox-navigation .fancybox-button {
|
||||||
|
direction: ltr;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
transition: opacity .25s ease, visibility 0s ease .25s;
|
||||||
|
visibility: hidden;
|
||||||
|
z-index: 99997;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-show-infobar .fancybox-infobar,
|
||||||
|
.fancybox-show-toolbar .fancybox-toolbar,
|
||||||
|
.fancybox-show-caption .fancybox-caption,
|
||||||
|
.fancybox-show-nav .fancybox-navigation .fancybox-button {
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity .25s ease 0s, visibility 0s ease 0s;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-infobar {
|
||||||
|
color: #ccc;
|
||||||
|
font-size: 13px;
|
||||||
|
-webkit-font-smoothing: subpixel-antialiased;
|
||||||
|
height: 44px;
|
||||||
|
left: 0;
|
||||||
|
line-height: 44px;
|
||||||
|
min-width: 44px;
|
||||||
|
mix-blend-mode: difference;
|
||||||
|
padding: 0 10px;
|
||||||
|
pointer-events: none;
|
||||||
|
top: 0;
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-toolbar {
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-stage {
|
||||||
|
direction: ltr;
|
||||||
|
overflow: visible;
|
||||||
|
transform: translateZ(0);
|
||||||
|
z-index: 99994;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-is-open .fancybox-stage {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide {
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
|
/* Using without prefix would break IE11 */
|
||||||
|
display: none;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
outline: none;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
padding: 44px;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
top: 0;
|
||||||
|
transition-property: transform, opacity;
|
||||||
|
white-space: normal;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 99994;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0;
|
||||||
|
height: 100%;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-is-sliding .fancybox-slide,
|
||||||
|
.fancybox-slide--previous,
|
||||||
|
.fancybox-slide--current,
|
||||||
|
.fancybox-slide--next {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--image {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 44px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--image::before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--html {
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-content {
|
||||||
|
background: #fff;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
padding: 44px;
|
||||||
|
position: relative;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--image .fancybox-content {
|
||||||
|
animation-timing-function: cubic-bezier(.5, 0, .14, 1);
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
|
background: transparent;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
left: 0;
|
||||||
|
max-width: none;
|
||||||
|
overflow: visible;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
-ms-transform-origin: top left;
|
||||||
|
transform-origin: top left;
|
||||||
|
transition-property: transform, opacity;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
z-index: 99995;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-can-zoomOut .fancybox-content {
|
||||||
|
cursor: zoom-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-can-zoomIn .fancybox-content {
|
||||||
|
cursor: zoom-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-can-swipe .fancybox-content,
|
||||||
|
.fancybox-can-pan .fancybox-content {
|
||||||
|
cursor: -webkit-grab;
|
||||||
|
cursor: grab;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-is-grabbing .fancybox-content {
|
||||||
|
cursor: -webkit-grabbing;
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-container [data-selectable='true'] {
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-image,
|
||||||
|
.fancybox-spaceball {
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
margin: 0;
|
||||||
|
max-height: none;
|
||||||
|
max-width: none;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-spaceball {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--video .fancybox-content,
|
||||||
|
.fancybox-slide--map .fancybox-content,
|
||||||
|
.fancybox-slide--pdf .fancybox-content,
|
||||||
|
.fancybox-slide--iframe .fancybox-content {
|
||||||
|
height: 100%;
|
||||||
|
overflow: visible;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--video .fancybox-content {
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--map .fancybox-content {
|
||||||
|
background: #e5e3df;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--iframe .fancybox-content {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-video,
|
||||||
|
.fancybox-iframe {
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix iOS */
|
||||||
|
.fancybox-iframe {
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-error {
|
||||||
|
background: #fff;
|
||||||
|
cursor: default;
|
||||||
|
max-width: 400px;
|
||||||
|
padding: 40px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-error p {
|
||||||
|
color: #444;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
|
||||||
|
.fancybox-button {
|
||||||
|
background: rgba(30, 30, 30, .6);
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
height: 44px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px;
|
||||||
|
position: relative;
|
||||||
|
transition: color .2s;
|
||||||
|
vertical-align: top;
|
||||||
|
visibility: inherit;
|
||||||
|
width: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button,
|
||||||
|
.fancybox-button:visited,
|
||||||
|
.fancybox-button:link {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button.fancybox-focus {
|
||||||
|
outline: 1px dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button[disabled],
|
||||||
|
.fancybox-button[disabled]:hover {
|
||||||
|
color: #888;
|
||||||
|
cursor: default;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix IE11 */
|
||||||
|
.fancybox-button div {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button svg {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
overflow: visible;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button svg path {
|
||||||
|
fill: currentColor;
|
||||||
|
stroke-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button--play svg:nth-child(2),
|
||||||
|
.fancybox-button--fsenter svg:nth-child(2) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-button--pause svg:nth-child(1),
|
||||||
|
.fancybox-button--fsexit svg:nth-child(1) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-progress {
|
||||||
|
background: #ff5268;
|
||||||
|
height: 2px;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
-ms-transform: scaleX(0);
|
||||||
|
transform: scaleX(0);
|
||||||
|
-ms-transform-origin: 0;
|
||||||
|
transform-origin: 0;
|
||||||
|
transition-property: transform;
|
||||||
|
transition-timing-function: linear;
|
||||||
|
z-index: 99998;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Close button on the top right corner of html content */
|
||||||
|
|
||||||
|
.fancybox-close-small {
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
color: #ccc;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: .8;
|
||||||
|
padding: 8px;
|
||||||
|
position: absolute;
|
||||||
|
right: -12px;
|
||||||
|
top: -44px;
|
||||||
|
z-index: 401;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-close-small:hover {
|
||||||
|
color: #fff;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--html .fancybox-close-small {
|
||||||
|
color: currentColor;
|
||||||
|
padding: 10px;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--image.fancybox-is-scaling .fancybox-content {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-is-scaling .fancybox-close-small,
|
||||||
|
.fancybox-is-zoomable.fancybox-can-pan .fancybox-close-small {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Navigation arrows */
|
||||||
|
|
||||||
|
.fancybox-navigation .fancybox-button {
|
||||||
|
background-clip: content-box;
|
||||||
|
height: 100px;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: calc(50% - 50px);
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-navigation .fancybox-button div {
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-navigation .fancybox-button--arrow_left {
|
||||||
|
left: 0;
|
||||||
|
left: env(safe-area-inset-left);
|
||||||
|
padding: 31px 26px 31px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-navigation .fancybox-button--arrow_right {
|
||||||
|
padding: 31px 6px 31px 26px;
|
||||||
|
right: 0;
|
||||||
|
right: env(safe-area-inset-right);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Caption */
|
||||||
|
|
||||||
|
.fancybox-caption {
|
||||||
|
background: linear-gradient(to top,
|
||||||
|
rgba(0, 0, 0, .85) 0%,
|
||||||
|
rgba(0, 0, 0, .3) 50%,
|
||||||
|
rgba(0, 0, 0, .15) 65%,
|
||||||
|
rgba(0, 0, 0, .075) 75.5%,
|
||||||
|
rgba(0, 0, 0, .037) 82.85%,
|
||||||
|
rgba(0, 0, 0, .019) 88%,
|
||||||
|
rgba(0, 0, 0, 0) 100%);
|
||||||
|
bottom: 0;
|
||||||
|
color: #eee;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
left: 0;
|
||||||
|
line-height: 1.5;
|
||||||
|
padding: 75px 44px 25px 44px;
|
||||||
|
pointer-events: none;
|
||||||
|
right: 0;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 99996;
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (padding: max(0px)) {
|
||||||
|
.fancybox-caption {
|
||||||
|
padding: 75px max(44px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-caption--separate {
|
||||||
|
margin-top: -50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-caption__body {
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow: auto;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-caption a,
|
||||||
|
.fancybox-caption a:link,
|
||||||
|
.fancybox-caption a:visited {
|
||||||
|
color: #ccc;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-caption a:hover {
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Loading indicator */
|
||||||
|
|
||||||
|
.fancybox-loading {
|
||||||
|
animation: fancybox-rotate 1s linear infinite;
|
||||||
|
background: transparent;
|
||||||
|
border: 4px solid #888;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
height: 50px;
|
||||||
|
left: 50%;
|
||||||
|
margin: -25px 0 0 -25px;
|
||||||
|
opacity: .7;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 50px;
|
||||||
|
z-index: 99999;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fancybox-rotate {
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Transition effects */
|
||||||
|
|
||||||
|
.fancybox-animated {
|
||||||
|
transition-timing-function: cubic-bezier(0, 0, .25, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* transitionEffect: slide */
|
||||||
|
|
||||||
|
.fancybox-fx-slide.fancybox-slide--previous {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate3d(-100%, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-slide.fancybox-slide--next {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate3d(100%, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-slide.fancybox-slide--current {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translate3d(0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* transitionEffect: fade */
|
||||||
|
|
||||||
|
.fancybox-fx-fade.fancybox-slide--previous,
|
||||||
|
.fancybox-fx-fade.fancybox-slide--next {
|
||||||
|
opacity: 0;
|
||||||
|
transition-timing-function: cubic-bezier(.19, 1, .22, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-fade.fancybox-slide--current {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* transitionEffect: zoom-in-out */
|
||||||
|
|
||||||
|
.fancybox-fx-zoom-in-out.fancybox-slide--previous {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale3d(1.5, 1.5, 1.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-zoom-in-out.fancybox-slide--next {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale3d(.5, .5, .5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-zoom-in-out.fancybox-slide--current {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale3d(1, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* transitionEffect: rotate */
|
||||||
|
|
||||||
|
.fancybox-fx-rotate.fancybox-slide--previous {
|
||||||
|
opacity: 0;
|
||||||
|
-ms-transform: rotate(-360deg);
|
||||||
|
transform: rotate(-360deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-rotate.fancybox-slide--next {
|
||||||
|
opacity: 0;
|
||||||
|
-ms-transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-rotate.fancybox-slide--current {
|
||||||
|
opacity: 1;
|
||||||
|
-ms-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* transitionEffect: circular */
|
||||||
|
|
||||||
|
.fancybox-fx-circular.fancybox-slide--previous {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-circular.fancybox-slide--next {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale3d(0, 0, 0) translate3d(100%, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-circular.fancybox-slide--current {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* transitionEffect: tube */
|
||||||
|
|
||||||
|
.fancybox-fx-tube.fancybox-slide--previous {
|
||||||
|
transform: translate3d(-100%, 0, 0) scale(.1) skew(-10deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-tube.fancybox-slide--next {
|
||||||
|
transform: translate3d(100%, 0, 0) scale(.1) skew(10deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-fx-tube.fancybox-slide--current {
|
||||||
|
transform: translate3d(0, 0, 0) scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Styling for Small-Screen Devices */
|
||||||
|
@media all and (max-height: 576px) {
|
||||||
|
.fancybox-slide {
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--image {
|
||||||
|
padding: 6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-close-small {
|
||||||
|
right: -6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-slide--image .fancybox-close-small {
|
||||||
|
background: #4e4e4e;
|
||||||
|
color: #f2f4f6;
|
||||||
|
height: 36px;
|
||||||
|
opacity: 1;
|
||||||
|
padding: 6px;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-caption {
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (padding: max(0px)) {
|
||||||
|
.fancybox-caption {
|
||||||
|
padding-left: max(12px, env(safe-area-inset-left));
|
||||||
|
padding-right: max(12px, env(safe-area-inset-right));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Share */
|
||||||
|
|
||||||
|
.fancybox-share {
|
||||||
|
background: #f4f4f4;
|
||||||
|
border-radius: 3px;
|
||||||
|
max-width: 90%;
|
||||||
|
padding: 30px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share h1 {
|
||||||
|
color: #222;
|
||||||
|
font-size: 35px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button {
|
||||||
|
border: 0;
|
||||||
|
border-radius: 3px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 40px;
|
||||||
|
margin: 0 5px 10px 5px;
|
||||||
|
min-width: 130px;
|
||||||
|
padding: 0 15px;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all .2s;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button:visited,
|
||||||
|
.fancybox-share__button:link {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button--fb {
|
||||||
|
background: #3b5998;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button--fb:hover {
|
||||||
|
background: #344e86;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button--pt {
|
||||||
|
background: #bd081d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button--pt:hover {
|
||||||
|
background: #aa0719;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button--tw {
|
||||||
|
background: #1da1f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button--tw:hover {
|
||||||
|
background: #0d95e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button svg {
|
||||||
|
height: 25px;
|
||||||
|
margin-right: 7px;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__button svg path {
|
||||||
|
fill: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-share__input {
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
border-bottom: 1px solid #d7d7d7;
|
||||||
|
border-radius: 0;
|
||||||
|
color: #5d5b5b;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 10px 0 0 0;
|
||||||
|
outline: none;
|
||||||
|
padding: 10px 15px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
/* Thumbs */
|
||||||
|
|
||||||
|
.fancybox-thumbs {
|
||||||
|
background: #ddd;
|
||||||
|
bottom: 0;
|
||||||
|
display: none;
|
||||||
|
margin: 0;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
||||||
|
padding: 2px 2px 4px 2px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
|
top: 0;
|
||||||
|
width: 212px;
|
||||||
|
z-index: 99995;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs-x {
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-show-thumbs .fancybox-thumbs {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-show-thumbs .fancybox-inner {
|
||||||
|
right: 212px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs__list {
|
||||||
|
font-size: 0;
|
||||||
|
height: 100%;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
position: relative;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs-x .fancybox-thumbs__list {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar {
|
||||||
|
width: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-track {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-thumb {
|
||||||
|
background: #2a2a2a;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs__list a {
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
|
backface-visibility: hidden;
|
||||||
|
background-color: rgba(0, 0, 0, .1);
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
cursor: pointer;
|
||||||
|
float: left;
|
||||||
|
height: 75px;
|
||||||
|
margin: 2px;
|
||||||
|
max-height: calc(100% - 8px);
|
||||||
|
max-width: calc(50% - 4px);
|
||||||
|
outline: none;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs__list a::before {
|
||||||
|
border: 6px solid #ff5268;
|
||||||
|
bottom: 0;
|
||||||
|
content: '';
|
||||||
|
left: 0;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
transition: all .2s cubic-bezier(.25, .46, .45, .94);
|
||||||
|
z-index: 99991;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs__list a:focus::before {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs__list a.fancybox-thumbs-active::before {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Styling for Small-Screen Devices */
|
||||||
|
@media all and (max-width: 576px) {
|
||||||
|
.fancybox-thumbs {
|
||||||
|
width: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-show-thumbs .fancybox-inner {
|
||||||
|
right: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fancybox-thumbs__list a {
|
||||||
|
max-width: calc(100% - 10px);
|
||||||
|
}
|
||||||
|
}
|
5632
fancybox/asset/fancybox/jquery.fancybox.js
vendored
Normal file
5632
fancybox/asset/fancybox/jquery.fancybox.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
fancybox/asset/fancybox/jquery.fancybox.min.css
vendored
Normal file
1
fancybox/asset/fancybox/jquery.fancybox.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
13
fancybox/asset/fancybox/jquery.fancybox.min.js
vendored
Normal file
13
fancybox/asset/fancybox/jquery.fancybox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
15
fancybox/createrelease
Executable file
15
fancybox/createrelease
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
MODULE=fancybox
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# old releases not needed anymore
|
||||||
|
mkdir -p $MODULE/dist
|
||||||
|
rm $MODULE/dist/*
|
||||||
|
|
||||||
|
# create release for actual version
|
||||||
|
zip -r9 $MODULE/dist/release.zip $MODULE/* -x $MODULE/dist/\* -x $MODULE/test/\* $MODULE/createrelease
|
||||||
|
|
||||||
|
echo dist/release.zip created.
|
||||||
|
|
||||||
|
cd $MODULE
|
||||||
|
|
60
fancybox/fancybox.php
Normal file
60
fancybox/fancybox.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Name: Fancybox
|
||||||
|
* Description: Open media attachments of posts into a fancybox overlay.
|
||||||
|
* Version: 1.05
|
||||||
|
* Author: Grischa Brockhaus <grischa@brockha.us>
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Friendica\App;
|
||||||
|
use Friendica\Core\Hook;
|
||||||
|
use Friendica\DI;
|
||||||
|
|
||||||
|
function fancybox_install()
|
||||||
|
{
|
||||||
|
Hook::register('head', __FILE__, 'fancybox_head');
|
||||||
|
Hook::register('footer', __FILE__, 'fancybox_footer');
|
||||||
|
Hook::register('prepare_body_final', __FILE__, 'fancybox_render');
|
||||||
|
}
|
||||||
|
|
||||||
|
function fancybox_head(App $a, string &$b)
|
||||||
|
{
|
||||||
|
DI::page()->registerStylesheet(__DIR__ . '/asset/fancybox/jquery.fancybox.min.css');
|
||||||
|
}
|
||||||
|
|
||||||
|
function fancybox_footer(App $a, string &$str)
|
||||||
|
{
|
||||||
|
DI::page()->registerFooterScript(__DIR__ . '/asset/fancybox/jquery.fancybox.min.js');
|
||||||
|
DI::page()->registerFooterScript(__DIR__ . '/asset/fancybox/fancybox.config.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
function fancybox_render(App $a, array &$b){
|
||||||
|
$gallery = 'gallery-' . $b['item']['uri-id'] ?? random_int(1000000, 10000000);
|
||||||
|
|
||||||
|
// performWithEscapedBlocks escapes block defined with 2nd par pattern that won't be processed.
|
||||||
|
// We don't want to touch images in class="type-link":
|
||||||
|
$b['html'] = \Friendica\Util\Strings::performWithEscapedBlocks(
|
||||||
|
$b['html'],
|
||||||
|
'#<div class="type-link">.*?</div>#s',
|
||||||
|
function ($text) use ($gallery) {
|
||||||
|
// This processes images inlined in posts
|
||||||
|
// Frio / Vier hooks für lightbox are un-hooked in fancybox-config.js. So this works for them, too!
|
||||||
|
//if (!in_array($a->getCurrentTheme(),['vier','frio']))
|
||||||
|
$text = preg_replace(
|
||||||
|
'#<a[^>]*href="([^"]*)"[^>]*>(<img[^>]*src="[^"]*"[^>]*>)</a>#',
|
||||||
|
'<a data-fancybox="' . $gallery . '" href="$1">$2</a>',
|
||||||
|
$text);
|
||||||
|
|
||||||
|
// Local content images attached:
|
||||||
|
$text = preg_replace_callback(
|
||||||
|
'#<div class="(body-attach|imagegrid-column)">.*?</div>#s',
|
||||||
|
function ($matches) use ($gallery) {
|
||||||
|
return str_replace('<a href', '<a data-fancybox="' . $gallery . '" href', $matches[0]);
|
||||||
|
},
|
||||||
|
$text
|
||||||
|
);
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
@ -16,7 +16,6 @@ use Friendica\Database\DBA;
|
|||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
use Friendica\Util\Strings;
|
|
||||||
|
|
||||||
global $forumdirectory_search;
|
global $forumdirectory_search;
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ function forumdirectory_app_menu(App $a, array &$b)
|
|||||||
|
|
||||||
function forumdirectory_init(App $a)
|
function forumdirectory_init(App $a)
|
||||||
{
|
{
|
||||||
if (local_user()) {
|
if (DI::userSession()->getLocalUserId()) {
|
||||||
DI::page()['aside'] .= Widget::findPeople();
|
DI::page()['aside'] .= Widget::findPeople();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,8 +61,8 @@ function forumdirectory_content(App $a)
|
|||||||
{
|
{
|
||||||
global $forumdirectory_search;
|
global $forumdirectory_search;
|
||||||
|
|
||||||
if ((DI::config()->get('system', 'block_public')) && (!local_user()) && (!remote_user())) {
|
if (DI::config()->get('system', 'block_public') && !DI::userSession()->getLocalUserId() && !DI::userSession()->getRemoteUserId()) {
|
||||||
notice(DI::l10n()->t('Public access denied.') . EOL);
|
DI::sysmsg()->addNotice(DI::l10n()->t('Public access denied.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +134,7 @@ function forumdirectory_content(App $a)
|
|||||||
}
|
}
|
||||||
DBA::close($r);
|
DBA::close($r);
|
||||||
} else {
|
} else {
|
||||||
notice(DI::l10n()->t("No entries \x28some entries may be hidden\x29."));
|
DI::sysmsg()->addNotice(DI::l10n()->t("No entries \x28some entries may be hidden\x29."));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate('directory_header.tpl');
|
$tpl = Renderer::getMarkupTemplate('directory_header.tpl');
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:19+0000\n"
|
"PO-Revision-Date: 2014-06-22 12:31+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -23,22 +23,22 @@ function fromapp_install()
|
|||||||
|
|
||||||
function fromapp_settings_post(App $a, $post)
|
function fromapp_settings_post(App $a, $post)
|
||||||
{
|
{
|
||||||
if (!local_user() || empty($_POST['fromapp-submit'])) {
|
if (!DI::userSession()->getLocalUserId() || empty($_POST['fromapp-submit'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(), 'fromapp', 'app', $_POST['fromapp-input']);
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'fromapp', 'app', $_POST['fromapp-input']);
|
||||||
DI::pConfig()->set(local_user(), 'fromapp', 'force', intval($_POST['fromapp-force']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'fromapp', 'force', intval($_POST['fromapp-force']));
|
||||||
}
|
}
|
||||||
|
|
||||||
function fromapp_settings(App &$a, array &$data)
|
function fromapp_settings(App &$a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fromapp = DI::pConfig()->get(local_user(), 'fromapp', 'app', '');
|
$fromapp = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'app', '');
|
||||||
$force = intval(DI::pConfig()->get(local_user(), 'fromapp', 'force'));
|
$force = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'force'));
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/fromapp/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/fromapp/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -55,16 +55,16 @@ function fromapp_settings(App &$a, array &$data)
|
|||||||
|
|
||||||
function fromapp_post_hook(App $a, &$item)
|
function fromapp_post_hook(App $a, &$item)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_user() != $item['uid']) {
|
if (DI::userSession()->getLocalUserId() != $item['uid']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$app = DI::pConfig()->get(local_user(), 'fromapp', 'app');
|
$app = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'app');
|
||||||
$force = intval(DI::pConfig()->get(local_user(), 'fromapp', 'force'));
|
$force = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'force'));
|
||||||
|
|
||||||
if (is_null($app) || (! strlen($app))) {
|
if (is_null($app) || (! strlen($app))) {
|
||||||
return;
|
return;
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:20+0000\n"
|
"PO-Revision-Date: 2014-06-22 12:33+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-22 15:15+0000\n"
|
"PO-Revision-Date: 2014-06-22 12:33+0000\n"
|
||||||
"Last-Translator: Transifex Bot <>\n"
|
"Last-Translator: Waldemar Stoczkowski, 2018-2019\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -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`:
|
||||||
|
|
||||||
|
return [
|
||||||
'geonames' => [
|
'geonames' => [
|
||||||
'username' => 'your_username'
|
'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)
|
||||||
@ -48,11 +48,11 @@ function geonames_post_hook(App $a, array &$item)
|
|||||||
|
|
||||||
Logger::notice('geonames invoked');
|
Logger::notice('geonames invoked');
|
||||||
|
|
||||||
if (!local_user()) { /* non-zero if this is a logged in user of this system */
|
if (!DI::userSession()->getLocalUserId()) { /* non-zero if this is a logged in user of this system */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_user() != $item['uid']) { /* Does this person own the post? */
|
if (DI::userSession()->getLocalUserId() != $item['uid']) { /* Does this person own the post? */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ function geonames_post_hook(App $a, array &$item)
|
|||||||
/* Retrieve our personal config setting */
|
/* Retrieve our personal config setting */
|
||||||
|
|
||||||
$geo_account = DI::config()->get('geonames', 'username');
|
$geo_account = DI::config()->get('geonames', 'username');
|
||||||
$active = DI::pConfig()->get(local_user(), 'geonames', 'enable');
|
$active = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'geonames', 'enable');
|
||||||
|
|
||||||
if (!$geo_account || !$active) {
|
if (!$geo_account || !$active) {
|
||||||
return;
|
return;
|
||||||
@ -102,11 +102,11 @@ function geonames_post_hook(App $a, array &$item)
|
|||||||
*/
|
*/
|
||||||
function geonames_addon_settings_post(App $a, array $post)
|
function geonames_addon_settings_post(App $a, array $post)
|
||||||
{
|
{
|
||||||
if (!local_user() || empty($_POST['geonames-submit'])) {
|
if (!DI::userSession()->getLocalUserId() || empty($_POST['geonames-submit'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(), 'geonames', 'enable', intval($_POST['geonames-enable']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'geonames', 'enable', intval($_POST['geonames-enable']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,7 +119,7 @@ function geonames_addon_settings_post(App $a, array $post)
|
|||||||
*/
|
*/
|
||||||
function geonames_addon_settings(App $a, array &$data)
|
function geonames_addon_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ function geonames_addon_settings(App $a, array &$data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = intval(DI::pConfig()->get(local_user(), 'geonames', 'enable'));
|
$enabled = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'geonames', 'enable'));
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/geonames/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/geonames/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:20+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:27+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -31,10 +31,10 @@ function gnot_install()
|
|||||||
* and if so set our configuration setting for this person.
|
* and if so set our configuration setting for this person.
|
||||||
*/
|
*/
|
||||||
function gnot_settings_post(App $a, $post) {
|
function gnot_settings_post(App $a, $post) {
|
||||||
if(! local_user() || empty($_POST['gnot-submit']))
|
if(! DI::userSession()->getLocalUserId() || empty($_POST['gnot-submit']))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(),'gnot','enable',intval($_POST['gnot']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'gnot','enable',intval($_POST['gnot']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,11 +43,11 @@ function gnot_settings_post(App $a, $post) {
|
|||||||
*/
|
*/
|
||||||
function gnot_settings(App &$a, array &$data)
|
function gnot_settings(App &$a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$gnot = intval(DI::pConfig()->get(local_user(), 'gnot', 'enable'));
|
$gnot = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'gnot', 'enable'));
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/gnot/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/gnot/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:21+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:30+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-22 15:27+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:30+0000\n"
|
||||||
"Last-Translator: Transifex Bot <>\n"
|
"Last-Translator: Waldemar Stoczkowski, 2018\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -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:
|
||||||
|
|
||||||
|
return [
|
||||||
'gravatar' => [
|
'gravatar' => [
|
||||||
'default_avatar' => 'identicon',
|
'default_avatar' => 'identicon',
|
||||||
'rating' => 'g',
|
'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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:21+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:33+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -11,8 +11,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2022-03-08 14:32+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:33+0000\n"
|
||||||
"Last-Translator: Piotr Strębski <strebski@gmail.com>\n"
|
"Last-Translator: Piotr Strębski <strebski@gmail.com>, 2022\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -12,12 +12,10 @@ use Friendica\Core\Logger;
|
|||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
|
||||||
function group_text_install() {
|
function group_text_install()
|
||||||
|
{
|
||||||
Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
|
||||||
Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
|
||||||
|
|
||||||
Logger::notice("installed group_text");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,10 +27,13 @@ function group_text_install() {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function group_text_settings_post(App $a, $post) {
|
function group_text_settings_post(App $a, array $post)
|
||||||
if(! local_user() || empty($_POST['group_text-submit']))
|
{
|
||||||
|
if (!DI::userSession()->getLocalUserId() || empty($post['group_text-submit'])) {
|
||||||
return;
|
return;
|
||||||
DI::pConfig()->set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
|
}
|
||||||
|
|
||||||
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'groupedit_image_limit', intval($post['group_text']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -43,15 +44,13 @@ function group_text_settings_post(App $a, $post) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function group_text_settings(App &$a, array &$data)
|
function group_text_settings(App &$a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = DI::pConfig()->get(local_user(),'system','groupedit_image_limit');
|
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'groupedit_image_limit');
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/group_text/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/group_text/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:21+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:35+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-22 15:27+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:35+0000\n"
|
||||||
"Last-Translator: Transifex Bot <>\n"
|
"Last-Translator: Waldemar Stoczkowski, 2018\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -10,11 +10,10 @@ use Friendica\App;
|
|||||||
use Friendica\Content\PageInfo;
|
use Friendica\Content\PageInfo;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\Protocol;
|
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Item;
|
|
||||||
use Friendica\Model\Post;
|
use Friendica\Model\Post;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
@ -35,14 +34,14 @@ function ifttt_content() {}
|
|||||||
|
|
||||||
function ifttt_settings(App $a, array &$data)
|
function ifttt_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$key = DI::pConfig()->get(local_user(), 'ifttt', 'key');
|
$key = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ifttt', 'key');
|
||||||
if (!$key) {
|
if (!$key) {
|
||||||
$key = Strings::getRandomHex(20);
|
$key = Strings::getRandomHex(20);
|
||||||
DI::pConfig()->set(local_user(), 'ifttt', 'key', $key);
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'ifttt', 'key', $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/ifttt/');
|
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/ifttt/');
|
||||||
@ -74,7 +73,7 @@ function ifttt_settings(App $a, array &$data)
|
|||||||
function ifttt_settings_post()
|
function ifttt_settings_post()
|
||||||
{
|
{
|
||||||
if (!empty($_POST['ifttt-submit'])) {
|
if (!empty($_POST['ifttt-submit'])) {
|
||||||
DI::pConfig()->delete(local_user(), 'ifttt', 'key');
|
DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'ifttt', 'key');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,8 +150,6 @@ function ifttt_post(App $a)
|
|||||||
|
|
||||||
function ifttt_message($uid, $item)
|
function ifttt_message($uid, $item)
|
||||||
{
|
{
|
||||||
$a = DI::app();
|
|
||||||
|
|
||||||
$post = [];
|
$post = [];
|
||||||
$post['uid'] = $uid;
|
$post['uid'] = $uid;
|
||||||
$post['app'] = 'IFTTT';
|
$post['app'] = 'IFTTT';
|
||||||
@ -183,5 +180,5 @@ function ifttt_message($uid, $item)
|
|||||||
$link = hash('ripemd128', $item['msg']);
|
$link = hash('ripemd128', $item['msg']);
|
||||||
}
|
}
|
||||||
|
|
||||||
Post\Delayed::add($link, $post, PRIORITY_MEDIUM, Post\Delayed::UNPREPARED);
|
Post\Delayed::add($link, $post, Worker::PRIORITY_MEDIUM, Post\Delayed::PREPARED);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
# Translators:
|
# Translators:
|
||||||
# bob lebonche <lebonche@tutanota.com>, 2021
|
# bob lebonche <lebonche@tutanota.com>, 2021
|
||||||
# Hypolite Petovan <hypolite@mrpetovan.com>, 2022
|
# Hypolite Petovan <hypolite@mrpetovan.com>, 2022
|
||||||
|
# Nicolas Derive, 2022
|
||||||
#
|
#
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -14,7 +15,7 @@ msgstr ""
|
|||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
|
"PO-Revision-Date: 2017-11-27 10:37+0000\n"
|
||||||
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>, 2022\n"
|
"Last-Translator: Nicolas Derive, 2022\n"
|
||||||
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n"
|
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\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"
|
||||||
@ -48,15 +49,15 @@ msgstr "Type de contenu"
|
|||||||
|
|
||||||
#: ifttt.php:56
|
#: ifttt.php:56
|
||||||
msgid "Body for \"new status message\""
|
msgid "Body for \"new status message\""
|
||||||
msgstr ""
|
msgstr "Corps du \"nouveau message de statut\""
|
||||||
|
|
||||||
#: ifttt.php:57
|
#: ifttt.php:57
|
||||||
msgid "Body for \"new photo upload\""
|
msgid "Body for \"new photo upload\""
|
||||||
msgstr ""
|
msgstr "Corps du \"nouveau téléversement de photo\""
|
||||||
|
|
||||||
#: ifttt.php:58
|
#: ifttt.php:58
|
||||||
msgid "Body for \"new link post\""
|
msgid "Body for \"new link post\""
|
||||||
msgstr ""
|
msgstr "Corps du \"nouveau lien de publication\""
|
||||||
|
|
||||||
#: ifttt.php:68
|
#: ifttt.php:68
|
||||||
msgid "IFTTT Mirror"
|
msgid "IFTTT Mirror"
|
||||||
|
@ -9,5 +9,8 @@ $a->strings['Create an account at <a href="http://www.ifttt.com">IFTTT</a>. Crea
|
|||||||
$a->strings['URL'] = 'URL';
|
$a->strings['URL'] = 'URL';
|
||||||
$a->strings['Method'] = 'Méthode';
|
$a->strings['Method'] = 'Méthode';
|
||||||
$a->strings['Content Type'] = 'Type de contenu';
|
$a->strings['Content Type'] = 'Type de contenu';
|
||||||
|
$a->strings['Body for "new status message"'] = 'Corps du "nouveau message de statut"';
|
||||||
|
$a->strings['Body for "new photo upload"'] = 'Corps du "nouveau téléversement de photo"';
|
||||||
|
$a->strings['Body for "new link post"'] = 'Corps du "nouveau lien de publication"';
|
||||||
$a->strings['IFTTT Mirror'] = 'Mirroir IFTTT';
|
$a->strings['IFTTT Mirror'] = 'Mirroir IFTTT';
|
||||||
$a->strings['Generate new key'] = 'Générer une nouvelle clé';
|
$a->strings['Generate new key'] = 'Générer une nouvelle clé';
|
||||||
|
@ -30,17 +30,17 @@ function ijpost_install()
|
|||||||
|
|
||||||
function ijpost_jot_nets(App &$a, array &$jotnets_fields)
|
function ijpost_jot_nets(App &$a, array &$jotnets_fields)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DI::pConfig()->get(local_user(), 'ijpost', 'post')) {
|
if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ijpost', 'post')) {
|
||||||
$jotnets_fields[] = [
|
$jotnets_fields[] = [
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'field' => [
|
'field' => [
|
||||||
'ijpost_enable',
|
'ijpost_enable',
|
||||||
DI::l10n()->t('Post to Insanejournal'),
|
DI::l10n()->t('Post to Insanejournal'),
|
||||||
DI::pConfig()->get(local_user(), 'ijpost', 'post_by_default')
|
DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ijpost', 'post_by_default')
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -48,13 +48,13 @@ function ijpost_jot_nets(App &$a, array &$jotnets_fields)
|
|||||||
|
|
||||||
function ijpost_settings(App &$a, array &$data)
|
function ijpost_settings(App &$a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = DI::pConfig()->get(local_user(), 'ijpost', 'post', false);
|
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ijpost', 'post', false);
|
||||||
$ij_username = DI::pConfig()->get(local_user(), 'ijpost', 'ij_username');
|
$ij_username = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ijpost', 'ij_username');
|
||||||
$def_enabled = DI::pConfig()->get(local_user(), 'ijpost', 'post_by_default');
|
$def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ijpost', 'post_by_default');
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/ijpost/');
|
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/ijpost/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -76,10 +76,10 @@ function ijpost_settings(App &$a, array &$data)
|
|||||||
function ijpost_settings_post(App $a, array &$b)
|
function ijpost_settings_post(App $a, array &$b)
|
||||||
{
|
{
|
||||||
if (!empty($_POST['ijpost-submit'])) {
|
if (!empty($_POST['ijpost-submit'])) {
|
||||||
DI::pConfig()->set(local_user(), 'ijpost', 'post', intval($_POST['ijpost']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'ijpost', 'post', intval($_POST['ijpost']));
|
||||||
DI::pConfig()->set(local_user(), 'ijpost', 'post_by_default', intval($_POST['ij_bydefault']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'ijpost', 'post_by_default', intval($_POST['ij_bydefault']));
|
||||||
DI::pConfig()->set(local_user(), 'ijpost', 'ij_username', trim($_POST['ij_username']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'ijpost', 'ij_username', trim($_POST['ij_username']));
|
||||||
DI::pConfig()->set(local_user(), 'ijpost', 'ij_password', trim($_POST['ij_password']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'ijpost', 'ij_password', trim($_POST['ij_password']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ function ijpost_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!local_user() || (local_user() != $b['uid'])) {
|
if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,11 +99,11 @@ function ijpost_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ij_post = intval(DI::pConfig()->get(local_user(), 'ijpost', 'post'));
|
$ij_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ijpost', 'post'));
|
||||||
|
|
||||||
$ij_enable = (($ij_post && !empty($_REQUEST['ijpost_enable'])) ? intval($_REQUEST['ijpost_enable']) : 0);
|
$ij_enable = (($ij_post && !empty($_REQUEST['ijpost_enable'])) ? intval($_REQUEST['ijpost_enable']) : 0);
|
||||||
|
|
||||||
if ($b['api_source'] && intval(DI::pConfig()->get(local_user(), 'ijpost', 'post_by_default'))) {
|
if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ijpost', 'post_by_default'))) {
|
||||||
$ij_enable = 1;
|
$ij_enable = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:22+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:37+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
return [
|
||||||
'impressum' => [
|
'impressum' => [
|
||||||
'owner' => '', This is the Name of the Operator
|
'owner' => '', // This is the Name of the Operator
|
||||||
'ownerprofile' => '', This is an optional Friendica account where the above owner name will link to
|
'ownerprofile' => '', // This is an optional Friendica account where the above owner name will link to
|
||||||
'email' => '', A contact email address (optional)
|
'email' => '', // A contact email address (optional)
|
||||||
Will be displayed slightly obfuscated as name(at)example(dot)com
|
// Will be displayed slightly obfuscated as name(at)example(dot)com
|
||||||
'postal' => '', Should contain a postal address where you can be reached at (optional)
|
'postal' => '', // Should contain a postal address where you can be reached at (optional)
|
||||||
'notes' => '', Additional informations that should be displayed in the Impressum block
|
'notes' => '', // Additional informations that should be displayed in the Impressum block
|
||||||
'footer_text' => '', Text that will be displayed at the bottom of the pages.
|
'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)
|
||||||
@ -98,8 +98,8 @@ function impressum_addon_admin_post (App $a)
|
|||||||
DI::config()->set('impressum', 'owner', strip_tags(trim($_POST['owner'] ?? '')));
|
DI::config()->set('impressum', 'owner', strip_tags(trim($_POST['owner'] ?? '')));
|
||||||
DI::config()->set('impressum', 'ownerprofile', strip_tags(trim($_POST['ownerprofile'] ?? '')));
|
DI::config()->set('impressum', 'ownerprofile', strip_tags(trim($_POST['ownerprofile'] ?? '')));
|
||||||
DI::config()->set('impressum', 'postal', strip_tags(trim($_POST['postal'] ?? '')));
|
DI::config()->set('impressum', 'postal', strip_tags(trim($_POST['postal'] ?? '')));
|
||||||
DI::config()->set('impressum', 'email', strip_tags(trim($_POST['notes'] ?? '')));
|
DI::config()->set('impressum', 'email', strip_tags(trim($_POST['email'] ?? '')));
|
||||||
DI::config()->set('impressum', 'notes', strip_tags(trim($_POST['email'] ?? '')));
|
DI::config()->set('impressum', 'notes', strip_tags(trim($_POST['notes'] ?? '')));
|
||||||
DI::config()->set('impressum', 'footer_text', strip_tags(trim($_POST['footer_text'] ?? '')));
|
DI::config()->set('impressum', 'footer_text', strip_tags(trim($_POST['footer_text'] ?? '')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:22+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:39+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -11,8 +11,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2022-03-08 14:33+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:39+0000\n"
|
||||||
"Last-Translator: Piotr Strębski <strebski@gmail.com>\n"
|
"Last-Translator: Piotr Strębski <strebski@gmail.com>, 2022\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
24
infiniteimprobabilitydrive/lang/fr/messages.po
Normal file
24
infiniteimprobabilitydrive/lang/fr/messages.po
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# ADDON infiniteimprobabilitydrive
|
||||||
|
# Copyright (C)
|
||||||
|
# This file is distributed under the same license as the Friendica infiniteimprobabilitydrive addon package.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
|
||||||
|
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: 2014-06-23 08:41+0000\n"
|
||||||
|
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>, 2016\n"
|
||||||
|
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#: infiniteimprobabilitydrive.php:18
|
||||||
|
msgid "Infinite Improbability Drive"
|
||||||
|
msgstr "Générateur d'improbabilté infinie"
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:22+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:41+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2018-04-20 20:59+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:41+0000\n"
|
||||||
"Last-Translator: Waldemar Stoczkowski\n"
|
"Last-Translator: Waldemar Stoczkowski, 2018\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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
irc/irc.php
20
irc/irc.php
@ -21,12 +21,12 @@ function irc_install()
|
|||||||
|
|
||||||
function irc_addon_settings(App &$a, array &$data)
|
function irc_addon_settings(App &$a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sitechats = DI::pConfig()->get(local_user(), 'irc', 'sitechats'); /* popular channels */
|
$sitechats = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'irc', 'sitechats'); /* popular channels */
|
||||||
$autochans = DI::pConfig()->get(local_user(), 'irc', 'autochans'); /* auto connect chans */
|
$autochans = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'irc', 'autochans'); /* auto connect chans */
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/irc/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/irc/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -44,16 +44,16 @@ function irc_addon_settings(App &$a, array &$data)
|
|||||||
|
|
||||||
function irc_addon_settings_post(App $a, array &$b)
|
function irc_addon_settings_post(App $a, array &$b)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['irc-submit'])) {
|
if (!empty($_POST['irc-submit'])) {
|
||||||
if (isset($_POST['autochans'])) {
|
if (isset($_POST['autochans'])) {
|
||||||
DI::pConfig()->set(local_user(), 'irc', 'autochans', trim(($_POST['autochans'])));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'irc', 'autochans', trim(($_POST['autochans'])));
|
||||||
}
|
}
|
||||||
if (isset($_POST['sitechats'])) {
|
if (isset($_POST['sitechats'])) {
|
||||||
DI::pConfig()->set(local_user(), 'irc', 'sitechats', trim($_POST['sitechats']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'irc', 'sitechats', trim($_POST['sitechats']));
|
||||||
}
|
}
|
||||||
/* upid pop-up thing */
|
/* upid pop-up thing */
|
||||||
}
|
}
|
||||||
@ -77,8 +77,8 @@ function irc_content(App $a)
|
|||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
/* set the list of popular channels */
|
/* set the list of popular channels */
|
||||||
if (local_user()) {
|
if (DI::userSession()->getLocalUserId()) {
|
||||||
$sitechats = DI::pConfig()->get( local_user(), 'irc', 'sitechats');
|
$sitechats = DI::pConfig()->get( DI::userSession()->getLocalUserId(), 'irc', 'sitechats');
|
||||||
if (!$sitechats) {
|
if (!$sitechats) {
|
||||||
$sitechats = DI::config()->get('irc', 'sitechats');
|
$sitechats = DI::config()->get('irc', 'sitechats');
|
||||||
}
|
}
|
||||||
@ -100,8 +100,8 @@ function irc_content(App $a)
|
|||||||
DI::page()['aside'] .= '</ul></div>';
|
DI::page()['aside'] .= '</ul></div>';
|
||||||
|
|
||||||
/* setting the channel(s) to auto connect */
|
/* setting the channel(s) to auto connect */
|
||||||
if (local_user()) {
|
if (DI::userSession()->getLocalUserId()) {
|
||||||
$autochans = DI::pConfig()->get(local_user(), 'irc', 'autochans');
|
$autochans = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'irc', 'autochans');
|
||||||
if (!$autochans)
|
if (!$autochans)
|
||||||
$autochans = DI::config()->get('irc','autochans');
|
$autochans = DI::config()->get('irc','autochans');
|
||||||
} else {
|
} else {
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:23+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:41+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-02-01 18:19+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:41+0000\n"
|
||||||
"Last-Translator: Transifex Bot <>\n"
|
"Last-Translator: Waldemar Stoczkowski, 2018\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -39,7 +39,7 @@ function js_upload_form(App $a, array &$b)
|
|||||||
'$cancel' => DI::l10n()->t('Cancel'),
|
'$cancel' => DI::l10n()->t('Cancel'),
|
||||||
'$failed' => DI::l10n()->t('Failed'),
|
'$failed' => DI::l10n()->t('Failed'),
|
||||||
'$post_url' => $b['post_url'],
|
'$post_url' => $b['post_url'],
|
||||||
'$maximagesize' => intval(DI::config()->get('system', 'maximagesize')),
|
'$maximagesize' => Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ function js_upload_post_init(App $a, array &$b)
|
|||||||
$allowedExtensions = ['jpeg', 'gif', 'png', 'jpg'];
|
$allowedExtensions = ['jpeg', 'gif', 'png', 'jpg'];
|
||||||
|
|
||||||
// max file size in bytes
|
// max file size in bytes
|
||||||
$sizeLimit = DI::config()->get('system', 'maximagesize');
|
$sizeLimit = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
|
||||||
|
|
||||||
$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
|
$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);
|
||||||
|
|
||||||
@ -200,21 +200,6 @@ class qqFileUploader
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function toBytes($str)
|
|
||||||
{
|
|
||||||
$val = trim($str);
|
|
||||||
$last = strtolower($str[strlen($str) - 1]);
|
|
||||||
switch ($last) {
|
|
||||||
case 'g':
|
|
||||||
$val *= 1024;
|
|
||||||
case 'm':
|
|
||||||
$val *= 1024;
|
|
||||||
case 'k':
|
|
||||||
$val *= 1024;
|
|
||||||
}
|
|
||||||
return $val;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns array('success'=>true) or array('error'=>'error message')
|
* Returns array('success'=>true) or array('error'=>'error message')
|
||||||
*/
|
*/
|
||||||
@ -236,7 +221,7 @@ class qqFileUploader
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
$maximagesize = DI::config()->get('system', 'maximagesize');
|
$maximagesize = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
|
||||||
|
|
||||||
if (($maximagesize) && ($size > $maximagesize)) {
|
if (($maximagesize) && ($size > $maximagesize)) {
|
||||||
return ['error' => DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize))];
|
return ['error' => DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize))];
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
# bob lebonche <lebonche@tutanota.com>, 2021
|
# bob lebonche <lebonche@tutanota.com>, 2021
|
||||||
# ButterflyOfFire, 2020
|
# ButterflyOfFire, 2020
|
||||||
# Hypolite Petovan <hypolite@mrpetovan.com>, 2022
|
# Hypolite Petovan <hypolite@mrpetovan.com>, 2022
|
||||||
|
# Nicolas Derive, 2022
|
||||||
# StefOfficiel <pichard.stephane@free.fr>, 2015
|
# StefOfficiel <pichard.stephane@free.fr>, 2015
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -14,7 +15,7 @@ msgstr ""
|
|||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-03-23 23:53-0400\n"
|
"POT-Creation-Date: 2021-03-23 23:53-0400\n"
|
||||||
"PO-Revision-Date: 2014-06-23 08:46+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:46+0000\n"
|
||||||
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>, 2022\n"
|
"Last-Translator: Nicolas Derive, 2022\n"
|
||||||
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
|
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\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"
|
||||||
@ -54,7 +55,7 @@ msgstr "L'image dépasse la taille limite de %s"
|
|||||||
#: js_upload.php:245
|
#: js_upload.php:245
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "File has an invalid extension, it should be one of %s."
|
msgid "File has an invalid extension, it should be one of %s."
|
||||||
msgstr ""
|
msgstr "Le fichier a une extension invalide, elle devrait être parmi celles-ci : %s."
|
||||||
|
|
||||||
#: js_upload.php:256
|
#: js_upload.php:256
|
||||||
msgid "Upload was cancelled, or server error encountered"
|
msgid "Upload was cancelled, or server error encountered"
|
||||||
|
@ -12,4 +12,5 @@ $a->strings['Failed'] = 'Echec';
|
|||||||
$a->strings['No files were uploaded.'] = 'Aucun fichier téléchargé';
|
$a->strings['No files were uploaded.'] = 'Aucun fichier téléchargé';
|
||||||
$a->strings['Uploaded file is empty'] = 'Le fichier téléchargé est vide';
|
$a->strings['Uploaded file is empty'] = 'Le fichier téléchargé est vide';
|
||||||
$a->strings['Image exceeds size limit of %s'] = 'L\'image dépasse la taille limite de %s';
|
$a->strings['Image exceeds size limit of %s'] = 'L\'image dépasse la taille limite de %s';
|
||||||
|
$a->strings['File has an invalid extension, it should be one of %s.'] = 'Le fichier a une extension invalide, elle devrait être parmi celles-ci : %s.';
|
||||||
$a->strings['Upload was cancelled, or server error encountered'] = 'Le téléchargement a été annulé ou le server a rencontré une erreur';
|
$a->strings['Upload was cancelled, or server error encountered'] = 'Le téléchargement a été annulé ou le server a rencontré une erreur';
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-03-23 23:53-0400\n"
|
"POT-Creation-Date: 2021-03-23 23:53-0400\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:23+0000\n"
|
"PO-Revision-Date: 2014-06-23 08:46+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -142,7 +142,7 @@ function keycloakpassword_addon_admin(App $a, string &$o)
|
|||||||
|
|
||||||
function keycloakpassword_addon_admin_post(App $a)
|
function keycloakpassword_addon_admin_post(App $a)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,12 +43,12 @@ function krynn_post_hook(App $a, &$item)
|
|||||||
* - A status post by a profile owner
|
* - A status post by a profile owner
|
||||||
* - The profile owner must have allowed our addon
|
* - The profile owner must have allowed our addon
|
||||||
*/
|
*/
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
/* non-zero if this is a logged in user of this system */
|
/* non-zero if this is a logged in user of this system */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_user() != $item['uid']) {
|
if (DI::userSession()->getLocalUserId() != $item['uid']) {
|
||||||
/* Does this person own the post? */
|
/* Does this person own the post? */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ function krynn_post_hook(App $a, &$item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Retrieve our personal config setting */
|
/* Retrieve our personal config setting */
|
||||||
$active = DI::pConfig()->get(local_user(), 'krynn', 'enable');
|
$active = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'krynn', 'enable');
|
||||||
|
|
||||||
if (!$active) {
|
if (!$active) {
|
||||||
return;
|
return;
|
||||||
@ -90,12 +90,12 @@ function krynn_post_hook(App $a, &$item)
|
|||||||
*/
|
*/
|
||||||
function krynn_settings_post(App $a, $post)
|
function krynn_settings_post(App $a, $post)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['krynn-submit']) {
|
if ($_POST['krynn-submit']) {
|
||||||
DI::pConfig()->set(local_user(),'krynn','enable',intval($_POST['krynn']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'krynn','enable',intval($_POST['krynn']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,11 +105,11 @@ function krynn_settings_post(App $a, $post)
|
|||||||
*/
|
*/
|
||||||
function krynn_settings(App &$a, array &$data)
|
function krynn_settings(App &$a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = DI::pConfig()->get(local_user(),'krynn','enable');
|
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(),'krynn','enable');
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/krynn/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/krynn/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:23+0000\n"
|
"PO-Revision-Date: 2015-07-07 15:14+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:14-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-22 16:22+0000\n"
|
"PO-Revision-Date: 2015-07-07 15:14+0000\n"
|
||||||
"Last-Translator: Transifex Bot <>\n"
|
"Last-Translator: Waldemar Stoczkowski, 2018\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:15-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:15-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:24+0000\n"
|
"PO-Revision-Date: 2015-07-25 08:05+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -11,8 +11,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:15-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:15-0500\n"
|
||||||
"PO-Revision-Date: 2022-03-08 14:08+0000\n"
|
"PO-Revision-Date: 2015-07-25 08:05+0000\n"
|
||||||
"Last-Translator: Piotr Strębski <strebski@gmail.com>\n"
|
"Last-Translator: Piotr Strębski <strebski@gmail.com>, 2022\n"
|
||||||
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
|
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\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"
|
||||||
|
@ -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';
|
||||||
|
@ -33,16 +33,16 @@ function langfilter_install()
|
|||||||
|
|
||||||
function langfilter_addon_settings(App $a, array &$data)
|
function langfilter_addon_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = DI::pConfig()->get(local_user(), 'langfilter', 'enable',
|
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'enable',
|
||||||
!DI::pConfig()->get(local_user(), 'langfilter', 'disable'));
|
!DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'disable'));
|
||||||
|
|
||||||
$languages = DI::pConfig()->get(local_user(), 'langfilter', 'languages');
|
$languages = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'languages');
|
||||||
$minconfidence = DI::pConfig()->get(local_user(), 'langfilter', 'minconfidence', 0) * 100;
|
$minconfidence = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'minconfidence', 0) * 100;
|
||||||
$minlength = DI::pConfig()->get(local_user(), 'langfilter', 'minlength', 32);
|
$minlength = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'minlength', 32);
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/langfilter/');
|
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/langfilter/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -69,7 +69,7 @@ function langfilter_addon_settings(App $a, array &$data)
|
|||||||
|
|
||||||
function langfilter_addon_settings_post(App $a, array &$b)
|
function langfilter_addon_settings_post(App $a, array &$b)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,10 +82,10 @@ function langfilter_addon_settings_post(App $a, array &$b)
|
|||||||
$minlength = 32;
|
$minlength = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::pConfig()->set(local_user(), 'langfilter', 'enable' , $enable);
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'langfilter', 'enable' , $enable);
|
||||||
DI::pConfig()->set(local_user(), 'langfilter', 'languages' , $languages);
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'langfilter', 'languages' , $languages);
|
||||||
DI::pConfig()->set(local_user(), 'langfilter', 'minconfidence', $minconfidence);
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'langfilter', 'minconfidence', $minconfidence);
|
||||||
DI::pConfig()->set(local_user(), 'langfilter', 'minlength' , $minlength);
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'langfilter', 'minlength' , $minlength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ function langfilter_addon_settings_post(App $a, array &$b)
|
|||||||
|
|
||||||
function langfilter_prepare_body_content_filter(App $a, &$hook_data)
|
function langfilter_prepare_body_content_filter(App $a, &$hook_data)
|
||||||
{
|
{
|
||||||
$logged_user = local_user();
|
$logged_user = DI::userSession()->getLocalUserId();
|
||||||
if (!$logged_user) {
|
if (!$logged_user) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
|
|||||||
$naked_body = preg_replace('#\s+#', ' ', trim($naked_body));
|
$naked_body = preg_replace('#\s+#', ' ', trim($naked_body));
|
||||||
|
|
||||||
// Don't filter if body lenght is below minimum
|
// Don't filter if body lenght is below minimum
|
||||||
$minlen = DI::pConfig()->get(local_user(), 'langfilter', 'minlength', 32);
|
$minlen = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'minlength', 32);
|
||||||
if (!$minlen) {
|
if (!$minlen) {
|
||||||
$minlen = 32;
|
$minlen = 32;
|
||||||
}
|
}
|
||||||
@ -137,8 +137,8 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$read_languages_string = DI::pConfig()->get(local_user(), 'langfilter', 'languages');
|
$read_languages_string = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'languages');
|
||||||
$minconfidence = DI::pConfig()->get(local_user(), 'langfilter', 'minconfidence');
|
$minconfidence = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'minconfidence');
|
||||||
|
|
||||||
// Don't filter if no spoken languages are configured
|
// Don't filter if no spoken languages are configured
|
||||||
if (!$read_languages_string) {
|
if (!$read_languages_string) {
|
||||||
|
@ -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`:
|
||||||
|
|
||||||
|
return [
|
||||||
'leistungsschutzrecht' => [
|
'leistungsschutzrecht' => [
|
||||||
'suppress_photos' => true,
|
'suppress_photos' => true,
|
||||||
],
|
],
|
||||||
|
];
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 18:44+0000\n"
|
"PO-Revision-Date: 2014-06-23 09:44+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -27,17 +27,17 @@ function libertree_install()
|
|||||||
|
|
||||||
function libertree_jot_nets(App &$a, array &$jotnets_fields)
|
function libertree_jot_nets(App &$a, array &$jotnets_fields)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DI::pConfig()->get(local_user(), 'libertree', 'post')) {
|
if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'post')) {
|
||||||
$jotnets_fields[] = [
|
$jotnets_fields[] = [
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'field' => [
|
'field' => [
|
||||||
'libertree_enable',
|
'libertree_enable',
|
||||||
DI::l10n()->t('Post to libertree'),
|
DI::l10n()->t('Post to libertree'),
|
||||||
DI::pConfig()->get(local_user(), 'libertree', 'post_by_default'),
|
DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'post_by_default'),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -45,14 +45,14 @@ function libertree_jot_nets(App &$a, array &$jotnets_fields)
|
|||||||
|
|
||||||
function libertree_settings(App $a, array &$data)
|
function libertree_settings(App $a, array &$data)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!DI::userSession()->getLocalUserId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$enabled = DI::pConfig()->get(local_user(), 'libertree', 'post', false);
|
$enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'post', false);
|
||||||
$ltree_api_token = DI::pConfig()->get(local_user(), 'libertree', 'libertree_api_token');
|
$ltree_api_token = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'libertree_api_token');
|
||||||
$ltree_url = DI::pConfig()->get(local_user(), 'libertree', 'libertree_url');
|
$ltree_url = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'libertree_url');
|
||||||
$def_enabled = DI::pConfig()->get(local_user(), 'libertree', 'post_by_default');
|
$def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'post_by_default');
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/libertree/');
|
$t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/libertree/');
|
||||||
$html = Renderer::replaceMacros($t, [
|
$html = Renderer::replaceMacros($t, [
|
||||||
@ -74,10 +74,10 @@ function libertree_settings(App $a, array &$data)
|
|||||||
function libertree_settings_post(App $a, array &$b)
|
function libertree_settings_post(App $a, array &$b)
|
||||||
{
|
{
|
||||||
if (!empty($_POST['libertree-submit'])) {
|
if (!empty($_POST['libertree-submit'])) {
|
||||||
DI::pConfig()->set(local_user(),'libertree','post',intval($_POST['libertree']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','post',intval($_POST['libertree']));
|
||||||
DI::pConfig()->set(local_user(),'libertree','post_by_default',intval($_POST['libertree_bydefault']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','post_by_default',intval($_POST['libertree_bydefault']));
|
||||||
DI::pConfig()->set(local_user(),'libertree','libertree_api_token',trim($_POST['libertree_api_token']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','libertree_api_token',trim($_POST['libertree_api_token']));
|
||||||
DI::pConfig()->set(local_user(),'libertree','libertree_url',trim($_POST['libertree_url']));
|
DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','libertree_url',trim($_POST['libertree_url']));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ function libertree_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!local_user()) || (local_user() != $b['uid'])) {
|
if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,11 +115,11 @@ function libertree_post_local(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ltree_post = intval(DI::pConfig()->get(local_user(),'libertree','post'));
|
$ltree_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'libertree','post'));
|
||||||
|
|
||||||
$ltree_enable = (($ltree_post && !empty($_REQUEST['libertree_enable'])) ? intval($_REQUEST['libertree_enable']) : 0);
|
$ltree_enable = (($ltree_post && !empty($_REQUEST['libertree_enable'])) ? intval($_REQUEST['libertree_enable']) : 0);
|
||||||
|
|
||||||
if ($b['api_source'] && intval(DI::pConfig()->get(local_user(),'libertree','post_by_default'))) {
|
if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'libertree','post_by_default'))) {
|
||||||
$ltree_enable = 1;
|
$ltree_enable = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ function libertree_send(App $a, array &$b)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], $b['body']);
|
$b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b));
|
||||||
|
|
||||||
$ltree_api_token = DI::pConfig()->get($b['uid'],'libertree','libertree_api_token');
|
$ltree_api_token = DI::pConfig()->get($b['uid'],'libertree','libertree_api_token');
|
||||||
$ltree_url = DI::pConfig()->get($b['uid'],'libertree','libertree_url');
|
$ltree_url = DI::pConfig()->get($b['uid'],'libertree','libertree_url');
|
||||||
|
@ -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:
|
||||||
|
|
||||||
|
return [
|
||||||
'libravatar' => [
|
'libravatar' => [
|
||||||
'default_avatar' => 'identicon',
|
'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' => [
|
||||||
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
"POT-Creation-Date: 2021-02-01 18:15+0100\n"
|
||||||
"PO-Revision-Date: 2021-12-23 17:24+0000\n"
|
"PO-Revision-Date: 2014-06-23 09:49+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
45
ljpost/lang/fr/messages.po
Normal file
45
ljpost/lang/fr/messages.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# ADDON ljpost
|
||||||
|
# Copyright (C)
|
||||||
|
# This file is distributed under the same license as the Friendica ljpost addon package.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Hypolite Petovan <hypolite@mrpetovan.com>, 2022
|
||||||
|
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: friendica\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
|
"PO-Revision-Date: 2014-06-23 09:51+0000\n"
|
||||||
|
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>, 2022\n"
|
||||||
|
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#: ljpost.php:43
|
||||||
|
msgid "Post to LiveJournal"
|
||||||
|
msgstr "Publier sur LiveJournal"
|
||||||
|
|
||||||
|
#: ljpost.php:63
|
||||||
|
msgid "Enable LiveJournal Post Addon"
|
||||||
|
msgstr "Activer l'extension LiveJournal"
|
||||||
|
|
||||||
|
#: ljpost.php:64
|
||||||
|
msgid "LiveJournal username"
|
||||||
|
msgstr "Nom d'utilisateur LiveJournal"
|
||||||
|
|
||||||
|
#: ljpost.php:65
|
||||||
|
msgid "LiveJournal password"
|
||||||
|
msgstr "Mot de passe LiveJournal"
|
||||||
|
|
||||||
|
#: ljpost.php:66
|
||||||
|
msgid "Post to LiveJournal by default"
|
||||||
|
msgstr "Publier sur LiveJournal par défaut"
|
||||||
|
|
||||||
|
#: ljpost.php:71
|
||||||
|
msgid "LiveJournal Export"
|
||||||
|
msgstr "Export LiveJournal"
|
@ -10,8 +10,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: friendica\n"
|
"Project-Id-Version: friendica\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
"POT-Creation-Date: 2021-11-21 19:17-0500\n"
|
||||||
"PO-Revision-Date: 2021-12-23 18:46+0000\n"
|
"PO-Revision-Date: 2014-06-23 09:51+0000\n"
|
||||||
"Last-Translator: Balázs Úr\n"
|
"Last-Translator: Balázs Úr, 2020-2021\n"
|
||||||
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n"
|
"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\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"
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user