initial work on dashboard
This commit is contained in:
parent
80d72112f3
commit
d96b7774da
2 changed files with 42 additions and 18 deletions
55
backend.php
55
backend.php
|
@ -238,31 +238,50 @@
|
||||||
|
|
||||||
print "<headlines id=\"$feed\"><![CDATA[";
|
print "<headlines id=\"$feed\"><![CDATA[";
|
||||||
|
|
||||||
$ret = outputHeadlinesList($link, $feed, $subop,
|
if ($feed == -4) {
|
||||||
$view_mode, $limit, $cat_view, $next_unread_feed, $offset);
|
|
||||||
|
|
||||||
$topmost_article_ids = $ret[0];
|
print "<div id=\"headlinesContainer\">";
|
||||||
$headlines_count = $ret[1];
|
|
||||||
$returned_feed = $ret[2];
|
|
||||||
$disable_cache = $ret[3];
|
|
||||||
|
|
||||||
print "]]></headlines>";
|
print "PLACEHOLDER";
|
||||||
|
|
||||||
print "<headlines-count value=\"$headlines_count\"/>";
|
print "</div>";
|
||||||
|
|
||||||
$headlines_unread = getFeedUnread($link, $returned_feed);
|
print "]]></headlines>";
|
||||||
|
print "<headlines-count value=\"0\"/>";
|
||||||
|
print "<headlines-unread value=\"0\"/>";
|
||||||
|
print "<disable-cache value=\"0\"/>";
|
||||||
|
|
||||||
print "<headlines-unread value=\"$headlines_unread\"/>";
|
|
||||||
printf("<disable-cache value=\"%d\"/>", $disable_cache);
|
|
||||||
|
|
||||||
if ($_GET["debug"]) $timing_info = print_checkpoint("10", $timing_info);
|
|
||||||
|
|
||||||
if (is_array($topmost_article_ids) && !get_pref($link, 'COMBINED_DISPLAY_MODE')) {
|
|
||||||
print "<articles>";
|
print "<articles>";
|
||||||
foreach ($topmost_article_ids as $id) {
|
|
||||||
outputArticleXML($link, $id, $feed, false);
|
|
||||||
}
|
|
||||||
print "</articles>";
|
print "</articles>";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$ret = outputHeadlinesList($link, $feed, $subop,
|
||||||
|
$view_mode, $limit, $cat_view, $next_unread_feed, $offset);
|
||||||
|
|
||||||
|
$topmost_article_ids = $ret[0];
|
||||||
|
$headlines_count = $ret[1];
|
||||||
|
$returned_feed = $ret[2];
|
||||||
|
$disable_cache = $ret[3];
|
||||||
|
|
||||||
|
print "]]></headlines>";
|
||||||
|
|
||||||
|
print "<headlines-count value=\"$headlines_count\"/>";
|
||||||
|
|
||||||
|
$headlines_unread = getFeedUnread($link, $returned_feed);
|
||||||
|
|
||||||
|
print "<headlines-unread value=\"$headlines_unread\"/>";
|
||||||
|
printf("<disable-cache value=\"%d\"/>", $disable_cache);
|
||||||
|
|
||||||
|
if ($_GET["debug"]) $timing_info = print_checkpoint("10", $timing_info);
|
||||||
|
|
||||||
|
if (is_array($topmost_article_ids) && !get_pref($link, 'COMBINED_DISPLAY_MODE')) {
|
||||||
|
print "<articles>";
|
||||||
|
foreach ($topmost_article_ids as $id) {
|
||||||
|
outputArticleXML($link, $id, $feed, false);
|
||||||
|
}
|
||||||
|
print "</articles>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
|
if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
|
||||||
|
|
|
@ -4004,6 +4004,11 @@
|
||||||
printCategoryHeader($link, -1, $cat_hidden, false);
|
printCategoryHeader($link, -1, $cat_hidden, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined('_ENABLE_DASHBOARD')) {
|
||||||
|
printFeedEntry(-4, "virt", __("Dashboard"), 0,
|
||||||
|
"images/tag.png", $link);
|
||||||
|
}
|
||||||
|
|
||||||
$num_starred = getFeedUnread($link, -1);
|
$num_starred = getFeedUnread($link, -1);
|
||||||
$num_published = getFeedUnread($link, -2);
|
$num_published = getFeedUnread($link, -2);
|
||||||
$num_fresh = getFeedUnread($link, -3);
|
$num_fresh = getFeedUnread($link, -3);
|
||||||
|
|
Loading…
Reference in a new issue