hi! The r65 Lately i saw in the Bazaar. I Tested The pager Some bugs and i saw That I fixed someones.
1. After activating the "Pager Setting", the pager appears at the bottom of the page but also all feeds items.
2. Links of pager's elements does not work well, specially for website which clean urls is disable. $base_path variable is the cause.
Correction proposal
function theme_page_udplanet_pager($pages, $selected) { global $base_path; global $conf;
$site_url = $base_path;
if ($conf['clean_url'] == 0) { $site_url.='?q='; };
if ($selected == 0) { $selected = 1; }
$pages = udtheme_real_max_pages($pages);
$page_down = ($selected - 1 <= 1) ? 1 : $selected - 1; $page_up = ($selected + 1 >= $pages) ? $pages : $selected + 1;
$output = '<div id="udplanet-pager"><ul>'; $output .= ' <li class="pager-first"><a href="' . $site_url . 'planet"><span><<</span></a></li>'; $output .= ' <li class="pager-previous"><a href="' . $site_url. 'planet/' . $page_down . '"><span><</span></a></li>'; for ($i = 1; $i <= $pages; $i++) { $output .= '<li class="pager-item pager-item-' . $i . '"><a href="' . $site_url . 'planet/' . $i . '"><span>' . $i . '</span></a></li>'; } $output .= ' <li class="pager-next"><a href="' . $site_url . 'planet/' . $page_up . '"><span>></span></a></li>'; $output .= ' <li class="pager-last"><a href="' . $site_url . 'planet/' . $pages . '"><span>>></span></a></li>'; $output .= '</ul></div>';
return $output; }
hi! The r65 Lately i saw in the Bazaar. I Tested The pager Some bugs and i saw That I fixed someones.
1. After activating the "Pager Setting", the pager appears at the bottom of the page but also all feeds items.
2. Links of pager's elements does not work well, specially for website which clean urls is disable. $base_path variable is the cause.
Correction proposal
function theme_page_ udplanet_ pager($ pages, $selected) {
global $base_path;
global $conf;
$site_url = $base_path;
if ($conf['clean_url'] == 0) { $site_url.='?q='; };
if ($selected == 0) {
$selected = 1;
}
$pages = udtheme_ real_max_ pages($ pages);
$page_down = ($selected - 1 <= 1) ? 1 : $selected - 1;
$page_up = ($selected + 1 >= $pages) ? $pages : $selected + 1;
$output = '<div id="udplanet- pager"> <ul>'; pager-first" ><a href="' . $site_url . 'planet" ><span> << </span> </a></li> '; pager-previous" ><a href="' . $site_url. 'planet/' . $page_down . '"><span> <</span> </a></li> '; pager-next" ><a href="' . $site_url . 'planet/' . $page_up . '"><span> ></span> </a></li> '; pager-last" ><a href="' . $site_url . 'planet/' . $pages . '"><span> >> </span> </a></li> ';
$output .= ' <li class="
$output .= ' <li class="
for ($i = 1; $i <= $pages; $i++) {
$output .= '<li class="pager-item pager-item-' . $i . '"><a href="' . $site_url . 'planet/' . $i . '"><span>' . $i . '</span></a></li>';
}
$output .= ' <li class="
$output .= ' <li class="
$output .= '</ul></div>';
return $output;
}