Change background image
LOVE quotion

Bắt đầu từ 4.53' thứ Hai ngày 17/10/2011


You are not connected. Please login or register

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down  Thông điệp [Trang 1 trong tổng số 1 trang]

Mõ
Tích cực

Cấp bậc: Tích cực

Bài viết : 275

Danh vọng : 450

Uy tín : 15

http://diendan.chinhphuc.info/t8765-topic
http://diendan.chinhphuc.info/t8765-topic#55111
http://www.phpbb.com/community/viewtopic.php?f=65&t=861505
http://www.phpbb.com/community/viewtopic.php?f=65&t=1761395

Yêu cầu:

- Forum bạn phải là phpbb3 (cái này nếu ai xài bb2 thì trước khi chuyển thì up lên bb3)

- Ngôn ngữ forum phải chuyển về tiếng Anh.

- Forum bạn chuyển đến cũng phải sử dụng mã nguồn phpBB (bác nào xài vBB thì cứ chuyển về phpBB trước rồi chuyển tiếp).

- Admin phải biết một số kiến thức về code, về cơ sở dữ liệu...

Nhược điểm:

- Sẽ bị mất tất cả các Poll, Attachment.

Chú ý:

- Đây là công cụ dùng để lấy db của fm để chuyển sang một forum mã nguồn phpbb3 (đã thử) và phpbb2 (chưa thử nhưng tác giả bảo thế) nên bạn nào muốn lấy db này gắn vào một forum mã nguồn khác như vbb hay invision,.. thì bạn không thể chuyển trực tiếp mà phải làm thêm bước convert lại lần nữa nhưng bước này mình sẽ không bàn đến trong bài hướng dẫn, các bạn chịu khó tự tìm hiểu nhé.

- Để tránh gặp phải những lỗi không đáng có giống như mình lúc đầu thì các bạn hãy làm theo đúng hướng dẫn của mình từng bước một ít nhất 2 lần vẫn gặp lỗi thì hãy hỏi mình nhé.

- Để làm được thì forum bạn phải là phpbb ở ver 3, nếu đang là ver 2 thì vô ACP để chỉnh nó lên (coi chừng mất hết template, không biết vụ này vì mình chưa thử)

- Tạm thời ngưng các script đang chạy trên forum như bộ gõ, hiệu ứng...

Những thứ cần có:

- Python 2.xx (không phải 3.xx nhé) -> tải tại python.org.

- 1 Tài khoản với quyền admin tại trang mà bạn muốn lấy db.

- Và bộ công cụ: http://www.mediafire.com/?5yw2f2hxmlg (bên trong có file hướng dẫn bằng tiếng anh)

Thực hiện

- Sau khi down python về, thì cài python trực tiếp vô máy, không đụng gì tới nó hết nhé, chỉ cài thôi.

- Down công cụ về extract ra, mở file "settings.py" lên bằng cách click phải, chọn Edit with IDLE, xong xuôi để đó.

- Mở trang forum của bạn lên bằng domain gốc của forumotion (abc.forumotion.net,...), đăng nhập vào.

- Vào UCP (không phải ACP nhé) chỉnh ngôn ngữ lại về ENGlish, chỉnh định dạng ngày tháng thành "2008-03-29, 19:46"

- Thoát khỏi forum hoàn toàn, xoá sạch cookies.

- Lần này vào forum lại bằng domain gốc của forumotion (để chắc ăn thì sử dụng IE trong toàn quá trình làm việc), bạn đăng nhập vô tới ACP luôn nhé, xong quay trở lại trang chủ Index (không phải Portal).

- Đợi trang load xong copy cái này bỏ vô thanh address (xoá bỏ cái địa chỉ luôn): "javascript:document.cookie" (không có ngoặc kép và dấu cách)

- Nhấn enter sẽ hiện ra một đống code lộn xộn, copy hết vô COOKIEDATA trong file setting mở ở trên. Giống như vầy: COOKIEDATA='mớ code copy được'

- Cũng trong file setting phần URL bạn điền địa chỉ gốc fm của forum bạn. Giống như vầy: http://abc.forumotion./

