only enable colored favicons in vfeeds; fix RGB triplet packing
This commit is contained in:
parent
687a4f59c8
commit
63c323f736
3 changed files with 12 additions and 5 deletions
|
@ -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\"
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -417,8 +417,12 @@
|
||||||
require_once "colors.php";
|
require_once "colors.php";
|
||||||
|
|
||||||
if (is_array($favicon_color))
|
if (is_array($favicon_color))
|
||||||
|
$tmp = array($favicon_color['red'],
|
||||||
|
$favicon_color['green'],
|
||||||
|
$favicon_color['blue']);
|
||||||
|
|
||||||
$favicon_colorstring = ",favicon_avg_color = '" .
|
$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
|
db_query($link, "UPDATE ttrss_feeds SET favicon_last_checked = NOW() $favicon_colorstring
|
||||||
|
|
Loading…
Reference in a new issue