summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-09-11 13:05:08 +0300
committerAndrew Dolgov <[email protected]>2015-09-11 13:05:08 +0300
commitf48f292d2b9c3274aeb742c343df1d2f536a6a65 (patch)
treef442c7756edefd348fdc78e7c6c2fdd81dd9b490 /classes
parent3857536f70057370810c70145cf8e54af5fdcd78 (diff)
tweak filter preview layout a bit; allow previewing matched articles in a popup
Diffstat (limited to 'classes')
-rw-r--r--classes/article.php4
-rwxr-xr-xclasses/pref/filters.php17
2 files changed, 11 insertions, 10 deletions
diff --git a/classes/article.php b/classes/article.php
index bcd249873..01f6b5126 100644
--- a/classes/article.php
+++ b/classes/article.php
@@ -41,12 +41,12 @@ class Article extends Handler_Protected {
} else if ($mode == "zoom") {
array_push($articles, format_article($id, true, true));
} else if ($mode == "raw") {
- if ($_REQUEST['html']) {
+ if (isset($_REQUEST['html'])) {
header("Content-Type: text/html");
print '<link rel="stylesheet" type="text/css" href="css/tt-rss.css"/>';
}
- $article = format_article($id, false);
+ $article = format_article($id, false, isset($_REQUEST["zoom"]));
print $article['content'];
return;
}
diff --git a/classes/pref/filters.php b/classes/pref/filters.php
index 6170f7a08..427ce79a1 100755
--- a/classes/pref/filters.php
+++ b/classes/pref/filters.php
@@ -134,7 +134,7 @@ class Pref_Filters extends Handler_Protected {
if (count($rc) > 0) {
- $line["content_preview"] = truncate_string(strip_tags($line["content"]), 100, '...');
+ $line["content_preview"] = truncate_string(strip_tags($line["content"]), 200, '&hellip;');
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 100);
@@ -142,10 +142,12 @@ class Pref_Filters extends Handler_Protected {
$content_preview = $line["content_preview"];
- if ($line["feed_title"]) $feed_title = "(" . $line["feed_title"] . ")";
+ $tmp = "<tr style='margin-top : 5px'><td width='5%' align='center'><input dojoType=\"dijit.form.CheckBox\"
+ checked=\"1\" disabled=\"1\" type=\"checkbox\"></td>";
- $tmp = "<tr><td width='5%' align='center'><input dojoType=\"dijit.form.CheckBox\"
- checked=\"1\" disabled=\"1\" type=\"checkbox\"></td><td>";
+ $id = $line['id'];
+ $tmp .= "<td width='5%' align='center'><img style='cursor : pointer' title='".__("Preview article")."'
+ src='images/information.png' onclick='openArticlePopup($id)'></td><td>";
foreach ($filter['rules'] as $rule) {
$reg_exp = str_replace('/', '\/', $rule["reg_exp"]);
@@ -157,10 +159,9 @@ class Pref_Filters extends Handler_Protected {
"<span class=\"highlight\">$1</span>", $content_preview);
}
- $tmp .= "<strong>" . $line["title"] . "</strong>";
- $tmp .= "<div class='small' style='float : right'>" . $feed_title . "</div>";
- $tmp .= "<div class=\"insensitive\">" . $content_preview . "</div>";
- $tmp .= " " . mb_substr($line["date_entered"], 0, 16);
+ $tmp .= "<strong>" . $line["title"] . "</strong><br/>";
+ $tmp .= $line['feed_title'] . ", " . mb_substr($line["date_entered"], 0, 16);
+ $tmp .= "<div class='insensitive'>" . $content_preview . "</div>";
$tmp .= "</td></tr>";
array_push($rv, $tmp);