summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-05-04 05:19:19 +0100
committerAndrew Dolgov <[email protected]>2008-05-04 05:19:19 +0100
commit0966ea378b623a7b2fe5f20e4bdc39dac8c446ab (patch)
tree3cf3ce76178b46b879b1ab822bac724677f9dc92
parentcb135873d8e37428423d0cd367e7452cdfaf96a4 (diff)
filter editor: show score_pic in params column
-rw-r--r--functions.php2
-rw-r--r--modules/pref-filters.php19
2 files changed, 20 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 2366ce9c4..449bb4e51 100644
--- a/functions.php
+++ b/functions.php
@@ -4918,6 +4918,8 @@
if ($score > 100) {
$score_pic = "score_high.png";
+ } else if ($score < -100) {
+ $score_pic = "score_low.png";
} else {
$score_pic = "score_neutral.png";
}
diff --git a/modules/pref-filters.php b/modules/pref-filters.php
index bc5704b57..ce4997673 100644
--- a/modules/pref-filters.php
+++ b/modules/pref-filters.php
@@ -303,7 +303,24 @@
$line["reg_exp"] = htmlspecialchars($line["reg_exp"]);
if (!$line["feed_title"]) $line["feed_title"] = __("All feeds");
- if (!$line["action_param"]) $line["action_param"] = "&mdash;";
+
+ if (!$line["action_param"]) {
+ $line["action_param"] = "&mdash;";
+ } else if ($line["action_name"] == "score") {
+
+ if ($line["action_param"] > 100) {
+ $score_pic = "score_high.png";
+ } else if ($line["action_param"] < -100) {
+ $score_pic = "score_low.png";
+ } else {
+ $score_pic = "score_neutral.png";
+ }
+
+ $score_pic = "<img class='hlScorePic' src=\"images/$score_pic\">";
+
+ $line["action_param"] = "$score_pic " . $line["action_param"];
+
+ }
$line["feed_title"] = htmlspecialchars($line["feed_title"]);