- Phần Sticky, đây là lựa chọn để lấy các chú ý, thông báo... trong forum bạn. Nếu muốn lấy cái nào bạn mở cái đó lên, nhìn vô thanh address lấy cái ID của cái đó copy vô.

Giống như vầy: sticky=[5,4,6,8,9]

- Phần lockimage , bạn lấy cái link hình của chữ locked trong bài viết để vô phần này

- Phần RANDOMNUMBER, đây là những số dùng để tạo nên pass mới cho thành viên (không cần quan tâm đến cái này)

- Phần NUMUSERS, lấy số id của thành viên mới nhất của forum bạn + 3 ra kết quả, lấy kết quả điền vô số này.

Mọi chuyện đã xong đối với những bạn chỉ muốn backup dữ liệu về máy cho an toàn. Save file setting lại, chạy file members_topics_posts.py thì việc BK bắt đầu.

* Còn chuyện làm sao để gắn DB vô forum mới và báo cho thành viên về pass mới thì mình sẽ bàn sau.

P/S: Trong lúc lấy dữ liệu thành viên, bạn thấy tiến trình lấy thông tin member có dòng chữ "Retrieving e-mail address..." là thành công.
      
Mõ
Tích cực

Cấp bậc: Tích cực

Bài viết : 275

Danh vọng : 450

Uy tín : 15

Hướng dẫn nguyên bản tiếng Anh ngày 08/08/2011, thêm hình minh họa:

== FORUMOTION TO phpBB3 CONVERSION INSTRUCTIONS ==

[Scripts tested with phpBB3 3.0.0]

[To convert to a different forum software, modify members_topics_posts_XXXX.py accordingly]

Before you begin, make some Profile changes (NOTE: If these changes are not done, conversion will probably fail!)

In your user profile preferences, choose the English language
In your user profile preferences, set the date format to "2008-03-29, 19:46".

Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion Fmbk1
In the administration panel, under General -> Messages and Emails -> Configuration:

Set "Posts Per Page" to the stated limit (probably 50)

Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion Fmbk5
Set "Always show the first post in the topics" to "No"
Set "Number of posts from previous page to display on last page" to 0

Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion Fmbk2
Set "Separate announcements and stickies from the messages" to "With a table".

Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion Fmbk3
In the administration panel, switch your theme version to phpBB3.

Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion Fmbk4
== REQUIRED STUFF ==

A Web Server with [preferably] MySQL.

Forum Software installed on this web server, configured and ready to go -- if you aren't using phpBB or SMF, you should convert to phpBB then use a converter to your software (a double conversion may cause a lot to be lost, but the topics, posts, forums and members should be intact)

Database Access - need to be able to insert, delete and truncate

Python (versions 2.5 to 2.6 will work, but Python 3 will NOT work!) -- download from http://www.python.org

CountryMirrorType
Belgium Belnet.be HTTP FTP
Ireland HEAnet.ie HTTP FTP
Netherlands NLUUG.nl HTTP FTP
USA Rowan.edu HTTP
USA OSUOSL.org HTTP FTP

= FORUM STRUCTURE =

1) The converter will crawl for forums, but you may have to fix the forum permissions as well as adding categories.

= POSTS AND TOPICS =

2) Change some settings in settings.py (edit the file)

table_prefix
When you set up your forum software, what prefix did you use (default will depend on the exact software used; it's usually the product name plus an underscore)
COOKIEDATA
Get this by entering this into the address bar while viewing any page in your Forumotion forum:
javascript:document.cookie
and copying the entire text of the page that appears.
The COOKIEDATA line should look like
COOKIEDATA=''
with the single quotes around your data.
URL
URL to the board's root (http://../)
sticky
A list of IDs which are stickied (pinned). You'll have to do this manually by going into each forum and recording the IDs of the pinned topics.
This is optional (set the sticky variable to [] to disable).
The line should look like
sticky=[1,2,3,4,5]
where 1,2,3,4,5 should be replaced by a comma separated list of pinned IDs.
lockimage
Location of the "Locked" image which appears in place of the usual "Post Reply" button.
[[Member settings]]
RANDOMNUMBER
a randomly chosen number used to generate member passwords, so they stay the same from run to run.
NUMUSERS
ID number of the most recent member. You can safely go much higher, since the crawler will only convert members with entries.
ADMINS
a set/list of the Admin user IDs (as they are in Forumotion). This allows the script to correctly set up the admin users.
The user IDs can be found in the user's profile URL: it's in the form http://domain.com/profile.forum?mode=viewprofile&u=

3) Run the members_topics_posts.py Python script (Windows: double click it; *nix use "python members_topics_posts.py" as a command)

