1 (edited by Riklaunim 2007-06-28 00:30)

Topic: Wordpress integration plugin :)

download: link

I used: WP: 2.2.1 | punBB: 1.2.15 - to integrate Wordpress user system  with punBB (http://jakilinux.org/ with http://forum.jakilinux.org/ smile)

I. Instalation
- edit the plugin file and add punBB info:

define('PUNPATH', '../punbb'); // path to punbb folder
define('PUNPREFIX', 'pun_'); // punBB table prefix

- then save & install as any other WP plugin (DB backup is nice idea)

Edit punBB register.php, and at start add:

header('Location: http://www.url/do/wordpress/wp-login.php?action=register');

For login.php:

header('Location: http://www.url/do/wordpress/wp-login.php');

In profile.php find:

if ($action == 'change_pass')
    {

Below add:

header('Location: http://www.url/do/wordpress/wp-admin/profile.php');

II. How it works
- punBB user table is synced against WP user table using passwords from WP. When you install users that are registered on WP will be copyed to punBB (but not in the other side).
- If a user have account on punBB and WP - he will user WP login and WP password for both
- it covers login/logout, register and password changes

My site [PHP, Python, Linux]

Re: Wordpress integration plugin :)

do u have this mod in english?
i downloaded the file and im sorta lost..haha
Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Wordpress integration plugin :)

the readme is in Polish, and my first post is the English version of it.

My site [PHP, Python, Linux]

Re: Wordpress integration plugin :)

for (punbb)login.php where do we place that code?  line 1.  i mean?
i sorta understand how but some line number where to put these changes so that it might be easier for people to understand.
and a big question is will this work for wpmu?

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Wordpress integration plugin :)

login.php and register.php - at the start - line 1 (after <?php)

My site [PHP, Python, Linux]

Re: Wordpress integration plugin :)

riklauunim, do u ever do any custom skin for punbb from a wp theme?
i got a basic theme that im going to use and i cant find a standard css template on the web of my theme for wp.
do u think that you could help create a basic html style?

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Wordpress integration plugin :)

check this: http://www.liewcf.com/blog/archives/200 … wordpress/
and maybe this: http://www.almosteffortless.com/2005/09 … and-punbb/

My site [PHP, Python, Linux]

Re: Wordpress integration plugin :)

to be honest this is something that im very interested in and maybe im stupid but i dont understand the order of events. the placement of code and which file is sorta out of alignment and where do i place the file that i downloaded from the site?

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Wordpress integration plugin :)

actually i just took the images from my wp theme and make my own style.
but i really need to understand the integration park clearly... maybe it is me being stupid but i still dont get it..

http://forum.southernhotbody.com/
http://southernhotbody.com

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Wordpress integration plugin :)

jl-punbb is a Wordpress plugin and you use it as any other plugin. Put it in /wp-content/plugins/ of your wordpress install, edit the jl-punbb file and add path to punBB folder and it's table prefix. Then install/activate this plugin in Wordpress Admin Panel. The integration is done, but you have to also redirect users from punBB login/register to Wordpress to maintain synchronisation of the tables - you edit in punBB - login.php, register.php and profile.php as described above.

My site [PHP, Python, Linux]

11

Re: Wordpress integration plugin :)

that kewl.. i understand now... thanks for keeping it simple for us folks.....


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

12

Re: Wordpress integration plugin :)

my path to punbb is in subdomain.

when i look at the directory i see
forum <-- location of punbb
southern <-- location of wp
so in the jl-punbb
path can it be a http://forum.southernhotbody.com?

because i use redirect in my hosting script.

http://southernhotbody.com is pointed to southern folder.

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Wordpress integration plugin :)

path, not an URL. If you have

/forum
/southern

then use ../forum

My site [PHP, Python, Linux]

14

Re: Wordpress integration plugin :)

thanks i just moved the forum into the southern folder but what if i dont have a pun_ for prefix. i just never use that before i simple just leave that area blank...
lol so much trouble from me...


thanks....

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Wordpress integration plugin :)

Hi,

I've been looking for a user integration like this for Wordpress and punBB. smile

I tried to do this but I can't seem to get it to work.

I have installed punBB on http://www.mmo-gamer.com/community/ and WP is installed in the root: http://www.mmo-gamer.com/

I put the plugin file (not the folder) in the plugins folder after updating it, changing ../punbb to ../community and then activated it. But it doesn't seem to work. I cannot login to punBB with current Wordpress users.

