Firefox PHP

Howto: Integrate Phorum and Wordpress

Posted by gloeglm 
pat
Re: Howto: Integrate Phorum and Wordpress
March 05, 2006 12:11AM
Hi blinkman,

what was the problem ?
Re: Howto: Integrate Phorum and Wordpress
March 05, 2006 03:53PM
Great ... I love mashups by the way, amazingly creative stuff. My current favourite: "Hung Up For Soul" (Madonna vs. Death Cab For Cutie) by PartyBen :) [partyben.com]

Not really on topic though :)

But it would be nice if you could post a quick message what the problem was, so if anybody else runs into the same thing ...
Re: Howto: Integrate Phorum and Wordpress
March 20, 2006 10:59PM
Sorry about the sluggish reply; I'm not as active on this forum as I ought to be...

The problem was embarassingly simple, something that should have been obvious to me but wasn't at first:

The line in the Phorum plugin

$cookiehash = md5('[www.leo-pam.de&];);

must of course be changed to include the URL of YOUR site, not his!
Re: Howto: Integrate Phorum and Wordpress
March 21, 2006 01:05AM
Yeah, thats pretty clear :)
Re: Howto: Integrate Phorum and Wordpress
April 24, 2006 12:15AM
Hi,


i have some problem with this solution:
both plugins are correctly installed, when i'm login at my WP site, i'm autologin at phorum, but when i'm trying (phorum) to post new message, or create new topic i get info to log in (look the printscreen: [noem.prv])

If it will help, a firstly say, that WP db is named planeta_01 and Phorum db is the same as WP
abs
Re: Howto: Integrate Phorum and Wordpress
May 08, 2006 09:59PM
hi,

I have a wordpress website which is more than a blog. I am looking at different forums to see which one works the best with my website. Ideally, I want to integrate my website theme with the forum and also, I have a few users on my website which needs to be bridged with phorum.

Is it possible with phorum to do all that I requested for...

Abhinav Kaiser
Re: Howto: Integrate Phorum and Wordpress
June 04, 2006 12:45PM
Since finding Phorum (and this topic) yesterday I've been working on integrating WordPress and Phorum, and was going to post something to give people a better idea of how to do it, provide all the files in one centralized location, etc., but I'm running into trouble getting the bridge to work properly. End result I won't be able to throw a final thing up tonight, but I've attached updated files that will hopefully help people begin to work out how to get things up to this post.

First off, Brian's suggested add function (and presumably the delete) function work, but with two caveats:
- chidr is a typo, should be chdir
- the path to your Phorum install must start with "../" in order to start from the base WordPress install

Edit: With a little more testing, it turns out that you only need the "../" if you are adding users through the administrative backend. If they are adding themselves normally through the frontend, you just need to have the path to the forum from the WordPress base directory. There has got to be a better way to set things up to allow both sides to work (I'm thinking of writing a check to see if "wp-admin" is in the getcwd string, but can't do it tonight).

The attached file contains a version of the WordPress plugin that fixes these issues (except the above edit), but MAKE SURE that you update the directory to point to the correct place.

Secondly, there is a possible bug inherent in the scripts with WordPress 2.0.2 (what I'm currently running). I haven't tested this enough, but it seems like wrapping the forum template in a WordPress one screws with the database calls. It kept breaking on message pages that were supposed to have a reply box at the bottom (would display everything prior fine, but then would throw an error saying that it couldn't find the table within, oddly, WordPress's database). I migrated all of my Phorum tables into the WordPress database, updated the config.php file, and everything worked fine. Since this makes backing things up easier and both sets of tables use prefixes that are fairly distinct, this shouldn't be much of a problem, but it deserves further testing particularly since it may be the result of a bug within the Phorum code (perhaps not properly selecting databases somewhere). If others could mess around with this (when it breaks, when it doesn't) and post their findings, I'd love to hear.

Third, I am working on creating a template for Phorum that includes an external CSS and no login/logout links. I will provide this for download when it is finished.

