Topic: My pagina script: mod to hide unnecessary previous / next links (Read 2072 times)
I crack Photoshop!
Gender:
Posts: 3
22 credits Members referred : 0
« on: Dec 07, 2006, 08:50:43 pm »
using the nice My Pagina script, i wanted simple back/next buttons (no direct link to a page). It works fine, except that it was printing the "previous page" image even on page 0, and the "next page" image even on the last page.
this simple modification took care of removing it:
Code:
if ($all_pages >= 1) { $forward = $curr_pages + 1; $backward = $curr_pages - 1; // the text two labels are new sinds ver 1.02 // PIXELINE HACK TO HIDE UNNECESSARY NEXT/PREV LINKS if ($backward > -1) { $lbl_backward = $this->build_back_or_forward("backward", $use_images); } if ($curr_pages < $all_pages) { $lbl_forward = $this->build_back_or_forward("forward", $use_images); } // END HACK $navi_string = ($curr_pages > 0) ? "<a href=\"" . $_SERVER['PHP_SELF'] . "?" . $var . "=" . $backward . $this->rebuild_qs($var) . "\">" . $lbl_backward . "</a> " : $lbl_backward . " ";
i hope it helps. Maybe it would be nice to include it in the next version
cheers,
Alex
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Dec 07, 2006, 09:47:41 pm »
I will think about, while I don't like to add modifications in the scripts, is it possible with mod to show the "unwanted" text as well?
hi olaf, why would you want to show arrows when they are not clickable? It's just confusing for the website visitor...
If you want to display them nonetheless, just use the class as it is delivered.
cheers,
Alex
just to show that there is some navigation the array is not clickable, I can't see the problem.
never got complains before, but I will think about that for the next upgrade
I think its more important to show the visitor on which page the visitor is currently and that's not a problem. You can give the not linked elements some light grey color, then is everything fine
I crack Photoshop!
Gender:
Posts: 3
22 credits Members referred : 0
« Reply #5 on: Dec 08, 2006, 11:19:01 pm »
nothing prevents you from improving my mod, make it optional, and include it in the next version as long as you understand its purpose, that was in fact the reason why i took the initiative to share my hack.
thank you,
alex
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=5113