Advertisement
Guest User

register.php

a guest
Jan 4th, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.51 KB | None | 0 0
  1. <?php get_header() ?>
  2.  
  3.     <div id="content">
  4.         <div class="padder">
  5.  
  6.         <?php do_action( 'bp_before_register_page' ) ?>
  7.  
  8.         <div class="page" id="register-page">
  9.  
  10.             <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data">
  11.  
  12.             <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?>
  13.  
  14.                 <h2><?php _e( 'Create an Account', 'buddypress' ) ?></h2>
  15.  
  16.                 <?php do_action( 'template_notices' ) ?>
  17.  
  18.                 <p><?php _e( 'Registering for this site is easy, just fill in the fields below and we\'ll get a new account set up for you in no time.', 'buddypress' ) ?></p>
  19.  
  20.                 <?php do_action( 'bp_before_account_details_fields' ) ?>
  21.  
  22.                 <div class="register-section" id="basic-details-section">
  23.  
  24.                     <?php /***** Basic Account Details ******/ ?>
  25.  
  26.                     <h4><?php _e( 'Account Details', 'buddypress' ) ?></h4>
  27.  
  28.                     <label for="signup_username"><?php _e( 'Username', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  29.                     <?php do_action( 'bp_signup_username_errors' ) ?>
  30.                     <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
  31.  
  32.                     <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  33.                     <?php do_action( 'bp_signup_email_errors' ) ?>
  34.                     <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />
  35.  
  36.                     <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  37.                     <?php do_action( 'bp_signup_password_errors' ) ?>
  38.                     <input type="password" name="signup_password" id="signup_password" value="" />
  39.  
  40.                     <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  41.                     <?php do_action( 'bp_signup_password_confirm_errors' ) ?>
  42.                     <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" />
  43.  
  44.                 </div><!-- #basic-details-section -->
  45.  
  46.                 <?php do_action( 'bp_after_account_details_fields' ) ?>
  47.  
  48.                 <?php /***** Extra Profile Details ******/ ?>
  49.  
  50.                 <?php if ( bp_is_active( 'xprofile' ) ) : ?>
  51.  
  52.                     <?php do_action( 'bp_before_signup_profile_fields' ) ?>
  53.  
  54.                     <div class="register-section" id="profile-details-section">
  55.  
  56.                         <h4><?php _e( 'Profile Details', 'buddypress' ) ?></h4>
  57.  
  58.                         <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
  59.                         <?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  60.  
  61.                         <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  62.  
  63.                             <div class="editfield">
  64.  
  65.                                 <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
  66.  
  67.                                     <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
  68.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  69.                                     <input type="text" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" value="<?php bp_the_profile_field_edit_value() ?>" />
  70.  
  71.                                 <?php endif; ?>
  72.  
  73.                                 <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
  74.  
  75.                                     <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
  76.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  77.                                     <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_edit_value() ?></textarea>
  78.  
  79.                                 <?php endif; ?>
  80.  
  81.                                 <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
  82.  
  83.                                     <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
  84.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  85.                                     <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>">
  86.                                         <?php bp_the_profile_field_options() ?>
  87.                                     </select>
  88.  
  89.                                 <?php endif; ?>
  90.  
  91.                                 <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
  92.  
  93.                                     <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
  94.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  95.                                     <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" multiple="multiple">
  96.                                         <?php bp_the_profile_field_options() ?>
  97.                                     </select>
  98.  
  99.                                 <?php endif; ?>
  100.  
  101.                                 <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?>
  102.  
  103.                                     <div class="radio">
  104.                                         <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span>
  105.  
  106.                                         <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  107.                                         <?php bp_the_profile_field_options() ?>
  108.  
  109.                                         <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
  110.                                             <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a>
  111.                                         <?php endif; ?>
  112.                                     </div>
  113.  
  114.                                 <?php endif; ?>
  115.  
  116.                                 <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
  117.  
  118.                                     <div class="checkbox">
  119.                                         <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span>
  120.  
  121.                                         <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  122.                                         <?php bp_the_profile_field_options() ?>
  123.                                     </div>
  124.  
  125.                                 <?php endif; ?>
  126.  
  127.                                 <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
  128.  
  129.                                     <div class="datebox">
  130.                                         <label for="<?php bp_the_profile_field_input_name() ?>_day"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>
  131.                                         <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  132.  
  133.                                         <select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day">
  134.                                             <?php bp_the_profile_field_options( 'type=day' ) ?>
  135.                                         </select>
  136.  
  137.                                         <select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month">
  138.                                             <?php bp_the_profile_field_options( 'type=month' ) ?>
  139.                                         </select>
  140.  
  141.                                         <select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year">
  142.                                             <?php bp_the_profile_field_options( 'type=year' ) ?>
  143.                                         </select>
  144.                                     </div>
  145.  
  146.                                 <?php endif; ?>
  147.  
  148.                                 <?php do_action( 'bp_custom_profile_edit_fields' ) ?>
  149.  
  150.                                 <p class="description"><?php bp_the_profile_field_description() ?></p>
  151.  
  152.                             </div>
  153.  
  154.                         <?php endwhile; ?>
  155.  
  156.                         <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
  157.  
  158.                         <?php endwhile; endif; endif; ?>
  159.  
  160.                     </div><!-- #profile-details-section -->
  161.  
  162.                     <?php do_action( 'bp_after_signup_profile_fields' ) ?>
  163.  
  164.                 <?php endif; ?>
  165.                
  166.                 <?php if ( bp_get_blog_signup_allowed() ) : ?>
  167.  
  168.                     <?php do_action( 'bp_before_blog_details_fields' ) ?>
  169.  
  170.                     <?php /***** Blog Creation Details ******/ ?>
  171.  
  172.                     <div class="register-section" id="blog-details-section">
  173.  
  174.                         <h4><?php _e( 'Blog Details', 'buddypress' ) ?></h4>
  175.  
  176.                         <p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new blog', 'buddypress' ) ?></p>
  177.  
  178.                         <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
  179.  
  180.                             <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  181.                             <?php do_action( 'bp_signup_blog_url_errors' ) ?>
  182.  
  183.                             <?php if ( is_subdomain_install() ) : ?>
  184.                                 http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> .<?php echo str_replace( 'http://', '', site_url() ) ?>
  185.                             <?php else : ?>
  186.                                 <?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" />
  187.                             <?php endif; ?>
  188.  
  189.                             <label for="signup_blog_title"><?php _e( 'Blog Title', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  190.                             <?php do_action( 'bp_signup_blog_title_errors' ) ?>
  191.                             <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value() ?>" />
  192.  
  193.                             <span class="label"><?php _e( 'I would like my blog to appear in search engines, and in public listings around this site', 'buddypress' ) ?>:</span>
  194.                             <?php do_action( 'bp_signup_blog_privacy_errors' ) ?>
  195.  
  196.                             <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes' ) ?></label>
  197.                             <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No' ) ?></label>
  198.  
  199.                         </div>
  200.  
  201.                     </div><!-- #blog-details-section -->
  202.  
  203.                     <?php do_action( 'bp_after_blog_details_fields' ) ?>
  204.  
  205.                 <?php endif; ?>
  206.  
  207.                 <?php do_action( 'bp_before_registration_submit_buttons' ) ?>
  208.  
  209.                 <div class="submit">
  210.                     <input type="submit" name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ) ?> &rarr;" />
  211.                 </div>
  212.  
  213.                 <?php do_action( 'bp_after_registration_submit_buttons' ) ?>
  214.  
  215.                 <?php wp_nonce_field( 'bp_new_signup' ) ?>
  216.  
  217.             <?php endif; // request-details signup step ?>
  218.  
  219.             <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
  220.  
  221.                 <h2><?php _e( 'Sign Up Complete!', 'buddypress' ) ?></h2>
  222.  
  223.                 <?php do_action( 'template_notices' ) ?>
  224.  
  225.                 <?php if ( bp_registration_needs_activation() ) : ?>
  226.                     <p><?php _e( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ) ?></p>
  227.                 <?php else : ?>
  228.                     <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ) ?></p>
  229.                 <?php endif; ?>
  230.  
  231.                 <?php if ( bp_is_active( 'xprofile' ) && !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
  232.  
  233.                     <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
  234.  
  235.                         <h4><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h4>
  236.                         <p><?php _e( "We've fetched an avatar for your new account. If you'd like to change this, why not upload a new one?", 'buddypress' ) ?></p>
  237.  
  238.                         <div id="signup-avatar">
  239.                             <?php bp_signup_avatar() ?>
  240.                         </div>
  241.  
  242.                         <p>
  243.                             <input type="file" name="file" id="file" />
  244.                             <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
  245.                             <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
  246.                             <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />
  247.                             <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
  248.                         </p>
  249.  
  250.                         <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
  251.  
  252.                     <?php endif; ?>
  253.  
  254.                     <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
  255.  
  256.                         <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
  257.  
  258.                         <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
  259.  
  260.                         <div id="avatar-crop-pane">
  261.                             <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
  262.                         </div>
  263.  
  264.                         <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
  265.  
  266.                         <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />
  267.                         <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
  268.                         <input type="hidden" name="signup_avatar_dir" id="signup_avatar_dir" value="<?php bp_signup_avatar_dir_value() ?>" />
  269.  
  270.                         <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
  271.                         <input type="hidden" id="x" name="x" />
  272.                         <input type="hidden" id="y" name="y" />
  273.                         <input type="hidden" id="w" name="w" />
  274.                         <input type="hidden" id="h" name="h" />
  275.  
  276.                         <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
  277.  
  278.                     <?php endif; ?>
  279.  
  280.                 <?php endif; ?>
  281.  
  282.             <?php endif; // completed-confirmation signup step ?>
  283.  
  284.             <?php do_action( 'bp_custom_signup_steps' ) ?>
  285.  
  286.             </form>
  287.  
  288.         </div>
  289.  
  290.         <?php do_action( 'bp_after_register_page' ) ?>
  291.  
  292.         </div><!-- .padder -->
  293.     </div><!-- #content -->
  294.  
  295.     <?php locate_template( array( 'sidebar.php' ), true ) ?>
  296.  
  297.     <?php do_action( 'bp_after_directory_activity_content' ) ?>
  298.  
  299.     <script type="text/javascript">
  300.         jQuery(document).ready( function() {
  301.             if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
  302.                 jQuery('div#blog-details').toggle();
  303.  
  304.             jQuery( 'input#signup_with_blog' ).click( function() {
  305.                 jQuery('div#blog-details').fadeOut().toggle();
  306.             });
  307.         });
  308.     </script>
  309.  
  310. <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement