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'>";
//setting feed headline background color, needs to change text color based on dark/light
$favColor = explode("|", $line['favicon_avg_color']);
$reply['content'] .= "<div class=\"cdmHeader\" style=\"background-color: rgb($favColor[0], $favColor[1], $favColor[2]);\">";
$fav_color = $line['favicon_avg_color'];
$reply['content'] .= "<div class=\"cdmHeader\" style=\"background-color: $fav_color;\">";
$reply['content'] .= "<div style=\"vertical-align : middle\">";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"

View File

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

View File

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