summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-04-30 09:10:59 +0100
committerAndrew Dolgov <[email protected]>2008-04-30 09:10:59 +0100
commit546499a9f37372d239d16b538e372faf641f5aa5 (patch)
tree2e117115435089ff48c74c0f747c7df23844ce95 /functions.php
parent48ddbb3380f096ef5005fc3b86a48b933a297b5d (diff)
finish initial work on scoring
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php32
1 files changed, 27 insertions, 5 deletions
diff --git a/functions.php b/functions.php
index bf0c55d3d..2c073b467 100644
--- a/functions.php
+++ b/functions.php
@@ -3313,7 +3313,8 @@
ttrss_entries,ttrss_user_entries,ttrss_feeds
WHERE
$group_limit_part
- ttrss_feeds.hidden = false AND
+ ttrss_feeds.hidden = false AND
+ score >= -500 AND
ttrss_user_entries.feed_id = ttrss_feeds.id AND
ttrss_user_entries.ref_id = ttrss_entries.id AND
ttrss_user_entries.owner_uid = '$owner_uid' AND
@@ -3344,7 +3345,8 @@
FROM
ttrss_entries,ttrss_user_entries,ttrss_tags
WHERE
- ref_id = ttrss_entries.id AND
+ ref_id = ttrss_entries.id AND
+ score >= -500 AND
ttrss_user_entries.owner_uid = '$owner_uid' AND
post_int_id = int_id AND tag_name = '$feed' AND
$view_query_part
@@ -4935,7 +4937,16 @@
$score = $line["score"];
- if ($score < 100) $score_pic = "score_low
+ if ($score > 100) {
+ $score_pic = "score_high.png";
+ } else {
+ $score_pic = "score_neutral.png";
+ }
+
+ $score_title = __("(Click to change)");
+
+ $score_pic = "<img src=\"images/$score_pic\"
+ onclick=\"adjustArticleScore($id, $score)\" title=\"$score $score_title\">";
$entry_author = $line["author"];
@@ -4979,7 +4990,16 @@
# truncate_string($line["feed_title"],30)."</a>&nbsp;</td>";
# } else {
- print "<td class='hlContent' valign='middle'>";
+
+ if ($score > 500) {
+ $hlc_suffix = "H";
+ } else if ($score < -100) {
+ $hlc_suffix = "L";
+ } else {
+ $hlc_suffix = "";
+ }
+
+ print "<td class='hlContent$hlc_suffix' valign='middle'>";
print "<a href=\"javascript:view($id,$feed_id);\">" .
$line["title"];
@@ -5010,7 +5030,9 @@
# }
print "<td class=\"hlUpdated\"><nobr>$updated_fmt&nbsp;</nobr></td>";
-
+
+ print "<td class='hlMarkedPic'>$score_pic</td>";
+
print "</tr>";
} else {