Elgg
Version 2.3
|
Go to the source code of this file.
Namespaces | |
Elgg | |
Save menu items. | |
Variables | |
if(elgg_in_context('widget')) | $count = (int) elgg_extract('count', $vars, 0) |
if(!$count) | $offset = abs((int) elgg_extract('offset', $vars, 0)) |
if(!$limit=(int) elgg_extract('limit', $vars, elgg_get_config('default_limit'))) | $offset_key = elgg_extract('offset_key', $vars, 'offset') |
$url_fragment = elgg_extract('url_fragment', $vars, '') | |
if(isset($vars['base_url'])&&$vars['base_url']) elseif(elgg_is_xhr()&&!empty($_SERVER['HTTP_REFERER'])) | else |
$base_url_has_fragment = preg_match('~#.~', $base_url) | |
$get_href | |
if($count<=$limit &&$offset==0) | $total_pages = (int) ceil($count / $limit) |
$current_page = (int) ceil($offset / $limit) + 1 | |
$pages = array() | |
$start_page = max(min([$current_page - 2, $total_pages - 4]), 1) | |
$prev_offset = $offset - $limit | |
if($prev_offset< 1) | $pages ['prev'] |
if($prev_offset< 1) if($current_page==1) if(1< $start_page) if(1< ($start_page-2)) elseif($start_page==3) | $max = 1 |
for($page=$start_page;$page<=$total_pages;$page++) if($total_pages >($start_page+6)) elseif(($start_page+5)==($total_pages-1)) if($total_pages >=($start_page+5)) | $next_offset = $offset + $limit |
if($next_offset >=$count) | $pages ['next'] |
if($next_offset >=$count) if($current_page==$total_pages) | $list ="" |
foreach ($pages as $page_num=> $page) | |
$base_url_has_fragment = preg_match('~#.~', $base_url) |
Definition at line 44 of file pagination.php.
if (elgg_in_context('widget')) $count = (int) elgg_extract('count', $vars, 0) |
Definition at line 21 of file pagination.php.
$current_page = (int) ceil($offset / $limit) + 1 |
Definition at line 60 of file pagination.php.
$get_href |
Definition at line 46 of file pagination.php.
Definition at line 131 of file pagination.php.
if ($prev_offset< 1) if ($current_page==1) if (1< $start_page) if (1< ($start_page-2)) elseif ($start_page==3) $max = 1 |
Definition at line 95 of file pagination.php.
for ($page=$start_page;$page<=$total_pages;$page++) if ($total_pages >($start_page+6)) elseif (($start_page+5)==($total_pages-1)) if ($total_pages >=($start_page+5)) $next_offset = $offset + $limit |
Definition at line 117 of file pagination.php.
if (!$count) $offset = abs((int) elgg_extract('offset', $vars, 0)) |
Definition at line 26 of file pagination.php.
if (!$limit=(int) elgg_extract('limit', $vars, elgg_get_config('default_limit'))) $offset_key = elgg_extract('offset_key', $vars, 'offset') |
Definition at line 32 of file pagination.php.
$pages = array() |
Definition at line 62 of file pagination.php.
Definition at line 74 of file pagination.php.
Definition at line 122 of file pagination.php.
$prev_offset = $offset - $limit |
Definition at line 68 of file pagination.php.
$start_page = max(min([$current_page - 2, $total_pages - 4]), 1) |
Definition at line 65 of file pagination.php.
if ($count<=$limit &&$offset==0) $total_pages = (int) ceil($count / $limit) |
Definition at line 59 of file pagination.php.
$url_fragment = elgg_extract('url_fragment', $vars, '') |
Definition at line 33 of file pagination.php.
if (isset($vars['base_url'])&&$vars['base_url']) elseif (elgg_is_xhr()&&!empty($_SERVER['HTTP_REFERER'])) else |
Definition at line 40 of file pagination.php.
foreach($pages as $page_num=> $page) |
Definition at line 132 of file pagination.php.