From cf899d8d25c57b05dff89b89e2c7e56808f83c50 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 5 Nov 2018 18:10:38 +0100 Subject: TT-RSS import (#2099) * TT-RSS import Import of Tiny Tiny RSS favourites https://github.com/FreshRSS/FreshRSS/issues/2018#issuecomment-432710462 * Fallback feed_url * Simpler JSON * TT-RSS import custom labels * Fix syntax --- app/views/helpers/export/articles.phtml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index b8958f527..59a2c7ad7 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -16,6 +16,12 @@ $articles = array( echo rtrim(json_encode($articles, $options), " ]}\n\r\t"), "\n"; $first = true; +$tagDAO = FreshRSS_Factory::createTagDao(); +$entryIdsTagNames = $tagDAO->getEntryIdsTagNames($this->entriesRaw); +if ($entryIdsTagNames == false) { + $entryIdsTagNames = array(); +} + foreach ($this->entriesRaw as $entryRaw) { if (empty($entryRaw)) { continue; @@ -32,13 +38,14 @@ foreach ($this->entriesRaw as $entryRaw) { $article = array( 'id' => $entry->guid(), + 'timestampUsec' => '' . $entry->id(), 'categories' => array_values($entry->tags()), 'title' => $entry->title(), - 'author' => $entry->authors(true), //TODO: Make an array like tags? + 'author' => $entry->authors(true), 'published' => $entry->date(true), 'updated' => $entry->date(true), 'alternate' => array(array( - 'href' => $entry->link(), + 'href' => htmlspecialchars_decode($entry->link(), ENT_QUOTES), 'type' => 'text/html', )), 'content' => array( @@ -51,6 +58,13 @@ foreach ($this->entriesRaw as $entryRaw) { 'feedUrl' => $feed == null ? '' : $feed->url(), ) ); + if ($entry->isFavorite()) { + $article['categories'][] = 'user/-/state/com.google/starred'; + } + $tagNames = isset($entryIdsTagNames['e_' . $entry->id()]) ? $entryIdsTagNames['e_' . $entry->id()] : array(); + foreach ($tagNames as $tagName) { + $article['categories'][] = 'user/-/label/' . $tagName; + } $line = json_encode($article, $options); if ($line != '') { -- cgit v1.2.3 From adcbfc43b866ad2654be3f96e90c650cae224141 Mon Sep 17 00:00:00 2001 From: romibi Date: Tue, 13 Nov 2018 22:29:03 +0100 Subject: Improve long dropdown menu lists (#2108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dropdown menus with lots of entries were a bit difficult to use … Set max height to 75% of Viewport-height and enabled scrolling --- app/views/helpers/index/normal/entry_bottom.phtml | 2 +- p/themes/base-theme/template.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 784a41e1f..1f35318e3 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -42,7 +42,7 @@ - + + feed) ? ' class="active"' : ''; ?> -- cgit v1.2.3 From 983aa587ee71a83d21b17de29d2a26763b18292e Mon Sep 17 00:00:00 2001 From: Patrick Crandol Date: Sat, 15 Dec 2018 04:56:38 -0500 Subject: Add aside_feed to reader view (#2180) * Add Nav menu to reader mode At this point, it appears to be non-functional in reader mode. * Add aside_feed toggle to reader view * make init_column_categories work in reader view * Make sidebar links redirect to proper view * CSS to support toggleable sidebar in reader view * remove unneeded !important --- app/layout/aside_feed.phtml | 15 ++++++++------- app/layout/nav_menu.phtml | 2 +- app/views/index/reader.phtml | 1 + p/scripts/main.js | 2 +- p/themes/base-theme/template.css | 23 +++++++++++++++++++++++ 5 files changed, 34 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 73b200686..5efaa54d1 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -1,4 +1,5 @@ hide_read_feeds && FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) && @@ -24,13 +25,13 @@