4) Import the SQL batch files members.sql, categories_forums.sql, topics_posts.sql and to the forum database, using the character set (encoding) of your forum. They must be imported in that order!

For English forums, use the "latin1", "iso8859-1" or "cp1252" encoding.

For other languages, please check the encoding that your forum uses (you can find the selected encoding under Firefox's "View -> Character Encoding" or Internet Explorer's "Page->Encoding" menus), and import using that encoding.

Tip: Encodings which appear as "Windows-X" (where X is a number) are also referred to as "cpX" encodings.

5) [OPTIONAL] To notify members of the new passwords (randomly generated), run the pm_passwords.py file (configuring settings.py first to suit your needs).
[in settings.py]
msgtitle
The title of the personal message to send
msgbody
The text in the personal message. %%0A is a line break (new line), %s is the password (use this only once!)
If you must use a % sign for any reason, place two of them (%%), only one will show up in the PM. Failure to do so will result in a failed script run!

On the new forum:

1) In your ACP, resynchronize statistics, post counts and dotted topics (main ACP page),
Maintenance->Search index->Create Index for the active search method (if the Delete Index button is shown instead, click it first)

Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion Fmbk7
2) Use this script:

http://www.startrekguide.com/community/viewtopic.php?p=47648#p47648. This script is designed to resynchronize individual post data which this converter is unable to reproduce. Instructions are posted there.

Code:
<?php
/**
* The file must be named resync_bbcode.php
*/

define('IN_PHPBB', true);
$phpbb_root_path = ((isset($phpbb_root_path)) ? $phpbb_root_path : './');
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('posting');

$start = intval(request_var('start', 0));
$limit = 200;

include($phpbb_root_path . 'includes/message_parser.' . $phpEx);

$bbcode_status    = ($config['allow_bbcode']) ? true : false;
$img_status        = ($bbcode_status) ? true : false;
$flash_status    = ($bbcode_status && $config['allow_post_flash']) ? true : false;

$sql = 'SELECT * FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t
    WHERE t.topic_id = p.topic_id
        ORDER BY p.post_id ASC
            LIMIT ' . $start . ', ' . $limit;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
    decode_message($row['post_text'], $row['bbcode_uid']);

    $message_parser = new parse_message();
    $message_parser->message = str_replace('"', '"', html_entity_decode($row['post_text']));
    $message_parser->parse((($bbcode_status) ? $row['enable_bbcode'] : false), (($config['allow_post_links']) ? $row['enable_magic_url'] : false), $row['enable_smilies'], $img_status, $flash_status, true, $config['allow_post_links']);

    if ($row['poll_title'] && $row['post_id'] == $row['topic_first_post_id'])
    {
        $row['poll_option_text'] = '';
        $sql = 'SELECT * FROM ' . POLL_OPTIONS_TABLE . ' WHERE topic_id = ' . $row['topic_id'];
        $result2 = $db->sql_query($sql);
        while ($row2 = $db->sql_fetchrow($result2))
        {
            $row['poll_option_text'] .= $row2['poll_option_text'] . "\n";
        }
        $db->sql_freeresult($result2);

        $poll = array(
            'poll_title'        => $row['poll_title'],
            'poll_length'        => $row['poll_length'],
            'poll_max_options'    => $row['poll_max_options'],
            'poll_option_text'    => $row['poll_option_text'],
            'poll_start'        => $row['poll_start'],
            'poll_last_vote'    => $row['poll_last_vote'],
            'poll_vote_change'    => $row['poll_vote_change'],
            'enable_bbcode'        => $row['enable_bbcode'],
            'enable_urls'        => $row['enable_magic_url'],
            'enable_smilies'    => $row['enable_smilies'],
            'img_status'        => $img_status
        );

        $message_parser->parse_poll($poll);
    }

    $sql_data = array(
        'post_text'            => $message_parser->message,
        'post_checksum'        => md5($message_parser->message),
        'bbcode_bitfield'    => $message_parser->bbcode_bitfield,
        'bbcode_uid'        => $message_parser->bbcode_uid,
    );

    $sql = 'UPDATE ' . POSTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_data) . '
        WHERE post_id = ' . $row['post_id'];
    $db->sql_query($sql);

    if ($row['poll_title'] && $row['post_id'] == $row['topic_first_post_id'])
    {
        $sql_data = array(
            'poll_title'        => str_replace($row['bbcode_uid'], $message_parser->bbcode_uid, $poll['poll_title']),
        );

        $sql = 'UPDATE ' . TOPICS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_data) . '
            WHERE topic_id = ' . $row['topic_id'];
        $db->sql_query($sql);

        $sql = 'SELECT * FROM ' . POLL_OPTIONS_TABLE . ' WHERE topic_id = ' . $row['topic_id'];
        $result2 = $db->sql_query($sql);
        while ($row2 = $db->sql_fetchrow($result2))
        {
            $sql_data = array(
                'poll_option_text'        => str_replace($row['bbcode_uid'], $message_parser->bbcode_uid, $row2['poll_option_text']),
            );

            $sql = 'UPDATE ' . POLL_OPTIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_data) . '
                WHERE topic_id = ' . $row['topic_id'] . '
                AND poll_option_id = ' . $row2['poll_option_id'];
            $db->sql_query($sql);
        }
    }
}

