Use full text search

This commit is contained in:
Michael 2023-09-21 23:27:05 +00:00
parent fac76a33df
commit 508d84b2b7
10 changed files with 173 additions and 121 deletions

View file

@ -1327,6 +1327,7 @@ CREATE TABLE IF NOT EXISTS `post-engagement` (
`contact-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Person, organisation, news, community, relay', `contact-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Person, organisation, news, community, relay',
`media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio', `media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio',
`language` varbinary(128) COMMENT 'Language information about this post', `language` varbinary(128) COMMENT 'Language information about this post',
`searchtext` mediumtext COMMENT 'Simplified text for the full text search',
`created` datetime COMMENT '', `created` datetime COMMENT '',
`restricted` boolean NOT NULL DEFAULT '0' COMMENT 'If true, this post is either unlisted or not from a federated network', `restricted` boolean NOT NULL DEFAULT '0' COMMENT 'If true, this post is either unlisted or not from a federated network',
`comments` mediumint unsigned COMMENT 'Number of comments', `comments` mediumint unsigned COMMENT 'Number of comments',
@ -1334,6 +1335,7 @@ CREATE TABLE IF NOT EXISTS `post-engagement` (
PRIMARY KEY(`uri-id`), PRIMARY KEY(`uri-id`),
INDEX `owner-id` (`owner-id`), INDEX `owner-id` (`owner-id`),
INDEX `created` (`created`), INDEX `created` (`created`),
FULLTEXT INDEX `searchtext` (`searchtext`),
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
FOREIGN KEY (`owner-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE FOREIGN KEY (`owner-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Engagement data per post'; ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Engagement data per post';

View file

@ -13,6 +13,7 @@ Fields
| contact-type | Person, organisation, news, community, relay | tinyint | NO | | 0 | | | contact-type | Person, organisation, news, community, relay | tinyint | NO | | 0 | |
| media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio | tinyint | NO | | 0 | | | media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio | tinyint | NO | | 0 | |
| language | Language information about this post | varbinary(128) | YES | | NULL | | | language | Language information about this post | varbinary(128) | YES | | NULL | |
| searchtext | Simplified text for the full text search | mediumtext | YES | | NULL | |
| created | | datetime | YES | | NULL | | | created | | datetime | YES | | NULL | |
| restricted | If true, this post is either unlisted or not from a federated network | boolean | NO | | 0 | | | restricted | If true, this post is either unlisted or not from a federated network | boolean | NO | | 0 | |
| comments | Number of comments | mediumint unsigned | YES | | NULL | | | comments | Number of comments | mediumint unsigned | YES | | NULL | |
@ -22,10 +23,11 @@ Indexes
------------ ------------
| Name | Fields | | Name | Fields |
| -------- | -------- | | ---------- | -------------------- |
| PRIMARY | uri-id | | PRIMARY | uri-id |
| owner-id | owner-id | | owner-id | owner-id |
| created | created | | created | created |
| searchtext | FULLTEXT, searchtext |
Foreign Keys Foreign Keys
------------ ------------

View file

@ -230,6 +230,7 @@ class BBCode
{ {
DI::profiler()->startRecording('rendering'); DI::profiler()->startRecording('rendering');
// Remove pictures in advance to avoid unneeded proxy calls // Remove pictures in advance to avoid unneeded proxy calls
$text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", ' ', $text);
$text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/ism", ' $2 ', $text); $text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/ism", ' $2 ', $text);
$text = preg_replace("/\[img.*?\[\/img\]/ism", ' ', $text); $text = preg_replace("/\[img.*?\[\/img\]/ism", ' ', $text);

View file

@ -21,6 +21,7 @@
namespace Friendica\Model\Post; namespace Friendica\Model\Post;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Logger; use Friendica\Core\Logger;
use Friendica\Core\Protocol; use Friendica\Core\Protocol;
use Friendica\Database\Database; use Friendica\Database\Database;
@ -52,7 +53,7 @@ class Engagement
return; return;
} }
$parent = Post::selectFirst(['created', 'owner-id', 'uid', 'private', 'contact-contact-type', 'language'], ['uri-id' => $item['parent-uri-id']]); $parent = Post::selectFirst(['uri-id', 'created', 'owner-id', 'uid', 'private', 'contact-contact-type', 'language', 'title', 'content-warning', 'body'], ['uri-id' => $item['parent-uri-id']]);
if ($parent['created'] < DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' hour')) { if ($parent['created'] < DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' hour')) {
Logger::debug('Post is too old', ['uri-id' => $item['uri-id'], 'parent-uri-id' => $item['parent-uri-id'], 'created' => $parent['created']]); Logger::debug('Post is too old', ['uri-id' => $item['uri-id'], 'parent-uri-id' => $item['parent-uri-id'], 'created' => $parent['created']]);
@ -87,6 +88,7 @@ class Engagement
'contact-type' => $parent['contact-contact-type'], 'contact-type' => $parent['contact-contact-type'],
'media-type' => $mediatype, 'media-type' => $mediatype,
'language' => $parent['language'], 'language' => $parent['language'],
'searchtext' => self::getSearchText($parent),
'created' => $parent['created'], 'created' => $parent['created'],
'restricted' => !in_array($item['network'], Protocol::FEDERATED) || ($parent['private'] != Item::PUBLIC), 'restricted' => !in_array($item['network'], Protocol::FEDERATED) || ($parent['private'] != Item::PUBLIC),
'comments' => DBA::count('post', ['parent-uri-id' => $item['parent-uri-id'], 'gravity' => Item::GRAVITY_COMMENT]), 'comments' => DBA::count('post', ['parent-uri-id' => $item['parent-uri-id'], 'gravity' => Item::GRAVITY_COMMENT]),
@ -104,6 +106,20 @@ class Engagement
Logger::debug('Engagement stored', ['fields' => $engagement, 'ret' => $ret]); Logger::debug('Engagement stored', ['fields' => $engagement, 'ret' => $ret]);
} }
private static function getSearchText(array $item): string
{
$body = $item['title'] . "\n" . $item['content-warning'] . "\n" . $item['body'] . "\n";
$body = Post\Media::addAttachmentsToBody($item['uri-id'], $body);
$text = BBCode::toPlaintext($body, false);
do {
$oldtext = $text;
$text = str_replace([' ', "\n", "\r"], ' ', $text);
} while ($oldtext != $text);
return $text;
}
private static function getMediaType(int $uri_id): int private static function getMediaType(int $uri_id): int
{ {
$media = Post\Media::getByURIId($uri_id); $media = Post\Media::getByURIId($uri_id);

View file

@ -376,8 +376,7 @@ class Timeline extends BaseModule
$condition = []; $condition = [];
if (!empty($channel->fullTextSearch)) { if (!empty($channel->fullTextSearch)) {
$first = $this->database->selectFirst('post-engagement', ['uri-id']); $condition = DBA::mergeConditions($condition, ["MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", $channel->fullTextSearch]);
$condition = DBA::mergeConditions($condition, ["`uri-id` IN (SELECT `uri-id` FROM `post-content` WHERE `uri-id` >= ? AND MATCH (`title`, `content-warning`, `body`) AGAINST (? IN BOOLEAN MODE))", $first['uri-id'], $channel->fullTextSearch]);
} }
if (!empty($channel->includeTags)) { if (!empty($channel->includeTags)) {

View file

@ -69,7 +69,7 @@ class Channels extends BaseSettings
'uid' => $uid, 'uid' => $uid,
'include-tags' => $this->cleanTags($request['new_include_tags']), 'include-tags' => $this->cleanTags($request['new_include_tags']),
'exclude-tags' => $this->cleanTags($request['new_exclude_tags']), 'exclude-tags' => $this->cleanTags($request['new_exclude_tags']),
'full-text-search' => null, // Currently not supported for performance reasons 'full-text-search' => $this->cleanTags($request['new_text_search']),
'media-type' => ($request['new_image'] ? 1 : 0) | ($request['new_video'] ? 2 : 0) | ($request['new_audio'] ? 4 : 0), 'media-type' => ($request['new_image'] ? 1 : 0) | ($request['new_video'] ? 2 : 0) | ($request['new_audio'] ? 4 : 0),
]); ]);
$saved = $this->channel->save($channel); $saved = $this->channel->save($channel);
@ -92,7 +92,7 @@ class Channels extends BaseSettings
'uid' => $uid, 'uid' => $uid,
'include-tags' => $this->cleanTags($request['include_tags'][$id]), 'include-tags' => $this->cleanTags($request['include_tags'][$id]),
'exclude-tags' => $this->cleanTags($request['exclude_tags'][$id]), 'exclude-tags' => $this->cleanTags($request['exclude_tags'][$id]),
'full-text-search' => null, // Currently not supported for performance reasons 'full-text-search' => $this->cleanTags($request['text_search'][$id]),
'media-type' => ($request['image'][$id] ? 1 : 0) | ($request['video'][$id] ? 2 : 0) | ($request['audio'][$id] ? 4 : 0), 'media-type' => ($request['image'][$id] ? 1 : 0) | ($request['video'][$id] ? 2 : 0) | ($request['audio'][$id] ? 4 : 0),
]); ]);
$saved = $this->channel->save($channel); $saved = $this->channel->save($channel);
@ -119,6 +119,7 @@ class Channels extends BaseSettings
'access_key' => ["access_key[$channel->code]", $this->t("Access Key"), $channel->accessKey], 'access_key' => ["access_key[$channel->code]", $this->t("Access Key"), $channel->accessKey],
'include_tags' => ["include_tags[$channel->code]", $this->t("Include Tags"), $channel->includeTags], 'include_tags' => ["include_tags[$channel->code]", $this->t("Include Tags"), $channel->includeTags],
'exclude_tags' => ["exclude_tags[$channel->code]", $this->t("Exclude Tags"), $channel->excludeTags], 'exclude_tags' => ["exclude_tags[$channel->code]", $this->t("Exclude Tags"), $channel->excludeTags],
'text_search' => ["text_search[$channel->code]", $this->t("Full Text Search"), $channel->fullTextSearch],
'image' => ["image[$channel->code]", $this->t("Images"), $channel->mediaType & 1], 'image' => ["image[$channel->code]", $this->t("Images"), $channel->mediaType & 1],
'video' => ["video[$channel->code]", $this->t("Videos"), $channel->mediaType & 2], 'video' => ["video[$channel->code]", $this->t("Videos"), $channel->mediaType & 2],
'audio' => ["audio[$channel->code]", $this->t("Audio"), $channel->mediaType & 4], 'audio' => ["audio[$channel->code]", $this->t("Audio"), $channel->mediaType & 4],
@ -133,6 +134,7 @@ class Channels extends BaseSettings
'access_key' => ["new_access_key", $this->t("Access Key"), '', $this->t('When you want to access this channel via an access key, you can define it here. Pay attentioon to not use an already used one.')], 'access_key' => ["new_access_key", $this->t("Access Key"), '', $this->t('When you want to access this channel via an access key, you can define it here. Pay attentioon to not use an already used one.')],
'include_tags' => ["new_include_tags", $this->t("Include Tags"), '', $this->t('Comma separated list of tags. A post will be used when it contains any of the listed tags.')], 'include_tags' => ["new_include_tags", $this->t("Include Tags"), '', $this->t('Comma separated list of tags. A post will be used when it contains any of the listed tags.')],
'exclude_tags' => ["new_exclude_tags", $this->t("Exclude Tags"), '', $this->t('Comma separated list of tags. If a post contain any of these tags, then it will not be part of nthis channel.')], 'exclude_tags' => ["new_exclude_tags", $this->t("Exclude Tags"), '', $this->t('Comma separated list of tags. If a post contain any of these tags, then it will not be part of nthis channel.')],
'text_search' => ["new_text_search", $this->t("Full Text Search"), '', $this->t('Search terms for the body.')],
'image' => ['new_image', $this->t("Images"), false, $this->t("Check to display images in the channel.")], 'image' => ['new_image', $this->t("Images"), false, $this->t("Check to display images in the channel.")],
'video' => ["new_video", $this->t("Videos"), false, $this->t("Check to display videos in the channel.")], 'video' => ["new_video", $this->t("Videos"), false, $this->t("Check to display videos in the channel.")],
'audio' => ["new_audio", $this->t("Audio"), false, $this->t("Check to display audio in the channel.")], 'audio' => ["new_audio", $this->t("Audio"), false, $this->t("Check to display audio in the channel.")],

