Hi,
I have put in Ovidiu's code.
At first I got an "UNEXPECTED $END" error. Which i have found happanes a lot if you miss a } in there somewhere. I couldn't figure out where to put it, so I tried right at the end of the code snippet Ovidiu supplied. That error went away and the page opens and show all that it is supposed.
Problem is it shows a bit extra. After the Submit button is this text which comes out of the next function in the coding.
'is your new username
But, before you can start using your new username, you must activate it.
Check your inbox at and click the link given.
If you do not activate your username within two days, you will have to sign up again.'
Here is the actual code that is in my page right now from the top of Ovidui's snippet to just after. Any ideas how to fix it? You can see the actual page at http://www.worldblogosphere.com/wp-signup.php if it would help to see the problem.
Thanks,
Gene
'<p>
<input id="signupblog" type="radio" name="signup_for" value="blog" checked="checked" />
<label for="signupblog"><?php _e('Gimme a blog!') ?></label>
<input id="signupuser" type="radio" name="signup_for" value="user" />
<label for="signupuser"><?php _e('Just a username, please.') ?></label>
<input id="ToS" type="checkbox" name="ToS" value="ToS" onclick= "if (this.checked)
doit(); else undoit();" />
<label for="ToS">I have read the ToS and
agree to them</label>
</p>
<script type="text/javascript">
function doit()
{
document.getElementById("submit").disabled=false; }
function undoit()
{
document.getElementById("submit").disabled=true; }
document.getElementById("ToS").checked=false;
</script>
</td>
</tr>
<tr>
<th scope="row" valign="top"> </th>
<td><input id="submit" type="submit" name="submit" class="submit" value="<?php
_e('Next »') ?>" DISABLED/></td>
</tr>
</table>
</form>
<?php
}
function validate_user_signup() {
$result = validate_user_form();
extract($result);
} //THIS IS THE CURLY BRACKET I ADDED
if ( $errors->get_error_code() ) {
signup_user($user_name, $user_email, $errors);
return false;
}
if ( 'blog' == $_POST['signup_for'] ) {
signup_blog($user_name, $user_email);
return false;
}
wpmu_signup_user($user_name, $user_email, apply_filters( "add_signup_meta", array() ) );
confirm_user_signup($user_name, $user_email);
return true;
}
function confirm_user_signup($user_name, $user_email) {
?>
<h2><?php printf(__('%s is your new username'), $user_name) ?></h2>
<p><?php _e('But, before you can start using your new username, you must activate it.') ?></p>
<p><?php printf(__('Check your inbox at %1$s and click the link given.'), $user_email) ?></p>
<p><?php _e('If you do not activate your username within two days, you will have to sign up again.'); ?></p>
<?php
do_action('signup_finished');
}
function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
if ( !is_wp_error($errors) )
$errors = new WP_Error();'