i have installed word press mu , when user register in my site I want to create blogs for them automatically, without doing a separate registration for blog .
in my site the fields for registration are
First Name
Last Name
Email
Phone:
i have installed word press mu , when user register in my site I want to create blogs for them automatically, without doing a separate registration for blog .
in my site the fields for registration are
First Name
Last Name
Email
Phone:
good luck and thanks for telling us :)
I think sivac is actually asking for help.
Sivac, when someone registers on your WPMU, the blog is going to get created for them automatically. First and last name fields are currently optional within a users profile with email required since it's used to confirm the registration. If you want to make the rest required, you're doing to have to code it yourself I'm afraid.
yeah, I was considering the same - I guess I can figure out the sql stuff about creating a blog, but the thing I want is little bit more complex - I would like to integrate not only registrations, but also logins - so can anyone help me how to set up a login cookie for wordpress from my site? and what else is needed to do? I am using joomla.
and I am dreaming of this: when user registers/logins he is checked whether he is present in wordpress database, if not user account is created. I will have a singup link in user profile (in cb plugin I will create) if a user would like co create its blog, and my second dream is integrated login.
can anybody give me some hints to start?
thanks a lot
(my site: http://www.upol.info/portal, blog site is blog.upol.info/user
good news for u
use the following code !
=================================
<?
require ('wp-config.php');
require_once( ABSPATH . WPINC . '/registration.php');
if($_POST['submit']){
$domain="www.sitename.com";
$title=$_POST['uname'];
$user=$_POST['uname'];
$user_email=$_POST['mail'];
$path="/blogs/".$title."/";
//$public = 1;
$meta_new='a:2:{s:7:"lang_id";s:2:"en";s:6:"public";i:1;}';
wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta_new);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test for blog registration</title>
</head>
<body>
<form name="signup" action="" method="post">
<input type="text" name="uname" value="<?=$_POST['uname']?>" />
<input type="text" name="mail" value="<?=$_POST['mail']?>"/>
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
====================================================
Note : Save the as php file
Upload it to your blog folder
Enjoy................
yeah, thanks for this! i am going to try this asap, but I have a question:
is situation that easy that I can include e.g. require ('/path-to-wordpress/wp-config.php');
require_once( ABSPATH . WPINC . '/registration.php');
inside joomla module? is it going to interfer with it or not? thanks in advance
you should include config and registration file,the path should be correct..
nothing else
yeah, but no success there. I am stuck if I want to include /wp-config.php, it dies with error: That blog does not exist. Please try xx (this string is generated by wpmu-settings.php.. what can I do with this?
i guess my way is going to be manual insertion of user into database and then let him set up his blog via wp-singup (after login)
so my second question: is it enough to insert user data into wp_users and wp_singups? (i have registered several users (without blogs) and they seem to be inserted just there
comment this line in wpmu-settings.php
$path = substr( $_SERVER[ 'REQUEST_URI' ], 0, 1 + strpos( $_SERVER[ 'REQUEST_URI' ], '/', 1 ) );
and try
sivac: still the same result :-(
It may be due to the incorrect path of blog entered in database
Please check the values of domain and path in the table “site”