diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | classes/api.php | 32 | ||||
-rw-r--r-- | classes/feeditem/common.php | 13 | ||||
-rw-r--r-- | classes/feeds.php | 57 | ||||
-rw-r--r-- | classes/handler/public.php | 38 | ||||
-rw-r--r-- | classes/pluginhost.php | 1 | ||||
-rw-r--r-- | classes/pref/feeds.php | 9 | ||||
-rw-r--r-- | classes/pref/filters.php | 10 | ||||
-rw-r--r-- | classes/pref/prefs.php | 8 | ||||
-rw-r--r-- | classes/pref/users.php | 2 | ||||
-rw-r--r-- | classes/rpc.php | 8 | ||||
-rw-r--r-- | css/cdm.css | 102 | ||||
-rw-r--r-- | css/prefs.css | 8 | ||||
-rw-r--r-- | css/tt-rss.css | 63 | ||||
-rw-r--r-- | css/utility.css | 2 | ||||
-rw-r--r-- | images/alert.png | bin | 340 -> 701 bytes | |||
-rw-r--r-- | images/alert.svg | 87 | ||||
-rw-r--r-- | images/archive.png | bin | 213 -> 555 bytes | |||
-rw-r--r-- | images/close_notify.svg | 76 | ||||
-rw-r--r-- | images/collapse.png | bin | 186 -> 317 bytes | |||
-rw-r--r-- | images/cross.png | bin | 0 -> 655 bytes | |||
-rw-r--r-- | images/error.png | bin | 0 -> 666 bytes | |||
-rw-r--r-- | images/feed.png | bin | 0 -> 691 bytes | |||
-rw-r--r-- | images/filter.png | bin | 0 -> 586 bytes | |||
-rw-r--r-- | images/folder.png | bin | 0 -> 537 bytes | |||
-rw-r--r-- | images/footer.png | bin | 415 -> 0 bytes | |||
-rw-r--r-- | images/fresh.png | bin | 251 -> 633 bytes | |||
-rw-r--r-- | images/information.png | bin | 0 -> 778 bytes | |||
-rw-r--r-- | images/label.png | bin | 387 -> 586 bytes | |||
-rw-r--r-- | images/mark_set.png | bin | 0 -> 670 bytes | |||
-rw-r--r-- | images/mark_set.svg | 73 | ||||
-rw-r--r-- | images/mark_unset.png | bin | 0 -> 610 bytes | |||
-rw-r--r-- | images/mark_unset.svg | 76 | ||||
-rw-r--r-- | images/new_version.png | bin | 141 -> 372 bytes | |||
-rw-r--r-- | images/page_white_go.png | bin | 0 -> 612 bytes | |||
-rw-r--r-- | images/plugin.png | bin | 0 -> 591 bytes | |||
-rw-r--r-- | images/plugin_disabled.png | bin | 0 -> 347 bytes | |||
-rw-r--r-- | images/pub_set.png | bin | 0 -> 691 bytes | |||
-rw-r--r-- | images/pub_set.svg | 184 | ||||
-rw-r--r-- | images/pub_unset.png | bin | 0 -> 718 bytes | |||
-rw-r--r-- | images/pub_unset.svg | 149 | ||||
-rw-r--r-- | images/recently_read.png | bin | 1281 -> 0 bytes | |||
-rw-r--r-- | images/score_half_high.png | bin | 205 -> 332 bytes | |||
-rw-r--r-- | images/score_half_low.png | bin | 181 -> 295 bytes | |||
-rw-r--r-- | images/score_high.png | bin | 190 -> 295 bytes | |||
-rw-r--r-- | images/score_low.png | bin | 168 -> 211 bytes | |||
-rw-r--r-- | images/score_neutral.png | bin | 172 -> 201 bytes | |||
-rw-r--r-- | images/sign_excl.svg | 80 | ||||
-rw-r--r-- | images/sign_info.svg | 83 | ||||
-rw-r--r-- | images/star.png | bin | 0 -> 670 bytes | |||
-rw-r--r-- | images/tag.png | bin | 372 -> 594 bytes | |||
-rw-r--r-- | images/time.png | bin | 0 -> 793 bytes | |||
-rw-r--r-- | images/user.png | bin | 0 -> 741 bytes | |||
-rw-r--r-- | include/functions.php | 59 | ||||
-rw-r--r-- | include/rssfuncs.php | 2 | ||||
-rw-r--r-- | include/sessions.php | 18 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | install/index.php | 4 | ||||
-rw-r--r-- | js/PrefFilterTree.js | 8 | ||||
-rw-r--r-- | js/PrefLabelTree.js | 4 | ||||
-rw-r--r-- | js/functions.js | 6 | ||||
-rw-r--r-- | js/prefs.js | 19 | ||||
-rw-r--r-- | js/tt-rss.js | 7 | ||||
-rw-r--r-- | js/viewfeed.js | 57 | ||||
-rw-r--r-- | plugins/close_button/button.png | bin | 3643 -> 655 bytes | |||
-rw-r--r-- | plugins/googlereaderimport/init.php | 7 | ||||
-rw-r--r-- | plugins/mail/mail.png | bin | 192 -> 641 bytes | |||
-rw-r--r-- | plugins/mailto/mail.png | bin | 254 -> 821 bytes | |||
-rw-r--r-- | plugins/mark_button/init.php | 4 | ||||
-rw-r--r-- | plugins/note/note.png | bin | 159 -> 500 bytes | |||
-rw-r--r-- | plugins/share/init.php | 58 | ||||
-rw-r--r-- | plugins/share/share.js | 59 | ||||
-rw-r--r-- | plugins/share/share.png | bin | 3639 -> 343 bytes | |||
-rw-r--r-- | plugins/share/share_prefs.js | 21 | ||||
-rw-r--r-- | plugins/updater/init.php | 2 | ||||
-rw-r--r-- | plugins/vf_shared/init.php | 60 | ||||
-rw-r--r-- | plugins/vf_shared/share.png | bin | 0 -> 343 bytes | |||
-rw-r--r-- | templates/generated_feed.txt | 3 |
79 files changed, 548 insertions, 1016 deletions
diff --git a/.gitignore b/.gitignore index b4853806c..e7e5407d0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ feed-icons/* cache/*/* lock/* tags +plugins/fever cache/htmlpurifier/*/*ser lib/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/*/*ser web.config
@@ -10,6 +10,8 @@ Licensed under GNU GPL version 2 Copyright (c) 2005 Andrew Dolgov (unless explicitly stated otherwise). +Uses Silk icons by Mark James: http://www.famfamfam.com/lab/icons/silk/ + ## Requirements * Compatible web browser (http://tt-rss.org/wiki/CompatibleBrowsers) diff --git a/classes/api.php b/classes/api.php index 23866072f..c1f4aa9fa 100644 --- a/classes/api.php +++ b/classes/api.php @@ -203,7 +203,7 @@ class API extends Handler { $override_order = false; switch ($_REQUEST["order_by"]) { case "date_reverse": - $override_order = "date_entered, updated"; + $override_order = "score DESC, date_entered, updated"; break; case "feed_dates": $override_order = "updated DESC"; @@ -309,7 +309,7 @@ class API extends Handler { if ($article_id) { - $query = "SELECT id,title,link,content,cached_content,feed_id,comments,int_id, + $query = "SELECT id,title,link,content,feed_id,comments,int_id, marked,unread,published,score, ".SUBSTRING_FOR_DATE."(updated,1,16) as updated, author,(SELECT title FROM ttrss_feeds WHERE id = feed_id) AS feed_title @@ -338,7 +338,7 @@ class API extends Handler { "comments" => $line["comments"], "author" => $line["author"], "updated" => (int) strtotime($line["updated"]), - "content" => $line["cached_content"] != "" ? $line["cached_content"] : $line["content"], + "content" => $line["content"], "feed_id" => $line["feed_id"], "attachments" => $attachments, "score" => (int)$line["score"], @@ -638,6 +638,11 @@ class API extends Handler { $headlines = array(); while ($line = db_fetch_assoc($result)) { + $line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100); + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 100, true); + } + $is_updated = ($line["last_read"] == "" && ($line["unread"] != "t" && $line["unread"] != "1")); @@ -660,28 +665,22 @@ class API extends Handler { "tags" => $tags, ); - if ($include_attachments) - $headline_row['attachments'] = get_article_enclosures( - $line['id']); + if ($include_attachments) + $headline_row['attachments'] = get_article_enclosures( + $line['id']); - if ($show_excerpt) { - $excerpt = truncate_string(strip_tags($line["content_preview"]), 100); - $headline_row["excerpt"] = $excerpt; - } + if (!$show_excerpt) + $headline_row["excerpt"] = $line["content_preview"]; if ($show_content) { - if ($line["cached_content"] != "") { - $line["content_preview"] =& $line["cached_content"]; - } - if ($sanitize_content) { $headline_row["content"] = sanitize( - $line["content_preview"], + $line["content"], sql_bool_to_bool($line['hide_images']), false, $line["site_url"]); } else { - $headline_row["content"] = $line["content_preview"]; + $headline_row["content"] = $line["content"]; } } @@ -699,6 +698,7 @@ class API extends Handler { $headline_row["always_display_attachments"] = sql_bool_to_bool($line["always_display_enclosures"]); $headline_row["author"] = $line["author"]; + $headline_row["score"] = (int)$line["score"]; foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_API) as $p) { diff --git a/classes/feeditem/common.php b/classes/feeditem/common.php index f8fd3c62a..58065b198 100644 --- a/classes/feeditem/common.php +++ b/classes/feeditem/common.php @@ -9,11 +9,16 @@ abstract class FeedItem_Common extends FeedItem { $this->xpath = $xpath; $this->doc = $doc; - $source = $elem->getElementsByTagName("source")->item(0); + try { - // we don't need <source> element - if ($source) - $elem->removeChild($source); + $source = $elem->getElementsByTagName("source")->item(0); + + // we don't need <source> element + if ($source) + $elem->removeChild($source); + } catch (DOMException $e) { + // + } } function get_author() { diff --git a/classes/feeds.php b/classes/feeds.php index 33f239ee6..c57328fe7 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -61,7 +61,7 @@ class Feeds extends Handler_Protected { truncate_string($feed_title,30)."</a>"; if ($error) { - $reply .= " (<span class=\"error\" title=\"$error\">Error</span>)"; + $reply .= " <img title='$error' src='images/error.png' alt='error' class=\"noborder\" style=\"vertical-align : middle\">"; } } else { @@ -74,7 +74,7 @@ class Feeds extends Handler_Protected { <a href=\"#\" title=\"".__("View as RSS feed")."\" onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\"> - <img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.svg\"></a>"; + <img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.png\"></a>"; $reply .= "</span>"; @@ -288,6 +288,16 @@ class Feeds extends Handler_Protected { $expand_cdm = get_pref('CDM_EXPANDED'); while ($line = $this->dbh->fetch_assoc($result)) { + $line["content_preview"] = "— " . truncate_string(strip_tags($line["content_preview"]), 250); + + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 250, false); + } + + if (get_pref('SHOW_CONTENT_PREVIEW')) { + $content_preview = $line["content_preview"]; + } + $id = $line["id"]; $feed_id = $line["feed_id"]; $label_cache = $line["label_cache"]; @@ -323,24 +333,24 @@ class Feeds extends Handler_Protected { if (sql_bool_to_bool($line["marked"])) { $marked_pic = "<img - src=\"images/mark_set.svg\" + src=\"images/mark_set.png\" class=\"markedPic\" alt=\"Unstar article\" onclick='toggleMark($id)'>"; $class .= " marked"; } else { $marked_pic = "<img - src=\"images/mark_unset.svg\" + src=\"images/mark_unset.png\" class=\"markedPic\" alt=\"Star article\" onclick='toggleMark($id)'>"; } if (sql_bool_to_bool($line["published"])) { - $published_pic = "<img src=\"images/pub_set.svg\" + $published_pic = "<img src=\"images/pub_set.png\" class=\"pubPic\" alt=\"Unpublish article\" onclick='togglePub($id)'>"; $class .= " published"; } else { - $published_pic = "<img src=\"images/pub_unset.svg\" + $published_pic = "<img src=\"images/pub_unset.png\" class=\"pubPic\" alt=\"Publish article\" onclick='togglePub($id)'>"; } @@ -360,11 +370,6 @@ class Feeds extends Handler_Protected { $date_entered_fmt = T_sprintf("Imported at %s", make_local_datetime($line["date_entered"], false)); - if (get_pref('SHOW_CONTENT_PREVIEW')) { - $content_preview = " — " . truncate_string(strip_tags($line["content_preview"]), - 250); - } - $score = $line["score"]; $score_pic = "images/" . get_score_pic($score); @@ -377,9 +382,9 @@ class Feeds extends Handler_Protected { title=\"$score\">"; if ($score > 500) { - $hlc_suffix = "H"; + $hlc_suffix = "high"; } else if ($score < -100) { - $hlc_suffix = "L"; + $hlc_suffix = "low"; } else { $hlc_suffix = ""; } @@ -395,7 +400,7 @@ class Feeds extends Handler_Protected { if ($has_feed_icon) { $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"".ICONS_URL."/$feed_id.ico\" alt=\"\">"; } else { - $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/pub_set.svg\" alt=\"\">"; + $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/pub_set.png\" alt=\"\">"; } $entry_site_url = $line["site_url"]; @@ -448,16 +453,14 @@ class Feeds extends Handler_Protected { $reply['content'] .= "</div>"; $reply['content'] .= "<div onclick='return hlClicked(event, $id)' - class=\"hlTitle\"><span class='hlContent$hlc_suffix'>"; - $reply['content'] .= "<a id=\"RTITLE-$id\" class=\"title\" + class=\"hlTitle\"><span class='hlContent $hlc_suffix'>"; + $reply['content'] .= "<a id=\"RTITLE-$id\" class=\"title $hlc_suffix\" href=\"" . htmlspecialchars($line["link"]) . "\" onclick=\"\">" . truncate_string($line["title"], 200); if (get_pref('SHOW_CONTENT_PREVIEW')) { - if ($content_preview) { - $reply['content'] .= "<span class=\"contentPreview\">$content_preview</span>"; - } + $reply['content'] .= "<span class=\"contentPreview\">" . $line["content_preview"] . "</span>"; } $reply['content'] .= "</a></span>"; @@ -502,7 +505,7 @@ class Feeds extends Handler_Protected { else $tags = false; - $line["content"] = sanitize($line["content_preview"], + $line["content"] = sanitize($line["content"], sql_bool_to_bool($line['hide_images']), false, $entry_site_url); foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_CDM) as $p) { @@ -539,7 +542,7 @@ class Feeds extends Handler_Protected { $expanded_class = $expand_cdm ? "expanded" : "expandable"; - $reply['content'] .= "<div class=\"cdm $expanded_class $class\" + $reply['content'] .= "<div class=\"cdm $hlc_suffix $expanded_class $class\" id=\"RROW-$id\" $mouseover_attrs>"; $reply['content'] .= "<div class=\"cdmHeader\" style=\"$row_background\">"; @@ -556,8 +559,8 @@ class Feeds extends Handler_Protected { $reply['content'] .= "<span id=\"RTITLE-$id\" onclick=\"return cdmClicked(event, $id);\" - class=\"titleWrap$hlc_suffix\"> - <a class=\"title\" + class=\"titleWrap $hlc_suffix\"> + <a class=\"title $hlc_suffix\" target=\"_blank\" href=\"". htmlspecialchars($line["link"])."\">". $line["title"] . @@ -574,8 +577,8 @@ class Feeds extends Handler_Protected { else $excerpt_hidden = "style=\"display : none\""; - $reply['content'] .= "<span $excerpt_hidden - id=\"CEXC-$id\" class=\"cdmExcerpt\">$content_preview</span>"; + $reply['content'] .= "<span $excerpt_hidden id=\"CEXC-$id\" class=\"cdmExcerpt\">" . $line["content_preview"] . "</span>"; + $reply['content'] .= "</span>"; if (!get_pref('VFEED_GROUP_BY_FEED')) { @@ -638,7 +641,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= " "; $reply['content'] .= "<a target='_blank' href='" . htmlspecialchars($tmp_line['feed_url']) . "'>"; - $reply['content'] .= "<img title='".__('Feed URL')."'class='tinyFeedIcon' src='images/pub_unset.svg'></a>"; + $reply['content'] .= "<img title='".__('Feed URL')."'class='tinyFeedIcon' src='images/pub_unset.png'></a>"; $reply['content'] .= "</div>"; } @@ -863,7 +866,7 @@ class Feeds extends Handler_Protected { $override_order = "ttrss_entries.title"; break; case "date_reverse": - $override_order = "date_entered, updated"; + $override_order = "score DESC, date_entered, updated"; break; case "feed_dates": $override_order = "updated DESC"; diff --git a/classes/handler/public.php b/classes/handler/public.php index f05beafd2..60a961bfa 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -3,7 +3,7 @@ class Handler_Public extends Handler { private function generate_syndicated_feed($owner_uid, $feed, $is_cat, $limit, $offset, $search, $search_mode, - $view_mode = false, $format = 'atom', $order = false) { + $view_mode = false, $format = 'atom', $order = false, $orig_guid = false) { require_once "lib/MiniTemplator.class.php"; @@ -65,8 +65,8 @@ class Handler_Public extends Handler { $last_error = $qfh_ret[3]; $feed_self_url = get_self_url_prefix() . - "/public.php?op=rss&id=-2&key=" . - get_feed_access_key(-2, false, $owner_uid); + "/public.php?op=rss&id=$feed&key=" . + get_feed_access_key($feed, false, $owner_uid); if (!$feed_site_url) $feed_site_url = get_self_url_prefix(); @@ -85,16 +85,21 @@ class Handler_Public extends Handler { } $tpl->setVariable('SELF_URL', htmlspecialchars(get_self_url_prefix()), true); - + $line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); while ($line = $this->dbh->fetch_assoc($result)) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line); + } - $tpl->setVariable('ARTICLE_ID', htmlspecialchars($line['link']), true); + $tpl->setVariable('ARTICLE_ID', + htmlspecialchars($orig_guid ? $line['link'] : + get_self_url_prefix() . + "/public.php?url=" . urlencode($line['link'])), true); $tpl->setVariable('ARTICLE_LINK', htmlspecialchars($line['link']), true); $tpl->setVariable('ARTICLE_TITLE', htmlspecialchars($line['title']), true); - $tpl->setVariable('ARTICLE_EXCERPT', - truncate_string(strip_tags($line["content_preview"]), 100, '...'), true); + $tpl->setVariable('ARTICLE_EXCERPT', $line["content_preview"], true); - $content = sanitize($line["content_preview"], false, $owner_uid); + $content = sanitize($line["content"], false, $owner_uid); if ($line['note']) { $content = "<div style=\"$note_style\">Article note: " . $line['note'] . "</div>" . @@ -111,6 +116,9 @@ class Handler_Public extends Handler { $tpl->setVariable('ARTICLE_AUTHOR', htmlspecialchars($line['author']), true); + $tpl->setVariable('ARTICLE_SOURCE_LINK', htmlspecialchars($line['site_url']), true); + $tpl->setVariable('ARTICLE_SOURCE_TITLE', htmlspecialchars($line['feed_title']), true); + $tags = get_article_tags($line["id"], $owner_uid); foreach ($tags as $tag) { @@ -164,13 +172,17 @@ class Handler_Public extends Handler { $feed['articles'] = array(); while ($line = $this->dbh->fetch_assoc($result)) { + $line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 100); + } $article = array(); $article['id'] = $line['link']; $article['link'] = $line['link']; $article['title'] = $line['title']; - $article['excerpt'] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); - $article['content'] = sanitize($line["content_preview"], false, $owner_uid); + $article['excerpt'] = $line["content_preview"]; + $article['content'] = sanitize($line["content"], false, $owner_uid); $article['updated'] = date('c', strtotime($line["updated"])); if ($line['note']) $article['note'] = $line['note']; @@ -342,7 +354,7 @@ class Handler_Public extends Handler { function rss() { $feed = $this->dbh->escape_string($_REQUEST["id"]); $key = $this->dbh->escape_string($_REQUEST["key"]); - $is_cat = $_REQUEST["is_cat"] != false; + $is_cat = sql_bool_to_bool($_REQUEST["is_cat"]); $limit = (int)$this->dbh->escape_string($_REQUEST["limit"]); $offset = (int)$this->dbh->escape_string($_REQUEST["offset"]); @@ -352,6 +364,7 @@ class Handler_Public extends Handler { $order = $this->dbh->escape_string($_REQUEST["order"]); $format = $this->dbh->escape_string($_REQUEST['format']); + $orig_guid = !sql_bool_to_bool($_REQUEST["no_orig_guid"]); if (!$format) $format = 'atom'; @@ -371,7 +384,7 @@ class Handler_Public extends Handler { if ($owner_id) { $this->generate_syndicated_feed($owner_id, $feed, $is_cat, $limit, - $offset, $search, $search_mode, $view_mode, $format, $order); + $offset, $search, $search_mode, $view_mode, $format, $order, $orig_guid); } else { header('HTTP/1.1 403 Forbidden'); } @@ -543,6 +556,7 @@ class Handler_Public extends Handler { } } else { $_SESSION["login_error_msg"] = __("Incorrect username or password"); + user_error("Failed login attempt from {$_SERVER['REMOTE_ADDR']}", E_USER_WARNING); } if ($_REQUEST['return']) { diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 53adf01f9..a1bd1b364 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -37,6 +37,7 @@ class PluginHost { const HOOK_PREFS_EDIT_FEED = 20; const HOOK_PREFS_SAVE_FEED = 21; const HOOK_FETCH_FEED = 22; + const HOOK_QUERY_HEADLINES = 23; const KIND_ALL = 1; const KIND_SYSTEM = 2; diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 870c4fed4..1f8c5e4a0 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1471,15 +1471,6 @@ class Pref_Feeds extends Handler_Protected { print "</p>"; - print_warning(__("You can disable all articles shared by unique URLs here.")); - - print "<p>"; - - print "<button dojoType=\"dijit.form.Button\" onclick=\"return clearArticleAccessKeys()\">". - __('Unshare all articles')."</button> "; - - print "</p>"; - PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "hook_prefs_tab_section", "prefFeedsPublishedGenerated"); diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 6a70e622c..c4d6fea1d 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -96,13 +96,17 @@ class Pref_Filters extends Handler_Protected { print "<div class=\"filterTestHolder\">"; print "<table width=\"100%\" cellspacing=\"0\" id=\"prefErrorFeedList\">"; + $line["content_preview"] = truncate_string(strip_tags($line["content_preview"]), 100, '...'); + while ($line = $this->dbh->fetch_assoc($result)) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) { + $line = $p->hook_query_headlines($line, 100); + } $entry_timestamp = strtotime($line["updated"]); $entry_tags = get_article_tags($line["id"], $_SESSION["uid"]); - $content_preview = truncate_string( - strip_tags($line["content_preview"]), 100, '...'); + $content_preview = $line["content_preview"]; if ($line["feed_title"]) $feed_title = $line["feed_title"]; @@ -118,7 +122,7 @@ class Pref_Filters extends Handler_Protected { print " ("; print "<b>" . $feed_title . "</b>"; print "): "; - print "<span class=\"insensitive\">" . $content_preview . "</span>"; + print "<span class=\"insensitive\">" . $line["content_preview"] . "</span>"; print " " . mb_substr($line["date_entered"], 0, 16); print "</td></tr>"; diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 32071e3b3..671756f08 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -765,7 +765,9 @@ class Pref_Prefs extends Handler_Protected { dojoType=\"dijit.form.CheckBox\" $checked type=\"checkbox\"></td>"; - print "<td>$name</td>"; + $plugin_icon = $checked ? "plugin.png" : "plugin_disabled.png"; + + print "<td><label><img src='images/$plugin_icon' alt=''> $name</label></td>"; print "<td>" . htmlspecialchars($about[1]); if (@$about[4]) { print " — <a target=\"_blank\" class=\"visibleLink\" @@ -818,11 +820,13 @@ class Pref_Prefs extends Handler_Protected { print "<tr class='$rowclass'>"; + $plugin_icon = $checked ? "plugin.png" : "plugin_disabled.png"; + print "<td align='center'><input id='FPCHK-$name' name='plugins[]' value='$name' onclick='toggleSelectRow2(this);' dojoType=\"dijit.form.CheckBox\" $checked $disabled type=\"checkbox\"></td>"; - print "<td><label for='FPCHK-$name'>$name</label></td>"; + print "<td><label for='FPCHK-$name'><img src='images/$plugin_icon' alt=''> $name</label></td>"; print "<td><label for='FPCHK-$name'>" . htmlspecialchars($about[1]) . "</label>"; if (@$about[4]) { print " — <a target=\"_blank\" class=\"visibleLink\" diff --git a/classes/pref/users.php b/classes/pref/users.php index 8a0202483..6db7d558b 100644 --- a/classes/pref/users.php +++ b/classes/pref/users.php @@ -418,7 +418,7 @@ class Pref_Users extends Handler_Protected { $onclick = "onclick='editUser($uid, event)' title='".__('Click to edit')."'"; - print "<td $onclick>" . $line["login"] . "</td>"; + print "<td $onclick><img src='images/user.png' class='markedPic' alt=''> " . $line["login"] . "</td>"; if (!$line["email"]) $line["email"] = " "; diff --git a/classes/rpc.php b/classes/rpc.php index 46583feb5..9cc8e7046 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -467,14 +467,6 @@ class RPC extends Handler_Protected { print_feed_cat_select("cat_id", $id, ''); } - // Silent - function clearArticleKeys() { - $this->dbh->query("UPDATE ttrss_user_entries SET uuid = '' WHERE - owner_uid = " . $_SESSION["uid"]); - - return; - } - function setpanelmode() { $wide = (int) $_REQUEST["wide"]; diff --git a/css/cdm.css b/css/cdm.css index 18bedce01..98fd4edf6 100644 --- a/css/cdm.css +++ b/css/cdm.css @@ -110,6 +110,10 @@ div.cdm.expandable div.cdmHeader span.titleWrap { max-width : 500px; } +div.cdm.expandable.active div.cdmHeader span.titleWrap { + white-space : normal; +} + div.cdm.expandable div.cdmHeader a.title { font-weight : bold; color : #555; @@ -230,38 +234,96 @@ div.cdmHeader span.author { div#floatingTitle { position : absolute; z-index : 5; - top : 30px; - right : 20px; - border : 1px solid #ccc; - background : white; - border-radius : 3px; - box-shadow : 0px 0px 3px 0px rgba(0,0,0,0.1); + top : 25px; + right : 0px; + left : 0px; + border-color : #ccc; + border-width : 1px 0px 1px 0px; + border-style : solid; + background : #fcfcfc; color : #555; - font-size : 10px; - padding : 3px; + box-shadow : 0px 1px 1px 0px rgba(0,0,0,0.1); } div#floatingTitle > * { display : table-cell; white-space : nowrap; vertical-align : middle; + padding : 9px 5px; } -div#floatingTitle span.titleWrap { - max-width : 200px; - overflow : hidden; - text-overflow : ellipsis; +div#floatingTitle img { + margin-right : 4px; + margin-left : 4px; } -div#floatingTitle img { - padding-right : 3px; +div#floatingTitle span.author { + color : #555; + font-size : 11px; + font-weight : normal; +} + +div#floatingTitle a.title { + font-size : 14px; + color : #999; + font-weight : bold; +} +div#floatingTitle img.anchor { + margin-right : 1px; + margin-left : 0px; +} + +div#floatingTitle div.hlFeed { + padding-right : 10px; + color : #555; + font-weight : normal; + font-style : italic; + font-size : 11px; + white-space : nowrap; +} + +div#floatingTitle div.hlFeed a { + border-radius : 4px; + display : inline-block; + padding : 1px 4px 1px 4px; +} + +div#floatingTitle span.updated { + padding-right : 10px; + white-space : nowrap; + color : #555; + font-size : 11px; +} + +div#floatingTitle div.hlFeed a { + color : #555; } -div#floatingTitle .dijit, -div#floatingTitle span.updated, -div#floatingTitle div.scoreWrap, -div#floatingTitle div.hlFeed, -div#floatingTitle span.author, -div#floatingTitle img.tinyFeedIcon { +div#floatingTitle span.titleWrap { + width : 100%; + white-space : normal; +} + +div#floatingTitle .dijit, +div#floatingTitle img.hlScorePic { display : none; } + +.cdm.high .cdmHeader a.title.high, .cdm.high .cdmHeader .cdmExcerpt, +.cdm.high .cdmHeader span.author { + color : #00aa00; +} + +.cdm.Unread.high .cdmHeader a.title.high, .cdm.Unread.high .cdmHeader .cdmExcerpt, +.cdm.Unread.high .cdmHeader span.author { + color : #00dd00; +} + +.cdm .cdmHeader a.title.low, .cdm.low .cdmHeader .cdmExcerpt, +.cdm.Unread .cdmHeader a.title.low, .cdm.Unread.low .cdmHeader .cdmExcerpt, +.cdm.low .cdmHeader span.author { + color : #909090; + text-decoration : line-through; +} + + diff --git a/css/prefs.css b/css/prefs.css index 1cc8b7b03..502a53be9 100644 --- a/css/prefs.css +++ b/css/prefs.css @@ -98,6 +98,14 @@ table.prefPluginsList td label, table.prefUserList td { cursor : pointer; } +table.prefPluginsList label { + white-space : nowrap; +} + +table.prefPluginsList label img { + vertical-align : middle; +} + table.prefErrorLog tr.errrow td { font-size : 10px; } diff --git a/css/tt-rss.css b/css/tt-rss.css index 3e6b8cd38..94bc5826c 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -299,7 +299,7 @@ div.error { } div.warning img, div.notice img, div.error img { - margin-right : 4px; + margin : 4px; vertical-align : middle; } @@ -606,20 +606,15 @@ div#headlines-frame.wide .hlTitle { white-space : normal; } -.hlContentH a, .hlContentH span { - color : #00cc00; -} - -.hlContentL a, .hlContentL span { - color : #909090; - text-decoration : line-through; +.hl a.title.high, span.hlContent.high .contentPreview { + color : #00aa00; } - -span.titleWrapH, span.titleWrapH a { - color : #00cc00; +.hl.Unread a.title.high, .hl.Unread span.hlContent.high .contentPreview { + color : #00dd00; } -span.titleWrapL, span.titleWrapL a { +.hl a.title.low, span.hlContent.low .contentPreview, +.hl.Unread a.title.low, .hl.Unread span.hlContent.low .contentPreview { color : #909090; text-decoration : line-through; } @@ -665,29 +660,18 @@ div.dlgButtons { } span.labelColorIndicator { - height : 14px; - width : 14px; + height : 16px; + width : 16px; + border-radius : 4px; line-height : 14px; + vertical-align : middle; font-size : 9px; display : inline-block; - border : 1px solid black; - background-color : #fff7d5; - color : #063064; - text-align : center; - margin-right : 2px; -} - -span.labelColorIndicator2 { - height : 14px; - width : 14px; - font-size : 9px; - display : inline-block; - border : 1px solid black; + border : 1px solid #ccc; background-color : #fff7d5; color : #063064; text-align : center; - margin-right : 2px; - vertical-align : bottom; + box-shadow : 0px 0px 1px 0px rgba(0,0,0,0.1); } div#cmdline { @@ -899,6 +883,7 @@ div.fatalError textarea { img.feedIcon, img.tinyFeedIcon { width : 16px; height : 16px; + line-height : 16px; vertical-align : middle; display : inline-block; } @@ -1075,15 +1060,21 @@ div.hl.active { margin-right : 25px; } +#feedTree img.feedIcon { + position : relative; + top : -2px; +} + body#ttrssMain #feedTree .dijitTreeRow { padding : 2px 0px 2px; + height : 22px; border-width : 1px; border-color : transparent; color : #333; } -.dijitFolderClosed, -.dijitFolderOpened { +body#ttrssMain #feedTree .dijitFolderClosed, +body#ttrssMain #feedTree .dijitFolderOpened { display : none; } @@ -1095,6 +1086,11 @@ body#ttrssMain #feedTree .dijitTreeIsRoot > .dijitTreeRow > .dijitTreeExpando { margin-left : 5px; } +body#ttrssMain #feedTree .dijitTreeExpando { + margin-top : 0px; + opacity : 0.6; +} + body#ttrssMain #feedTree .dijitTreeNode { padding : 0px; border-width : 0px; @@ -1124,8 +1120,11 @@ body#ttrssMain #feedTree { border-radius : 4px; vertical-align : middle; float : right; - margin : 5px 5px 5px 0px; + line-height : 14px; + margin-right : 4px; + margin-top : 3px; min-width : 23px; + height : 14px; text-shadow : 1px 1px rgba(0,0,0,0.2); } diff --git a/css/utility.css b/css/utility.css index 029fa9cb3..f342223e3 100644 --- a/css/utility.css +++ b/css/utility.css @@ -86,7 +86,7 @@ div.error { } div.warning img, div.notice img, div.error img { - margin-right : 4px; + margin : 4px; vertical-align : middle; } diff --git a/images/alert.png b/images/alert.png Binary files differindex 9687c4cf1..c37bd062e 100644 --- a/images/alert.png +++ b/images/alert.png diff --git a/images/alert.svg b/images/alert.svg deleted file mode 100644 index 237f66caf..000000000 --- a/images/alert.svg +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16px" - height="16px" - id="svg2985" - version="1.1" - inkscape:version="0.48.4 r9939" - inkscape:export-filename="Y:\public_html\testbox\tt-irc\images\alert.png" - inkscape:export-xdpi="102.17" - inkscape:export-ydpi="102.17" - sodipodi:docname="alert.svg"> - <defs - id="defs2987" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="22.197802" - inkscape:cx="0.97227717" - inkscape:cy="13.508447" - inkscape:current-layer="layer1" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1600" - inkscape:window-height="1137" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" /> - <metadata - id="metadata2990"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="star" - style="opacity:1;fill:#d40000;fill-opacity:1" - id="path2993" - sodipodi:sides="3" - sodipodi:cx="4.7752476" - sodipodi:cy="2.3499999" - sodipodi:r1="8.1370182" - sodipodi:r2="4.0685091" - sodipodi:arg1="0.52359878" - sodipodi:arg2="1.5707963" - inkscape:flatsided="false" - inkscape:rounded="0" - inkscape:randomized="0" - d="m 11.822112,6.418509 -7.0468643,0 -7.0468646,0 3.5234322,-6.10276355 3.5234323,-6.10276375 3.5234322,6.10276356 z" - inkscape:transform-center-y="-2.0342545" - transform="translate(3.2247524,7.6842546)" /> - <text - xml:space="preserve" - style="font-size:11px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Times New Roman;-inkscape-font-specification:Sans Bold" - x="6.1657715" - y="12.508285" - id="text3767" - sodipodi:linespacing="125%"><tspan - sodipodi:role="line" - id="tspan3769" - x="6.1657715" - y="12.508285">!</tspan></text> - </g> -</svg> diff --git a/images/archive.png b/images/archive.png Binary files differindex 1afa254f7..8443c23eb 100644 --- a/images/archive.png +++ b/images/archive.png diff --git a/images/close_notify.svg b/images/close_notify.svg deleted file mode 100644 index b3a17e02e..000000000 --- a/images/close_notify.svg +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16px" - height="16px" - id="svg2985" - version="1.1" - inkscape:version="0.48.2 r9819" - sodipodi:docname="close_notify.svg"> - <defs - id="defs2987" /> - <sodipodi:namedview - id="base" - pagecolor="#88b0f0" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:zoom="22.197802" - inkscape:cx="0.97227717" - inkscape:cy="8" - inkscape:current-layer="layer1" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1920" - inkscape:window-height="1138" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" /> - <metadata - id="metadata2990"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:1;fill:none;fill-opacity:1;stroke:#454545;stroke-width:0.73948608000000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" - id="path2997" - sodipodi:cx="6.6673269" - sodipodi:cy="7.1702971" - sodipodi:rx="5.270792" - sodipodi:ry="5.270792" - d="m 11.938119,7.1702971 a 5.270792,5.270792 0 1 1 -10.5415841,0 5.270792,5.270792 0 1 1 10.5415841,0 z" - transform="matrix(1.3522905,0,0,1.3522905,-1.0161629,-1.6963247)" /> - <path - style="fill:none;stroke:#454545;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;opacity:1" - d="M 4.4322613,4.4322611 11.567739,11.567739" - id="path3771" - inkscape:connector-curvature="0" /> - <path - style="fill:none;stroke:#454545;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;opacity:1" - d="M 11.567739,4.432261 4.432261,11.567739" - id="path3771-1" - inkscape:connector-curvature="0" /> - </g> -</svg> diff --git a/images/collapse.png b/images/collapse.png Binary files differindex 5adbd5e1c..79b344645 100644 --- a/images/collapse.png +++ b/images/collapse.png diff --git a/images/cross.png b/images/cross.png Binary files differnew file mode 100644 index 000000000..1514d51a3 --- /dev/null +++ b/images/cross.png diff --git a/images/error.png b/images/error.png Binary files differnew file mode 100644 index 000000000..628cf2dae --- /dev/null +++ b/images/error.png diff --git a/images/feed.png b/images/feed.png Binary files differnew file mode 100644 index 000000000..315c4f4fa --- /dev/null +++ b/images/feed.png diff --git a/images/filter.png b/images/filter.png Binary files differnew file mode 100644 index 000000000..9757fc6ed --- /dev/null +++ b/images/filter.png diff --git a/images/folder.png b/images/folder.png Binary files differnew file mode 100644 index 000000000..784e8fa48 --- /dev/null +++ b/images/folder.png diff --git a/images/footer.png b/images/footer.png Binary files differdeleted file mode 100644 index 19c1fd3fc..000000000 --- a/images/footer.png +++ /dev/null diff --git a/images/fresh.png b/images/fresh.png Binary files differindex f5b741a19..b7bfcd15f 100644 --- a/images/fresh.png +++ b/images/fresh.png diff --git a/images/information.png b/images/information.png Binary files differnew file mode 100644 index 000000000..12cd1aef9 --- /dev/null +++ b/images/information.png diff --git a/images/label.png b/images/label.png Binary files differindex aea67c4fd..83d12924f 100644 --- a/images/label.png +++ b/images/label.png diff --git a/images/mark_set.png b/images/mark_set.png Binary files differnew file mode 100644 index 000000000..b88c85789 --- /dev/null +++ b/images/mark_set.png diff --git a/images/mark_set.svg b/images/mark_set.svg deleted file mode 100644 index 1942d14c2..000000000 --- a/images/mark_set.svg +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16.000000px" - height="16.000000px" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.42" - sodipodi:docbase="/home/fox/public_html/testbox/tt-rss/images" - sodipodi:docname="mark_set.svg" - inkscape:export-filename="/home/fox/public_html/testbox/tt-rss/images/mark_set.png" - inkscape:export-xdpi="90.000000" - inkscape:export-ydpi="90.000000"> - <defs - id="defs4" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0000000" - inkscape:pageshadow="2" - inkscape:zoom="31.678384" - inkscape:cx="6.9004349" - inkscape:cy="7.4155540" - inkscape:document-units="px" - inkscape:current-layer="layer1" - inkscape:window-width="1600" - inkscape:window-height="1131" - inkscape:window-x="0" - inkscape:window-y="25" - showguides="true" - inkscape:guide-bbox="true" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <path - sodipodi:type="star" - style="opacity:1.0000000;fill:#a8cdfd;fill-opacity:1.0000000;stroke:#4f9dfd;stroke-width:0.99999938;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" - id="path1306" - sodipodi:sides="5" - sodipodi:cx="7.3551731" - sodipodi:cy="1.6684607" - sodipodi:r1="6.3745561" - sodipodi:r2="3.1872780" - sodipodi:arg1="0.78539816" - sodipodi:arg2="1.4137167" - inkscape:flatsided="false" - inkscape:rounded="0.0000000" - inkscape:randomized="0.0000000" - d="M 11.862665,6.1759525 L 7.8537732,4.8164981 L 4.4611852,7.3482318 L 4.5152876,3.1154547 L 1.0590984,0.67126048 L 5.1014272,-0.58528520 L 6.3579728,-4.6276140 L 8.8021671,-1.1714248 L 13.034944,-1.2255272 L 10.503210,2.1670609 L 11.862665,6.1759525 z " - transform="matrix(-0.707107,-0.707107,0.707107,-0.707107,12.02111,14.98939)" /> - </g> -</svg> diff --git a/images/mark_unset.png b/images/mark_unset.png Binary files differnew file mode 100644 index 000000000..537e2f0c0 --- /dev/null +++ b/images/mark_unset.png diff --git a/images/mark_unset.svg b/images/mark_unset.svg deleted file mode 100644 index 4b31d31c4..000000000 --- a/images/mark_unset.svg +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16.000000px" - height="16.000000px" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.48.0 r9654" - sodipodi:docname="mark_unset.svg" - inkscape:export-filename="/home/fox/public_html/testbox/tt-rss/images/mark_unset.png" - inkscape:export-xdpi="90.000000" - inkscape:export-ydpi="90.000000" - version="1.1"> - <defs - id="defs4" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0000000" - inkscape:pageshadow="2" - inkscape:zoom="7.919596" - inkscape:cx="-13.509597" - inkscape:cy="-5.9527534" - inkscape:document-units="px" - inkscape:current-layer="layer1" - inkscape:window-width="1600" - inkscape:window-height="1131" - inkscape:window-x="0" - inkscape:window-y="25" - showguides="true" - inkscape:guide-bbox="true" - showgrid="false" - inkscape:window-maximized="0" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <path - sodipodi:type="star" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#88b0f0;stroke-width:0.99999938000000022;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="path1306" - sodipodi:sides="5" - sodipodi:cx="7.3551731" - sodipodi:cy="1.6684607" - sodipodi:r1="6.3745561" - sodipodi:r2="3.1872780" - sodipodi:arg1="0.78539816" - sodipodi:arg2="1.4137167" - inkscape:flatsided="false" - inkscape:rounded="0.0000000" - inkscape:randomized="0.0000000" - d="M 11.862665,6.1759525 L 7.8537732,4.8164981 L 4.4611852,7.3482318 L 4.5152876,3.1154547 L 1.0590984,0.67126048 L 5.1014272,-0.58528520 L 6.3579728,-4.6276140 L 8.8021671,-1.1714248 L 13.034944,-1.2255272 L 10.503210,2.1670609 L 11.862665,6.1759525 z " - transform="matrix(-0.707107,-0.707107,0.707107,-0.707107,12.02111,14.98939)" /> - </g> -</svg> diff --git a/images/new_version.png b/images/new_version.png Binary files differindex 878f7a4fb..1ebb19324 100644 --- a/images/new_version.png +++ b/images/new_version.png diff --git a/images/page_white_go.png b/images/page_white_go.png Binary files differnew file mode 100644 index 000000000..7e62a924b --- /dev/null +++ b/images/page_white_go.png diff --git a/images/plugin.png b/images/plugin.png Binary files differnew file mode 100644 index 000000000..6187b15ae --- /dev/null +++ b/images/plugin.png diff --git a/images/plugin_disabled.png b/images/plugin_disabled.png Binary files differnew file mode 100644 index 000000000..f4f6be59c --- /dev/null +++ b/images/plugin_disabled.png diff --git a/images/pub_set.png b/images/pub_set.png Binary files differnew file mode 100644 index 000000000..315c4f4fa --- /dev/null +++ b/images/pub_set.png diff --git a/images/pub_set.svg b/images/pub_set.svg deleted file mode 100644 index c13a5c31b..000000000 --- a/images/pub_set.svg +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.1" - width="16" - height="16" - id="RSSicon" - viewBox="0 0 32 32" - inkscape:version="0.48.0 r9654" - sodipodi:docname="mark_set.svg"> - <metadata - id="metadata34"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1600" - inkscape:window-height="1137" - id="namedview32" - showgrid="false" - inkscape:zoom="23.953242" - inkscape:cx="6.5252922" - inkscape:cy="10.694533" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" - inkscape:current-layer="RSSicon" /> - <defs - id="defs3"> - <linearGradient - x1="30.059999" - y1="30.059999" - x2="225.94" - y2="225.94" - id="RSSg" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(0,-224)"> - <stop - offset="0.0" - stop-color="#E3702D" - id="stop6" /> - <stop - offset="0.1071" - stop-color="#EA7D31" - id="stop8" /> - <stop - offset="0.3503" - stop-color="#F69537" - id="stop10" /> - <stop - offset="0.5" - stop-color="#FB9E3A" - id="stop12" /> - <stop - offset="0.7016" - stop-color="#EA7C31" - id="stop14" /> - <stop - offset="0.8866" - stop-color="#DE642B" - id="stop16" /> - <stop - offset="1.0" - stop-color="#D95B29" - id="stop18" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#RSSg" - id="linearGradient3029" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(0,-224)" - x1="30.059999" - y1="30.059999" - x2="225.94" - y2="225.94" /> - <filter - id="filter3031" - inkscape:label="Desaturate" - x="0" - y="0" - width="1" - height="1" - inkscape:menu="Color" - inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero" - color-interpolation-filters="sRGB"> - <feColorMatrix - id="feColorMatrix3033" - type="saturate" - values="0" /> - </filter> - <filter - id="filter3035" - inkscape:label="Desaturate" - x="0" - y="0" - width="1" - height="1" - inkscape:menu="Color" - inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero" - color-interpolation-filters="sRGB"> - <feColorMatrix - id="feColorMatrix3037" - type="saturate" - values="0" /> - </filter> - </defs> - <g - id="g3021" - transform="matrix(0.10305878,0,0,0.10305878,2.808475,25.893644)" - style="opacity:1"> - <rect - style="fill:#cc5d15;" - id="rect20" - y="-224" - x="0" - ry="55" - rx="55" - height="256" - width="256" /> - <rect - style="fill:#f49c52;" - id="rect22" - y="-219" - x="5" - ry="50" - rx="50" - height="246" - width="246" /> - <rect - style="fill:url(#linearGradient3029);" - id="rect24" - y="-214" - x="10" - ry="47" - rx="47" - height="236" - width="236" /> - <circle - transform="translate(0,-224)" - style="fill:#ffffff;" - sodipodi:ry="24" - sodipodi:rx="24" - sodipodi:cy="189" - sodipodi:cx="68" - id="circle26" - r="24" - cy="189" - cx="68" - d="m 92,189 c 0,13.25483 -10.745166,24 -24,24 -13.254834,0 -24,-10.74517 -24,-24 0,-13.25483 10.745166,-24 24,-24 13.254834,0 24,10.74517 24,24 z" /> - <path - style="fill:#ffffff;" - inkscape:connector-curvature="0" - id="path28" - d="M 160,-11 H 126 A 82,82 0 0 0 44,-93 v -34 a 116,116 0 0 1 116,116 z" /> - <path - style="fill:#ffffff;" - inkscape:connector-curvature="0" - id="path30" - d="M 184,-11 A 140,140 0 0 0 44,-151 v -35 a 175,175 0 0 1 175,175 z" /> - </g> -</svg> diff --git a/images/pub_unset.png b/images/pub_unset.png Binary files differnew file mode 100644 index 000000000..3629d4cb8 --- /dev/null +++ b/images/pub_unset.png diff --git a/images/pub_unset.svg b/images/pub_unset.svg deleted file mode 100644 index 7b823fc5e..000000000 --- a/images/pub_unset.svg +++ /dev/null @@ -1,149 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.1" - width="16" - height="16" - id="RSSicon" - viewBox="0 0 32 32" - inkscape:version="0.48.4 r9939" - sodipodi:docname="pub_unset.svg"> - <metadata - id="metadata34"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1600" - inkscape:window-height="1137" - id="namedview32" - showgrid="false" - inkscape:zoom="23.953242" - inkscape:cx="6.0451902" - inkscape:cy="5.8935127" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" - inkscape:current-layer="RSSicon" /> - <defs - id="defs3"> - <linearGradient - x1="30.059999" - y1="30.059999" - x2="225.94" - y2="225.94" - id="RSSg" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(0,-224)"> - <stop - offset="0.0" - stop-color="#E3702D" - id="stop6" /> - <stop - offset="0.1071" - stop-color="#EA7D31" - id="stop8" /> - <stop - offset="0.3503" - stop-color="#F69537" - id="stop10" /> - <stop - offset="0.5" - stop-color="#FB9E3A" - id="stop12" /> - <stop - offset="0.7016" - stop-color="#EA7C31" - id="stop14" /> - <stop - offset="0.8866" - stop-color="#DE642B" - id="stop16" /> - <stop - offset="1.0" - stop-color="#D95B29" - id="stop18" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#RSSg" - id="linearGradient3029" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(0,-224)" - x1="30.059999" - y1="30.059999" - x2="225.94" - y2="225.94" /> - </defs> - <rect - width="27.385" - height="27.385" - rx="5.8834963" - ry="5.8834963" - x="2.3074989" - y="2.3075001" - id="rect20" - style="fill:#909090;fill-opacity:1" /> - <rect - width="26.315275" - height="26.315275" - rx="5.3486328" - ry="5.3486328" - x="2.8423624" - y="2.8423634" - id="rect22" - style="fill:#a0a0a0;fill-opacity:0.94117647" /> - <rect - width="25.245548" - height="25.245548" - rx="5.0277152" - ry="5.0277152" - x="3.3772256" - y="3.3772268" - id="rect24" - style="fill:#c0c0c0;fill-opacity:1" /> - <circle - d="m 92,189 c 0,13.25483 -10.745166,24 -24,24 -13.254834,0 -24,-10.74517 -24,-24 0,-13.25483 10.745166,-24 24,-24 13.254834,0 24,10.74517 24,24 z" - cx="68" - cy="189" - r="24" - id="circle26" - sodipodi:cx="68" - sodipodi:cy="189" - sodipodi:rx="24" - sodipodi:ry="24" - style="fill:#ffffff" - transform="matrix(0.10697266,0,0,0.10697266,2.307499,2.3075002)" /> - <path - d="M 19.423125,25.092677 H 15.786054 A 8.7717581,8.7717581 0 0 0 7.014296,16.320919 v -3.637071 a 12.408829,12.408829 0 0 1 12.408829,12.408829 z" - id="path28" - inkscape:connector-curvature="0" - style="fill:#ffffff" /> - <path - d="M 21.990468,25.092677 A 14.976172,14.976172 0 0 0 7.014296,10.116504 V 6.3724612 A 18.720216,18.720216 0 0 1 25.734512,25.092677 z" - id="path30" - inkscape:connector-curvature="0" - style="fill:#ffffff" /> -</svg> diff --git a/images/recently_read.png b/images/recently_read.png Binary files differdeleted file mode 100644 index ac1bf1782..000000000 --- a/images/recently_read.png +++ /dev/null diff --git a/images/score_half_high.png b/images/score_half_high.png Binary files differindex 205429aba..b7c82dfe6 100644 --- a/images/score_half_high.png +++ b/images/score_half_high.png diff --git a/images/score_half_low.png b/images/score_half_low.png Binary files differindex 62da70043..5d4b43679 100644 --- a/images/score_half_low.png +++ b/images/score_half_low.png diff --git a/images/score_high.png b/images/score_high.png Binary files differindex 0ab5c07cb..058ad261f 100644 --- a/images/score_high.png +++ b/images/score_high.png diff --git a/images/score_low.png b/images/score_low.png Binary files differindex 7a18affc9..57619706d 100644 --- a/images/score_low.png +++ b/images/score_low.png diff --git a/images/score_neutral.png b/images/score_neutral.png Binary files differindex 22d44f8ef..a9af8d44b 100644 --- a/images/score_neutral.png +++ b/images/score_neutral.png diff --git a/images/sign_excl.svg b/images/sign_excl.svg deleted file mode 100644 index eb5e6dd20..000000000 --- a/images/sign_excl.svg +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="32px" - height="32px" - id="svg7311" - version="1.1" - inkscape:version="0.48.0 r9654" - sodipodi:docname="sign_excl.svg"> - <defs - id="defs7313" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="11.197802" - inkscape:cx="-11.862611" - inkscape:cy="16" - inkscape:current-layer="layer1" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1600" - inkscape:window-height="1137" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" /> - <metadata - id="metadata7316"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="fill:#eb6363;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" - id="path6540-7" - sodipodi:cx="3.409934" - sodipodi:cy="4.3416462" - sodipodi:rx="14.271205" - sodipodi:ry="14.271205" - d="m 17.681139,4.3416462 a 14.271205,14.271205 0 1 1 -28.54241,0 14.271205,14.271205 0 1 1 28.54241,0 z" - transform="translate(12.590066,11.658354)" - inkscape:export-xdpi="73.07" - inkscape:export-ydpi="73.07" /> - <text - xml:space="preserve" - style="font-size:40px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Times New Roman;-inkscape-font-specification:Times New Roman" - x="11.482422" - y="24.308594" - id="text6542-9" - sodipodi:linespacing="125%"><tspan - sodipodi:role="line" - id="tspan6544-5" - x="11.482422" - y="24.308594" - style="font-size:24px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1;font-family:Georgia;-inkscape-font-specification:Georgia Bold">!</tspan></text> - </g> -</svg> diff --git a/images/sign_info.svg b/images/sign_info.svg deleted file mode 100644 index b5a3e9f4d..000000000 --- a/images/sign_info.svg +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="32px" - height="32px" - id="svg2985" - version="1.1" - inkscape:version="0.48.0 r9654" - sodipodi:docname="sign_info.svg" - inkscape:export-filename="Y:\public_html\testbox\tt-rss\images\sign_info.png" - inkscape:export-xdpi="67.5" - inkscape:export-ydpi="67.5"> - <defs - id="defs2987" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="2.7994505" - inkscape:cx="6.8311272" - inkscape:cy="-22.339561" - inkscape:current-layer="layer1" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1600" - inkscape:window-height="1137" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" /> - <metadata - id="metadata2990"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="fill:#88b0f0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" - id="path6540" - sodipodi:cx="3.409934" - sodipodi:cy="4.3416462" - sodipodi:rx="14.271205" - sodipodi:ry="14.271205" - d="m 17.681139,4.3416462 a 14.271205,14.271205 0 1 1 -28.54241,0 14.271205,14.271205 0 1 1 28.54241,0 z" - transform="translate(12.590066,11.658354)" - inkscape:export-xdpi="73.07" - inkscape:export-ydpi="73.07" /> - <text - xml:space="preserve" - style="font-size:40px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Times New Roman;-inkscape-font-specification:Times New Roman" - x="11.763672" - y="25.070313" - id="text6542" - sodipodi:linespacing="125%"><tspan - sodipodi:role="line" - id="tspan6544" - x="11.763672" - y="25.070313" - style="font-size:24px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1;font-family:Georgia;-inkscape-font-specification:Georgia Bold">i</tspan></text> - </g> -</svg> diff --git a/images/star.png b/images/star.png Binary files differnew file mode 100644 index 000000000..b88c85789 --- /dev/null +++ b/images/star.png diff --git a/images/tag.png b/images/tag.png Binary files differindex 5fe6596ec..80547e927 100644 --- a/images/tag.png +++ b/images/tag.png diff --git a/images/time.png b/images/time.png Binary files differnew file mode 100644 index 000000000..911da3f1d --- /dev/null +++ b/images/time.png diff --git a/images/user.png b/images/user.png Binary files differnew file mode 100644 index 000000000..79f35ccbd --- /dev/null +++ b/images/user.png diff --git a/include/functions.php b/include/functions.php index 355eec2cd..35edd8d1a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -71,7 +71,6 @@ "hu_HU" => "Magyar (Hungarian)", "it_IT" => "Italiano", "ja_JP" => "日本語 (Japanese)", - "ko_KR" => "한국어 (Korean)", "lv_LV" => "Latviešu", "nb_NO" => "Norwegian bokmål", "nl_NL" => "Dutch", @@ -1059,7 +1058,7 @@ $date_qpart = "date_entered < DATE_SUB(NOW(), INTERVAL 1 WEEK) "; } break; - case "2week": + case "2weeks": if (DB_TYPE == "pgsql") { $date_qpart = "date_entered < NOW() - INTERVAL '2 week' "; } else { @@ -1502,7 +1501,11 @@ foreach ($feeds as $feed) { $cv = array("id" => PluginHost::pfeed_to_feed_id($feed['id']), "counter" => $feed['sender']->get_unread($feed['id'])); - array_push($ret_arr, $cv); + + if (method_exists($feed['sender'], 'get_total')) + $cv["auxcounter"] = $feed['sender']->get_total($feed['id']); + + array_push($ret_arr, $cv); } } @@ -1876,19 +1879,19 @@ return "images/archive.png"; break; case -1: - return "images/mark_set.svg"; + return "images/star.png"; break; case -2: - return "images/pub_set.svg"; + return "images/feed.png"; break; case -3: return "images/fresh.png"; break; case -4: - return "images/tag.png"; + return "images/folder.png"; break; case -6: - return "images/recently_read.png"; + return "images/time.png"; break; default: if ($id < LABEL_BASE_INDEX) { @@ -2314,7 +2317,7 @@ return $rv; } - function queryFeedHeadlines($feed, $limit, $view_mode, $cat_view, $search, $search_mode, $override_order = false, $offset = 0, $owner_uid = 0, $filter = false, $since_id = 0, $include_children = false, $ignore_vfeed_group = false) { + function queryFeedHeadlines($feed, $limit, $view_mode, $cat_view, $search, $search_mode, $override_order = false, $offset = 0, $owner_uid = 0, $filter = false, $since_id = 0, $include_children = false, $ignore_vfeed_group = false, $override_strategy = false, $override_vfeed = false) { if (!$owner_uid) $owner_uid = $_SESSION["uid"]; @@ -2516,6 +2519,11 @@ $allow_archived = true; if (!$override_order) $override_order = "last_read DESC"; + +/* } else if ($feed == -7) { // shared + $query_strategy_part = "uuid != ''"; + $vfeed_query_part = "ttrss_feeds.title AS feed_title,"; + $allow_archived = true; */ } else if ($feed == -3) { // fresh virtual feed $query_strategy_part = "unread = true AND score >= 0"; @@ -2557,6 +2565,14 @@ $order_by = $override_order; } + if ($override_strategy) { + $query_strategy_part = $override_strategy; + } + + if ($override_vfeed) { + $vfeed_query_part = $override_vfeed; + } + $feed_title = ""; if ($search) { @@ -2579,7 +2595,9 @@ } } - $content_query_part = "content as content_preview, cached_content, "; + + $content_query_part = "content, content AS content_preview, "; + if (is_numeric($feed)) { @@ -2750,13 +2768,10 @@ if ($site_url) { - if ($entry->hasAttribute('href')) { + if ($entry->hasAttribute('href')) $entry->setAttribute('href', rewrite_relative_url($site_url, $entry->getAttribute('href'))); - $entry->setAttribute('rel', 'noreferrer'); - } - if ($entry->hasAttribute('src')) { $src = rewrite_relative_url($site_url, $entry->getAttribute('src')); @@ -2996,19 +3011,19 @@ function format_warning($msg, $id = "") { global $link; return "<div class=\"warning\" id=\"$id\"> - <span><img src=\"images/sign_excl.svg\"></span><span>$msg</span></div>"; + <span><img src=\"images/alert.png\"></span><span>$msg</span></div>"; } function format_notice($msg, $id = "") { global $link; return "<div class=\"notice\" id=\"$id\"> - <span><img src=\"images/sign_info.svg\"></span><span>$msg</span></div>"; + <span><img src=\"images/information.png\"></span><span>$msg</span></div>"; } function format_error($msg, $id = "") { global $link; return "<div class=\"error\" id=\"$id\"> - <span><img src=\"images/sign_excl.svg\"></span><span>$msg</span></div>"; + <span><img src=\"images/alert.png\"></span><span>$msg</span></div>"; } function print_notice($msg) { @@ -3106,8 +3121,7 @@ tag_cache, author, orig_feed_id, - note, - cached_content + note FROM ttrss_entries,ttrss_user_entries WHERE id = '$id' AND ref_id = id AND owner_uid = $owner_uid"); @@ -3788,7 +3802,7 @@ * @return string Absolute URL */ function rewrite_relative_url($url, $rel_url) { - if (strpos($rel_url, "magnet:") === 0) { + if (strpos($rel_url, ":") !== false) { return $rel_url; } else if (strpos($rel_url, "://") !== false) { return $rel_url; @@ -3958,6 +3972,7 @@ $reg_qpart = "REGEXP"; foreach ($filter["rules"] AS $rule) { + $rule['reg_exp'] = str_replace('/', '\/', $rule["reg_exp"]); $regexp_valid = preg_match('/' . $rule['reg_exp'] . '/', $rule['reg_exp']) !== FALSE; @@ -4092,7 +4107,9 @@ return in_array($interface, class_implements($class)); } - function geturl($url){ + function geturl($url, $depth = 0){ + + if ($depth == 20) return $url; if (!function_exists('curl_init')) return user_error('CURL Must be installed for geturl function to work. Ask your host to enable it or uncomment extension=php_curl.dll in php.ini', E_USER_ERROR); @@ -4131,7 +4148,7 @@ preg_match("/(Location:|URI:)[^(\n)]*/", $header, $matches); $url = trim(str_replace($matches[1],"",$matches[0])); $url_parsed = parse_url($url); - return (isset($url_parsed))? geturl($url):''; + return (isset($url_parsed))? geturl($url, $depth + 1):''; } global $fetch_last_error; diff --git a/include/rssfuncs.php b/include/rssfuncs.php index e2837a3b5..cfb0e7a46 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -671,7 +671,6 @@ updated, content, content_hash, - cached_content, no_orig_date, date_updated, date_entered, @@ -686,7 +685,6 @@ '$entry_timestamp_fmt', '$entry_content', '$content_hash', - '', $no_orig_date, NOW(), '$date_feed_processed', diff --git a/include/sessions.php b/include/sessions.php index 423ef0eda..66214afe7 100644 --- a/include/sessions.php +++ b/include/sessions.php @@ -62,11 +62,17 @@ return false; } - if ($_SESSION["ref_schema_version"] != session_get_schema_version(true)) + if ($_SESSION["ref_schema_version"] != session_get_schema_version(true)) { + $_SESSION["login_error_msg"] = + __("Session failed to validate (schema version changed)"); return false; + } - if (sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION["user_agent"]) + if (sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION["user_agent"]) { + $_SESSION["login_error_msg"] = + __("Session failed to validate (user agent changed)"); return false; + } if ($_SESSION["uid"]) { $result = Db::get()->query( @@ -74,11 +80,19 @@ // user not found if (Db::get()->num_rows($result) == 0) { + + $_SESSION["login_error_msg"] = + __("Session failed to validate (user not found)"); + return false; } else { $pwd_hash = Db::get()->fetch_result($result, 0, "pwd_hash"); if ($pwd_hash != $_SESSION["pwd_hash"]) { + + $_SESSION["login_error_msg"] = + __("Session failed to validate (password changed)"); + return false; } } @@ -210,7 +210,7 @@ <button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true" title="<?php echo __("Communication problem with server.") ?>"> <img - src="images/alert.png" /> + src="images/error.png" /> </button> <button id="newVersionIcon" dojoType="dijit.form.Button" style="display : none"> diff --git a/install/index.php b/install/index.php index f71a779fa..440954537 100644 --- a/install/index.php +++ b/install/index.php @@ -80,13 +80,13 @@ } function print_error($msg) { - print "<div class='error'><span><img src='../images/sign_excl.svg'></span> + print "<div class='error'><span><img src='../images/alert.png'></span> <span>$msg</span></div>"; } function print_notice($msg) { print "<div class=\"notice\"> - <span><img src=\"../images/sign_info.svg\"></span><span>$msg</span></div>"; + <span><img src=\"../images/information.png\"></span><span>$msg</span></div>"; } function db_connect($host, $user, $pass, $db, $type, $port = false) { diff --git a/js/PrefFilterTree.js b/js/PrefFilterTree.js index 4e49075bd..d9391c135 100644 --- a/js/PrefFilterTree.js +++ b/js/PrefFilterTree.js @@ -32,6 +32,14 @@ dojo.declare("fox.PrefFilterTree", lib.CheckBoxTree, { dojo.place(param, tnode.rowNode, 'first'); } + if (this.model.store.getValue(args.item, 'id') != 'root') { + var img = dojo.doc.createElement('img'); + img.src ='images/filter.png'; + img.className = 'markedPic'; + tnode._filterIconNode = img; + dojo.place(tnode._filterIconNode, tnode.labelNode, 'before'); + } + return tnode; }, diff --git a/js/PrefLabelTree.js b/js/PrefLabelTree.js index 05a0c15b6..2f7dc0f53 100644 --- a/js/PrefLabelTree.js +++ b/js/PrefLabelTree.js @@ -22,7 +22,7 @@ dojo.declare("fox.PrefLabelTree", lib.CheckBoxTree, { if (type == 'label') { var span = dojo.doc.createElement('span'); span.innerHTML = 'α'; - span.className = 'labelColorIndicator2'; + span.className = 'labelColorIndicator'; span.id = 'LICID-' + bare_id; span.setStyle({ @@ -38,6 +38,6 @@ dojo.declare("fox.PrefLabelTree", lib.CheckBoxTree, { }, getIconClass: function (item, opened) { return (!item || this.model.mayHaveChildren(item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "invisible"; - }, + }, }); diff --git a/js/functions.js b/js/functions.js index 8691c1ee5..c75fb95cb 100644 --- a/js/functions.js +++ b/js/functions.js @@ -226,13 +226,13 @@ function notify_real(msg, no_hide, n_type) { no_hide = true; } else if (n_type == 3) { n.className = "notify error"; - msg = "<span><img src='images/sign_excl.svg'></span>" + msg; + msg = "<span><img src='images/alert.png'></span>" + msg; } else if (n_type == 4) { n.className = "notify info"; - msg = "<span><img src='images/sign_info.svg'></span>" + msg; + msg = "<span><img src='images/information.png'></span>" + msg; } - msg += " <span><img src=\"images/close_notify.svg\" class=\"close\" title=\"" + + msg += " <span><img src=\"images/cross.png\" class=\"close\" title=\"" + __("Click to close") + "\" onclick=\"notify('')\"></span>"; // msg = "<img src='images/live_com_loading.gif'> " + msg; diff --git a/js/prefs.js b/js/prefs.js index 287804c6f..67a4a378c 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -1529,25 +1529,6 @@ function clearFeedAccessKeys() { return false; } -function clearArticleAccessKeys() { - - var ok = confirm(__("This will invalidate all previously shared article URLs. Continue?")); - - if (ok) { - notify_progress("Clearing URLs..."); - - var query = "?op=rpc&method=clearArticleKeys"; - - new Ajax.Request("backend.php", { - parameters: query, - onComplete: function(transport) { - notify_info("Shared URLs cleared."); - } }); - } - - return false; -} - function resetFilterOrder() { try { notify_progress("Loading, please wait..."); diff --git a/js/tt-rss.js b/js/tt-rss.js index a1d7d6411..46e282351 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -847,11 +847,16 @@ function hotkey_handler(e) { var keycode = false; var shift_key = false; + var ctrl_key = false; + var alt_key = false; + var meta_key = false; var cmdline = $('cmdline'); shift_key = e.shiftKey; ctrl_key = e.ctrlKey; + alt_key = e.altKey; + meta_key = e.metaKey; if (window.event) { keycode = window.event.keyCode; @@ -893,6 +898,8 @@ function hotkey_handler(e) { // ensure ^*char notation if (shift_key) hotkey = "*" + hotkey; if (ctrl_key) hotkey = "^" + hotkey; + if (alt_key) hotkey = "+" + hotkey; + if (meta_key) hotkey = "%" + hotkey; hotkey = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey; hotkey_prefix = false; diff --git a/js/viewfeed.js b/js/viewfeed.js index 5875a9e48..1785fe3f5 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1274,6 +1274,7 @@ function headlines_scroll_handler(e) { // set topmost child in the buffer as active if (getInitParam("cdm_auto_catchup") == 1 && + getSelectedArticleIds2().length <= 1 && (!isCdmMode() || getInitParam("cdm_expanded"))) { var rows = $$("#headlines-frame > div[id*=RROW]"); @@ -1314,7 +1315,7 @@ function headlines_scroll_handler(e) { if (hsp) hsp.innerHTML = ""; } - if (getInitParam("cdm_expanded") && isCdmMode()) { + if (isCdmMode()) { updateFloatingTitle(); } @@ -1488,6 +1489,12 @@ function cdmCollapseArticle(event, id, unmark) { if (event) Event.stop(event); PluginHost.run(PluginHost.HOOK_ARTICLE_COLLAPSED, id); + + if (row.offsetTop < $("headlines-frame").scrollTop) + scrollToRowId(row.id); + + Element.hide("floatingTitle"); + $("floatingTitle").setAttribute("rowid", false); } } catch (e) { @@ -2214,27 +2221,49 @@ function openSelectedAttachment(elem) { } } +function scrollToRowId(id) { + try { + var row = $(id); + + if (row) + $("headlines-frame").scrollTop = row.offsetTop; + + } catch (e) { + exception_error("scrollToRowId", e); + } +} + function updateFloatingTitle() { try { var hf = $("headlines-frame"); - var child = $("RROW-" + _active_article_id); - if (child && child.offsetTop + child.offsetHeight > hf.scrollTop) { + var elems = $$("#headlines-frame > div[id*=RROW]"); - var header = child.getElementsByClassName("cdmHeader")[0]; + for (var i = 0; i < elems.length; i++) { - if (child.id != $("floatingTitle").getAttribute("rowid")) { - $("floatingTitle").setAttribute("rowid", child.id); - $("floatingTitle").innerHTML = header.innerHTML; + var child = elems[i]; - PluginHost.run(PluginHost.HOOK_FLOATING_TITLE, child); - } + if (child && child.offsetTop + child.offsetHeight > hf.scrollTop) { - if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 && - child.offsetTop + child.offsetHeight - hf.scrollTop > 100) - Element.show("floatingTitle"); - else - Element.hide("floatingTitle"); + var header = child.getElementsByClassName("cdmHeader")[0]; + + if (child.id != $("floatingTitle").getAttribute("rowid")) { + $("floatingTitle").setAttribute("rowid", child.id); + $("floatingTitle").innerHTML = header.innerHTML; + $("floatingTitle").firstChild.innerHTML = "<img class='anchor markedPic' src='images/page_white_go.png' onclick=\"scrollToRowId('"+child.id+"')\">" + $("floatingTitle").firstChild.innerHTML; + + PluginHost.run(PluginHost.HOOK_FLOATING_TITLE, child); + } + + if (child.offsetTop < hf.scrollTop - header.offsetHeight && + child.offsetTop + child.offsetHeight - hf.scrollTop > header.offsetHeight) + Element.show("floatingTitle"); + else + Element.hide("floatingTitle"); + + return; + + } } } catch (e) { diff --git a/plugins/close_button/button.png b/plugins/close_button/button.png Binary files differindex b04aed796..1514d51a3 100644 --- a/plugins/close_button/button.png +++ b/plugins/close_button/button.png diff --git a/plugins/googlereaderimport/init.php b/plugins/googlereaderimport/init.php index 2e22161b9..dcb335a0d 100644 --- a/plugins/googlereaderimport/init.php +++ b/plugins/googlereaderimport/init.php @@ -114,6 +114,7 @@ class GoogleReaderImport extends Plugin { $guid = db_escape_string(mb_substr($item['id'], 0, 250)); $title = db_escape_string($item['title']); $updated = date('Y-m-d h:i:s', $item['updated']); + $last_marked = date('Y-m-d h:i:s', mb_substr($item['crawlTimeMsec'], 0, 10)); $link = ''; $content = ''; $author = db_escape_string($item['author']); @@ -165,7 +166,7 @@ class GoogleReaderImport extends Plugin { $imported += (int) $this->create_article($owner_uid, $guid, $title, $link, $updated, $content, $author, $sql_set_marked, $tags, - $orig_feed_data); + $orig_feed_data, $last_marked); if ($file && $processed % 25 == 0) { _debug("processed $processed articles..."); @@ -196,7 +197,7 @@ class GoogleReaderImport extends Plugin { } // expects ESCAPED data - private function create_article($owner_uid, $guid, $title, $link, $updated, $content, $author, $marked, $tags, $orig_feed_data) { + private function create_article($owner_uid, $guid, $title, $link, $updated, $content, $author, $marked, $tags, $orig_feed_data, $last_marked) { if (!$guid) $guid = sha1($link); @@ -299,7 +300,7 @@ class GoogleReaderImport extends Plugin { (ref_id, uuid, feed_id, orig_feed_id, owner_uid, marked, tag_cache, label_cache, last_read, note, unread, last_marked) VALUES - ('$ref_id', '', NULL, $orig_feed_id, $owner_uid, $marked, '', '', NOW(), '', false, NOW())"); + ('$ref_id', '', NULL, $orig_feed_id, $owner_uid, $marked, '', '', '$last_marked', '', false, '$last_marked')"); $result = db_query("SELECT int_id FROM ttrss_user_entries, ttrss_entries WHERE owner_uid = $owner_uid AND ref_id = id AND ref_id = $ref_id"); diff --git a/plugins/mail/mail.png b/plugins/mail/mail.png Binary files differindex 4d3fe7751..7348aed77 100644 --- a/plugins/mail/mail.png +++ b/plugins/mail/mail.png diff --git a/plugins/mailto/mail.png b/plugins/mailto/mail.png Binary files differindex fcdcbd604..2c49f78a6 100644 --- a/plugins/mailto/mail.png +++ b/plugins/mailto/mail.png diff --git a/plugins/mark_button/init.php b/plugins/mark_button/init.php index 971b12932..4cdff53d0 100644 --- a/plugins/mark_button/init.php +++ b/plugins/mark_button/init.php @@ -21,12 +21,12 @@ class Mark_Button extends Plugin { if (get_pref("COMBINED_DISPLAY_MODE")) { if (sql_bool_to_bool($line["marked"])) { $marked_pic = "<img - src=\"images/mark_set.svg\" + src=\"images/mark_set.png\" class=\"markedPic\" alt=\"Unstar article\" onclick='toggleMark($id)'>"; } else { $marked_pic = "<img - src=\"images/mark_unset.svg\" + src=\"images/mark_unset.png\" class=\"markedPic\" alt=\"Star article\" onclick='toggleMark($id)'>"; } diff --git a/plugins/note/note.png b/plugins/note/note.png Binary files differindex 7f9f3fc3f..244e6ca04 100644 --- a/plugins/note/note.png +++ b/plugins/note/note.png diff --git a/plugins/share/init.php b/plugins/share/init.php index 72a4d4bf9..552aa0a31 100644 --- a/plugins/share/init.php +++ b/plugins/share/init.php @@ -12,12 +12,62 @@ class Share extends Plugin { $this->host = $host; $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); + $host->add_hook($host::HOOK_PREFS_TAB_SECTION, $this); } function get_js() { return file_get_contents(dirname(__FILE__) . "/share.js"); } + function get_prefs_js() { + return file_get_contents(dirname(__FILE__) . "/share_prefs.js"); + } + + + function unshare() { + $id = db_escape_string($_REQUEST['id']); + + db_query("UPDATE ttrss_user_entries SET uuid = '' WHERE int_id = '$id' + AND owner_uid = " . $_SESSION['uid']); + + print "OK"; + } + + function hook_prefs_tab_section($id) { + if ($id == "prefFeedsPublishedGenerated") { + + print_warning(__("You can disable all articles shared by unique URLs here.")); + + print "<p>"; + + print "<button dojoType=\"dijit.form.Button\" onclick=\"return clearArticleAccessKeys()\">". + __('Unshare all articles')."</button> "; + + print "</p>"; + + } + } + + // Silent + function clearArticleKeys() { + db_query("UPDATE ttrss_user_entries SET uuid = '' WHERE + owner_uid = " . $_SESSION["uid"]); + + return; + } + + + function newkey() { + $id = db_escape_string($_REQUEST['id']); + + $uuid = db_escape_string(sha1(uniqid(rand(), true))); + + db_query("UPDATE ttrss_user_entries SET uuid = '$uuid' WHERE int_id = '$id' + AND owner_uid = " . $_SESSION['uid']); + + print json_encode(array("link" => $uuid)); + } + function hook_article_button($line) { return "<img src=\"plugins/share/share.png\" class='tagsPic' style=\"cursor : pointer\" @@ -50,7 +100,7 @@ class Share extends Plugin { $url_path .= "/public.php?op=share&key=$uuid"; print "<div class=\"tagCloudContainer\">"; - print "<a id='pub_opml_url' href='$url_path' target='_blank'>$url_path</a>"; + print "<a id='gen_article_url' href='$url_path' target='_blank'>$url_path</a>"; print "</div>"; /* if (!label_find_id(__('Shared'), $_SESSION["uid"])) @@ -61,6 +111,12 @@ class Share extends Plugin { print "<div align='center'>"; + print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('shareArticleDlg').unshare()\">". + __('Unshare article')."</button>"; + + print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('shareArticleDlg').newurl()\">". + __('Generate new URL')."</button>"; + print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('shareArticleDlg').hide()\">". __('Close this window')."</button>"; diff --git a/plugins/share/share.js b/plugins/share/share.js index 6752189ea..bbfb553d5 100644 --- a/plugins/share/share.js +++ b/plugins/share/share.js @@ -9,12 +9,69 @@ function shareArticle(id) { id: "shareArticleDlg", title: __("Share article by URL"), style: "width: 600px", + newurl: function() { + + var ok = confirm(__("Generate new share URL for this article?")); + + if (ok) { + + notify_progress("Trying to change URL...", true); + + var query = "op=pluginhandler&plugin=share&method=newkey&id=" + param_escape(id); + + new Ajax.Request("backend.php", { + parameters: query, + onComplete: function(transport) { + var reply = JSON.parse(transport.responseText); + var new_link = reply.link; + + var e = $('gen_article_url'); + + if (new_link) { + + e.innerHTML = e.innerHTML.replace(/\&key=.*$/, + "&key=" + new_link); + + e.href = e.href.replace(/\&key=.*$/, + "&key=" + new_link); + + new Effect.Highlight(e); + + notify(''); + + } else { + notify_error("Could not change URL."); + } + } }); + + } + + }, + unshare: function() { + + var ok = confirm(__("Remove sharing for this article?")); + + if (ok) { + + notify_progress("Trying to unshare...", true); + + var query = "op=pluginhandler&plugin=share&method=unshare&id=" + param_escape(id); + + new Ajax.Request("backend.php", { + parameters: query, + onComplete: function(transport) { + notify("Article unshared."); + dialog.hide(); + } }); + } + + }, href: query}); dialog.show(); } catch (e) { - exception_error("emailArticle", e); + exception_error("shareArticle", e); } } diff --git a/plugins/share/share.png b/plugins/share/share.png Binary files differindex 3b6398f4a..25eacb7c2 100644 --- a/plugins/share/share.png +++ b/plugins/share/share.png diff --git a/plugins/share/share_prefs.js b/plugins/share/share_prefs.js new file mode 100644 index 000000000..9efe291f9 --- /dev/null +++ b/plugins/share/share_prefs.js @@ -0,0 +1,21 @@ +function clearArticleAccessKeys() { + + var ok = confirm(__("This will invalidate all previously shared article URLs. Continue?")); + + if (ok) { + notify_progress("Clearing URLs..."); + + var query = "?op=pluginhandler&plugin=share&method=clearArticleKeys"; + + new Ajax.Request("backend.php", { + parameters: query, + onComplete: function(transport) { + notify_info("Shared URLs cleared."); + } }); + } + + return false; +} + + + diff --git a/plugins/updater/init.php b/plugins/updater/init.php index fa283c8be..69d9b08b2 100644 --- a/plugins/updater/init.php +++ b/plugins/updater/init.php @@ -24,6 +24,8 @@ class Updater extends Plugin { // __FILE__ is in plugins/updater so we need to go one level up $work_dir = dirname(dirname(dirname(__FILE__))); $parent_dir = dirname($work_dir); + // Set PATH to run "which" + putenv('PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"'); $log = array(); if (!is_array($params)) $params = array(); diff --git a/plugins/vf_shared/init.php b/plugins/vf_shared/init.php new file mode 100644 index 000000000..00d288c05 --- /dev/null +++ b/plugins/vf_shared/init.php @@ -0,0 +1,60 @@ +<?php +class VF_Shared extends Plugin { + + private $host; + + function about() { + return array(1.0, + "Feed for all articles actively shared by URL", + "fox", + false); + } + + function init($host) { + $this->host = $host; + + $host->add_feed(-1, __("Shared articles"), 'plugins/vf_shared/share.png', $this); + } + + function api_version() { + return 2; + } + + function get_unread($feed_id) { + $result = db_query("select count(int_id) AS count from ttrss_user_entries where owner_uid = ".$_SESSION["uid"]." and unread = true and uuid != ''"); + + return db_fetch_result($result, 0, "count"); + } + + function get_total($feed_id) { + $result = db_query("select count(int_id) AS count from ttrss_user_entries where owner_uid = ".$_SESSION["uid"]." and uuid != ''"); + + return db_fetch_result($result, 0, "count"); + } + + //function queryFeedHeadlines($feed, $limit, $view_mode, $cat_view, $search, $search_mode, $override_order = false, $offset = 0, $owner_uid = 0, $filter = false, $since_id = 0, $include_children = false, $ignore_vfeed_group = false, $override_strategy = false, $override_vfeed = false) { + + function get_headlines($feed_id, $options) { + $qfh_ret = queryFeedHeadlines(-4, + $options['limit'], + $this->get_unread() > 0 ? "adaptive" : "all_articles", + false, + $options['search'], + $options['search_mode'], + $options['override_order'], + $options['offset'], + $options['owner_uid'], + $options['filter'], + $options['since_id'], + $options['include_children'], + false, + "uuid != ''", + "ttrss_feeds.title AS feed_title,"); + + $qfh_ret[1] = __("Shared articles"); + + return $qfh_ret; + } + +} +?> diff --git a/plugins/vf_shared/share.png b/plugins/vf_shared/share.png Binary files differnew file mode 100644 index 000000000..25eacb7c2 --- /dev/null +++ b/plugins/vf_shared/share.png diff --git a/templates/generated_feed.txt b/templates/generated_feed.txt index 6bfa50b1b..c1f921c45 100644 --- a/templates/generated_feed.txt +++ b/templates/generated_feed.txt @@ -20,6 +20,9 @@ <content type="html"><![CDATA[${ARTICLE_CONTENT}]]></content> <updated>${ARTICLE_UPDATED_ATOM}</updated> <author><name>${ARTICLE_AUTHOR}</name></author> + <source> + <link rel="self" href="${ARTICLE_SOURCE_LINK}"/> + <title>${ARTICLE_SOURCE_TITLE}</title></source> <!-- $BeginBlock category --> <category term="${ARTICLE_CATEGORY}"/> <!-- $EndBlock category --> |