sbrajesh

Brajesh Singh

Apr 28th, 2010
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.55 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 do_action( 'bp_before_blog_details_fields' ) ?>
  49.  
  50.  
  51.                 <?php /***** Extra Profile Details ******/ ?>
  52.  
  53.                 <?php if ( bp_is_active( 'xprofile' ) ) : ?>
  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(  ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
  60.  
  61.                     <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
  62.                         <?php if(!bp_get_the_profile_field_is_required())
  63.                             continue;
  64.                         ?>
  65.                         <div class="editfield">
  66.  
  67.                             <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
  68.  
  69.                                 <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>
  70.                                 <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  71.                                 <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() ?>" />
  72.  
  73.                             <?php endif; ?>
  74.  
  75.                             <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
  76.  
  77.                                 <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>
  78.                                 <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  79.                                 <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>
  80.  
  81.                             <?php endif; ?>
  82.  
  83.                             <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
  84.  
  85.                                 <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>
  86.                                 <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  87.                                 <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>">
  88.                                     <?php bp_the_profile_field_options() ?>
  89.                                 </select>
  90.  
  91.                             <?php endif; ?>
  92.  
  93.                             <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
  94.  
  95.                                 <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>
  96.                                 <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  97.                                 <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" multiple="multiple">
  98.                                     <?php bp_the_profile_field_options() ?>
  99.                                 </select>
  100.  
  101.                             <?php endif; ?>
  102.  
  103.                             <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?>
  104.  
  105.                                 <div class="radio">
  106.                                     <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>
  107.  
  108.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  109.                                     <?php bp_the_profile_field_options() ?>
  110.  
  111.                                     <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
  112.                                         <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a>
  113.                                     <?php endif; ?>
  114.                                 </div>
  115.  
  116.                             <?php endif; ?>
  117.  
  118.                             <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
  119.  
  120.                                 <div class="checkbox">
  121.                                     <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>
  122.  
  123.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  124.                                     <?php bp_the_profile_field_options() ?>
  125.                                 </div>
  126.  
  127.                             <?php endif; ?>
  128.  
  129.                             <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
  130.  
  131.                                 <div class="datebox">
  132.                                     <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>
  133.                                     <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>
  134.  
  135.                                     <select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day">
  136.                                         <?php bp_the_profile_field_options( 'type=day' ) ?>
  137.                                     </select>
  138.  
  139.                                     <select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month">
  140.                                         <?php bp_the_profile_field_options( 'type=month' ) ?>
  141.                                     </select>
  142.  
  143.                                     <select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year">
  144.                                         <?php bp_the_profile_field_options( 'type=year' ) ?>
  145.                                     </select>
  146.                                 </div>
  147.  
  148.                             <?php endif; ?>
  149.  
  150.                             <?php do_action( 'bp_custom_profile_edit_fields' ) ?>
  151.  
  152.                             <p class="description"><?php bp_the_profile_field_description() ?></p>
  153.  
  154.                         </div>
  155.  
  156.                     <?php endwhile; ?>
  157.                     <?php $fields_ids[]= bp_get_the_profile_group_field_ids();?>
  158.                    
  159.                     <?php endwhile; endif; endif; ?>
  160.                 <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php echo implode(",",$fields_ids);?>" />
  161.  
  162.                 </div><!-- #profile-details-section -->
  163.                 <?php endif; ?>
  164.  
  165.                 <?php do_action( 'bp_after_signup_profile_fields' ) ?>
  166.  
  167.                 <?php if ( bp_get_blog_signup_allowed() ) : ?>
  168.  
  169.                     <?php do_action( 'bp_before_blog_details_fields' ) ?>
  170.  
  171.                     <?php /***** Blog Creation Details ******/ ?>
  172.  
  173.                     <div class="register-section" id="blog-details-section">
  174.  
  175.                         <h4><?php _e( 'Blog Details', 'buddypress' ) ?></h4>
  176.  
  177.                         <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>
  178.  
  179.                         <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
  180.  
  181.                             <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  182.                             <?php do_action( 'bp_signup_blog_url_errors' ) ?>
  183.  
  184.                             <?php if ( 'yes' == VHOST ) : ?>
  185.                                 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() ) ?>
  186.                             <?php else : ?>
  187.                                 <?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" />
  188.                             <?php endif; ?>
  189.  
  190.                             <label for="signup_blog_title"><?php _e( 'Blog Title', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  191.                             <?php do_action( 'bp_signup_blog_title_errors' ) ?>
  192.                             <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value() ?>" />
  193.  
  194.                             <span class="label"><?php _e( 'I would like my blog to appear in search engines, and in public listings around this site', 'buddypress' ) ?>:</span>
  195.                             <?php do_action( 'bp_signup_blog_privacy_errors' ) ?>
  196.  
  197.                             <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>
  198.                             <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>
  199.  
  200.                         </div>
  201.  
  202.                     </div><!-- #blog-details-section -->
  203.  
  204.                     <?php do_action( 'bp_after_blog_details_fields' ) ?>
  205.  
  206.                 <?php endif; ?>
  207.  
  208.                 <?php do_action( 'bp_before_registration_submit_buttons' ) ?>
  209.  
  210.                 <div class="submit">
  211.                     <input type="submit"name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ) ?> &rarr;" />
  212.                 </div>
  213.  
  214.                 <?php do_action( 'bp_after_registration_submit_buttons' ) ?>
  215.  
  216.                 <?php wp_nonce_field( 'bp_new_signup' ) ?>
  217.  
  218.             <?php endif; // request-details signup step ?>
  219.  
  220.             <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
  221.  
  222.                 <h2><?php _e( 'Sign Up Complete!', 'buddypress' ) ?></h2>
  223.  
  224.                 <?php do_action( 'template_notices' ) ?>
  225.  
  226.                 <?php if ( bp_registration_needs_activation() ) : ?>
  227.                     <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>
  228.                 <?php else : ?>
  229.                     <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ) ?></p>
  230.                 <?php endif; ?>
  231.  
  232.                 <?php if ( bp_is_active( 'xprofile' ) && !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
  233.  
  234.                     <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
  235.  
  236.                         <h4><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h4>
  237.                         <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>
  238.  
  239.                         <div id="signup-avatar">
  240.                             <?php bp_signup_avatar() ?>
  241.                         </div>
  242.  
  243.                         <p>
  244.                             <input type="file" name="file" id="file" />
  245.                             <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
  246.                             <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
  247.                             <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />
  248.                             <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
  249.                         </p>
  250.  
  251.                         <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
  252.  
  253.                     <?php endif; ?>
  254.  
  255.                     <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
  256.  
  257.                         <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
  258.  
  259.                         <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
  260.  
  261.                         <div id="avatar-crop-pane">
  262.                             <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
  263.                         </div>
  264.  
  265.                         <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
  266.  
  267.                         <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />
  268.                         <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
  269.                         <input type="hidden" name="signup_avatar_dir" id="signup_avatar_dir" value="<?php bp_signup_avatar_dir_value() ?>" />
  270.  
  271.                         <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
  272.                         <input type="hidden" id="x" name="x" />
  273.                         <input type="hidden" id="y" name="y" />
  274.                         <input type="hidden" id="w" name="w" />
  275.                         <input type="hidden" id="h" name="h" />
  276.  
  277.                         <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
  278.  
  279.                     <?php endif; ?>
  280.  
  281.                 <?php endif; ?>
  282.  
  283.             <?php endif; // completed-confirmation signup step ?>
  284.  
  285.             <?php do_action( 'bp_custom_signup_steps' ) ?>
  286.  
  287.             </form>
  288.  
  289.         </div>
  290.  
  291.         <?php do_action( 'bp_after_register_page' ) ?>
  292.  
  293.         </div><!-- .padder -->
  294.     </div><!-- #content -->
  295.  
  296.     <?php locate_template( array( 'sidebar.php' ), true ) ?>
  297.  
  298.     <?php do_action( 'bp_after_directory_activity_content' ) ?>
  299.  
  300.     <script type="text/javascript">
  301.         jQuery(document).ready( function() {
  302.             if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
  303.                 jQuery('div#blog-details').toggle();
  304.  
  305.             jQuery( 'input#signup_with_blog' ).click( function() {
  306.                 jQuery('div#blog-details').fadeOut().toggle();
  307.             });
  308.         });
  309.     </script>
  310.  
  311. <?php get_footer() ?>
Add Comment
Please, Sign In to add comment