Fourth, grabbing the login info via the cookie is really wonky. It seems to be acting up because WordPress shies away from ever using "www" while Phorum appears to attach it to all internal links. This screws with the domain stuff in the cookie, and results in some odd situations where you're actually logged in, but neither WordPress or Phorum will recognize it (although WordPress knows it if you click the login link). At this moment I'm no sure what to do about this, but hopefully I'll think of something.

Hopefully I'll be able to refine the system over the next few days and toss what I've got (including a template file and some detailed instructions on getting it wrapped into WordPress) up here. If others are messing around with this, please keep us updated.

Edit 7/2/06: File unattached, new version later in the thread.

Beckism

One Crayon :: Beckism.com :: Tagamac
WordPress-Phorum Bridge



Edited 3 time(s). Last edit at 07/02/2006 11:12AM by Beckism.
Ben
Re: Howto: Integrate Phorum and Wordpress
June 19, 2006 07:33AM
Hi guys,

I am running into a weird issue when trying to integrate Wordpress (2.0)
and the latest Phorum version and would appreciate any help with this.

I have used the plugins that Michael (goeglm) has provided, incorporating the new functions that Brian posted for the Phorum plugin.

Both plugins are installed where they should be and are activated in Phorum and Wordpress respectively. User creation seems to be all running smoothly and login doesn't hicup either, however it seems that Phorum doesn't quite agree on just "how logged in" someone really is after using the Wordpress login form.

If i go to the Phorum install after having logged in via Wordpress i can see that Phorum is recognizing the $GLOBALS data, because all the navigation links for the Forums have changed correctly, showing "My Control Center", "Logout" etc.

However as soon as I try to go to "My Control Center" or try to post a reply to the message in the test board I am urged to login again, and if i do so, nothing changes.
ie. the page is refreshed but i still get the box a the bottom telling me that i need to login again for security reasons.

I have attached a PDF with a screenshot in it to make whats happening a bit clearer.
The top part of the screenshot is a print_r() of $GLOBALS["PHORUM"]["user"]

I can see that the problem seems to be the missing "phorum_session_v5" cookie, but as i just found out at [www.the-legion-of-doom.com] that cookie doesn't even seem to be necessary, as all cookies that are set by Legion of Doom are only the 2 wordpress session cookies.

Does anyone have an idea what might be happening here ?

(All setting on the phorums are default, so there are no special permission rules etc. just in case anyone is wondering if that might be the problem)


Re: Howto: Integrate Phorum and Wordpress
June 19, 2006 08:40AM
Here's one thing to check for:

The current Phorum/WordPress bridge suffers from a domain problem on the cookie every now and again. If your WP install is using domain [yourdomain.com] (default behavior) but your Phorum install is using [www.yourdomain.com] (I think this is default behavior) then the cookies will not be translating correctly because the WP cookie only applies to things that lack the "www". Hopefully someone will fix this soon. That someone might be me, but I'm not actively working on it at this moment in time (project took back burner due to other stuff).

Beckism

One Crayon :: Beckism.com :: Tagamac
WordPress-Phorum Bridge
Re: Howto: Integrate Phorum and Wordpress
June 19, 2006 09:06AM
Quote
Ben

If i go to the Phorum install after having logged in via Wordpress i can see that Phorum is recognizing the $GLOBALS data, because all the navigation links for the Forums have changed correctly, showing "My Control Center", "Logout" etc.

However as soon as I try to go to "My Control Center" or try to post a reply to the message in the test board I am urged to login again, and if i do so, nothing changes.
ie. the page is refreshed but i still get the box a the bottom telling me that i need to login again for security reasons.

I have attached a PDF with a screenshot in it to make whats happening a bit clearer.
The top part of the screenshot is a print_r() of $GLOBALS["PHORUM"]["user"]

The Login shown there is the "tight security" login. you should disable this in the admin.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Sorry, only registered users may post in this forum.

Click here to login