Mod Phân Trang Giống WordPress Cho Filelist Xtgem
- Tạo file page.xt (tập tin văn bản gốc) ngang hàng index rồi dán code này vô.<?php
<!--parser:xtscript-->
function paging_template $page;$active_page;$total_pages;
if $page == 1
print <b><div class='wp-pagenavi'>
if $page == 2
print <a href="$surl?__filelist_page=$page">‹</a>
elseif ($page+1) == $active_page
print <a href="$surl?__filelist_page=($page-1)">«</a><a href="$surl?__filelist_page=$page">$page</a>
elseif ($page+2) == $active_page
print <a href="$surl?__filelist_page=1">‹</a>
elseif $page == $active_page
print <span class='current'>$page</span>
elseif ($page-1) == $active_page
print <a href="$surl?__filelist_page=$page">$page</a>
elseif ($page-2) == $active_page
print <a title="Xem Trang $page" href="$surl?__filelist_page=$page">$page</a> <a class="nextpostslink" href="$surl?__filelist_page=($page-1)">»</a>
endif
if $page == $total_pages
print <a class="last" title="Xem Trang $total_pages" href="$surl?__filelist_page=$total_pages">›</a></div></b>
endif
endfunction
<!--/parser:xtscript-->
?>
- Sau đó dán code này vào _header nhé. <!--parser:xtscript-->
function paging_template $page;$active_page;$total_pages;
if $page == 1
print <b><div class='wp-pagenavi'>
if $page == 2
print <a href="$surl?__filelist_page=$page">‹</a>
elseif ($page+1) == $active_page
print <a href="$surl?__filelist_page=($page-1)">«</a><a href="$surl?__filelist_page=$page">$page</a>
elseif ($page+2) == $active_page
print <a href="$surl?__filelist_page=1">‹</a>
elseif $page == $active_page
print <span class='current'>$page</span>
elseif ($page-1) == $active_page
print <a href="$surl?__filelist_page=$page">$page</a>
elseif ($page-2) == $active_page
print <a title="Xem Trang $page" href="$surl?__filelist_page=$page">$page</a> <a class="nextpostslink" href="$surl?__filelist_page=($page-1)">»</a>
endif
if $page == $total_pages
print <a class="last" title="Xem Trang $total_pages" href="$surl?__filelist_page=$total_pages">›</a></div></b>
endif
endfunction
<!--/parser:xtscript-->
?>
<?php
<xt id="include" file="/page.xt" />
?>
- Và hưởng thụ thành quả thôi.<xt id="include" file="/page.xt" />
?>
Chúc bạn thành công!!!.
Search Engine: Phân trang filelist mod WordPress, code phân trang, Code filelist, mod, phan, trang, giong, wordpress, cho, filelist, xtgem, Mod Phân Trang Giống WordPress Cho Filelist Xtgem, Xtgem