Sayfalara ileri geri seçeneği eklemek
Mod BilgileriName:Previous and Next Links for Page Index
Created By:gigitravels
Type:Feature Enhancement
First Created:22 Ocak 2008,21:50:54
Last Modified:22 Ocak 2008,22:20:34
Latest Version:1.0
Compatible With:1.1.4
Görünüm: Resimde Prev-Next diye görünüyor,ama aşağıdaki kodlarda,bu ifadeleri,ileri ve geri olarak değiştirdim.Bilginize....
$sourcedir/Subs.php dosyasında
Bul:
// Show the first page. (>1< ... 6 7 [8] 9 10 ... 15)
if ($start > $num_per_page * $PageContiguous)
$pageindex = sprintf($base_link, 0, '1');
else
$pageindex = '';
Değiştir:
// "Prev"
$tmpStart = $start + $num_per_page * -1;
if (($start / $num_per_page + 1)>1) {
$pageindex = sprintf($base_link, $tmpStart, "Geri");
if ($start > $num_per_page * $PageContiguous)
$pageindex .= sprintf($base_link, 0, '1');
else
$pageindex .= '';
} else {
if ($start > $num_per_page * $PageContiguous)
$pageindex = sprintf($base_link, 0, '1');
else
$pageindex = '';
}
Bul:
// Show the last number in the list. (1 ... 6 7 [8] 9 10 ... >15<)
if ($start + $num_per_page * $PageContiguous < $tmpMaxPages)
$pageindex .= sprintf($base_link, $tmpMaxPages, $tmpMaxPages / $num_per_page + 1);
Altına Ekle:
// "Prev"
$tmpMaxPages = (int) (($max_value - 1) / $num_per_page) * $num_per_page;
$tmpStart = $start + $num_per_page * 1;
if ($tmpStart <= $tmpMaxPages) $pageindex .= sprintf($base_link, $tmpStart, "İleri");