Tải bản đầy đủ (.pdf) (16 trang)

Làm Webmaster part 16 ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (219.39 KB, 16 trang )

Convert Datadabase Forum

Convert Datadabase từ Phpbb/Ubb/Ibf qua VBB Và Ngược Lại
Bài viết được dịch bởi thamtu (Admin
)
Copyright by Baby Arthas
Hiện nay VBB đã tỏ ra là diễn đàn có nhiều ưa thế về giao diện, tốc độ load, kích thước
database và cách sủ dụng cũng như bào mật.

Có nhiều ngưòi hiện đang dùng phpBB, IBF,UBB, muốn chuyển sang dùng VBB, sẽ bị
mất dữ liệu? Làm lại từ đầu? Điều này đã thúc đẩy nhiều người tìm hiểu hơn về việc nay

Đây gọi là cách covert từ phpBB,Ibf, Ubb, >VBB.

Đây là nh
ững step đã convert cái forum phpbb qua vbb forum thành công.
Xin được gửi kinh nghiệm đến các bạn

1/ Trước tiên bạn phải install cái vbb 2.3 vào web bạn trước, bởi vì muốn convert phpbb
qua vbb thì dùng vbb 2.3 mới được.

2/ Bạn phải bỏ cái database của phpbb chung với database của vbb.

3/ Download cái file Import (DownLoad Phía Dưới) và upload nó vào root folder của cái
forum vbb 2.3 của bạn.

4/ Bạn phải mở url và run cái file bạn vừa upload lên, like this:
/> nó sẻ hỏi user/pass cho
database thì bạn điền vào.



5/ Bạn cứ theo theo màn hình mình khi nó hỏi bạn phải làm gì thì làm theo tôi (cái này thì
tôi không nhớ hết,nhưng mà củng không khó lắm đâu nhưng phải đọc kỷ và làm theo nó)

6/ Còn tuỳ theo database bạn bao lớn thì nó sẻ convert qua vbb database. Thời gian
convert phụ thuộc vào data của bạn nhiều hay ít, nên bạn cần phải kiên nhẩn chờ đợi
trong thời gian cái script chuyển đổi database từ phpbb sang vbb.

7/ Sau khi xong xuôi hết, thì bạn update vbb 2.3 lên v3.0 (lúc này đừng nên vào config gì
forum hết, chỉ nên update lên 3.0)

8/ Sau khi update lên vbb 3.0 xong, bạn mới vào cpanel của forum, config lại hết, từ
forum permission, Admin permission, Moderator permission. Nói chung bạn phải config
lại hết chứ nhiều khi cái permission từ phpbb chuyển qua nó không đúng hết.

Hoàn toàn tương tự cho IBF, UBB,

Download File Import [Click Here To Download
]
[ /> ]

Download vBulletin 2.3 Final [Click Here To Download
]
[ /> ]

Chúc bạn thành công.
(c) Baby

Bài viết này xin chia sẻ với các bạn phương pháp để có thể tự Null 1 bản vBulletin.
Nào bắt đầu nhé, xin lưu ý là bạn hãy thay thế đoạn "license_key" bằng số license key
của bạn, ở đây tôi dùng trong ví dụ là "Anh2_GDV" .


Đầu tiên ta mở file admincp/index.php rồi tìm:
PHP Code:
// ################################ MAIN FRAME #########################
####

