Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 162 lines (119 sloc) 7.052 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
<?php

/*
Template Name: Register
*/


// Hackish way to get statuses
if ( isset( $_GET['status'] ) ) {
$status = explode( ',', $_GET['status'] );
} else {
$status = array();
}


get_header(); ?>

<div id="primary">
<div id="content" role="main">
<?php if ( isset( $_GET['wplogin'] ) ) : ?>
<?php if ( 'choose' == $_GET['wplogin'] ) : ?>
<ul>
<li><a href="<?php echo get_bloginfo( 'wpurl' ) . '/register?wplogin=login' ?>">I've already got a wallyg.me account</a></li>
<li><a href="<?php echo site_url() . '/register?wplogin=apply' ?>">I need to apply for a wallyg.me account</a></li>
</ul>
<?php elseif ( 'apply' == $_GET['wplogin'] ) : ?>
<p>You can apply for a wallyg.me account in just a few seconds!</p>
<form name="apply-form" class="standard-form" action="<?php echo add_query_arg( 'wp_apply', '1', site_url( 'register' ) ) ?>" method="post">
<table>
<tr>
<td width="300"><label><?php _e( 'Your name', 'buddypress' ) ?></td>
<td><input type="text" name="display_name" class="input" tabindex="96" />
</label>
<p class="description">This will be the name people see when you leave comments on the site.</p>
</td>
</tr>
<tr>
<td width="300"><label><?php _e( 'Username', 'buddypress' ) ?></td>
<td><input type="text" name="log" class="input" tabindex="97" />
<?php if ( in_array( 'usernameexists', $status ) ) : ?>
<span class="error">That username is already in use. Please try another.</span>
<?php elseif ( in_array( 'usernameinvalid', $status ) ) : ?>
<span class="error">Usernames must have at least four characters, at least one letter, and can only contain letters and numbers.</span>
<?php endif ?>
<p class="description">This will be the username you use to log in. Make sure it has at least four characters, and contains only letters and numbers.</p>
</label></td>
</tr>
<tr>
<td><label><?php _e( 'Email Address', 'buddypress' ) ?></td>
<td><input type="text" name="email" class="input" tabindex="98" />
<?php if ( in_array( 'emailexists', $status ) ) : ?>
<span class="error">That email address is already in use. Please try another.</span>
<?php elseif ( in_array( 'emailinvalid', $status ) ) : ?>
<span class="error">That doesn't appear to be a valid email address.</span>
<?php endif ?>
</label></td>
</tr>
<tr>
<td><label><?php _e( 'Password', 'buddypress' ) ?></td>
<td><input type="password" name="pwd" class="input" value="" tabindex="99" />
<?php if ( in_array( 'failhumancheck', $status ) ) : ?>
<span class="error">Make sure your passwords match</span>
<?php endif ?></label>
</td>
</tr>
<tr>
<td><label><?php _e( 'Password (again)', 'buddypress' ) ?></td>
<td><input type="password" name="pwd_again" class="input" value="" tabindex="99" /></label></td>
</tr>
<tr>
<td><label>What number do you get if you subtract ten from fourteen? <span class="description">(Just making sure you're a human!)</span></td>
<td>
<input type="text" name="humancheck" tabindex="100" />
<?php if ( in_array( 'failhumancheck', $status ) ) : ?>
<span class="error">Try that math again!</span>
<?php endif ?></label>
</td>
</tr>
</table>
<?php wp_nonce_field( 'wallyg_apply' ) ?>
<input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php _e( 'Submit', 'buddypress' ); ?>" tabindex="101" />
</form>
<?php else : ?>
<p>Log in with your wallyg.me username and password.</p>
<form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ) ?>" method="post">
<p><label><?php _e( 'Username', 'buddypress' ) ?>
<input type="text" name="log" id="sidebar-user-login" class="input" value="<?php if ( isset( $user_login) ) echo esc_attr(stripslashes($user_login)); ?>" tabindex="97" /></label></p>
<p><label><?php _e( 'Password', 'buddypress' ) ?>
<input type="password" name="pwd" id="sidebar-user-pass" class="input" value="" tabindex="98" /></label></p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="sidebar-rememberme" value="forever" tabindex="99" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></p>
<input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php _e( 'Log In', 'buddypress' ); ?>" tabindex="100" />
<input type="hidden" name="testcookie" value="1" />
<input type="hidden" name="redirect_to" value="<?php echo site_url(); ?>" />
</form>
<ul>
<li><a href="<?php echo add_query_arg( 'action', 'lostpassword', wp_login_url() ) ?>">I forgot my username or password!</a></p>
<li><a href="<?php echo site_url() . '/register?wplogin=apply' ?>">I don't have a wallyg.me account yet.</a></p>
<li><a href="<?php echo site_url() . '/register' ?>">I changed my mind. Can I use my Facebook login instead?</a></li>
</ul>
<?php endif ?>
<?php else : ?>
<?php do_action( 'wally_messages' ) ?>
<?php if ( !is_user_logged_in() ) : ?>
<p>You can log in with your Facebook credentials, or you can use your wallyg.me account.</p>
<form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ) ?>" method="post">
<p><label><?php _e( 'Username', 'buddypress' ) ?>
<input type="text" name="log" id="sidebar-user-login" class="input" value="<?php if ( isset( $user_login) ) echo esc_attr(stripslashes($user_login)); ?>" tabindex="97" /></label></p>
<p><label><?php _e( 'Password', 'buddypress' ) ?>
<input type="password" name="pwd" id="sidebar-user-pass" class="input" value="" tabindex="98" /></label></p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="sidebar-rememberme" value="forever" tabindex="99" /> <?php _e( 'Remember Me', 'buddypress' ) ?></label></p>
<input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php _e( 'Log In', 'buddypress' ); ?>" tabindex="100" />
<input type="hidden" name="testcookie" value="1" />
<?php $redirect_to = isset( $_GET['redirect_to'] ) ? $_GET['redirect_to'] : site_url() ?>
<input type="hidden" name="redirect_to" value="<?php echo $redirect_to ?>" />
</form>
<ul>
<li><a href="<?php echo add_query_arg( 'action', 'lostpassword', wp_login_url() ) ?>">I forgot my username or password!</a></p>
<li><a href="<?php echo site_url() . '/register?wplogin=apply' ?>">I don't have a wallyg.me account yet.</a></p>
<li><a href="<?php echo wally_fb_url(); ?>">Log me in using Facebook</a></li>
</ul>
<?php endif ?>

<?php endif ?>
</div><!-- #content -->
</div><!-- #primary -->

<?php get_footer(); ?>

Something went wrong with that request. Please try again.