I haven't done the redirection steps with the other files yet; I wanted to db integration to work before I started with that.

What am I doing wrong?

16 (edited by MaryJane197 2007-07-27 20:30)

Re: Wordpress integration plugin :)

I first want to say what a awesome plugin!!  It works perfectly!   It took me a bit to get it working properly.  A few errors and reinstalls.  But it works good now.

I have WordPressMU and Coppermine both working with Punbb.  Now thanks to this plugin users only have to register once.  That saves alot of time and aggrevation.

To get it to work this is how i did it.
1.  I edited the Jl-punbb file.  There are some things in here you want to pay close attention to.  I didnt the first few times and thats why it wouldnt work for me.

These two lines have to be edited right:

define('PUNPATH', '/home/mydomainname/public_html/forum'); // path to punbb folder

When it asks for the path it doesnt want the http reference it wants that folder layout from the server to your forum path.  So you need to figure out your path.  You can usually see this in your control panel.  Where it tells you what version of php and such your running then it shows the path to the php.  It also shows the public_html path there as well.  ( usually, not always )

So i put the direct path in mine to get it working.  You can do .../forum that would work to.  You put as many dots ( . ) as needed to get to that folder.  Like with mine i would go through three folders to get to the forum folder.

Now you need to see what this says here because when you install your punbb, or if you have already installed it, then you need to know this.  Because it will look for this prefix to your punbb tables.  If you named your punbb table prefix something else then you would need to edit this line here.  I didnt.  I named mine on a fresh install exactly as its wrote here.  You can look in your sql tables with your phpmyadmin to see the prefix if your not sure.

define('PUNPREFIX', 'pun_'); // punBB table prefix

2.  Then I uploaded the Jl-punbb plugin to WordPress plugin directory.  I didnt activate it yet cause as soon as you do it starts working.

3.  I edited the profile and the register file.  I didnt edit the login file at first cause it kept redirecting me back to wordpress and that annoyed me cause i was getting errors with it so after the third time of trying i just didnt edit the login file to save me some trouble till i got it working.

4.  Then i activated it.  As soon as you activate it , try registering a user in your WordPress and then go to your forum to see if the new name appeared.  Hopefully you wont get any errors if everything works now.


It is working for me now.  I  register in my WordPress and it carries over to my Punbb and my Coppermine.  I love it!


Now i do have some questions about this plugin tho.  Is there a way to make the password's the same or are they the same with this plugin?  Because i know when you first register on punbb that it randomly generates a password for you.  So i was just wondering if it uses the same password from the WordPress or if it registers you in Punbb with a random one?? Anyone know?

17 (edited by Riklaunim 2007-08-11 10:13)

Re: Wordpress integration plugin :)

Kheldon wrote:

Hi,

I've been looking for a user integration like this for Wordpress and punBB. smile

I tried to do this but I can't seem to get it to work.

I have installed punBB on http://www.mmo-gamer.com/community/ and WP is installed in the root: http://www.mmo-gamer.com/

In punBB config.php you may try to set the punBB cookie domain to "mmo-gamer.com" and try then.

MaryJane197 wrote:

Now i do have some questions about this plugin tho.  Is there a way to make the password's the same or are they the same with this plugin?  Because i know when you first register on punbb that it randomly generates a password for you.  So i was just wondering if it uses the same password from the WordPress or if it registers you in Punbb with a random one?? Anyone know?

I uses wordpress users and passwords. It does not import users from punBB that aren't in WP smile Users that exist at both script will have to use WP password in punBB.

My site [PHP, Python, Linux]

18

Re: Wordpress integration plugin :)

I first want to say thanks for this great plugin!
My english is terrible, im sorry for this,  but i hope you understand my problem.
I follow your instruction step by step, but the modification dont work for me.
The WP userlist transferring perfectly to the punbb, the WP login working good, but the forum always write this: You are not logged in. I try login with different user, but it doesn't work, i can't login to the forum!
Thanks for your help..

I used: WP: 2.2.2 | punBB: 1.2.15
WP address form: thisismysite.yyyyyyyy.xx
PunBB address: thisismysite.yyyyyyyy.xx/forum

Details:
define('PUNPATH', '../forum'); // path to punbb folder
define('PUNPREFIX', 'pbb_'); // punBB table prefix
header('Location: thisismysite.yyyyyyyy.xx/wp-login.php?action=register'); etc etc etc

