From eedfb635ddde041201c6b5cd683c60cd6ba2ad12 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Sep 2008 08:36:57 +0100 Subject: [PATCH] add function to open article summary in a popup window --- backend.php | 2 ++ functions.php | 55 +++++++++++++++++++++++++++++++++++++------- images/art-zoom.png | Bin 0 -> 229 bytes viewfeed.js | 11 +++++++++ 4 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 images/art-zoom.png diff --git a/backend.php b/backend.php index 116b04b5..a632fafa 100644 --- a/backend.php +++ b/backend.php @@ -227,6 +227,8 @@ if ($mode == "") { outputArticleXML($link, $id, $feed_id); + } else if ($mode == "zoom") { + outputArticleXML($link, $id, $feed_id, true, true); } else { catchupArticleById($link, $id, 0); } diff --git a/functions.php b/functions.php index 0e34af34..701d3ec5 100644 --- a/functions.php +++ b/functions.php @@ -4533,7 +4533,8 @@ return vsprintf(__(array_shift($args)), $args); } - function outputArticleXML($link, $id, $feed_id, $mark_as_read = true) { + function outputArticleXML($link, $id, $feed_id, $mark_as_read = true, + $zoom_mode = false) { /* we can figure out feed_id from article id anyway, why do we * pass feed_id here? */ @@ -4543,7 +4544,7 @@ $feed_id = db_fetch_result($result, 0, "feed_id"); - print "
+ Tiny Tiny RSS - ".$line["title"]." + + "; + } + + print "
"; print "
'; + if (!$tags_nolinks_str) $tags_nolinks_str = ''.__('no tags').''; print "
- Tags - $tags_str - (+)
-
$entry_comments
"; + Tags"; + + if (!$zoom_mode) { + print "$tags_str + (+) + Zoom"; + } else { + print "$tags_nolinks_str"; + } + print "
"; + print "
$entry_comments
"; print "
"; @@ -4750,7 +4775,16 @@ } - print "]]>
"; + if (!$zoom_mode) { + print "]]>"; + } else { + print " +
+
"; + print ""; + + } } @@ -5258,6 +5292,11 @@ print "$marked_pic "; print "$published_pic "; + print "Zoom"; $tags = get_article_tags($link, $id); diff --git a/images/art-zoom.png b/images/art-zoom.png new file mode 100644 index 0000000000000000000000000000000000000000..5f7c809556c9ac755f0dffec11a3d04631a88e0c GIT binary patch literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP;k1Z zi(`mI@7bV(f`=7&f{S9A-4dB+2#IYlPY{u4+4rE~#>uZ&UmR^zi8ed1zwnK?%N2$N z*R;5L3>g{(4ly#wcRrc3d+n@Zx#z|8SG2O{bRS$VAz1Y-h%2e5Ibkj9g5yzX5B7?C zp80d9QSE|{^$|&%PM7A&O=tGZcr*KDJ)?lqnMXHOmX-+WD=b>JFyG_QB}U`>+kX4i ZFuDW;ihnh)nFn+tgQu&X%Q~loCIH4eRc-(P literal 0 HcmV?d00001 diff --git a/viewfeed.js b/viewfeed.js index e14911a2..5813f413 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1892,3 +1892,14 @@ function invertHeadlineSelection() { function getArticleUnderPointer() { return post_under_pointer; } + +function zoomToArticle(id) { + try { + var w = window.open("backend.php?op=view&mode=zoom&id=" + param_escape(id), + "ttrss_zoom_" + id, + "status=0,toolbar=0,location=0,width=450,height=300,scrollbars=1,menubar=0"); + + } catch (e) { + exception_error("zoomToArticle", e); + } +} -- 2.39.5