If there are more albums - than in one page - the link on second page is broken.
for example I have 2 pages - on front page I have good links to next » /page/2/
but - on the second page - links to page 1 ( prev) are also /page/2/ - so they link to the actual page - not previous.
Anybody help?
(used last ver.)
Plodz
Comments
I think that this only happened when installing to a subdomain or directly to a domain, but am not sure.
In the remplate-functions.php file go to this area of code:
`
function getPageURL($page) {
global $_zp_current_album, $_zp_gallery;
$total = getTotalPages();
if ($page <= $total && $page > 0) {
if (in_context(ZP_ALBUM)) {
if (zp_conf('mod_rewrite')) {
return WEBPATH . "/" . urlencode($_zp_current_album->name) . (($page > 1) ? "/page/" . $page . "/" : "");
} else {
return WEBPATH . "/index.php?album=" . urlencode($_zp_current_album->name) . (($page > 1) ? "&page=" . $page : "");
}
} else if (in_context(ZP_INDEX)) {
if (zp_conf('mod_rewrite')) {
return WEBPATH . (($page > 1) ? "/page/" . $page . "/" : "/");
} else {
return WEBPATH . "/index.php" . (($page > 1) ? "?page=" . $page : "");
}
}
}
return null;
}
`
The change was made in this area:
`
return WEBPATH . (($page > 1) ? "/page/" . $page . "/" : "");
`
The code originally has nothing in the last set of quotes if you simple add a slash in there it fixes the problem.
`
return WEBPATH . (($page > 1) ? "/page/" . $page . "/" : "/");
`
What was happening is that it wouldn't put anything in for the link. It would be like putting «a href=""» It doesn't go anywhere and thus just refreshes the current page.