19 (edited by Riklaunim 2007-08-18 22:59)

Re: Wordpress integration plugin :)

hard to guess the problem.

1. delete in your browser all cookies for your site and try to login

2. in punBB config.php set $cookie_domain = ''; to $cookie_domain = 'yourdomain.com';
and check (try also with deleted cookies)

3. if it still doesn't work then it must have problem with this (jl-punbb.php plugin):

setcookie($cookie_name, serialize(array($user->id, md5($cookie_seed.sha1($user_pass)))),  time() + 31536000, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);

it may need some hacking then like: $cookie_path.'; HttpOnly' to $cookie_path

My site [PHP, Python, Linux]

20

Re: Wordpress integration plugin :)

Riklaunim wrote:

hard to guess the problem.

1. delete in your browser all cookies for your site and try to login

2. in punBB config.php set $cookie_domain = ''; to $cookie_domain = 'yourdomain.com';
and check (try also with deleted cookies)

3. if it still doesn't work then it must have problem with this (jl-punbb.php plugin):

setcookie($cookie_name, serialize(array($user->id, md5($cookie_seed.sha1($user_pass)))),  time() + 31536000, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure);

it may need some hacking then like: $cookie_path.'; HttpOnly' to $cookie_path

Thanks for the very fast answer!

I tryed everything but it doesn't work..
But if i dont use the login.php modification, only the normal punbb login file, everything ok, i log in with my WP username and password to the forum.
I use Wp 2.2.2, this Wp version dont possible problem?

Re: Wordpress integration plugin :)

WP version isn't a problem until the plugin works smile

My site [PHP, Python, Linux]

Re: Wordpress integration plugin :)

Neat plugin but I'm having trouble making it work.  I followed the steps and everything seemed to go well.  The only things that I have different are that users cannot register themselves in my wordpress plugin.  Also, my wordpress and my punbb have different databases on my server.  Should they use the same database and use the table-prefix of 'pun_' for this plugin to work correctly?

When I go to the admin section of wordpress and add a user I get the following error message:

WordPress database error: [Table 'wordpressMain.pun_users' doesn't exist]
SELECT id FROM pun_users WHERE username = '' LIMIT 1

WordPress database error: [Table 'wordpressMain.pun_users' doesn't exist]
INSERT INTO pun_users (username, group_id, password, email, email_setting, save_pass, timezone, language, style, registered, registration_ip, last_visit) VALUES('test4', 4, 'BRAK', 'test4@test.com', 1, 1, 1 , 'Polish', 'Oxygen', 1187640923, '192.168.1.1', 1187640923)

Warning: Cannot modify header information - headers already sent by (output started at /var/www/mep/httpdocs/blog/wp-includes/wp-db.php:133) in /var/www/mep/httpdocs/blog/wp-includes/classes.php on line 734
9 test4 test4 test4 test4@test.com

Also, looking over this post I see that the plugin is trying to set the language to Polish on the insert statement.  For English, do I just change that in the php to English?  Thanks.

Re: Wordpress integration plugin :)

- for the language yes, change it to "English"
- both scripts have to use the same database to work nicely.

My site [PHP, Python, Linux]

Re: Wordpress integration plugin :)

Thanks for the quick reply!  I really didn't think I'd have anything to work with until tomorrow!

Since I had literally *just* done the install and hadn't customized anything (except for your plug-in) I just deleted out my forum and reinstalled using the same database.  I edited the language to English and re-activated your plug-in in Wordpress and it worked like a charm!

Thanks again.

25 (edited by Bloody 2007-09-03 14:00)

Re: Wordpress integration plugin :)

I've got these warning. sad

Warning: include(../forum/config.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\wp\wp-content\plugins\jl-punbb.php on line 62

Warning: include() [function.include]: Failed opening '../forum/config.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\wp\wp-content\plugins\jl-punbb.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\wp\wp-content\plugins\jl-punbb.php:62) in C:\wamp\www\wp\wp-content\plugins\jl-punbb.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\wp\wp-content\plugins\jl-punbb.php:62) in C:\wamp\www\wp\wp-includes\pluggable.php on line 369

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\wp\wp-content\plugins\jl-punbb.php:62) in C:\wamp\www\wp\wp-includes\pluggable.php on line 370

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\wp\wp-content\plugins\jl-punbb.php:62) in C:\wamp\www\wp\wp-includes\pluggable.php on line 331

What is my mistake ? smile

Benoît V.
My Board