Joomla and wordpress MU bridge
I will try to explain how you can use wordpress MU (2.8.4) inside your joomla (1.5) to create blogs for your joomla users automatically.
you will not want every joomla user to have blogs without actually user wants it to create.
keeping it in mind we follow these things.
1) install wordpress MU inside your joomla main installation directory (i.e if my joomla is installed in ABC/joomla then I would install wordpress inside ABC/Joomla/wordpress
2) when installing your wordpress keep the database same as joomla is using (remember you should not have ur joomla tables prefix “wp_” if it is so then change your joomla tables prefix to something else)
3) configure your wordpress.
4) now come to the button or link on your registered joomla user page where you want to give user an option to create wordpress blogs.
5) following functions you should have
function getUserValue($id,$field){
$db =& JFactory::getDBO();
$query="SELECT $field from #__users Where id=".$id;
$db->setQuery($query);
$result=$db->loadObject($field);
//if(strlen($result->$field)<100){
return nl2br($result->$field);
// }else{
//return ;
// }
}
function isBlogActive($username){
$db =& JFactory::getDBO();
$query="SELECT COUNT(*) FROM wp_blogs Where domain='".$username.".<span style="color: #993300"><strong><em>yourdomain</em></strong></span>.com'";
//echo $query;
$db->setQuery($query);
//echo $db->stdErr();
$results=$db->loadResult();
//echo $results;
return $results;
}
#### now paste given below where you want to give user an option to create blog
</pre>
<pre><?php
$user=& JFactory:getUser();
$id=$user->get('id);
if(isBlogActive(getUserValue($id,'username'))){
echo '<a href="http://'.getUserValue($id,'username').'.<span style="color: #993300"><strong>yourdomain</strong></span>.com">
MY BLOGS</a>';
}else{
?>
<form method="post" action="/wordpress/wp-admin/wpmu-edit.php?action=addblog">
<input name="blog[createblog]" type="hidden" title="<span style="color: #0000ff">some key</span>" value="<span style="color: #0000ff">some key</span>"/>
<input name="blog[domain]" type="hidden"
title="<?php echo getUserValue($id,'username'); ?>"
value="<?php echo getUserValue($id,'username'); ?>"/>
<input type="hidden" name="blog[title]" size="20"
title="<?php echo getUserValue($id,'name'); ?>"
value="<?php echo getUserValue($id,'name'); ?>"/>
<input type="hidden" name="blog[email]" size="20"
title="<?php echo getUserValue($id,'email'); ?>"
value="<?php echo getUserValue($id,'email'); ?>"/>
<input type="submit" name="go" id="go"
Value="Add <?php echo getUserValue($id,'name');?> Blogs" >
</form>
<?php
}
?>
##################################
6) now come to wordpress/wp-admin/wpmu-edit.php file to make some changes
#######CHANGE FROM:##########################
if( is_site_admin() == false ) {
wp_die( __('You do not have permission to access this page.') );
} do_action('wpmuadminedit', '');
if( isset($_GET[ 'id' ]) ) {
$id = intval( $_GET[ 'id' ] );
} elseif( isset($_POST[ 'id' ]) ) {
$id = intval( $_POST[ 'id' ] );
}
if( isset( $_POST['ref'] ) == false && !empty($_SERVER['HTTP_REFERER']) ) {
$_POST['ref'] = $_SERVER['HTTP_REFERER'];
}
####################### CHANGE TO:##########
$blog = $_POST['blog'];
if($blog['createblog']=='<span style="color: #0000ff">some key</span>'){
}else{
if( is_site_admin() == false ) {
wp_die( __('You do not have permission to access this page.') );
}
do_action('wpmuadminedit', '');
if( isset($_GET[ 'id' ]) ) {
$id = intval( $_GET[ 'id' ] );
} elseif( isset($_POST[ 'id' ]) ) {
$id = intval( $_POST[ 'id' ] );
}
}
7) go to case “addblog”: line in wpmu-edit.php and replace check_admin_referer(’add-blog’); line with
$blog = $_POST['blog'];
if($blog['createblog']=='<span style="color: #0000ff"><strong>some key</strong></span>'){
}else{
check_admin_referer('add-blog');
}
to
//auth_redirect();
################
DO NOT FORGET TO CHANGE “some key” and “yourdomain“.
and you are done with it but make sure your wordpress is configured to send user login/passwd after their registeration so that user can get his blog pasword otherwise use “configure smtp” plugin to send mail using gmail or google hosted emails.
HAPPY BLOGGING

