wordpress mu 下安装bbpress
- Friday, May 11, 2007, 21:59
- Uncategorized
- 2,836 views
- 1 comment
1. 将下载到的文件解压上传到wpmu的目录下,比如是/forums/
2. 修改config-sample.php文件,文件里有详细的提示,设置好以后,注意数据库当然是用mu的数据库了,
再参照这里的方法来和wordpress整合。
其实就是在/* Stop editing */后面加上下面几句话:
1. /* Start WP integration
2. **************************/
3. if(file_exists(“../wp-settings.php”)) {
4.
5. // loads the functions and wp config
6. require_once “../wp-config.php”;
7. require_once “../wp-settings.php”;
8.
9. // use the WP user table for your bbpress user list
10. define(‘CUSTOM_USER_TABLE’, ‘wp_users’);
11.
12. // your $bb->domain must match your wp domain exactly or the hash won’t work and users will not authenticate.
13. $myhash = md5($bb->domain);
14. $bb->usercookie = ‘wordpressuser_’ . $myhash;
15. $bb->passcookie = ‘wordpresspass_’ . $myhash;
16.
17. // Use the same cookie as WP
18. $bb->cookiepath = ‘/’;
19.
20. }
21. /**************************/
3. 文件另存为config.php,上传开始安装。提示你输入wordpress下的管理员用户名,然后你就可以用这个管理员帐号登录bbpress了,你会发现后台右边就会列出最近在mu里注册的用户名。。
4. 如果你在config.php文件里设置了 $bb->mod_rewrite = true; 这个的话,会发现链接打不开了,原因是没有.htaccess文件,解决办法是:登录以后,打开http://yoururl/bb-admin/rewrite-rules.php,
将生成的代码复制到.htaccess文件中,上传到bbpress的安装目录就可以了。。
5. 在config.php文件开头
// ** MySQL settings ** // 上面加上这两句:
require_once(‘../wp-blog-header.php’);
define(‘WP_BB’, true);
这样就可以直接调用wordpress里的函数了,比如你mu装了中文包,就会发现bbpress里面一些相同的词汇就已经是中文了。
Popularity: 29% [?]
One Comment on “wordpress mu 下安装bbpress”
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!





为什么我都进不了安装界面?把bbPress上传到BBS目录后,在URL中输入www.MU安装域名.com/bbPress就提示新建一个名为bbPress的Blog……
回复请用邮件或者MSN吧~谢谢……
[Reply]