Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Форумы / Cotonti / Core Labs / Archive / Some enhancement for list.php

Some enhancement for list.php

Asmo
#1048 14.09.2008 23:47
This improvement is clear extra variables in the URL string in the sorting and pagination, if they are not used. And add highlight active arrows in sorting bar.
This looks very interesting and + clear URL string.



// At the very top, before the hook list.first
$url_string     = "list.php?c=$c";
$sort_string   .= (!empty($s) && !empty($w)) ? "&s=$s&w=$w" : "";
$filter_string .= (!empty($o) && !empty($p)) ? "&o=$o&p=$p" : "";


Pagination:
$pagination = sed_pagination($url_string.$sort_string.$filter_string, $d, $totallines, $cfg['maxrowsperpage']);
list($pageprev, $pagenext) = sed_pagination_pn($url_string.$sort_string.$filter_string, $d, $totallines, $cfg['maxrowsperpage'], TRUE);



The next hack adds highlight active arrows in sorting bar


You will also need to add two different colour images of arrows, for highlight
img/system/arrow-up-active.gif
img/system/arrow-down-active.gif

So, it looks very interesting and + clear URL string.

Heh, P.S. PFS and smiles not work Call to undefined function sed_htmlmetas()
Last core revision was very brutal :)

Отредактировано: Asmo (15.09.2008 01:22, 13 лет назад)