id . "/" . $tag_id . "/" . $album_id); } elseif ($page_type == "") { } endfor; else: // End rWatcher Mod. switch ($page_type) { case "collection": if (isset($item)): $parent = $item->parent(); endif; $current_page = $page; $total_pages = $max_pages; // Prepare page url list for ($i = 1; $i <= $total_pages; $i++): $_pagelist[$i] = url::site(url::merge(array("page" => $i))); endfor; break; case "item": if (isset($item)): $parent = $item->parent(); endif; $current_page = $position; $total_pages = $total; if (isset($parent)): $siblings = $parent->children(); for ($i = 1; $i <= $total; $i++): $_pagelist[$i] = $siblings[$i-1]->url(); endfor; endif; break; default: $current_page = 1; $total_pages = 1; $_pagelist[1] = url::site(); break; } // rWatcher Mod endif; // End rWatcher Mod. if ($total_pages <= 1): $pagination_msg = " "; else: $pagination_msg = t("Page:") . ' '; if ($total_pages < 13): for ($i = 1; $i <= $total_pages; $i++): if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; else: $pagination_msg .= '' . t($i) . ''; endif; if ($i < $total_pages): $pagination_msg .= '·'; endif; endfor; elseif ($current_page < 9): for ($i = 1; $i <= 10; $i++): if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; else: $pagination_msg .= '' . t($i) . ''; endif; if ($i < 10): $pagination_msg .= '·'; endif; endfor; $pagination_msg .= '…'; $pagination_msg .= '' . t($total_pages - 1) . ''; $pagination_msg .= '·'; $pagination_msg .= '' . t($total_pages) . ''; elseif ($current_page > $total_pages - 8): $pagination_msg .= '' . t(1) . ''; $pagination_msg .= '·'; $pagination_msg .= '' . t(2) . ''; $pagination_msg .= '…'; for ($i = $total_pages - 9; $i <= $total_pages; $i++): if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; else: $pagination_msg .= '' . t($i) . ''; endif; if ($i < $total_pages): $pagination_msg .= '·'; endif; endfor; else: $pagination_msg .= '' . t(1) . ''; $pagination_msg .= '·'; $pagination_msg .= '' . t(2) . ''; $pagination_msg .= '…'; for ($i = $current_page - 5; $i <= $current_page + 5; $i++): if ($i == $current_page): $pagination_msg .= '' . t($i) . ''; else: $pagination_msg .= '' . t($i) . ''; endif; if ($i < $current_page + 5): $pagination_msg .= '·'; endif; endfor; $pagination_msg .= '…'; $pagination_msg .= '' . t($total_pages - 1) . ''; $pagination_msg .= '·'; $pagination_msg .= '' . t($total_pages) . ''; endif; endif; ?>