jandonggao
Senior Member
Nghĩ cách bưng cái Data mới quan trọng nhất![]()
Cái này xưa xài roài. Code một cái thủ công thôi.
Đúng ra ngay từ đầu số id lớn nhất thread của VBB là 5000,Thì bên xenforo bài post đầu tiên lấy id lớn hơn MAX id của VBB.
Sau đó code tool tự động lấy dữ liệu qua theo 1 tiêu chí nào đó mà ko ảnh hưởng, lúc đó hai bên chạy song song bình thường. Ví dụ được vote hay gì đó thì code nó lấy qua, như vậy id theard ko ảnh hưởng . Và chuyện move data được xã hội hóa bởi thành viên.
Sau thi dữ liệu được move qua thì những ID thread củ sẽ redirect qua tương ứng (sửa index của vbb).
CODE NGHIỆP DƯ LÚC CÒN TRẺ TRÂU
PHP:
$link = $_SERVER['REQUEST_URI'];
preg_match_all('!\d+!', $link, $matches);
$ex = explode(''.$matches[0][0].'-', $link);
$pagex = explode('/', $link);
$huynh=explode('.', $pagex[2]);
$new_link = str_replace('/', '', $ex[1]);
$new_link .= '.'.$matches[0][0].'';
$vbbdomain="xxxxx.com";
if (strstr($_SERVER['REQUEST_URI'],'/home/threads/'))
{
$pagex[4]= str_replace("page","page-",$pagex[4]);
//echo $link."====".$pagex[4] ;
//exit;
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://{$vbbdomain}/threads/{$new_link}/{$pagex[4]}");
exit;
}
if (strstr($_SERVER['REQUEST_URI'],'/home/forums/'))
{
$pagex[4]= str_replace("page","page-",$pagex[4]);
//echo $link."====".$pagex[4] ;
//exit;
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://{$vbbdomain}/f/{$new_link}/{$pagex[4]}");
exit;
}





