Well yeah, been coding again... That's why I've been out from posting for a while...
I'm no code guru at all, yet I was assigned with some friends the task of integrating a Joomla 1.0.13 user database with Wordpress Multi user, or WP MU. I haven't slept all weekend trying to accomplish this. I hate coding and so, I'm sharing this crap to anyone interested. I'm not giving support tho, cuz these CMS tend to change and I'm not changing this code unless I really need it.
Been coding and Googling all weekend trying to solve it and found a very useful plugin here. Made by Eugene Heriniaina AKA Hery. All the credit should go to him.
Thanks a lot to DiegoH and JoVi, thanks to them this coding hell is now over.
Couple of issues to consider:
- Since version 1.0.13 of Joomla there's a new hash for login processes. We based on an md5 check used for new users in joomla in the joomla.php login function...
- on the admin page in WPMU (Panel- Options- Mysql Auth) you will want to specify the database address and a query similar to the following: SELECT username, email FROM jos_users WHERE username = '%{user}'
- This hack checks in joomla's db and logs into wpmu with joomla's users
- If the user exists on joomla andnot on wp, a new user is created in WP, subscribed to the main blog. If you want to create a default blog you can add it via code with:
$blog_id = wpmu_create_blog($newdomain, $path, $username , $user_id, $meta);
do_action('wpmu_activate_blog', $blog_id, $user_id, $password, $username, $meta);
$meta = apply_filters('signup_create_blog_meta', array ('lang_id' => 'en', 'public' => 1));
- If the user is in both joomla an wpmu, the user is updated with data from joomlas database and logged in to the panel
- Be sure to ALWAYS send a STRING NON MD5 password to the wp-login function in the plugin... Via cookies, post variables, or session variables. Whatever, as long as $password is not hashed and all info is correct it should work fine.
You can accomplish this by modifying on /wp-includes/pluggable.php and in wp-login.php... all passwords that are sent to wp-login should be changed.
You can send $_POST['pwd'] to the wp-login function and it should work.
All files have been uploaded to a RAR.
- Be sure to redirect the user to the panel by default
- That's it. Enjoy and hope it works for you and saves you tears.
Source code is here.
My Google Code page is here.
The site this hell was made for is here.
EDIT:
- Also, to install a WPMU installation inside a joomla portal, just install your WPMU in a SUB FOLDER in your FTP server. That way you get no weird issues.
Say, if you have your joomla installed in www.mysite.com/
you should have your WPMU installed in www.mysite.com/blogs/
(you can name it as you wish), at least that's how they solved it where I was working.
By
Davicho
Posted
Monday, January 14, 2008
Subscribe to:
Post Comments (Atom)




4 comments:
i like this plugin but i can't install wordpress in my joomla portal so, can you explain me how i can install wordpress blog in my joomla portal and after installing the plugin to integrate joomla users?? thank so much sorry for my english!
sorry this is my email fantactf@email.it thanks a lot
i couldnt get it to work with joomla either. could you please emial me?
oh and my email is: sedaiss.svlg@gmx.de
Just a comment for you this time, no need to publish :-)
Post a Comment