:::
tad - XOOPS小秘方 | 2011-03-14 | 點閱數: 22114

本站之前的討論區用的是CBB 3.0.8,因為受限於主機PHP環境的關係,XOOPS一直無法升級到2.5,無奈CBB 4.0.3只能裝在XOOPS 2.4.5 之後的版本,所以,一直沿用CBB 3.0.8至今。

搬到新站後,原想將CBB升級為4.0.3,後來發現升級時,會出現空白畫面而且無法升級。由於懶得跟它耗時間抓bug,於是轉向到X-Forum討論區,至少X-Forum討論區更新動作頻頻,看起來相當有活力,而且它也是從CBB改寫而來的,所以,相容性上以及語系的編寫上,都可縮短許多時間。底下就是討論區從CBB3.08更新為X-Forum 5.7.5的一些心得分享:

首先,當然得先裝好X-Forum 5.7.5,只要按照一般裝法來安裝即可,沒啥兩樣。裝好後,把下面語法複製起來,貼到phpMyAdmin中的SQL去執行即可。如此,它就會幫我們把資料從CBB複製一份到X-Forum(換言之,即使沒成功的話,CBB還是活著的)

TRUNCATE 前置字串_xf_archive;
TRUNCATE 前置字串_xf_attachments;
TRUNCATE 前置字串_xf_categories;
TRUNCATE 前置字串_xf_digest;
TRUNCATE 前置字串_xf_extras;
TRUNCATE 前置字串_xf_field;
TRUNCATE 前置字串_xf_forums;
TRUNCATE 前置字串_xf_moderates;
TRUNCATE 前置字串_xf_online;
TRUNCATE 前置字串_xf_posts;
TRUNCATE 前置字串_xf_posts_text;
TRUNCATE 前置字串_xf_reads_forum;
TRUNCATE 前置字串_xf_reads_topic;
TRUNCATE 前置字串_xf_report;
TRUNCATE 前置字串_xf_topics;
TRUNCATE 前置字串_xf_visibility;
TRUNCATE 前置字串_xf_votedata;

INSERT INTO 前置字串_xf_archive (`topic_id`, `post_id`, `post_text`) SELECT * FROM 前置字串_bb_archive;

INSERT INTO 前置字串_xf_attachments (`attach_id`, `post_id`, `name_saved`, `name_disp`, `mimetype`, `online`, `attach_time`, `download`) SELECT * FROM 前置字串_bb_attachments;

INSERT INTO 前置字串_xf_categories (`cat_id`, `cat_image`, `cat_title`, `cat_description`, `cat_order`, `cat_url`) SELECT * FROM 前置字串_bb_categories;

INSERT INTO 前置字串_xf_digest SELECT * FROM 前置字串_bb_digest;

INSERT INTO 前置字串_xf_forums (`forum_id`, `forum_name`, `forum_desc`, `parent_forum`, `forum_moderator`, `forum_topics`, `forum_posts`, `forum_last_post_id`, `cat_id`, `forum_type`, `allow_html`, `allow_sig`, `allow_subject_prefix`, `hot_threshold`, `forum_order`, `attach_maxkb`, `attach_ext`, `allow_polls`) SELECT * FROM 前置字串_bb_forums;

INSERT INTO 前置字串_xf_moderates SELECT * FROM 前置字串_bb_moderates;

INSERT INTO 前置字串_xf_online SELECT * FROM 前置字串_bb_online;

INSERT INTO 前置字串_xf_posts (`post_id`, `pid`, `topic_id`, `forum_id`, `post_time`, `uid`, `poster_name`, `poster_ip`, `subject`, `dohtml`, `dosmiley`, `doxcode`, `dobr`, `doimage`, `icon`, `attachsig`, `approved`, `post_karma`, `attachment`, `require_reply`) SELECT * FROM 前置字串_bb_posts;

INSERT INTO 前置字串_xf_posts_text SELECT * FROM 前置字串_bb_posts_text;

INSERT INTO 前置字串_xf_reads_forum SELECT * FROM 前置字串_bb_reads_forum;
INSERT INTO 前置字串_xf_reads_topic SELECT * FROM 前置字串_bb_reads_topic;
INSERT INTO 前置字串_xf_report SELECT * FROM 前置字串_bb_report;
INSERT INTO 前置字串_xf_topics SELECT * FROM 前置字串_bb_topics;
INSERT INTO 前置字串_xf_votedata SELECT * FROM 前置字串_bb_votedata;

到這裡,您應該就可以去您的新討論區看看了,是否已經順利轉移了~真是輕鬆又愉快阿~

:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.cp27.secserverpros.com%2Fmodules%2Ftadnews%2Findex.php%3Fnsn%3D164

線上使用者

62人線上 (9人在瀏覽最新消息)

會員: 0

訪客: 62

更多…