Advertisement
Guest User

Untitled

a guest
May 20th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. function mytheme_views_mini_pager__myview($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) {
  2.   global $pager_page_array, $pager_total;
  3.  
  4.   // Calculate various markers within this pager piece:
  5.   // Middle is used to "center" pages around the current page.
  6.   $pager_middle = ceil($quantity / 2);
  7.   // current is the page we are currently paged to
  8.   $pager_current = $pager_page_array[$element] + 1;
  9.   // max is the maximum page number
  10.   $pager_max = $pager_total[$element];
  11.   // End of marker calculations.
  12.  
  13.   $prev =  t('Older Posts', array('class' => 'action back'));
  14.   $prev_2 =  t('Older Posts', array('class' => 'action back'));
  15.   $nex =  t('Newer Posts', array('class' => 'action')) ;
  16.  
  17.  
  18.   $li_previous = theme('pager_previous', (isset($tags[1]) ? $tags[1] : $prev), $limit, $element, 1, $parameters);
  19.   if (empty($li_previous)) {
  20.     $li_previous = " ";
  21.   }
  22.  
  23.   $li_next =  theme('pager_next', (isset($tags[3]) ? $tags[3] : $nex), $limit, $element, 1, $parameters);
  24.   if (empty($li_next)) {
  25.     $li_next = " ";
  26.   }
  27.  
  28.  
  29.   if ($pager_total[$element] > 1) {
  30.     $items[] = array(
  31.       'class' => 'pager-previous',
  32.       'data' => $li_previous,
  33.     );
  34.  
  35.     $items[] = array(
  36.       'class' => 'pager-next',
  37.       'data' => $li_next,
  38.     );
  39.     return theme('item_list', $items, NULL, 'div', array('class' => 'articlePagination'));
  40.   }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement