Whiler wrote:
z0rglub, I tried your last BSF...
I really like the new function create_navigation_bar...
But personnally, I update it like this :
(To avoid stuff like : 1 ... 2 or n-1 ... n)Code:
# #-----[ OPEN ]------------------------------------------ # ./include/functions_html.inc.php # #-----[ REPLACE ]------------------------------------------ # if ($cur_page > $pages_around + 1) { $navbar.= ' <a href="'; $navbar.= add_session_id($url.'&start=0'); $navbar.= '" class="'.$link_class.'">1</a> ...'; } # #-----[ WITH ]------------------------------------------ # if ($cur_page > $pages_around + 1) { $navbar.= ' <a href="'; $navbar.= add_session_id($url.'&start=0'); $navbar.= '" class="'.$link_class.'">1</a>'; if ($cur_page > $pages_around + 2) $navbar.= ' ...'; } # #-----[ REPLACE ]------------------------------------------ # if ($cur_page < ($maximum - $pages_around)) { $temp_start = ($maximum - 1) * $nb_element_page; $navbar.= ' ... <a href="'; $navbar.= add_session_id($url.'&start='.$temp_start); $navbar.= '" class="'.$link_class.'">'.$maximum.'</a>'; } # #-----[ WITH ]------------------------------------------ # if ($cur_page < ($maximum - $pages_around)) { $temp_start = ($maximum - 1) * $nb_element_page; if ($cur_page < ($maximum - $pages_around - 1)) $navbar.= ' ...'; $navbar.= ' <a href="'; $navbar.= add_session_id($url.'&start='.$temp_start); $navbar.= '" class="'.$link_class.'">'.$maximum.'</a>'; } # #-----[ SAVE/CLOSE THE FILE ]------------------------------------------ #As usual, if you prefer to move/remove my post... feel free to do it... ;)
I moved your post to an appropriate topic.
You're right. I'll make the change :-)
(I'm currently working on the migration script from 1.3 branch...for next build in the week)
Offline
z0rglub wrote:
You're right. I'll make the change :-)
(I'm currently working on the migration script from 1.3 branch...for next build in the week)
thx ;)
bon courage ;o)
Offline