Firefox PHP

Howto: Integrate Phorum and Wordpress

Posted by gloeglm 
Re: Howto: Integrate Phorum and Wordpress
August 20, 2007 08:37AM
Hey Norvo,

Sorry for taking so long to respond to this; been away from the internet. I still haven't gotten the bridge working in the latest version of WordPress. I'll try to up this project on my priority list, but I've been distracted recently by web design. For some reason the Phorum module is not reading the cookie; if anyone has any advice, I'd love to hear it since I can't find any reason in the code for it not to work.

I've never tried to use the friendly URLs module for Phorum, so I can't offer any specific advice. Sorry about that. :-(

If you get it running, let us know!

Beckism

One Crayon :: Beckism.com :: Tagamac
WordPress-Phorum Bridge
Re: Howto: Integrate Phorum and Wordpress
April 11, 2008 07:52PM
Err, why the heck would any one put Phorum inside of WordPress?

How do we fix this mess by having a custom Phorum path that does not lock us in to this plugin presuming Phorum is improperly installed inside the WordPress directory? It's creating errors when people register.

John A. Bilicki III
Re: Howto: Integrate Phorum and Wordpress
April 11, 2008 08:15PM
Well I attempted to mend the plugin by manually setting the path to see the files. Did that a few times and then even edited Phorum's common.php file. When I had "fixed" the paths Phorum still encountered an error saying the database was not yet connected.

It's a cool plugin but it shares the same arrogance of WordPress, 'You can only do things the way *I* tell you!' Please fix this and I'd be happy to post a link on my blog to give out the credit.
Re: Howto: Integrate Phorum and Wordpress
November 20, 2009 03:35PM
I see these posts are quite old.. Is there a way to integrate Phorum into new Wordpress? Has someone managed to do it?
Re: Howto: Integrate Phorum and Wordpress
July 26, 2010 05:13AM
I, too, am asking this question...
Re: Howto: Integrate Phorum and Wordpress
July 26, 2010 09:20AM
I don't think that there's a ready-to-go solution for this, but if you want to accomplish something complex like integrating software packages, could you at least describe in what way you would like to integrate? What would the final setup look like and how would users use it?


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Howto: Integrate Phorum and Wordpress
October 19, 2010 09:28PM
i'd like to have a sign in / logged in widget to display on wordpress.

i guess that would be reading cookies with a welcome message (wouldnt need any usernames mentioned) else show a login link / form.

is this possible?
Re: Howto: Integrate Phorum and Wordpress
October 19, 2010 10:01PM
You can only read your own cookies, so you would only be able to show an indicator that tells if *you* are logged into Phorum or not. If you want to show an indicator for yourself, then this can be done in a few lines of code.

Showing an indicator for a random user is a totally different thing. The online users module would be a good starting point for ideas on how to decide if a user is online or not.

A widget kind of implies JavaScript as the data retrieval methodology. But if you want to build something, then it's probably much easier to create a basic script that returns a status image. Embedding the indicator is then as simple as setting up an <img src="URL-for-statusscript?username=examplearg"/> image.

I hope this provides you some ideas.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Howto: Integrate Phorum and Wordpress
October 21, 2010 02:53AM
yeah that's right maurice that's what im after - user comes onto the website (main site and content areas powered by wordpress) but they can see a login link for the phorums, or if logged in it will say "logged in" with a link to the phorum.

can you point me in the direction of any code that performs this kind of function already? if not i'll look into getting it together from someone on elance and post here when done :)
Re: Howto: Integrate Phorum and Wordpress
October 21, 2010 09:45AM
I don't know of such code, but the simplest route might be a script like this (inside your Phorum directory):

Language: PHP
<?php // Load the Phorum code. include "./common.php";   // Redirect the browser to an image URL, based on the authentication session state. if ($PHORUM[';user';][';user_id';]) { header("Location: http://some.site/images/loggedin.png"); } else { header("Location: http://some.site/images/notloggedin.png"); }

Not tested, but this might work. Another way could be to let the script itself serve the image files, instead of redirecting the browser to one. This would look somewhat like this:

Language: PHP
<?php // Load the Phorum code. include "./common.php";   // Tell the browser that we will be sending an image. header("Content-Type: image/png"); // or jpeg of gif, whatever you like   // Return an image, based on the authentication session state. if ($PHORUM[';user';][';user_id';]) { readfile("path/to/images/loggedin.png"); } else { readfile("path/to/images/notloggedin.png"); }

Hope this helps.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login