$sql = 'SELECT count(post_id) as post_cnt FROM ' . POSTS_TABLE;
$result = $db->sql_query($sql);
$cnt = $db->sql_fetchrow($result);

if ($cnt['post_cnt'] > ($start + $limit))
{
    meta_refresh(1, './resync_bbcode.' . $phpEx . '?start=' . ($start + $limit));
    trigger_error('The script is not finished yet, please wait.  Part ' . (($start + $limit) / $limit) . ' of ' . intval($cnt['post_cnt'] / $limit) . ' is finished.');
}
else
{
    trigger_error('Finished!');
}

?>

= FINAL TOUCHES =

Make sure to set your forum permissions correctly.
Manually add any moderators, themes or other settings.

Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion Fmbk6
= BUGS/INCOMPLETE CONVERSION NOTES =

- No Attachments
- No Polls
      
KHCN
KHCN Ưu tú

Cấp bậc: Ưu tú

Giới tính : Nam

Bài viết : 796

Danh vọng : 1618

Uy tín : 23

Sao lưu dữ liệu cho forumotion mọi phiên bản
Mon Dec 10, 2012 9:04 am by ƃuoʌıɐq

Đặt tiêu đề cho hấp dẫn tý, để dụ dỗ một số bạn lo lắng vụ giao diện khi chuyển về phpBB3.
Mình thấy có nhiều bạn vẫn còn đang hỏi vấn đề này, một số phải thuê người backup hộ, trong khi nó cũng không đến nỗi phức tạp.

Bước 1: Download 3 file sau:




Bước 2: Cấu hình diễn đàn


  • Profile (lý lịch) Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Preferences (giao diện):
    Ngôn ngữ sử dụng(Board Language) : English (Từ giờ giao diện là tiếng Anh nên đường dẫn mình ghi tiếng Anh luôn)
    Date format : yyyy-mm-dd, hh:mm (Cái dòng cuối dùng) VD: 2012-12-10, 21:00
  • ACP Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149General Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Forum Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Configuration:
    Cookies deletion link : Yes
  • ACP Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149General Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Messages and e-mails Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Configuration:
    Posts Per Page : 50
    Always show the first post in the topics : No
    Number of posts from previous page to display on last page : 0
    Separate announcements and stickies from the messages : With a table
  • ACP Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Display Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Skins Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Choose a theme Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Version: phpBB3
    Nếu 4rum bạn đang là phpBB3 thì không cần làm bước này. Những bạn xài phiên bản khác cũng không cần lo mất giao diện, xong việc ta chỉ cần chuyển lại version cũ và Import file BBtheme đã download ở bước 1 là xong.



