only enable colored favicons in vfeeds; fix RGB triplet packing

This commit is contained in:
Andrew Dolgov 2013-04-15 15:17:12 +04:00
parent 687a4f59c8
commit 63c323f736
3 changed files with 12 additions and 5 deletions

View file

@ -529,8 +529,8 @@ class Feeds extends Handler_Protected {
id=\"RROW-$id\" $mouseover_attrs'>"; id=\"RROW-$id\" $mouseover_attrs'>";
//setting feed headline background color, needs to change text color based on dark/light //setting feed headline background color, needs to change text color based on dark/light
$favColor = explode("|", $line['favicon_avg_color']); $fav_color = $line['favicon_avg_color'];
$reply['content'] .= "<div class=\"cdmHeader\" style=\"background-color: rgb($favColor[0], $favColor[1], $favColor[2]);\">"; $reply['content'] .= "<div class=\"cdmHeader\" style=\"background-color: $fav_color;\">";
$reply['content'] .= "<div style=\"vertical-align : middle\">"; $reply['content'] .= "<div style=\"vertical-align : middle\">";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\" $reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"

View file

@ -2602,6 +2602,9 @@
LEFT JOIN ttrss_feeds ON (feed_id = ttrss_feeds.id)"; LEFT JOIN ttrss_feeds ON (feed_id = ttrss_feeds.id)";
} }
if ($vfeed_query_part)
$vfeed_query_part .= "favicon_avg_color,";
$query = "SELECT DISTINCT $query = "SELECT DISTINCT
date_entered, date_entered,
guid, guid,

View file

@ -416,9 +416,13 @@
require_once "colors.php"; require_once "colors.php";
if (is_array($favicon_color)) if (is_array($favicon_color))
$favicon_colorstring = ",favicon_avg_color = '" . $tmp = array($favicon_color['red'],
_color_pack(array_slice($favicon_color, 0, 3)) . "'"; $favicon_color['green'],
$favicon_color['blue']);
$favicon_colorstring = ",favicon_avg_color = '" .
_color_pack($tmp) . "'";
} }
db_query($link, "UPDATE ttrss_feeds SET favicon_last_checked = NOW() $favicon_colorstring db_query($link, "UPDATE ttrss_feeds SET favicon_last_checked = NOW() $favicon_colorstring