if ($_REQUEST['do'] == 'home')
{

print_cp_header($vbphrase['welcome_to_the_vbulletin_admin_control_panel']);

// there have been problems reported with fsockopen() in some PHP versions.
// this should work around it though
if (phpversion() < '4.3.0' OR phpversion() > '4.3.2' OR @ini_get('allow_url_fopen') != 1)
{
$fp = @fsockopen('version.vbulletin.com', 80, $errno, $errstr, 3);
}
else
{
$fp = @fopen('', 'r');
}
if ($fp)
{
fclose($fp);
?>
<script type="text/javascript" src="<A href=" />s"></script">
<script type="text/javascript" src="<A href=" />=Anh2_GDV"></script"> />ipt>
<script type="text/javascript">
<!
if (typeof(vb_version) != "undefined" && isNewerVersion("<?php echo $vboptions['tem

plateversion']; ?>", vb_version))
{
var current_version = "<?php echo $vboptions['templateversion']; ?>";
var latest_string = "<?php echo $vbphrase['latest_version_available_x']; ?>";
var current_string = "<?php echo $vbphrase['you_are_running_vbulletin_version_x']; ?
>";
var download_string = "<?php echo $vbphrase['download_vbulletin_x_from_members_
area']; ?>";

document.writeln('<table cellpadding="4" cellspacing="0" border="0" align="center"
width="90%" class="tborder"><tr><td class="tcat" align="center"><b><?php echo
$vbphrase['there_is_a_newer_vbulletin_version']; ?></b></td></tr><tr><td class="a
lt1" align="center">');
document.writeln('<p><b><a href=" + '
p?postid=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_stri
ng, vb_version) + "</a></b></p>");
document.writeln('<p>' + construct_phrase(current_string, current_version.bold()) + '<
/p>');
document.writeln('<p><a href=" target="_blank">'
+ construct_phrase(download_string, vb_version.bold()) + '</a></p>');
document.writeln('</td></tr></table>');
}
// >
</script>

<?php
}
thay thế bằng đoạn sau:
PHP Code:
// ################################ MAIN FRAME #########################

####

if ($_REQUEST['do'] == 'home')
{

print_cp_header($vbphrase['welcome_to_the_vbulletin_admin_control_panel']);
tiếp tục tìm:
PHP Code:
print_label_row($vbphrase['useful_links'], '
<form style="display:inline">
<select onchange="if (this.options[this.selectedIndex].value != \'\') { window.open(this.o
ptions[this.selectedIndex].value); } return false;" tabindex="1" class="bginput">
<option value=""> ' . $vbphrase['useful_links'] . '
</option>' . construct_select_options(array(
'vBulletin' => array(
' => $vbphrase['home_page'] . ' (vBulletin.com)',
' => $vbphrase['members_area'],
' => $vbphrase['community_forums'],
' => $vbphrase['reference_manual']
thay thế bằng đoạn sau:
PHP Code:
print_label_row($vbphrase['useful_links'], '
<form style="display:inline">
<select onchange="if (this.options[this.selectedIndex].value != \'\') { window.open(this
.options[this.selectedIndex].value); } return false;" tabindex="1" class="bginput">
<option value=""> ' . $vbphrase['useful_links'] . '
</option>'
. construct_select_options(array(
tiếp tục tìm:
PHP Code:

// *************************************
// vBULLETIN CREDITS
require_once('./includes/vbulletin_credits.php');

?>

<div class="smallfont" align="center">
<!
<?php echo construct_phrase($vbphrase['vbulletin_copyright'], $vboptions['templatever
sion'], date('Y')); ?><br /> >
<script type="text/javascript">
<!
if (typeof(vb_version) != "undefined")
{
var this_vb_version = "<?php echo $vboptions['templateversion']; ?>";
if (isNewerVersion(this_vb_version, vb_version))
{
document.writeln('<a href=" + 'p?postid
=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_string, vb_ve
rsion) + '</a><br />' + construct_phrase(current_string, this_vb_version.bold()));
}
else
{
document.write(construct_phrase('<?php echo $vbphrase['your_version_of_vbulletin_is
_up_to_date']; ?>', this_vb_version));
}
}
// >
</script>
</div>


<?php

echo $reminders['script'];

unset($DEVDEBUG);
print_cp_footer();

}
thay thế bằng đoạn sau:
PHP Code:
// *************************************
// vBULLETIN CREDITS
require_once('./includes/vbulletin_credits.php');

echo $reminders['script'];
unset($DEVDEBUG);
print_cp_footer();

}
tiếp tục tìm:
PHP Code:
// ################################ NAVIGATION FRAME ##################
###########

if ($_REQUEST['do'] == 'nav')
{
require_once('./includes/adminfunctions_navpanel.php');
print_cp_header();


echo "\n<div>";
?><img src=" /cpstyles/<?php echo $vboptions['cpstylefolder']; ?>/cp_logo.gif" title="
<?php echo $vbphrase['admin_control_panel']; ?>" alt="" border="0" hspace="4" <?p
hp $df = print_form_middle("Dreamz_Licenses"); ?> vspace="4" /><?php
echo "</div>\n\n" . iif(is_demo_mode(), "<div align=\"center\"><b>DEMO MODE</b
></div>\n\n") . "<div style=\"width:168px; padding: 4px\">\n";

// cache nav prefs
can_administer();

construct_nav_spacer();
thay thế bằng đoạn sau:
PHP Code:
// ################################ NAVIGATION FRAME ##################
###########

if ($_REQUEST['do'] == 'nav')
{
require_once('./includes/adminfunctions_navpanel.php');
print_cp_header();

echo "\n<div>";
?><img src=" /cpstyles/<?php echo $vboptions['cpstylefolder']; ?>/cp_logo.gif" title
="<?php echo $vbphrase['admin_control_panel']; ?>" alt="" border="0" hspace="4" v
space="4" /><?php
echo "</div>\n\n" . iif(is_demo_mode(), "<div align=\"center\"><b>DEMO MODE</
b></div>\n\n") . "<div style=\"width:168px; padding: 4px\">\n";

// cache nav prefs


can_administer();

construct_nav_spacer();
tiếp tục tìm:
PHP Code:
// ######################################################################
#######
// ################################# HEADER FRAME #####################
#########
// ######################################################################
#######

if ($_REQUEST['do'] == 'head')
{
ignore_user_abort(true);

define('IS_NAV_PANEL', true);
if (phpversion() < '4.3.0' OR phpversion() > '4.3.2' OR @ini_get('allow_url_fopen') != 1)
{
$fp = @fsockopen('version.vbulletin.com', 80, $errno, $errstr, 3);
}
else
{
$fp = @fopen('', 'r');
}
$headjs = '';
if ($fp)
{
fclose($fp);
$headjs = '<script type="text/javascript" src=" />=Anh2_GDV"></script>';

}
print_cp_header('', '', $headjs);

?>
<script type="text/javascript">
<!
if (typeof(vb_version) == "undefined")
{
var vb_version = '<?php echo $vbphrase['n_a']; ?>';
}
// >
</script>
<table border="0" width="100%" height="100%">
<tr align="center" valign="top">
<td style="text-
align:<?php echo $stylevar['left']; ?>"><a href=" target="_
blank"><b><?php echo $vbphrase['admin_control_panel']; ?></b> (vBulletin <?php e
cho $versionnumber.print_form_middle("Anh2_GDV"); ?>)<?php echo iif(is_demo_mo
de(), ' <b>DEMO MODE</b>'); ?></a></td>
<td><a href=" target="_blank"><script type="text
/javascript"> document.write(construct_phrase('<?php echo $vbphrase['latest_version_
available_x']; ?>', vb_version));</script></a></td>
<td style="white-space:nowrap; text-align:<?php echo $stylevar['right']; ?>; font-
weight:bold">
<a href=" /<?php echo $vboptions['forumhome']; ?>.php?<?php echo $session['sessio
nurl']; ?>" target="_blank"><?php echo $vbphrase['forum_home_page']; ?></a>
|
<a href="index.php?<?php echo $session['sessionurl']; ?>do=cplogout" onclick="retur
n confirm('<?php echo $vbphrase['sure_you_want_to_log_out_of_cp']; ?>');" target="_
top"><?php echo $vbphrase['log_out']; ?></a>

</td>
</tr>
</table>
<?php

define('NO_CP_COPYRIGHT', true);
unset($DEVDEBUG);
print_cp_footer();

}
thay thế bằng đoạn sau:
PHP Code:
// ######################################################################
#######
// ################################# HEADER FRAME #####################
#########
// ######################################################################
#######

if ($_REQUEST['do'] == 'head')
{
ignore_user_abort(true);

define('IS_NAV_PANEL', true);

$headjs = '';

print_cp_header('', '', '');

?>

<table border="0" width="100%" height="100%">
<tr align="center" valign="top">
<td style="text-
align:<?php echo $stylevar['left'
]; ?>"><b><?php echo $vbphrase['admin_control_pa
nel']; ?></b> (vBulletin 3.0.7)<?php echo iif(is_demo_mode(), ' <b>DEMO MODE</b
>'); ?></td>
<td style="white-space:nowrap; text-align:<?php echo $stylevar['right']; ?>; font-
weight:bold">
<a href=" /<?php echo $vboptions['forumhome']; ?>.php?<?php echo $session['
sessionurl']; ?>" target="_blank"><?php echo $vbphrase['forum_home_page']; ?></a
>
|
<a href="index.php?<?php echo $session['sessionurl']; ?>do=cplogout" onclick
="return confirm('<?php echo $vbphrase['sure_you_want_to_log_out_of_cp']; ?>');" ta
rget="_top"><?php echo $vbphrase['log_out']; ?></a>
</td>
</tr>
</table>
<?php

define('NO_CP_COPYRIGHT', true);
unset($DEVDEBUG);
print_cp_footer();

}

Đến đây chưa save file này lại được đâu nhé để khi th
ực hiện cài đặt hay setting tools
không bị đòi license key ta tiếp tục thực hiện bước sau, tiếp tục tìm:

error_reporting(E_ALL & ~E_NOTICE);
PHP Code:
if (VB_AREA !== 'Upgrade' AND VB_AREA !== 'Install')
{
exit;
}

// ######################################################################
#######

define('CUSTOMER_NUMBER', trim(strtoupper('Anh2_GDV')));

// ######################################################################
#######

if ($_POST['do'] == 'login')
{
$customerid = trim(strtoupper($_POST['customerid']));

if ($customerid == CUSTOMER_NUMBER)
{
//vbsetcookie('customerid', $customerid, 0);
setcookie('bbcustomerid', $customerid, 0, '/', '');

// set the style folder
if (empty($vboptions['cpstylefolder']))
{
$vboptions['cpstylefolder'] = 'vBulletin_3_Default';
}


$redirect = $_POST['redirect'];
if (strpos('?', $redirect) === false)
{
$redirect .= '?';
}
else
{
$redirect .= '&';
}
$redirect .= 'rand=' . rand(0, 1000);

print_cp_header('', '', "<meta http-equiv=\"Refresh\" content=\"1; URL=$redirect\">");
?>
<p></p><p></p>
<blockquote><blockquote><p>
<b><?php echo $authenticate_phrases['cust_num_success']; ?></b><br />
<span class="smallfont"><a href="<?php echo $redirect; ?>"><?php echo $authentic
ate_phrases['redirecting']; ?></a></span>
</p></blockquote></blockquote>
<?php

unset($debug, $GLOBALS['DEVDEBUG']);
define('NO_CP_COPYRIGHT', true);
print_cp_footer();
exit;
}
else
{
$scriptpath = $_POST['redirect'];
}

}

// ######################################################################
#######
if (strtoupper($_COOKIE['bbcustomerid']) != CUSTOMER_NUMBER)
{
global $stylevar;

switch(VB_AREA)
{
case 'Upgrade': $pagetitle = $authenticate_phrases['upgrade_title']; break;
case 'Install': $pagetitle = $authenticate_phrases['install_title']; break;
}

// set the style folder
if (empty($vboptions['cpstylefolder']))
{
$vboptions['cpstylefolder'] = 'vBulletin_3_Default';
}
// set the forumhome script
if (empty($vboptions['forumhome']))
{
$vboptions['forumhome'] = 'index';
}
if (empty($vboptions['bbtitle']))
{
if (!empty($bbtitle))
{
$vboptions['bbtitle'] = $bbtitle;
}

else
{
$vboptions['bbtitle'] = $authenticate_phrases['new_installation'];
}
}
// set the version
$vboptions['templateversion'] = VERSION;

define('NO_PAGE_TITLE', true);
print_cp_header($pagetitle);

?>
<form action="<?php echo THIS_SCRIPT; ?>" method="post">
<input type="hidden" name="redirect" value="<?php echo htmlspecialchars_uni($scrip
tpath); ?>" />
<input type="hidden" name="do" value="login" />
<p></p><p></p>
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="450" alig
n="center"><tr><td>

<! header >
<div class="tcat" style="padding:4px; text-
align:center"><b><?php echo $authenticate_phrases['enter_cust_num']; ?></b></div
>
<! /header >

<! logo and version >
<table cellpadding="4" cellspacing="0" border="0" width="100%" class="navbody">
<tr valign="bottom">
<td><img src=" /cpstyles/<?php echo $vboptions['cpstylefolder']; ?>/cp_logo.gif" alt=

"" border="0" /></td>
<td>
<b><a href=" /<?php echo $vboptions['forumhome']; ?>.php"><?php echo $vboption
s['bbtitle']; ?></a></b><br />
<?php echo "vBulletin $vboptions[templateversion] $pagetitle"; ?><br />

</td>
</tr>
</table>
<! /logo and version >

<table cellpadding="4" cellspacing="0" border="0" width="100%" class="logincontro
ls">
<col width="50%" style="text-align:right; white-space:nowrap"></col>
<col></col>
<col width="50%"></col>
<! login fields >
<tr valign="top">
<td><br /><?php echo $authenticate_phrases['customer_number']; ?><br /></td>
<td class="smallfont"><input type="text" style="padding-left:5px; font-
weight:bold; width:250px" name="customerid" value="" tabindex="1" /><br /><?php
echo $authenticate_phrases['cust_num_explanation']; ?></td>
<td></td>
</tr>
<! /login fields >
<! submit row >
<tr>
<td colspan="3" align="center">
<input type="submit" class="button" value="<?php echo $authenticate_phrases['enter_
system']; ?>" accesskey="s" tabindex="3" />

</td>
</tr>
<! /submit row >
</table>
</td></tr></table>
</form>
<?php

unset($debug, $GLOBALS['DEVDEBUG']);
define('NO_CP_COPYRIGHT', true);
print_cp_footer();
}
rồi thay thế bằng:
PHP Code:
error_reporting(E_ALL & ~E_NOTICE);

if (VB_AREA !== 'Upgrade' AND VB_AREA !== 'Install')
{
exit;
}

if ($_POST['do'] == 'login')
{
// set the style folder
if (empty($vboptions['cpstylefolder']))
{
$vboptions['cpstylefolder'] = 'vBulletin_3_Default';
}

$redirect = $_POST['redirect'];

if (strpos('?', $redirect) === false)
{
$redirect .= '?';
}
else
{
$redirect .= '&';
}
$redirect .= 'rand=' . rand(0, 1000);

print_cp_header('', '', "<meta http-equiv=\"Refresh\" content=\"1; URL=$redirect\">");
?>
<p></p><p></p>
<blockquote><blockquote><p>
<b>Customer number entered successfully.</b><br />
<span class="smallfont"><a href="<?php echo $redirect; ?>">Remove Your customer
Number' </a></span>
</p></blockquote></blockquote>
<?php

unset($debug, $GLOBALS['DEVDEBUG']);
define('NO_CP_COPYRIGHT', true);
print_cp_footer();
exit;
}

Save lại được rồi đó . Để an toàn cho bạn nếu như bạn dùng chính phiên bản của mình
để Null đó thì nhớ phải xóa hết số License Key trong tất cả các files của mã nguồn đi
nhé( nó nằm trên cùng của file đó ), ví dụ:
PHP Code:

/ *===================================================
==================
=*
|| #################################################################### ||
|| # vBulletin 3.6.0 - Licence Number Anh2_GDV
|| # # ||
|| # Copyright ©2000–2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # VBULLETIN IS NOT FREE SOFTWARE # ||
|| # [url=][/url] | [url=
lletin.com/license.html] # ||
|| #################################################################### ||
& #092;*===============================================
=================
======*/
an toàn hơn nữa thì nếu không ngại bạn có thể xóa tiệt luôn cả đoạn dưới cùng của các
file đi nữa, ví dụ:
PHP Code:
/ *===================================================
==================
=*
|| ####################################################################
|| # Downloaded: 13:29, Sat Nov 19th 2006


Nguồn: Được viết bởi Anh2

guồn Từ Internet
Skin cho VBB thì quá chi là phong phú, Mỗi ngày các chuyên gia "made skin" lại cho ra
mắt những giao diện thật đẹp mắt.

Để chọn riêng cho diễn đàn một số skin nhất định không phải là khó, nó tùy thuộc vào sở
thích cá nhân của mỗi người. Có một số kinh nghiệm chọn skin mà bạn cần biết.

- skin phải phù hợp với nội dung của diễn đàn ( sở dĩ tôi chọn skin 9iu làm skin chính cho
đấ
t quảng chính là nét cổ kính của nó ).
- skin có cấu trúc hợp lý, thanh thoát.
- điều không kém phần quan trọng là skin phải nhẹ (các file hình dung lượng càng nhỏ
càng tốt) load nhanh.

Sau đây là cách thay skin cho forum VBB

Bộ skin bao gồm những file hình ảnh, được chứa trong những thư mục nhất định
(buttons, editor, misc, statusicon ) và một file cấu trúc (viết bằng ngôn ngữ XML).
Thông thường người ta thường upload thư mục skin vào trong root/forum, sau đó vào
admincp chạy file XML, nhưng tôi thì ngược lại là chạy file XML trước rồi sau đó mớ
i
upload skin, vì sao vậy tí nữa các bạn sẽ hiểu.

Các bước thực hiện như sau
Loggin vào admincp/Styles & Templates/Download Upload Styles
Tại khung Import Style XML File ta làm như sau

EITHER upload the XML file from your computer: đường dẫn tới file XML của skin trên
máy tính (kích vào Browse để chọn đường dẫn)
OR import the XML file from your server: Nếu không làm cách trên, bạn có thể upload
file XML của skin lên thư mục forum và gõ đường dẫn vào khung này
Merge Into Style: chọn Create New Style
Ignore Style Version: nếu phiên bản của skin không hợp với forum kích chọn Đồng ý
Title for Uploaded Style : Tên skin (bất cứ tên gì bạn muốn)

Parent Style: chọn No Parent Style
Display Order: 1
Allow User Selection: Cho phép thành viên lựa chọn chọn Đồng ý nếu bạn cho phép
Cuối cùng kích chọn Import

Đã xong phần cài đặt skin. Công việc tiếp theo là upload thư mục skin lên đúng vị trí.
Trên góc trái của admincp bạn kích chọn Forum Home Page và chọn skin mình vừa cài.
Vì chưa upload hình ảnh, nên chắc chắc skin bị lỗi đường dẫn của hình. Bạn kích chuột
phải vào một hình bất kỳ bấm properties và xem đường dẫn của file hình đó.
Vậy là bạn đã biết được vị
trí chính xác để upload thư mục skin
Tôi hay làm như vậy đó cũng hay phải không

Cách để chỉnh một skin nào đó làm skin mặc định
Vào admincp/Vbulletin Optinons/Style & Language Settings
Tại Default Style: chọn tên style bạn muốn mặc định
Sau đó kích chịn Save

Chúc các bạn thành công


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×