September 7th, 2009 at 3:00 am
What versions of Wordpress & Joomla was this tutorial based on?
September 10th, 2009 at 1:32 pm
tutorial was based on joomla(1.5) and wordpress version 2.8.4 MU
September 28th, 2009 at 5:12 pm
4) now come to the button or link on your registered joomla user page where you want to give user an option to create wordpress blogs.
Please is needed for the above statement.
What are you referring to when you said “button or link”? Does it mean the Section, Category or the Article created for such. Or something entirely different.
I would appreciate a swift response.
Thanks so much for the help file.
September 28th, 2009 at 5:18 pm
actually “button or link” plays a role to get user response to create blog in your joomla site
check this part here user submit the button which says ” Add username Blogs”
<input name="blog[domain]" type="hidden"
title="”
value=”"/>
<input type="hidden" name="blog[title]" size="20"
title="”
value=”"/>
<input type="hidden" name="blog[email]" size="20"
title="”
value=”"/>
<input type="submit" name="go" id="go"
Value="Add Blogs” >
October 20th, 2009 at 11:43 am
Great Site! Thanks for the Information. Just what I was looking for. Will definately bookmark.
October 21st, 2009 at 7:44 am
There is nothing better than to go to your blog in the morning with a cup of coffee
October 21st, 2009 at 9:51 pm
You are very interesting to write. Can you recommend any similar sites similar to yours?
October 27th, 2009 at 8:37 pm
Is there anyone who could either install or help me install the Jooml/WPMU Bridge on my site for me? This looks a bit hairy for me and I’m nervous about doing it. I’d love to be able to give my users the option to be able to create a wordpress blog. We are a non-profit social and political reforms organization and we’re having some problems getting our site up and running. We are inexperienced Joomla users, and learning as we go along. It makes things rough on us, but we have to do it this way due to a lack of money right now. Any help or advice you could lend to us Gaurav would be greatly appreciated.
Walter.
December 31st, 2009 at 1:11 pm
Really? I will test by myself.
February 23rd, 2010 at 1:50 am
wordpress MU 2.9.X + joomla 1.5.X Support ?
March 4th, 2010 at 1:52 am
Hi, that’s a great tip – thanks! This is my first Wordpress site but I’m still a touch lost… I can’t believe the sheer number of themes and plugins out there! But I’m slowly getting there and it’s starting to take form. I’m guessing that installation and setup won’t take forever next time. Anyhow… cool blog – I’m subscribed to your RSS feed now so I’ll check in more often!
March 6th, 2010 at 8:33 am
Hi, I really would like to use this bridge, but steps 4 and 5 are a bit unclear to me as well as ’some key’ part. What key?
If possible, can you give a brisk description of what this means:
4) now come to the button or link on your registered joomla user page where you want to give user an option to create wordpress blogs.
5) following functions you should have
You mean make a link to an article that will have the code? and for #5 what functions , where does the code go? inside the same page where the input for add blog goes?
April 21st, 2010 at 1:43 pm
HI,
If you just try linksutra ..create and account and go to your profile..you will get a button “add your blog” …then you can understand whole process better.
cheers
linksutra admin
April 25th, 2010 at 1:06 am
Hi admin:
I have a question about…, doing everything you says take this error “Fatal error: Call to undefined function sanitize_user() in C:\xampp\htdocs\test\blogs\wp-admin\wpmu-edit.php on line 184″. When you do, nothing similar happen or I have to include some files? (”include_once()”something.php”).
I would appreciate so much your help,
jumas.
Sorry my bad English.
April 28th, 2010 at 3:38 am
wordpress MU 2.9.X + joomla 1.5.X Support
i have tested it with 2.9.2 wordpress MU + joomla 1.5.15
#####
“Fatal error: Call to undefined function sanitize_user() in C:\xampp\htdocs\test\blogs\wp-admin\wpmu-edit.php on line 184″
#######
i didnt get any such kinda error..did you follow last step?
“open admin.php in same directory and comment the line auth_redirect();
to
//auth_redirect();”
April 28th, 2010 at 3:39 am
i didnt get any such kinda error..did you follow last step?
“open admin.php in same directory and comment the line auth_redirect();
to
//auth_redirect();”
April 28th, 2010 at 3:45 am
some key means any arbit key (secret) you want for your website…i.e. “zxcz*(6jhdsfd”
4) step 4 means I want a button on my users profile page to create blogs. user clicks it and its blog is created.
5) yeah if blog is already created then it will show users blog link otherwise “button” to create blog.( step 4)
May 3rd, 2010 at 4:24 am
…
vim to very …
May 3rd, 2010 at 4:24 am
…
vim to very …
May 3rd, 2010 at 10:24 am
Thank you for the information
May 3rd, 2010 at 3:33 pm
hi guys…
hi guysI would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well and i have start my own blog now, , thanks for your effort…
May 16th, 2010 at 2:04 am
Thanks…
Thanks, I always aprisiate a good read. Hehe I usually do agree with your posts opinions and stuff
Dont stop posting!…
June 12th, 2010 at 10:54 pm
How To Get Free Website Templates…
My blog is about php hosting script…
June 17th, 2010 at 11:58 am
Risky Business: Welding Rod Gases | Best and Free tips on the ……
Leave a Comment. Name. Mail (will not be published). Website. Please note: Comment moderation is enabled and may delay your comment. ……
June 29th, 2010 at 1:13 am
Themes…
I saw this really good post today….
July 8th, 2010 at 3:17 am
The largest and best club for insomnia…
Here is the club of the loser of sleeping. We supply the most abundant knowledge about insomnia and help you get rid of it soon….
July 8th, 2010 at 10:37 pm
Watch movies free online…
A really Pain-free Way to Watch movies online – Online with free streaming…
July 16th, 2010 at 3:49 am
Hi, can you tell me what can i do if i want use wordpress 3 as multiblog plataform inside joomla 1.5.18? Many thanks
July 16th, 2010 at 8:08 pm
mobile and telecom software telecommunications network…
the telecommunications network can find telecom software,mobile telecom,solutions telecommunications,Get your toll free numbers,800 numbers,virtual business phone system…
July 18th, 2010 at 5:12 am
Another Title…
I saw this really good post today….
July 18th, 2010 at 3:17 pm
free best fat loss supplements…
the best fat loss training cardio programs and supplements,fitness bodybuiding rapid fat loss excercise muscle gain diet plans and tips….
July 23rd, 2010 at 12:47 pm
great website collect…
great website collect in twitter…
July 25th, 2010 at 8:59 pm
Revitol Certainly Brings Confidence In Your Lives…
Revitol is individual of the a large amount wy goods presented clothed in the souk now,…
July 25th, 2010 at 9:29 pm
mobile and telecom software telecommunications network…
the telecommunications network can find telecom software,mobile telecom,solutions telecommunications,Get your toll free numbers,800 numbers,virtual business phone system…
July 27th, 2010 at 9:21 pm
casio pathfinder…
My blog about casio pathfinder…
July 30th, 2010 at 3:37 am
I have tosay that I like what you posted, and I’ve added your site to my bookmarks.
July 31st, 2010 at 2:29 am
Private student loans…
This site has tons of information about private student loans and loan consolidation….