Bước 3: Sau khi download file Forumotion Converter ở bước 1, bạn giải nén ra, mở thư mục forumotion, nhấp chuột phải vào file settings (Type: Python File - 3Kb) chọn Edit with IDLE (nếu chưa cài Python, bạn sẽ không thấy dòng này, mà mình thấy edit bằng Notepad cũng được). Điều chỉnh như sau:


  • table_prefix='phpbb_' Để nguyên
  • COOKIEDATA='' Nhập cookie của forum vào giữa 2 dấu nháy. Cách lấy cookie như sau:
    Đầu tiên xóa cookie forum bằng cách nhấp vào link Delete the forum cookies ở gần cuối forum (trên cái bảng thống kê). URL_FORUM/?mode=delete_cookies
    Đăng nhập lại bằng nick admin chính, vào ACP rồi thoát ra trang chủ, mục đích là làm mới cookie ID và PW
    Nhập dòng sau vào thanh địa chỉ trình duyệt
    CODE:javascript:document.write(document.cookie)
    Nó sẽ cho ra toàn bộ cookie của forum bạn, còn nếu không thấy gì (như khi dùng trình duyệt Firefox) thì bạn tạo một trang HTML rồi nhập code sau vào:
    CODE:<script type="text/javascript">javascript:document.write(document.cookie)</script>
    ... Nhấn Preview, bạn sẽ thấy cookie của forum.
  • URL='http://myboard.forumotion.com/' Thay myboard.forumotion.com bằng địa chỉ gốc của diễn đàn bạn, nếu không nhớ có thể xem lại tại ACP Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149General Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Forum Address
  • sticky=[] Nhập ID của bài viết trong phần Sticky của các chuyên mục (thông báo, chú ý), cách nhau bằng dấu phẩy "," VD [1,2,3,4] nếu không có thì để trống.
  • lockimage='https://2img.net/i/fa/prosilver/button_topic_locked_en.png' thay bằng link ảnh button khóa bài viết của bạn. ACP Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Display Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Pictures and Colors Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Pics management Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Advanced Mode Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Button Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149New posts [ Locked ] : Lấy link ảnh trong này.
  • RANDOMNUMBER=12345678 Để số ngẫu nhiên, nó dùng để tạo mật khẩu mới cho thành viên trong file backup (do backup sẽ mất mật khẩu), cứ để nguyên cũng được.
  • NUMUSERS=200 Thay số 200 bằng số thành viên diễn đàn bạn, có thể xem số ID của thành viên mới đăng ký. Xem ở bảng thống kê forum không chính xác đâu, vì có một số thành viên bị xóa.
  • PROFILE_DATEFMT="%Y-%m-%d" Để nguyên
  • ADMINS=[1] Để nguyên
  • waittime=1 Đây là thời gian giữa 2 lần gửi mật khẩu mới cho thành viên tính bằng giây.


Mấy dòng dưới là thông báo đổi mật khẩu cho thành viên mới, thích thì dịch ra tiếng việt, còn mình chỉ backup thì chưa cần quan tâm làm gì. Xong, Lưu lại. Nhấp đôi vào file members_topics_posts_phpBB3, đợi nó chạy xong nhấn ENTER để kết thúc.

Forum cũ của mình 5k bài viết, 1k thành viên mất khoảng hơn 3 giờ.

Sau khi backup xong, bạn chuyển diễn đàn về version cũ, sau đó Import file BBtheme bạn lưu ở bước 1 để phục hồi giao diện. ACP Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Display Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Skins Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Themes management Hướng dẫn backup database (DB) về máy cho diễn đàn forumotion 93149Import the skin

Nguồn: https://www.phpbb.com/community/viewtopic.php?f=65&t=861505
      
      

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang  Thông điệp [Trang 1 trong tổng số 1 trang]

Quyền hạn của bạn

Bạn không có quyền trả lời bài viết
free counters



  • Đoàn Ngọc Khánh

    mobile phone 098 376 5575


    Đỗ Quang Thảo

    mobile phone 090 301 9666


    Nguyễn Văn Của

    mobile phone 090 372 1401


    IP address signature
    Free forum | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất