Advertisement
Guest User

register.php

a guest
Nov 7th, 2012
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.00 KB | None | 0 0
  1. <?php get_header( 'buddypress' ); ?>
  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 ( 'registration-disabled' == bp_get_current_signup_step() ) : ?>
  13.                 <?php do_action( 'template_notices' ); ?>
  14.                 <?php do_action( 'bp_before_registration_disabled' ); ?>
  15.  
  16.                     <p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p>
  17.  
  18.                 <?php do_action( 'bp_after_registration_disabled' ); ?>
  19.             <?php endif; // registration-disabled signup setp ?>
  20.  
  21.             <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?>
  22.  
  23.                 <h2><?php _e( 'Create an Account', 'buddypress' ); ?></h2>
  24.  
  25.                 <?php do_action( 'template_notices' ); ?>
  26.  
  27.                 <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>
  28.  
  29.                 <?php do_action( 'bp_before_account_details_fields' ); ?>
  30.  
  31.                 <div class="register-section" id="basic-details-section">
  32.  
  33.                     <?php /***** Basic Account Details ******/ ?>
  34.  
  35.                     <h4><?php _e( 'Account Details', 'buddypress' ); ?></h4>
  36.  
  37.                     <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  38.                     <?php do_action( 'bp_signup_username_errors' ); ?>
  39.                     <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" />
  40.  
  41.                     <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  42.                     <?php do_action( 'bp_signup_email_errors' ); ?>
  43.                     <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" />
  44.  
  45.                     <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  46.                     <?php do_action( 'bp_signup_password_errors' ); ?>
  47.                     <input type="password" name="signup_password" id="signup_password" value="" />
  48.  
  49.                     <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  50.                     <?php do_action( 'bp_signup_password_confirm_errors' ); ?>
  51.                     <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" />
  52.  
  53.                 </div><!-- #basic-details-section -->
  54.  
  55.                 <?php do_action( 'bp_after_account_details_fields' ); ?>
  56.  
  57.                 <?php /***** Extra Profile Details ******/ ?>
  58.  
  59.                 <?php if ( bp_is_active( 'xprofile' ) ) : ?>
  60.  
  61.                     <?php do_action( 'bp_before_signup_profile_fields' ); ?>
  62.  
  63.                     <div class="register-section" id="profile-details-section">
  64.  
  65.                         <h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4>
  66.  
  67.                         <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
  68.                         <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  69.  
  70.                         <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  71.  
  72.                             <div class="editfield">
  73.  
  74.                                 <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
  75.  
  76.                                     <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>
  77.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
  78.                                     <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(); ?>" />
  79.  
  80.                                 <?php endif; ?>
  81.  
  82.                                 <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
  83.  
  84.                                     <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>
  85.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
  86.                                     <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>
  87.  
  88.                                 <?php endif; ?>
  89.  
  90.                                 <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
  91.  
  92.                                     <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>
  93.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
  94.                                     <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
  95.                                         <?php bp_the_profile_field_options(); ?>
  96.                                     </select>
  97.  
  98.                                 <?php endif; ?>
  99.  
  100.                                 <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
  101.  
  102.                                     <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>
  103.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
  104.                                     <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
  105.                                         <?php bp_the_profile_field_options(); ?>
  106.                                     </select>
  107.  
  108.                                 <?php endif; ?>
  109.  
  110.                                 <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?>
  111.  
  112.                                     <div class="radio">
  113.                                         <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>
  114.  
  115.                                         <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
  116.                                         <?php bp_the_profile_field_options(); ?>
  117.  
  118.                                         <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
  119.                                             <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a>
  120.                                         <?php endif; ?>
  121.                                     </div>
  122.  
  123.                                 <?php endif; ?>
  124.  
  125.                                 <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
  126.  
  127.                                     <div class="checkbox">
  128.                                         <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>
  129.  
  130.                                         <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
  131.                                         <?php bp_the_profile_field_options(); ?>
  132.                                     </div>
  133.  
  134.                                 <?php endif; ?>
  135.  
  136.                                 <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
  137.  
  138.                                     <div class="datebox">
  139.                                         <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>
  140.                                         <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
  141.  
  142.                                         <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
  143.                                             <?php bp_the_profile_field_options( 'type=day' ); ?>
  144.                                         </select>
  145.  
  146.                                         <select name="<?php bp_the_profile_field_input_name(); ?>_month" id="<?php bp_the_profile_field_input_name(); ?>_month">
  147.                                             <?php bp_the_profile_field_options( 'type=month' ); ?>
  148.                                         </select>
  149.  
  150.                                         <select name="<?php bp_the_profile_field_input_name(); ?>_year" id="<?php bp_the_profile_field_input_name(); ?>_year">
  151.                                             <?php bp_the_profile_field_options( 'type=year' ); ?>
  152.                                         </select>
  153.                                     </div>
  154.  
  155.                                 <?php endif; ?>
  156.                                
  157.                                 <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
  158.                                     <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
  159.                                         <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link">Change</a>
  160.                                     </p>
  161.                                    
  162.                                     <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
  163.                                         <fieldset>
  164.                                             <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
  165.                                        
  166.                                             <?php bp_profile_visibility_radio_buttons() ?>
  167.                                        
  168.                                         </fieldset>
  169.                                         <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
  170.                                        
  171.                                     </div>
  172.                                 <?php else : ?>
  173.                                     <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
  174.                                         <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
  175.                                     </p>           
  176.                                 <?php endif ?>
  177.  
  178.  
  179.                                 <?php do_action( 'bp_custom_profile_edit_fields' ); ?>
  180.  
  181.                                 <p class="description"><?php bp_the_profile_field_description(); ?></p>
  182.  
  183.                             </div>
  184.  
  185.                         <?php endwhile; ?>
  186.  
  187.                         <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" />
  188.  
  189.                         <?php endwhile; endif; endif; ?>
  190.  
  191.                     </div><!-- #profile-details-section -->
  192.  
  193.                     <?php do_action( 'bp_after_signup_profile_fields' ); ?>
  194.  
  195.                 <?php endif; ?>
  196.  
  197.                 <?php if ( bp_get_blog_signup_allowed() ) : ?>
  198.  
  199.                     <?php do_action( 'bp_before_blog_details_fields' ); ?>
  200.  
  201.                     <?php /***** Blog Creation Details ******/ ?>
  202.  
  203.                     <div class="register-section" id="blog-details-section">
  204.  
  205.                         <h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4>
  206.  
  207.                         <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 site', 'buddypress' ); ?></p>
  208.  
  209.                         <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
  210.  
  211.                             <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  212.                             <?php do_action( 'bp_signup_blog_url_errors' ); ?>
  213.  
  214.                             <?php if ( is_subdomain_install() ) : ?>
  215.                                 http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
  216.                             <?php else : ?>
  217.                                 <?php echo site_url(); ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
  218.                             <?php endif; ?>
  219.  
  220.                             <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
  221.                             <?php do_action( 'bp_signup_blog_title_errors' ); ?>
  222.                             <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" />
  223.  
  224.                             <span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?>:</span>
  225.                             <?php do_action( 'bp_signup_blog_privacy_errors' ); ?>
  226.  
  227.                             <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', 'buddypress' ); ?></label>
  228.                             <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', 'buddypress' ); ?></label>
  229.  
  230.                         </div>
  231.  
  232.                     </div><!-- #blog-details-section -->
  233.  
  234.                     <?php do_action( 'bp_after_blog_details_fields' ); ?>
  235.  
  236.                 <?php endif; ?>
  237.  
  238.                 <?php do_action( 'bp_before_registration_submit_buttons' ); ?>
  239.  
  240.                 <div class="submit">
  241.                     <input type="submit" name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ); ?>" />
  242.                 </div>
  243.  
  244.                 <?php do_action( 'bp_after_registration_submit_buttons' ); ?>
  245.  
  246.                 <?php wp_nonce_field( 'bp_new_signup' ); ?>
  247.  
  248.             <?php endif; // request-details signup step ?>
  249.  
  250.             <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
  251.  
  252.                 <h2><?php _e( 'Sign Up Complete!', 'buddypress' ); ?></h2>
  253.  
  254.                 <?php do_action( 'template_notices' ); ?>
  255.                 <?php do_action( 'bp_before_registration_confirmed' ); ?>
  256.  
  257.                 <?php if ( bp_registration_needs_activation() ) : ?>
  258.                     <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>
  259.                 <?php else : ?>
  260.                     <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p>
  261.                 <?php endif; ?>
  262.  
  263.                 <?php do_action( 'bp_after_registration_confirmed' ); ?>
  264.  
  265.             <?php endif; // completed-confirmation signup step ?>
  266.  
  267.             <?php do_action( 'bp_custom_signup_steps' ); ?>
  268.  
  269.             </form>
  270.  
  271.         </div>
  272.  
  273.         <?php do_action( 'bp_after_register_page' ); ?>
  274.  
  275.         </div><!-- .padder -->
  276.     </div><!-- #content -->
  277.  
  278.     <?php get_sidebar( 'buddypress' ); ?>
  279.  
  280.     <script type="text/javascript">
  281.         jQuery(document).ready( function() {
  282.             if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
  283.                 jQuery('div#blog-details').toggle();
  284.  
  285.             jQuery( 'input#signup_with_blog' ).click( function() {
  286.                 jQuery('div#blog-details').fadeOut().toggle();
  287.             });
  288.         });
  289.     </script>
  290.  
  291. <?php get_footer( 'buddypress' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement