MyBB Community Forums

Full Version: Thoughts on this Wordpress Plugin to Merge/Bridge MyBB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2013-05-06, 10:49 AM).m. Wrote: [ -> ]^ Thanks. most of the users should be able to install WordPress & MyBB on the same domain.

however original poster here and other users are interested in having single sign in for WordPress & MyBB.
that is, they do not want different log in systems for the forum & the blog.
Hmmm why to do that?? I think i do not want some rude guy making posts all over my Wordpress site, this way is much simpler. Just ban him and make sure yur main site is not compromised.Lightbulb
(2013-05-06, 10:34 AM)navuhodonosor Wrote: [ -> ]
(2013-05-06, 09:32 AM)WebDevandPhoto Wrote: [ -> ]Simple and straightforward? I'd like to see that typed out how if you don't mind.

Ok first you go to your server with your ftp client.
Go to /public_html or whatever is the main folder where your Wordpress installation is.
Then make there new folder and name it "forum", so you will have four folders in total in the root of "public_html":
forum
wp-admin
wp-content
wp-includes

Now ftp your Mybb to "forum" folder and install it - follow installation instructions that came zipped with your download.
You will need NEW database for your Mybb installation. (you do not want to make your life miserable when it came to upgrade either Wordpress or Mybb, and it is safer and easier for backups and eventually to fix corruptions in separated databases.
you just need to be careful with paths for cookies, Mybb will enter paths correctly if you provide correct data for your site installation.
On my test site it goes like this:
Homepage: http://sasha.site90.net
Cookie Domain: .sasha.site90.net (this is your site domain,just add (dot)at the beginning (no http://www)
Cookie Path: /forum/ (it is the "forum" folder in your domain so if you change the name of this folder you must change it here too, and do not forget forward slashes)
Now only thing that you need to do is to connect Wordpress with your forum so go to wordpress dashboard and make new menu item and link it to index.php of your Mybb installation.
In test site example it is: http://sasha.site90.net/forum/index.php
And you have your Wordpress-Mybb installation on same domain easy to maintain.CoolShy

..... ...... ..... this is not at all what I'm talking about....
what you gave instructions to is how to install MyBB and Wordpress on that same domain as well as adding a LINK to MyBB in Wordpress.... the skill it takes to do that is minimal.

What I was talking about since OP is called Single Sign On for both Wordpress & MyBB... that means one user name, one password, one login.... across both platforms.

.... so yea... lol I'm glad to see that I misunderstood you when you claimed it was simple and straightforward... because we're not talking about the same thing. If singe sign on was simple and straight forward (as installing a platform) then there would be numerous solutions available.

If you find out how to do single sign on for Wordpress, MyBB, and other platforms do share...as that's what the main topic of this thread is about.
We launched a new MyBB plugin to integrate Wordpress, you can find out more here: http://mods.mybb.com/view/wordpress-bridge
^ Thanks. IIRC, that is for visual integration. earlier version was not perfect - it was like a iframe!
there were style conflicts (may be due to navigation menu used on wordpress). yet to test the new version.
(2013-05-22, 08:06 AM)zingiri Wrote: [ -> ]We launched a new MyBB plugin to integrate Wordpress, you can find out more here: http://mods.mybb.com/view/wordpress-bridge

I'll have to check this out?
How do you manage to wrap the Theme used for the wordpress site onto the MyBB site without messing up the functionality of the MyBB core javascripts? EG prototype and others do not work well with many jQuery scripts.
(2013-05-26, 09:29 AM)WebDevandPhoto Wrote: [ -> ]
(2013-05-22, 08:06 AM)zingiri Wrote: [ -> ]We launched a new MyBB plugin to integrate Wordpress, you can find out more here: http://mods.mybb.com/view/wordpress-bridge

I'll have to check this out?
How do you manage to wrap the Theme used for the wordpress site onto the MyBB site without messing up the functionality of the MyBB core javascripts? EG prototype and others do not work well with many jQuery scripts.

I havent been able to make it work yet.
(2013-05-28, 04:39 AM)rainbowdash93 Wrote: [ -> ]
(2013-05-26, 09:29 AM)WebDevandPhoto Wrote: [ -> ]
(2013-05-22, 08:06 AM)zingiri Wrote: [ -> ]We launched a new MyBB plugin to integrate Wordpress, you can find out more here: http://mods.mybb.com/view/wordpress-bridge

I'll have to check this out?
How do you manage to wrap the Theme used for the wordpress site onto the MyBB site without messing up the functionality of the MyBB core javascripts? EG prototype and others do not work well with many jQuery scripts.

I havent been able to make it work yet.


Thanks Rainbowdash93,
I had suspicions that this wouldn't work as there would more than likely massive javascript/format issues as WP theme CSS can't directly apply to MyBB theme CSS without heavily modifying one or the other. Let along javascript conflicts.. most themes use their own javascripts. I don't see how a plugin(s) can successfully do this.
i am good at the design point of view, i already made my wordpress and mybb themes look identical..

what im looking for is the ability to call php stuff

for example include welcomeblock in wordpress and not the whole forum... so i can have the bar under my header.. so if ppl are logged in it shows their logged in name, usercp etc.. if they are logged out to show guest to sign in...
I wanted to integrate MyBB (version 1.8.5) with my Wordpress theme so the forum would visually fit into Wordpress; for now I'm interested in "visual" integration. I have tried that wordpress-bridge by zingiri  but it seems doesn't work after installation but it gave me a clue on how this could be made.

I started with a "no frame" solution. I have created a very simple plugin for MyBB that fetches the "special wordpress page" that contains a "[BRIDGE]" content (like zingiri did). After that the plugin has two pages: a wordpress page and a forum output page. Simple solution would be to copy the MyBB body section into that Wordpress page where a phrase "[BRIDGE]" is located. I managed to did that but the MyBB CSS'were missing. So I copied the CSS links from MyBB page to Wordpress head section. It didn't helped to much because of styles conflicts between Wordpress and MyBB (like @WebDevandPhoto  mentioned earlier). I went further: the plugin modifies the MyBB output page in runtime:
  • prefixes ids (if available) of html elements with "mybb-" (so the ids may be different than generated by Wordpress)
  • prefixes the CSS styles with "mybb-" (so there will be no name conflicts in CSS)
  • adds a data-mybb attribute to all elements of body section (will be used by CSS selectors)
I have manually created new CSS files where all styles and selector has been modified properly (styles prefixed with "mybb-", selectors modified to select elemnts with "data-mybb" attribute, and so on)
The visual result was quite good (I do not have any screenshots at hand). Some additional CSS needed to be applied in MyBB to overwrite Wordpress default CSS (like a global default value for a "div" element).
One thing that I didn't manage to fix were the MyBB java scripts that makes some additional work on the html elements (like selecting the elements by their id or CSS class). That may not be an easy work to do in the runtime as it would require to update the scripts itself and change the referenced ids or styles Sad

Because of these limitations above I started to think about embedding MyBB inside of iframe element. I have reworked my plugin to put an iframe in Wordpress page where a "[BRIDGE]" is located and feed the iframe with a static MyBB output page (saved in cache directory on the server - yeah, that cache may break the forum security - but I don't care about that right now). I needed to add some runtime fixes in the plugin to make the forum working in the iframe, especially:
  • add a <base target="_parent"> to MyBB output page (so it would work nice in the iframe)
  • remove some meta entries (with http-equiv="refresh") from MyBB page and put them directly into Wordpress output page (this makes that parent window gets refreshed instead of iframe page)
  • add some java script to parent (Wordpress) page to set the iframe size after it has been loaded
  • add some java script to parent (Wordpress) page to scroll the window to a proper anchor (if available)
  • add some short nasty hack (for now) to handle redirection when logging
I have made some smoke tests on Firefox and it looks like working fine (for now).

I have implement the changes on my local machine and can not give any URL. I'm attaching the screenshot for reference. You can see the Wordpress theme with some widgets (in the header section) and menu at the top.


What could be the disadvantages of that approach?
I have created a MyBB plugin Github project.

Probably it is not perfect. Some things may not work correctly on all browsers (I have tested in on Firefox and Chrome only).

Please, let me know if that even works for someone.
Pages: 1 2 3