diff --git a/bl-kernel/archives.class.php b/bl-kernel/archives.class.php index c1e487d5..0accf0a7 100644 --- a/bl-kernel/archives.class.php +++ b/bl-kernel/archives.class.php @@ -18,7 +18,7 @@ class Archives extends dbList { $db = $pages->getDB($onlyKeys=false); $archiveIndex = array(); foreach ($db as $pageKey=>$pageFields) { - if (in_array($pageFields['type'], $GLOBALS['DB_TAGS_TYPES'])) { + if (in_array($pageFields['type'], $GLOBALS['DB_TAGS_AUTHOR_ARCHIVE'])) { $date = $pageFields['date']; $year = mb_substr($date, 0, 4); $month = mb_substr($date, 0, 7); diff --git a/bl-kernel/authors.class.php b/bl-kernel/authors.class.php index fc6263a7..a60d976f 100644 --- a/bl-kernel/authors.class.php +++ b/bl-kernel/authors.class.php @@ -18,7 +18,7 @@ class Authors extends dbList { $db = $pages->getDB($onlyKeys=false); $authorsIndex = array(); foreach ($db as $pageKey=>$pageFields) { - if (in_array($pageFields['type'], $GLOBALS['DB_TAGS_TYPES'])) { + if (in_array($pageFields['type'], $GLOBALS['DB_TAGS_AUTHOR_ARCHIVE'])) { $authorName = $pageFields['username']; if (isset($authorsIndex[$authorName])) { array_push($authorsIndex[$authorName]['list'], $pageKey); diff --git a/bl-kernel/boot/rules/99.paginator.php b/bl-kernel/boot/rules/99.paginator.php index 249dc03c..4547f36a 100644 --- a/bl-kernel/boot/rules/99.paginator.php +++ b/bl-kernel/boot/rules/99.paginator.php @@ -15,6 +15,18 @@ if ($url->whereAmI()=='admin') { $itemsPerPage = $site->itemsPerPage(); $categoryKey = $url->slug(); $numberOfItems = $categories->numberOfPages($categoryKey); +} elseif ($url->whereAmI()=='author') { + $itemsPerPage = $site->itemsPerPage(); + $categoryKey = $url->slug(); + $numberOfItems = $authors->numberOfPages($categoryKey); +} elseif ($url->whereAmI()=='archive') { + $itemsPerPage = $site->itemsPerPage(); + $categoryKey = $url->slug(); + $numberOfItems = $archives->numberOfPages($categoryKey); +} elseif ($url->whereAmI()=='kind') { + $itemsPerPage = $site->itemsPerPage(); + $categoryKey = $url->slug(); + $numberOfItems = $kinds->numberOfPages($categoryKey); } else { $itemsPerPage = $site->itemsPerPage(); $numberOfItems = $pages->count(true); diff --git a/bl-kernel/boot/variables.php b/bl-kernel/boot/variables.php index cd45aa8c..7a597769 100644 --- a/bl-kernel/boot/variables.php +++ b/bl-kernel/boot/variables.php @@ -106,6 +106,9 @@ define('MEDIA_MANAGER_SORT_BY_DATE', true); // Type of pages included in the tag database $GLOBALS['DB_TAGS_TYPES'] = array('published','static','sticky'); +// Type of pages included in the author/archive database +$GLOBALS['DB_TAGS_AUTHOR_ARCHIVE'] = array('published','sticky'); + // Allowed image extensions $GLOBALS['ALLOWED_IMG_EXTENSION'] = array('gif', 'png', 'jpg', 'jpeg', 'svg', 'webp');