// // the list of related articles if not at another follow-up page if ((!$zoom_type || $zoom_type == 'articles') && (!isset($item['articles_layout']) || $item['articles_layout'] != 'none')) { // build a complete box $box = array('bar' => array(), 'text' => ''); // select a layout if (!isset($item['articles_layout']) || !$item['articles_layout']) { include_once '../articles/layout_articles.php'; $layout_articles = new Layout_articles(); } else { $layout_articles = Layouts::new_($item['articles_layout'], 'article'); } // do not refer to this category $layout_articles->set_focus('category:' . $item['id']); // count the number of articles in this category $count = Members::count_articles_for_anchor('category:' . $item['id'], $this_cat->get_listed_lang()); if ($count) { $box['bar'] = array('_count' => sprintf(i18n::ns('%d page', '%d pages', $count), $count)); } // navigation commands for articles $home = Categories::get_permalink($item); $prefix = Categories::get_url($item['id'], 'navigate', 'articles'); $box['bar'] = array_merge($box['bar'], Skin::navigate($home, $prefix, $count, ARTICLES_PER_PAGE, $zoom_index)); // list items by date (default) or by title (option 'articles_by_title') or by rating_sum (option article_by_rating) $offset = ($zoom_index - 1) * ARTICLES_PER_PAGE; if (isset($order) && preg_match('/\\barticles_by_rating\\b/i', $order)) { $items =& Members::list_articles_by_rating_for_anchor('category:' . $item['id'], $offset, ARTICLES_PER_PAGE, $layout_articles, $this_cat->get_listed_lang()); } elseif (isset($item['options']) && preg_match('/\\barticles_by_title\\b/i', $item['options'])) { $items =& Members::list_articles_by_title_for_anchor('category:' . $item['id'], $offset, ARTICLES_PER_PAGE, $layout_articles, $this_cat->get_listed_lang()); } else { $items =& Members::list_articles_by_date_for_anchor('category:' . $item['id'], $offset, ARTICLES_PER_PAGE, $layout_articles, $this_cat->get_listed_lang());