From ac541432000c24fee20cf0e0ce0881aa6437455a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 9 Aug 2007 08:36:04 +0100 Subject: infinite scrolling --- functions.php | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 3bf2a0b7d..7ca93956d 100644 --- a/functions.php +++ b/functions.php @@ -3693,7 +3693,9 @@ $topmost_article_ids = array(); - if (!$offset) $offset = 0; + if (!$offset) { + $offset = 0; + } if ($subop == "undefined") $subop = ""; @@ -3777,24 +3779,26 @@ /// STOP ////////////////////////////////////////////////////////////////////////////////// - print "
"; + if (!$offset) { + print "
"; - if (!$result) { - print "
".__("Could not display feed (query failed). Please check label match syntax or local configuration.")."
"; - return; - } + if (!$result) { + print "
".__("Could not display feed (query failed). Please check label match syntax or local configuration.")."
"; + return; + } - print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, - $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, - $offset, $limit); + print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, + $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, + $offset, $limit); - print "
"; + print "
"; + } if (db_num_rows($result) > 0) { # print "\{$offset}"; - if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { + if (!get_pref($link, 'COMBINED_DISPLAY_MODE') && !$offset) { print ""; } @@ -3975,7 +3979,7 @@ ++$lnum; } - if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { + if (!get_pref($link, 'COMBINED_DISPLAY_MODE') && !$offset) { print "
"; } @@ -3984,12 +3988,13 @@ } else { - print "
".__('No articles found.')."
"; + if (!$offset) print "
".__('No articles found.')."
"; } - print "
"; - - print "
"; + if (!$offset) { + print "
"; + print "
"; + } return $topmost_article_ids; } -- cgit v1.2.3