Info
- 5 posts
- 4 voices
- Started 5 years ago by tzangms
- Latest reply from CoreForce
- This topic is not resolved
wordpress integrate problem when enable BBLANG
-
- Posted 5 years ago #
Today I am integreating wordpress and bbpress, it's works fine, but after I set BBLANG to my language(zh_TW), this message below shows up.
"Fatal error: Cannot redeclare class streamreader in /path/to/bbpress/bb-includes/streams.php on line 26"
Coz StreamReader class has been declared in wordpress, but bbpress will declare it again in 'bb-settings.php', this coz the error.
here is the code in 'bb-settings.php'
[code]
include_once(BBPATH . BBINC . 'streams.php');
include_once(BBPATH . BBINC . 'gettext.php');
[/code]I use class_exists to avoid these two files, 'streams.php' and 'gettext.php' to be include twice.
the code came into these:
[code]
if (!class_exists('StreamReader'))
include_once(BBPATH . BBINC . 'streams.php');if (!class_exists('gettext_reader'))
include_once(BBPATH . BBINC . 'gettext.php');
[/code]
then it works! bbpress came back to normal, but my language file seems not to be loaded.After all, I find out, that bbpress uses wordpress function after integrate, so I place my .mo file into /path/to/wordpress/wp-includes/languages/ , then, my language file finally loaded. but ..... here is another problem, the .po of wordpress and bbpress will mess up into one file. but I want my wordpress not to be translated. ><
-
- Posted 4 years ago #
I seems to have the same problem. I get
Fatal error: Cannot redeclare class streamreader in /mnt/home/_g/goranlin/www.goranlin.se/blogg/wordpress/bbpress/bb-includes/streams.php on line 26
I want both wp and bbpress to be translate so maybe I can put your code into 'bb-settings.php'. Would that work?
-
- Posted 4 years ago #
I inserted your code:
[code]
include_once(BBPATH . BBINC . 'streams.php');
include_once(BBPATH . BBINC . 'gettext.php');
[/code]in 'bb-settings.php' but it did not quite work. My blog http://www.goranlin.se/blogg/wordpress/ is slower and website adm disappeared. And my forum http://www.goranlin.se/blogg/wordpress/bbpress/
still do not show the posts from the blog which was planned. I use bbSync to try to get that, but no success so far. -
- Posted 4 years ago #
Quoto from simpler integration with wordpress:
Do so by defining WP_BB as true in either config.php or wp-config.php. Also, WordPress will have to be loaded first.
I use WP and BB with german language! If I include wp-blog-header.php in the configuration file (config.php) of bbpress, the following error occurs:
Fatal error: Cannot redeclare class streamreader in /homepages/.../www/forum/bb-includes/streams.php on line 26If I uncomment the lines 122 + 123 in bb-settings.php:
// include_once(BBPATH . BBINC . 'streams.php');
// include_once(BBPATH . BBINC . 'gettext.php');No error occurs ... but the forum is in english!
I use WP 2.3.3 and bbpress 0.8.3.1 ... WP is installed in web root and bbpress in the subfolder "forum".
Is there a documented way to fix this ... or a workaround?
cu, helpy
-
- Posted 4 years ago #
Looks like I'm running into the same or similar issue.
Localization works fine on my local system, which is WordPress free.I've uploaded the same configuration onto a hosted server and this one fails to internationalize. I realize now that the hosting provider offers WordPress as installation option out of the box. I suspect this to be the reason why the internationalizations fails, presumably because of some preliminary setups for WordPress are in place already.
Is there a clean solution to get bbpress internationalized without all the hazzle from WordPress? I intend not to install the WordPress package.
-
You must log in to post.