]>
src.bluestatic.org Git - bugdar.git/blob - includes/pagination.php
2 /*=====================================================================*\
3 || ###################################################################
5 || # Copyright (c)2005-2008 Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version 2 of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 require_once ISSO
. '/Pagination.php';
27 * Subclass of BSPagination
30 * @copyright Copyright (c)2005 - 2008, Blue Static
34 class Pagination
extends BSPagination
37 * Sets the variables used by the system
39 protected function _setVariables()
41 $this->page
= BSApp
::$input->inputClean('p', TYPE_UINT
);
42 $this->defaultperpage
= bugdar
::$options['defaultpp'];
43 $this->perpage
= BSApp
::$input->inputClean('pp', TYPE_UINT
);
44 $this->pagelinks
= bugdar
::$options['pagelinks'];
45 $this->maxperpage
= bugdar
::$options['maxpp'];
49 * Processes an individual page link
51 protected function _bitProcessor($baselink, $isCurrent, $pagenumber)
53 $template = new BSTemplate('pagenav_bit');
54 $template->vars
= array(
55 'baselink' => $baselink,
56 'nolink' => $isCurrent,
57 'number' => $pagenumber
59 return $template->evaluate()->getTemplate();
63 * Generates the entire page navigation HTML
65 protected function _navigationProcessor($baselink, $next, $prev, $show, $bits)
67 $template = new BSTemplate('pagenav');
68 $template->vars
= array(
69 'baselink' => $baselink,
76 return $template->evaluate()->getTemplate();