]> git.wh0rd.org Git - tt-rss.git/commitdiff
filter editor: show score_pic in params column
authorAndrew Dolgov <fox@madoka.spb.ru>
Sun, 4 May 2008 04:19:19 +0000 (05:19 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sun, 4 May 2008 04:19:19 +0000 (05:19 +0100)
functions.php
modules/pref-filters.php

index 2366ce9c46821beda878efcf193afb36a0bb0f95..449bb4e51dc193ec4609e27c95f7a872a205a3f3 100644 (file)
 
                                if ($score > 100) { 
                                        $score_pic = "score_high.png"; 
+                               } else if ($score < -100) {
+                                       $score_pic = "score_low.png"; 
                                } else { 
                                        $score_pic = "score_neutral.png"; 
                                }
index bc5704b5772ae538f61ab62b992af60afd2578f3..ce49976730d5329586f80050c02f5c1e1980231d 100644 (file)
                                $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"]);