View file

@ -1350,6 +1350,7 @@ return [
"contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"], "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"],
"media-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Type of media in a bit array (1 = image, 2 = video, 4 = audio"], "media-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Type of media in a bit array (1 = image, 2 = video, 4 = audio"],
"language" => ["type" => "varbinary(128)", "comment" => "Language information about this post"], "language" => ["type" => "varbinary(128)", "comment" => "Language information about this post"],
"searchtext" => ["type" => "mediumtext", "comment" => "Simplified text for the full text search"],
"created" => ["type" => "datetime", "comment" => ""], "created" => ["type" => "datetime", "comment" => ""],
"restricted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "If true, this post is either unlisted or not from a federated network"], "restricted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "If true, this post is either unlisted or not from a federated network"],
"comments" => ["type" => "mediumint unsigned", "comment" => "Number of comments"], "comments" => ["type" => "mediumint unsigned", "comment" => "Number of comments"],
@ -1359,6 +1360,7 @@ return [
"PRIMARY" => ["uri-id"], "PRIMARY" => ["uri-id"],
"owner-id" => ["owner-id"], "owner-id" => ["owner-id"],
"created" => ["created"], "created" => ["created"],
"searchtext" => ["FULLTEXT", "searchtext"],
] ]
], ],
"post-history" => [ "post-history" => [

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2023.09-dev\n" "Project-Id-Version: 2023.09-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-21 06:47+0000\n" "POT-Creation-Date: 2023-09-21 23:26+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -70,7 +70,7 @@ msgstr ""
#: src/Module/Settings/Account.php:50 src/Module/Settings/Account.php:408 #: src/Module/Settings/Account.php:50 src/Module/Settings/Account.php:408
#: src/Module/Settings/Channels.php:55 src/Module/Settings/Channels.php:111 #: src/Module/Settings/Channels.php:55 src/Module/Settings/Channels.php:111
#: src/Module/Settings/Delegation.php:41 src/Module/Settings/Delegation.php:71 #: src/Module/Settings/Delegation.php:41 src/Module/Settings/Delegation.php:71
#: src/Module/Settings/Display.php:73 src/Module/Settings/Display.php:160 #: src/Module/Settings/Display.php:73 src/Module/Settings/Display.php:176
#: src/Module/Settings/Profile/Photo/Crop.php:165 #: src/Module/Settings/Profile/Photo/Crop.php:165
#: src/Module/Settings/Profile/Photo/Index.php:111 #: src/Module/Settings/Profile/Photo/Index.php:111
#: src/Module/Settings/RemoveMe.php:117 src/Module/Settings/UserExport.php:80 #: src/Module/Settings/RemoveMe.php:117 src/Module/Settings/UserExport.php:80
@ -385,7 +385,7 @@ msgstr ""
#: mod/notes.php:57 src/Content/Text/HTML.php:859 #: mod/notes.php:57 src/Content/Text/HTML.php:859
#: src/Module/Admin/Storage.php:142 src/Module/Filer/SaveTag.php:74 #: src/Module/Admin/Storage.php:142 src/Module/Filer/SaveTag.php:74
#: src/Module/Post/Edit.php:129 src/Module/Settings/Channels.php:144 #: src/Module/Post/Edit.php:129 src/Module/Settings/Channels.php:146
msgid "Save" msgid "Save"
msgstr "" msgstr ""
@ -1548,7 +1548,7 @@ msgid "Posts from accounts that are followed by accounts that you follow"
msgstr "" msgstr ""
#: src/Content/Conversation/Factory/Timeline.php:85 #: src/Content/Conversation/Factory/Timeline.php:85
#: src/Module/Settings/Channels.php:122 src/Module/Settings/Channels.php:136 #: src/Module/Settings/Channels.php:123 src/Module/Settings/Channels.php:138
msgid "Images" msgid "Images"
msgstr "" msgstr ""
@ -1557,7 +1557,7 @@ msgid "Posts with images"
msgstr "" msgstr ""
#: src/Content/Conversation/Factory/Timeline.php:86 #: src/Content/Conversation/Factory/Timeline.php:86
#: src/Module/Settings/Channels.php:124 src/Module/Settings/Channels.php:138 #: src/Module/Settings/Channels.php:125 src/Module/Settings/Channels.php:140
msgid "Audio" msgid "Audio"
msgstr "" msgstr ""
@ -1566,7 +1566,7 @@ msgid "Posts with audio"
msgstr "" msgstr ""
#: src/Content/Conversation/Factory/Timeline.php:87 #: src/Content/Conversation/Factory/Timeline.php:87
#: src/Module/Settings/Channels.php:123 src/Module/Settings/Channels.php:137 #: src/Module/Settings/Channels.php:124 src/Module/Settings/Channels.php:139
msgid "Videos" msgid "Videos"
msgstr "" msgstr ""
@ -1931,7 +1931,7 @@ msgstr ""
#: src/Content/Nav.php:233 src/Content/Nav.php:293 #: src/Content/Nav.php:233 src/Content/Nav.php:293
#: src/Module/BaseProfile.php:85 src/Module/BaseProfile.php:88 #: src/Module/BaseProfile.php:85 src/Module/BaseProfile.php:88
#: src/Module/BaseProfile.php:96 src/Module/BaseProfile.php:99 #: src/Module/BaseProfile.php:96 src/Module/BaseProfile.php:99
#: src/Module/Settings/Display.php:267 view/theme/frio/theme.php:236 #: src/Module/Settings/Display.php:294 view/theme/frio/theme.php:236
#: view/theme/frio/theme.php:240 #: view/theme/frio/theme.php:240
msgid "Calendar" msgid "Calendar"
msgstr "" msgstr ""
@ -2174,39 +2174,39 @@ msgstr ""
msgid "last" msgid "last"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:696 src/Content/Text/BBCode.php:1636 #: src/Content/Text/BBCode.php:697 src/Content/Text/BBCode.php:1637
#: src/Content/Text/BBCode.php:1637 #: src/Content/Text/BBCode.php:1638
msgid "Image/photo" msgid "Image/photo"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:914 #: src/Content/Text/BBCode.php:915
#, php-format #, php-format
msgid "" msgid ""
"<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s" "<a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">%2$s</a> %3$s"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:939 src/Model/Item.php:3745 #: src/Content/Text/BBCode.php:940 src/Model/Item.php:3745
#: src/Model/Item.php:3751 src/Model/Item.php:3752 #: src/Model/Item.php:3751 src/Model/Item.php:3752
msgid "Link to source" msgid "Link to source"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1543 src/Content/Text/HTML.php:904 #: src/Content/Text/BBCode.php:1544 src/Content/Text/HTML.php:904
msgid "Click to open/close" msgid "Click to open/close"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1576 #: src/Content/Text/BBCode.php:1577
msgid "$1 wrote:" msgid "$1 wrote:"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1641 src/Content/Text/BBCode.php:1642 #: src/Content/Text/BBCode.php:1642 src/Content/Text/BBCode.php:1643
msgid "Encrypted content" msgid "Encrypted content"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1901 #: src/Content/Text/BBCode.php:1902
msgid "Invalid source protocol" msgid "Invalid source protocol"
msgstr "" msgstr ""
#: src/Content/Text/BBCode.php:1920 #: src/Content/Text/BBCode.php:1921
msgid "Invalid link protocol" msgid "Invalid link protocol"
msgstr "" msgstr ""
@ -2366,8 +2366,8 @@ msgstr ""
msgid "All" msgid "All"
msgstr "" msgstr ""
#: src/Content/Widget.php:577 src/Module/BaseSettings.php:125 #: src/Content/Widget.php:585 src/Module/BaseSettings.php:125
#: src/Module/Settings/Channels.php:140 src/Module/Settings/Display.php:266 #: src/Module/Settings/Channels.php:142 src/Module/Settings/Display.php:293
msgid "Channels" msgid "Channels"
msgstr "" msgstr ""
@ -2826,37 +2826,37 @@ msgid "Could not connect to database."
msgstr "" msgstr ""
#: src/Core/L10n.php:476 src/Model/Event.php:430 #: src/Core/L10n.php:476 src/Model/Event.php:430
#: src/Module/Settings/Display.php:235 #: src/Module/Settings/Display.php:262
msgid "Monday" msgid "Monday"
msgstr "" msgstr ""
#: src/Core/L10n.php:476 src/Model/Event.php:431 #: src/Core/L10n.php:476 src/Model/Event.php:431
#: src/Module/Settings/Display.php:236 #: src/Module/Settings/Display.php:263
msgid "Tuesday" msgid "Tuesday"
msgstr "" msgstr ""
#: src/Core/L10n.php:476 src/Model/Event.php:432 #: src/Core/L10n.php:476 src/Model/Event.php:432
#: src/Module/Settings/Display.php:237 #: src/Module/Settings/Display.php:264
msgid "Wednesday" msgid "Wednesday"
msgstr "" msgstr ""
#: src/Core/L10n.php:476 src/Model/Event.php:433 #: src/Core/L10n.php:476 src/Model/Event.php:433
#: src/Module/Settings/Display.php:238 #: src/Module/Settings/Display.php:265
msgid "Thursday" msgid "Thursday"
msgstr "" msgstr ""
#: src/Core/L10n.php:476 src/Model/Event.php:434 #: src/Core/L10n.php:476 src/Model/Event.php:434
#: src/Module/Settings/Display.php:239 #: src/Module/Settings/Display.php:266
msgid "Friday" msgid "Friday"
msgstr "" msgstr ""
#: src/Core/L10n.php:476 src/Model/Event.php:435 #: src/Core/L10n.php:476 src/Model/Event.php:435
#: src/Module/Settings/Display.php:240 #: src/Module/Settings/Display.php:267
msgid "Saturday" msgid "Saturday"
msgstr "" msgstr ""
#: src/Core/L10n.php:476 src/Model/Event.php:429 #: src/Core/L10n.php:476 src/Model/Event.php:429
#: src/Module/Settings/Display.php:234 #: src/Module/Settings/Display.php:261
msgid "Sunday" msgid "Sunday"
msgstr "" msgstr ""
@ -3301,17 +3301,17 @@ msgid "today"
msgstr "" msgstr ""
#: src/Model/Event.php:463 src/Module/Calendar/Show.php:129 #: src/Model/Event.php:463 src/Module/Calendar/Show.php:129
#: src/Module/Settings/Display.php:245 src/Util/Temporal.php:353 #: src/Module/Settings/Display.php:272 src/Util/Temporal.php:353
msgid "month" msgid "month"
msgstr "" msgstr ""
#: src/Model/Event.php:464 src/Module/Calendar/Show.php:130 #: src/Model/Event.php:464 src/Module/Calendar/Show.php:130
#: src/Module/Settings/Display.php:246 src/Util/Temporal.php:354 #: src/Module/Settings/Display.php:273 src/Util/Temporal.php:354
msgid "week" msgid "week"
msgstr "" msgstr ""
#: src/Model/Event.php:465 src/Module/Calendar/Show.php:131 #: src/Model/Event.php:465 src/Module/Calendar/Show.php:131
#: src/Module/Settings/Display.php:247 src/Util/Temporal.php:355 #: src/Module/Settings/Display.php:274 src/Util/Temporal.php:355
msgid "day" msgid "day"
msgstr "" msgstr ""
@ -3884,7 +3884,7 @@ msgid "Disable"
msgstr "" msgstr ""
#: src/Module/Admin/Addons/Details.php:91 #: src/Module/Admin/Addons/Details.php:91
#: src/Module/Admin/Themes/Details.php:49 #: src/Module/Admin/Themes/Details.php:49 src/Module/Settings/Display.php:316
msgid "Enable" msgid "Enable"
msgstr "" msgstr ""
@ -3934,7 +3934,7 @@ msgstr ""
#: src/Module/Settings/Account.php:561 src/Module/Settings/Addons.php:78 #: src/Module/Settings/Account.php:561 src/Module/Settings/Addons.php:78
#: src/Module/Settings/Connectors.php:160 #: src/Module/Settings/Connectors.php:160
#: src/Module/Settings/Connectors.php:246 #: src/Module/Settings/Connectors.php:246
#: src/Module/Settings/Delegation.php:171 src/Module/Settings/Display.php:260 #: src/Module/Settings/Delegation.php:171 src/Module/Settings/Display.php:287
#: src/Module/Settings/Features.php:76 #: src/Module/Settings/Features.php:76
msgid "Save Settings" msgid "Save Settings"
msgstr "" msgstr ""
@ -4295,11 +4295,11 @@ msgstr ""
msgid "%s is no valid input for maximum image size" msgid "%s is no valid input for maximum image size"
msgstr "" msgstr ""
#: src/Module/Admin/Site.php:313 src/Module/Settings/Display.php:178 #: src/Module/Admin/Site.php:313 src/Module/Settings/Display.php:194
msgid "No special theme for mobile devices" msgid "No special theme for mobile devices"
msgstr "" msgstr ""
#: src/Module/Admin/Site.php:330 src/Module/Settings/Display.php:188 #: src/Module/Admin/Site.php:330 src/Module/Settings/Display.php:204
#, php-format #, php-format
msgid "%s - (Experimental)" msgid "%s - (Experimental)"
msgstr "" msgstr ""
@ -5847,7 +5847,7 @@ msgstr ""
#: src/Module/Moderation/Blocklist/Server/Index.php:116 #: src/Module/Moderation/Blocklist/Server/Index.php:116
#: src/Module/Moderation/Item/Delete.php:67 src/Module/Register.php:148 #: src/Module/Moderation/Item/Delete.php:67 src/Module/Register.php:148
#: src/Module/Security/TwoFactor/Verify.php:101 #: src/Module/Security/TwoFactor/Verify.php:101
#: src/Module/Settings/Channels.php:117 src/Module/Settings/Channels.php:131 #: src/Module/Settings/Channels.php:117 src/Module/Settings/Channels.php:132
#: src/Module/Settings/TwoFactor/Index.php:140 #: src/Module/Settings/TwoFactor/Index.php:140
#: src/Module/Settings/TwoFactor/Verify.php:155 #: src/Module/Settings/TwoFactor/Verify.php:155
msgid "Required" msgid "Required"
@ -5909,7 +5909,7 @@ msgstr ""
msgid "Create New Event" msgid "Create New Event"
msgstr "" msgstr ""
#: src/Module/Calendar/Show.php:132 src/Module/Settings/Display.php:248 #: src/Module/Calendar/Show.php:132 src/Module/Settings/Display.php:275
msgid "list" msgid "list"
msgstr "" msgstr ""
@ -5943,7 +5943,7 @@ msgid "Contact not found."
msgstr "" msgstr ""
#: src/Module/Circle.php:102 src/Module/Contact/Contacts.php:66 #: src/Module/Circle.php:102 src/Module/Contact/Contacts.php:66
#: src/Module/Conversation/Network.php:233 #: src/Module/Conversation/Network.php:224
msgid "Invalid contact." msgid "Invalid contact."
msgstr "" msgstr ""
@ -6729,16 +6729,16 @@ msgstr ""
msgid "Not available." msgid "Not available."
msgstr "" msgstr ""
#: src/Module/Conversation/Network.php:219 #: src/Module/Conversation/Network.php:210
msgid "No such circle" msgid "No such circle"
msgstr "" msgstr ""
#: src/Module/Conversation/Network.php:223 #: src/Module/Conversation/Network.php:214
#, php-format #, php-format
msgid "Circle: %s" msgid "Circle: %s"
msgstr "" msgstr ""
#: src/Module/Conversation/Network.php:317 #: src/Module/Conversation/Network.php:308
msgid "Network feed not available." msgid "Network feed not available."
msgstr "" msgstr ""
@ -7119,7 +7119,7 @@ msgstr ""
#: src/Module/Friendica.php:102 #: src/Module/Friendica.php:102
#: src/Module/Moderation/Blocklist/Server/Index.php:87 #: src/Module/Moderation/Blocklist/Server/Index.php:87
#: src/Module/Moderation/Blocklist/Server/Index.php:111 #: src/Module/Moderation/Blocklist/Server/Index.php:111
#: src/Module/Settings/Channels.php:147 #: src/Module/Settings/Channels.php:149
msgid "Reason for the block" msgid "Reason for the block"
msgstr "" msgstr ""
@ -7867,7 +7867,7 @@ msgstr ""
#: src/Module/Moderation/Blocklist/Server/Index.php:86 #: src/Module/Moderation/Blocklist/Server/Index.php:86
#: src/Module/Moderation/Blocklist/Server/Index.php:110 #: src/Module/Moderation/Blocklist/Server/Index.php:110
#: src/Module/Settings/Channels.php:146 #: src/Module/Settings/Channels.php:148
msgid "Blocked server domain pattern" msgid "Blocked server domain pattern"
msgstr "" msgstr ""
@ -9909,94 +9909,104 @@ msgstr ""
msgid "No Addon settings configured" msgid "No Addon settings configured"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:117 src/Module/Settings/Channels.php:131 #: src/Module/Settings/Channels.php:117 src/Module/Settings/Channels.php:132
#: src/Module/Settings/Display.php:314
msgid "Label" msgid "Label"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:118 src/Module/Settings/Channels.php:132 #: src/Module/Settings/Channels.php:118 src/Module/Settings/Channels.php:133
#: src/Module/Settings/Display.php:315
#: src/Module/Settings/TwoFactor/AppSpecific.php:134 #: src/Module/Settings/TwoFactor/AppSpecific.php:134
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:119 src/Module/Settings/Channels.php:133 #: src/Module/Settings/Channels.php:119 src/Module/Settings/Channels.php:134
msgid "Access Key" msgid "Access Key"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:120 src/Module/Settings/Channels.php:134 #: src/Module/Settings/Channels.php:120 src/Module/Settings/Channels.php:135
msgid "Include Tags" msgid "Include Tags"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:121 src/Module/Settings/Channels.php:135 #: src/Module/Settings/Channels.php:121 src/Module/Settings/Channels.php:136
msgid "Exclude Tags" msgid "Exclude Tags"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:125 #: src/Module/Settings/Channels.php:122 src/Module/Settings/Channels.php:137
msgid "Full Text Search"
msgstr ""
#: src/Module/Settings/Channels.php:126
msgid "Delete channel" msgid "Delete channel"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:125 #: src/Module/Settings/Channels.php:126
msgid "Check to delete this entry from the channel list" msgid "Check to delete this entry from the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:131 #: src/Module/Settings/Channels.php:132
msgid "Short name for the channel. It is displayed on the channels widget." msgid "Short name for the channel. It is displayed on the channels widget."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:132 #: src/Module/Settings/Channels.php:133
msgid "This should describe the content of the channel in a few word." msgid "This should describe the content of the channel in a few word."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:133 #: src/Module/Settings/Channels.php:134
msgid "" msgid ""
"When you want to access this channel via an access key, you can define it " "When you want to access this channel via an access key, you can define it "
"here. Pay attentioon to not use an already used one." "here. Pay attentioon to not use an already used one."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:134 #: src/Module/Settings/Channels.php:135
msgid "" msgid ""
"Comma separated list of tags. A post will be used when it contains any of " "Comma separated list of tags. A post will be used when it contains any of "
"the listed tags." "the listed tags."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:135 #: src/Module/Settings/Channels.php:136
msgid "" msgid ""
"Comma separated list of tags. If a post contain any of these tags, then it " "Comma separated list of tags. If a post contain any of these tags, then it "
"will not be part of nthis channel." "will not be part of nthis channel."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:136
msgid "Check to display images in the channel."
msgstr ""
#: src/Module/Settings/Channels.php:137 #: src/Module/Settings/Channels.php:137
msgid "Check to display videos in the channel." msgid "Search terms for the body."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:138 #: src/Module/Settings/Channels.php:138
msgid "Check to display images in the channel."
msgstr ""
#: src/Module/Settings/Channels.php:139
msgid "Check to display videos in the channel."
msgstr ""
#: src/Module/Settings/Channels.php:140
msgid "Check to display audio in the channel." msgid "Check to display audio in the channel."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:141 #: src/Module/Settings/Channels.php:143
msgid "This page can be used to define your own channels." msgid "This page can be used to define your own channels."
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:142 #: src/Module/Settings/Channels.php:144
msgid "Add new entry to the channel list" msgid "Add new entry to the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:143 src/Module/Settings/Delegation.php:181 #: src/Module/Settings/Channels.php:145 src/Module/Settings/Delegation.php:181
msgid "Add" msgid "Add"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:145 #: src/Module/Settings/Channels.php:147
msgid "Current Entries in the channel list" msgid "Current Entries in the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:148 #: src/Module/Settings/Channels.php:150
msgid "Delete entry from the channel list" msgid "Delete entry from the channel list"
msgstr "" msgstr ""
#: src/Module/Settings/Channels.php:149 #: src/Module/Settings/Channels.php:151
msgid "Delete entry from the channel list?" msgid "Delete entry from the channel list?"
msgstr "" msgstr ""
@ -10269,171 +10279,167 @@ msgstr ""
msgid "No entries." msgid "No entries."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:146 #: src/Module/Settings/Display.php:162
msgid "The theme you chose isn't available." msgid "The theme you chose isn't available."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:186 #: src/Module/Settings/Display.php:202
#, php-format #, php-format
msgid "%s - (Unsupported)" msgid "%s - (Unsupported)"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:221 #: src/Module/Settings/Display.php:237
msgid "No preview" msgid "No preview"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:222 #: src/Module/Settings/Display.php:238
msgid "No image" msgid "No image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:223 #: src/Module/Settings/Display.php:239
msgid "Small Image" msgid "Small Image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:224 #: src/Module/Settings/Display.php:240
msgid "Large Image" msgid "Large Image"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:259 #: src/Module/Settings/Display.php:286
msgid "Display Settings" msgid "Display Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:261 #: src/Module/Settings/Display.php:288
msgid "General Theme Settings" msgid "General Theme Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:262 #: src/Module/Settings/Display.php:289
msgid "Custom Theme Settings" msgid "Custom Theme Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:263 #: src/Module/Settings/Display.php:290
msgid "Content Settings" msgid "Content Settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:264 view/theme/duepuntozero/config.php:86 #: src/Module/Settings/Display.php:291 view/theme/duepuntozero/config.php:86
#: view/theme/frio/config.php:172 view/theme/quattro/config.php:88 #: view/theme/frio/config.php:172 view/theme/quattro/config.php:88
#: view/theme/vier/config.php:136 #: view/theme/vier/config.php:136
msgid "Theme settings" msgid "Theme settings"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:265 #: src/Module/Settings/Display.php:292
msgid "Timelines" msgid "Timelines"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:272 #: src/Module/Settings/Display.php:299
msgid "Display Theme:" msgid "Display Theme:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:273 #: src/Module/Settings/Display.php:300
msgid "Mobile Theme:" msgid "Mobile Theme:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:276 #: src/Module/Settings/Display.php:303
msgid "Number of items to display per page:" msgid "Number of items to display per page:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:276 src/Module/Settings/Display.php:277 #: src/Module/Settings/Display.php:303 src/Module/Settings/Display.php:304
msgid "Maximum of 100 items" msgid "Maximum of 100 items"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:277 #: src/Module/Settings/Display.php:304
msgid "Number of items to display per page when viewed from mobile device:" msgid "Number of items to display per page when viewed from mobile device:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:278 #: src/Module/Settings/Display.php:305
msgid "Update browser every xx seconds" msgid "Update browser every xx seconds"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:278 #: src/Module/Settings/Display.php:305
msgid "Minimum of 10 seconds. Enter -1 to disable it." msgid "Minimum of 10 seconds. Enter -1 to disable it."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:279 #: src/Module/Settings/Display.php:306
msgid "Display emoticons" msgid "Display emoticons"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:279 #: src/Module/Settings/Display.php:306
msgid "When enabled, emoticons are replaced with matching symbols." msgid "When enabled, emoticons are replaced with matching symbols."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:280 #: src/Module/Settings/Display.php:307
msgid "Infinite scroll" msgid "Infinite scroll"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:280 #: src/Module/Settings/Display.php:307
msgid "Automatic fetch new items when reaching the page end." msgid "Automatic fetch new items when reaching the page end."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:281 #: src/Module/Settings/Display.php:308
msgid "Enable Smart Threading" msgid "Enable Smart Threading"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:281 #: src/Module/Settings/Display.php:308
msgid "Enable the automatic suppression of extraneous thread indentation." msgid "Enable the automatic suppression of extraneous thread indentation."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:282 #: src/Module/Settings/Display.php:309
msgid "Display the Dislike feature" msgid "Display the Dislike feature"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:282 #: src/Module/Settings/Display.php:309
msgid "Display the Dislike button and dislike reactions on posts and comments." msgid "Display the Dislike button and dislike reactions on posts and comments."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:283 #: src/Module/Settings/Display.php:310
msgid "Display the resharer" msgid "Display the resharer"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:283 #: src/Module/Settings/Display.php:310
msgid "Display the first resharer as icon and text on a reshared item." msgid "Display the first resharer as icon and text on a reshared item."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:284 #: src/Module/Settings/Display.php:311
msgid "Stay local" msgid "Stay local"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:284 #: src/Module/Settings/Display.php:311
msgid "Don't go to a remote system when following a contact link." msgid "Don't go to a remote system when following a contact link."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:285 #: src/Module/Settings/Display.php:312
msgid "Link preview mode" msgid "Link preview mode"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:285 #: src/Module/Settings/Display.php:312
msgid "Appearance of the link preview that is added to each post with a link." msgid "Appearance of the link preview that is added to each post with a link."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:287 #: src/Module/Settings/Display.php:317
msgid "Timelines for the network page:" msgid "Bookmark"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:287 #: src/Module/Settings/Display.php:319
msgid "Select all the timelines that you want to see on your network page." msgid ""
"Enable timelines that you want to see in the channels widget. Bookmark "
"timelines that you want to see in the top menu."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:288 #: src/Module/Settings/Display.php:321
msgid "Channel languages:" msgid "Channel languages:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:288 #: src/Module/Settings/Display.php:321
msgid "Select all languages that you want to see in your channels." msgid "Select all languages that you want to see in your channels."
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:290 #: src/Module/Settings/Display.php:323
msgid "Beginning of week:" msgid "Beginning of week:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:291 #: src/Module/Settings/Display.php:324
msgid "Default calendar view:" msgid "Default calendar view:"
msgstr "" msgstr ""
#: src/Module/Settings/Display.php:300 src/Module/Settings/Display.php:308
#: src/Module/Settings/Display.php:312
#, php-format
msgid "%s: %s"
msgstr ""
#: src/Module/Settings/Features.php:74 #: src/Module/Settings/Features.php:74
msgid "Additional Features" msgid "Additional Features"
msgstr "" msgstr ""

View file

@ -9,6 +9,7 @@
{{include file="field_input.tpl" field=$access_key}} {{include file="field_input.tpl" field=$access_key}}
{{include file="field_input.tpl" field=$include_tags}} {{include file="field_input.tpl" field=$include_tags}}
{{include file="field_input.tpl" field=$exclude_tags}} {{include file="field_input.tpl" field=$exclude_tags}}
{{include file="field_input.tpl" field=$text_search}}
{{include file="field_checkbox.tpl" field=$image}} {{include file="field_checkbox.tpl" field=$image}}
{{include file="field_checkbox.tpl" field=$video}} {{include file="field_checkbox.tpl" field=$video}}
{{include file="field_checkbox.tpl" field=$audio}} {{include file="field_checkbox.tpl" field=$audio}}
@ -27,6 +28,7 @@
{{include file="field_input.tpl" field=$e.access_key}} {{include file="field_input.tpl" field=$e.access_key}}
{{include file="field_input.tpl" field=$e.include_tags}} {{include file="field_input.tpl" field=$e.include_tags}}
{{include file="field_input.tpl" field=$e.exclude_tags}} {{include file="field_input.tpl" field=$e.exclude_tags}}
{{include file="field_input.tpl" field=$e.text_search}}
{{include file="field_checkbox.tpl" field=$e.image}} {{include file="field_checkbox.tpl" field=$e.image}}
{{include file="field_checkbox.tpl" field=$e.video}} {{include file="field_checkbox.tpl" field=$e.video}}
{{include file="field_checkbox.tpl" field=$e.audio}} {{include file="field_checkbox.tpl" field=$e.audio}}

View file

@ -22,7 +22,27 @@
{{include file="field_select.tpl" field=$preview_mode}} {{include file="field_select.tpl" field=$preview_mode}}
<h2>{{$timeline_title}}</h2> <h2>{{$timeline_title}}</h2>
{{include file="field_select.tpl" field=$network_timelines}} {{$timeline_explanation}}
<table class="table table-condensed table-striped table-bordered">
<thead>
<tr>
<th>{{$timeline_label}}</th>
<th>{{$timeline_descriptiom}}</th>
<th>{{$timeline_enable}}</th>
<th>{{$timeline_bookmark}}</th>
</tr>
</thead>
<tbody>
{{foreach $timelines as $t}}
<tr>
<td>{{$t.label}}</td>
<td>{{$t.description}}</td>
<td>{{include file="field_checkbox.tpl" field=$t.enable}}</td>
<td>{{include file="field_checkbox.tpl" field=$t.bookmark}}</td>
</tr>
{{/foreach}}
</tbody>
</table>
<h2>{{$channel_title}}</h2> <h2>{{$channel_title}}</h2>
{{include file="field_select.tpl" field=$channel_languages}} {{include file="field_select.tpl" field=$channel_languages}}