Snack's 1967
↓↓xuống cuối trang↓↓
Chào mừng bạn đến với wap DinhLoi.XtGem.Com | Chúc bạn có 1 năm mới vui vẻ tốt lành hạnh phúc! Hãy giới thiệu website này cho bạn bè nhé!img
DinhLoi.XtGem.Com =>> CaFe9x.Gq
Bạn đến từ quốc gia: United StatesUnited States



Hôm nay ngày
25.02.25/20:50
img- Hi. Xin chào! Mozilla/5.0
logo
.
HOMECHÁTTruyệnFORUM
logo

Chatbox|Admin nhận làm wap/web, giá cả thương lượng... Thông tin admin tại mỗi bài viết.
Home · Bang hội ·
* Đăng Nhập hoặc Đăng Kí
để sử dụng hết chức năng của diễn đàn.
Hi, Khách!
HomeBang hội » Wapmaster » JohnCMS » Share code phân trang bài viết cho johncms chuẩn
Xuống dưới » Share code phân trang bài viết cho johncms chuẩn
avatar by Pham_loi Pham_loi
Chức vụ:
21:01:22, 23-04-2016

Vào đề đầu tiên bạn mở forum/index.php
Tìm hoặc đoạn tương tự.

<?php
$text 
$res['text';
if (
$set_forum['postcut') {
// Если текст длинный, обрезаем и даем ссылку на полный вариант
switch ($set_forum['postcut') {
case 
2:
$cut 10000;
break;

case 
3:
$cut 30000;
break;
default :
$cut 5000;
}
}
if (
$set_forum['postcut' && strlen($text) > $cut) {
$text substr($text0$cut);
$text functions::checkout($text11);
$text preg_replace('#\[c\(.*?)\[/c\#si''<div class="quote"></div>'$text);
if (
$set_user['smileys')
$text functions::smileys($text$res['rights' ? 0);
echo 
bbcode::notags($text) . '...<br /><a href="'.$home.'/forum/' functions::nhanhnao($type1['text') . '_p' $res['id' . '.html">' $lng_forum['read_all' . ' >></a>';
} else {
// Или, обрабатываем тэги и выводим весь текст
$text functions::checkout($text11);
if (
$set_user['smileys')
$text functions::smileys($text$res['rights' ? 0);
echo 
'<center><font color="green"><h2><b>' bbcode::tags($type1['text') . '</b></h2></font></center>';

echo 
$text;
}

if (
$res['kedit') {
?>

Copy code

Thay tất cả thành

<?php
$trang 
$_GET['trang';
if(empty(
$trang)) $trang=1;
$show '10000';
$tx $res['text';
$strrpos mb_strrpos($tx" ");
$total 1;
if(isset(
$trang)){
$trang abs(intval($trang));
if(
$trang == 0)
$trang 1;
$start $trang-1;
}else{
$trang $start+1; }
$ta 0;
if(
$strrpos){
while(
$ta $strrpos){
$string mb_substr($tx$ta$show);
$tb mb_strrpos($string" ");
$m_sim $tb;
$strings[$total = $string;
$ta $tb $ta;
if(
$trang == $total){
$nd $strings[$total; }
if(
$strings[$total == ""){
$ta $strrpos++;
}else{
$total++; } }
if(
$trang >= $total){
$trang $total-1;
$nd $strings[$trang; }
$total $total-1;
if(
$trang != $total){
$prb mb_strrpos($nd" ");
$nd mb_substr($nd0$prb); } }
else{
$nd $tx; }
$text $nd;
$text functions::checkout($text11);
if (
$set_user['smileys')
$text functions::smileys($text$res['rights' ? 0);
echo 
'<div class="forumtxt"><big>'.$text.'</big></div>';
if(empty(
$trang)) $trang=1;
if(
$total 1){
if(
$trang != 1$pervpage ' <a class="pagenav" href= "/forum/' functions::thai($type1['text') . '_' $id '_trang-'.($trang-1).'.html" title="'.$type1['text'.'">«</a> ';
if(
$trang != $total$nextpage ' <a class="pagenav" href="/forum/' functions::thai($type1['text') . '_'.$id.'_trang-'.($trang+1).'.html" title="'.$type1['text'.'">»</a>';
if(
$trang-0$first '<a class="pagenav" href="/forum/' functions::thai($type1['text') . '_'.$id.'.html" title="'.$type1['text'.'">1</a>...';
if(
$trang+<= $total$last '...<a class="pagenav" href="/forum/' functions::thai($type1['text') . '_'.$id.'_trang-'.$total.'.html" title="'.$type1['text'.'">'.$total.'</a>';
if(
$trang-0$trang2left ' <a class="pagenav" href= "/forum/' functions::thai($type1['text') . '_'.$id.'_trang-'.($trang-2).'.html" title="'.$type1['text'.'">'.($trang-2).'</a> ';
if(
$trang-0$trang1left '<a class="pagenav" href= "/forum/' functions::thai($type1['text') . '_'.$id.'_trang-'.($trang-1).'.html" title="'.$type1['text'.'">'.($trang-1).'</a> ';
if(
$trang+<= $total$trang2right ' <a class="pagenav" href= "/forum/' functions::thai($type1['text') . '_'.$id.'_trang-'.($trang+2).'.html" title="'.$type1['text'.'">'.($trang+2).'</a>';
if(
$trang+<= $total$trang1right ' <a class="pagenav" href="/forum/' functions::thai($type1['text') . '_'.$id.'_trang-'.($trang+1).'.html" title="'.$type1['text'.'">'.($trang+1).'</a>';
if(
$total 1$xemngay '<div class="trang" title="'.$type1['text'.'">'.$pervpage.$first.$trang2left.$trang1left.'<b class="page">'.$trang.'</b>'.$trang1right.$trang2right.$last.$nextpage.'</center></div>';
echo 
''.$xemngay.'';
echo
'<p><form action="/forum/chuyen-trang.php" method="get"><input type="hidden" name="url" value="' functions::thai($type1['text') . '_'.$id.'"><input type="text" name="trang" size="2"/><input type="submit" value="Đến Trang››"/></form></p>';
}
if (
$res['kedit') {
?>

Copy code

nhớ sửa lai func theo func bạn đang dùng nhé vd của mình là ''thai''
sau đó tạo file forum/chuyen-trang.php
với nội dung

<?php
error_reporting
(0);
$trang $_GET['trang';
$url $_GET['url';
if(
$trang){
header('Location: /forum/'.$url.'_trang-'.$trang.'.html');
}else{
header('Location:index.php');
exit; }
?>

Copy code

Cuối cùng vào .htaccess post

<?php
RewriteRule 
^forum/(.*)_([0-9+)_trang-([0-9+).htmlforum/index.php?id=$2&trang=$[L
?>

Copy code

Xong.
Lưu ý: CODE Tích hợp bạn nào làm wap truyện.
Nguồn : Văn Việt - Johncmsvn.Com

Like: 0
Lên trên  Tổng số: 1







Trực Tuyến: Khách: 1
Diễn đàn teen Việt Nam
CopyRight 2014
Tag:
Bạn đến từ:
Share: img img img img img

Thanks To:XtGem
Liên kết:U-ON