• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[bd] WordPress Proxy

Ok last question say my blog is
domain/blog
proxy become's
domain/blogs

google will see the main one right? so all the link's will be /blog
when people come they will see that Fugly default theme/skin

is this the way it's meant to be? or have i gone wrong somewhere?
Thank's

Edit also i have no bdwpp.css Anywhere in xenforo or wordpress :/
 
Ok last question say my blog is
domain/blog
proxy become's
domain/blogs

google will see the main one right? so all the link's will be /blog
when people come they will see that Fugly default theme/skin

is this the way it's meant to be? or have i gone wrong somewhere?
Thank's

Edit also i have no bdwpp.css Anywhere in xenforo or wordpress :/
I don't understand your question :D But there is a setting to always redirect to the proxy version of the site. It's probably what you want ;)

Does this work fine for Gold ?
It works for me at least (WordPress 3.1, XenForo 1.0.0 stable) :D
 
does this allow me to share the user database between xf and wordpress ?

XenForo DB plugin for WordPress.zip

I want my forum and blog to share users. I have 500 + users on the blog and no one of the forum. Trying to merge them and have one DB for both. can this be done ?
 
Hi xfrocks!

Have spent the last couple of hours installing this and playing around with it. It's all going great for me except for one tiny issue which hopefully you have a solution for.

When I change the WP site URL to ensure a commenter is directed properly, back to the XF version of the post, the WP Admin area loses all it's styling. Not a big issue to me but I can't see my moderators enjoying it much. I took a punt at adding a copy of [WPROOT]/wp-content/themes to [XFROOT]/wp-content/themes, although it didnt have the desired effect.

I assume I will need to hard code the stylesheet links into the wordpress admin area theme, can you confirm this and maybe give me a head start on where to look please?

Other than that this is fantastic, thanks a lot :D

[EDIT]: Ok I sorted the styles out by copying the wp-admin images/js/css from my wordpress root into my xenforo root.

The issue I see now is that bbcodes are not parsed in promoted articles. other than that it's rock and roll.
 
Ok I sorted out my bbcode issue. After some digging I think its almost a one liner seems to get it going. Simply create a bbcode parser object after the post is retrieved but before it gets punted of to the wp insertion method I've tested this with all of the standard buttons in the editor.

Find this line (#106)
PHP:
$post = $postModel->getPostById($thread['first_post_id']);

Directly afterwards add the following lines
PHP:
 /* bbcode parser */
$bbcode_parser = new XenForo_BbCode_Parser(new XenForo_BbCode_Formatter_Base());
$post['message'] = $bbcode_parser->render($post['message']);
/* end bbcode parser */

giving the following result
PHP:
$postModel = $this->_getPostModel();
 $post = $postModel->getPostById($thread['first_post_id']);

/* bbcode parser */
$bbcode_parser = new XenForo_BbCode_Parser(new XenForo_BbCode_Formatter_Base());
$post['message'] = $bbcode_parser->render($post['message']);
/* end bbcode parser */

$postData = array(
     'post_status' => 'publish',
     'post_type' => 'post',
     'post_content' => $post['message'],
     'post_title' => $input['title'],
     'post_category' => $input['categories'],
);
$result = wp_insert_post($postData);

Complete Controller.php is attached.
 

Attachments

Hi xfrocks!

Have spent the last couple of hours installing this and playing around with it. It's all going great for me except for one tiny issue which hopefully you have a solution for.

When I change the WP site URL to ensure a commenter is directed properly, back to the XF version of the post, the WP Admin area loses all it's styling. Not a big issue to me but I can't see my moderators enjoying it much. I took a punt at adding a copy of [WPROOT]/wp-content/themes to [XFROOT]/wp-content/themes, although it didnt have the desired effect.

I assume I will need to hard code the stylesheet links into the wordpress admin area theme, can you confirm this and maybe give me a head start on where to look please?

Other than that this is fantastic, thanks a lot :D

[EDIT]: Ok I sorted the styles out by copying the wp-admin images/js/css from my wordpress root into my xenforo root.

The issue I see now is that bbcodes are not parsed in promoted articles. other than that it's rock and roll.
Hi there,

Your fix for the controller is awesome, I have added it to my code and it will be available in the next release. Anyway, can you tell me more about the styling issue?
 
Hey xfrocks.

my dir structure is like this.

WEBROOT/ (xf root)
data/​
internal_data/​
js/​
library/​
styles/​
wp/ (wp root)​
wp-admin/
css/
images/
includes/​
js/
maint/​
network/​
user/​
wp-content/​
wp-includes/​

Because I won't be using the Wordpress install for the public and only the admin I set the Worpress Address and Site Address in the Wordpress admin area as you suggested in an earlier post as follows:

WordPress address (URL): http://DOMAIN/wp

Site address (URL): http://DOMAIN/

All pretty standard and as expected when people post comments they now get redirected back to the XenForo article page they commented on.

The issue I'm now sure, is with the template or the template engine. Unfortunately I know nothing about Wordpress internals so hoped you could offer some advice. either the template engine by default of the template (I hope) uses the 'Site Address' URL when building links to the styles in the output html document. Of course this results in the template looking for the admin styles and javascript in http://DOMAIN/wp-admin/* which does not exist. These has been hastly resolved by creating a copy of the needed directories (the ones highlighted in the above diagram) at the root level like below.

WEBROOT/ (xf root)
data/​
internal_data/​
js/​
library/​
styles/​
wp/ (wp root)​
wp-admin/
css/
images/
includes/​
js/
maint/​
network/​
user/​
wp-content/​
wp-includes/​
wp-admin/
css/
images/
js/

Of course this resolves the issue but is less than ideal. Hopefully it is simply a template variable in the Twenty Ten Style that can be changed to use the 'Site Address' variable instead although when I looked initially I couldn't find it. Any help you can offer would be greatly appreciated.
 
The issue I'm now sure, is with the template or the template engine. Unfortunately I know nothing about Wordpress internals so hoped you could offer some advice. either the template engine by default of the template (I hope) uses the 'Site Address' URL when building links to the styles in the output html document. Of course this results in the template looking for the admin styles and javascript in http://DOMAIN/wp-admin/* which does not exist. These has been hastly resolved by creating a copy of the needed directories (the ones highlighted in the above diagram) at the root level like below.
Oh, it's strange. Why the front end interface needs those assets in wp-admin?
 
No its not the front end that needs them, its the Wordpress administration panel ;)

I mentioned it above, should have said again in my last reply for clarity. My bad.

the WP Admin area loses all it's styling. Not a big issue to me but I can't see my moderators enjoying it much. I took a punt at adding a copy of [WPROOT]/wp-content/themes to [XFROOT]/wp-content/themes, although it didnt have the desired effect.

As I say, I think this is actually a WP bug if anything rather than a WP Proxy bug, but maybe it would be worth distributing a 'Twenty Ten XF' Style with you mod.

I've attached a screenshot with the wp-admin / wp-include removed from the root and highlighted the source from the browser so you can see the issue.

hv2ah1.png
 
So this makes it so your wordpress articles are inside the xenforo theme? Does it sill allow wordpress to use HTML? I tried using the dynamic theme but HTML didn't work so I couldn't use it.

Does anyone have this on their site so I could see an example?
 
I can't seem to find how to add blocks/widgets to the blog page. Left side of the page is my WP content, but right side is empty.
 
I get this error: "Route prefixes must be unique. The specified prefix 'blog' already exists."

I have the blog addon already installed. What should I edit in order to use this?

Thanks!

 
Top Bottom