sbrajesh

Brajesh Singh

Apr 4th, 2010
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.47 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.  
  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.                     <?php $fields_ids[]= bp_get_the_profile_group_field_ids();?>
  156.                    
  157.                     <?php endwhile; endif; endif; ?>
  158.                 <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php echo implode(",",$fields_ids);?>" />
  159.  
  160.                 </div><!-- #profile-details-section -->
  161.                 <?php endif; ?>
  162.  
  163.                 <?php do_action( 'bp_after_signup_profile_fields' ) ?>
  164.  
  165.                 <?php if ( bp_get_blog_signup_allowed() ) : ?>
  166.  
  167.                     <?php do_action( 'bp_before_blog_details_fields' ) ?>
  168.  
  169.                     <?php /***** Blog Creation Details ******/ ?>
  170.  
  171.                     <div class="register-section" id="blog-details-section">
  172.  
  173.                         <h4><?php _e( 'Blog Details', 'buddypress' ) ?></h4>
  174.  
  175.                         <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>
  176.  
  177.                         <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
  178.  
  179.                             <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  180.                             <?php do_action( 'bp_signup_blog_url_errors' ) ?>
  181.  
  182.                             <?php if ( 'yes' == VHOST ) : ?>
  183.                                 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() ) ?>
  184.                             <?php else : ?>
  185.                                 <?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" />
  186.                             <?php endif; ?>
  187.  
  188.                             <label for="signup_blog_title"><?php _e( 'Blog Title', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  189.                             <?php do_action( 'bp_signup_blog_title_errors' ) ?>
  190.                             <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value() ?>" />
  191.  
  192.                             <span class="label"><?php _e( 'I would like my blog to appear in search engines, and in public listings around this site', 'buddypress' ) ?>:</span>
  193.                             <?php do_action( 'bp_signup_blog_privacy_errors' ) ?>
  194.  
  195.                             <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>
  196.                             <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>
  197.  
  198.                         </div>
  199.  
  200.                     </div><!-- #blog-details-section -->
  201.  
  202.                     <?php do_action( 'bp_after_blog_details_fields' ) ?>
  203.  
  204.                 <?php endif; ?>
  205.  
  206.                 <?php do_action( 'bp_before_registration_submit_buttons' ) ?>
  207.  
  208.                 <div class="submit">
  209.                     <input type="submit"name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ) ?> &rarr;" />
  210.                 </div>
  211.  
  212.                 <?php do_action( 'bp_after_registration_submit_buttons' ) ?>
  213.  
  214.                 <?php wp_nonce_field( 'bp_new_signup' ) ?>
  215.  
  216.             <?php endif; // request-details signup step ?>
  217.  
  218.             <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
  219.  
  220.                 <h2><?php _e( 'Sign Up Complete!', 'buddypress' ) ?></h2>
  221.  
  222.                 <?php do_action( 'template_notices' ) ?>
  223.  
  224.                 <?php if ( bp_registration_needs_activation() ) : ?>
  225.                     <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>
  226.                 <?php else : ?>
  227.                     <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ) ?></p>
  228.                 <?php endif; ?>
  229.  
  230.                 <?php if ( bp_is_active( 'xprofile' ) && !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
  231.  
  232.                     <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
  233.  
  234.                         <h4><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h4>
  235.                         <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>
  236.  
  237.                         <div id="signup-avatar">
  238.                             <?php bp_signup_avatar() ?>
  239.                         </div>
  240.  
  241.                         <p>
  242.                             <input type="file" name="file" id="file" />
  243.                             <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
  244.                             <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
  245.                             <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />
  246.                             <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
  247.                         </p>
  248.  
  249.                         <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
  250.  
  251.                     <?php endif; ?>
  252.  
  253.                     <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
  254.  
  255.                         <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
  256.  
  257.                         <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
  258.  
  259.                         <div id="avatar-crop-pane">
  260.                             <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
  261.                         </div>
  262.  
  263.                         <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
  264.  
  265.                         <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" />
  266.                         <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" />
  267.                         <input type="hidden" name="signup_avatar_dir" id="signup_avatar_dir" value="<?php bp_signup_avatar_dir_value() ?>" />
  268.  
  269.                         <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
  270.                         <input type="hidden" id="x" name="x" />
  271.                         <input type="hidden" id="y" name="y" />
  272.                         <input type="hidden" id="w" name="w" />
  273.                         <input type="hidden" id="h" name="h" />
  274.  
  275.                         <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
  276.  
  277.                     <?php endif; ?>
  278.  
  279.                 <?php endif; ?>
  280.  
  281.             <?php endif; // completed-confirmation signup step ?>
  282.  
  283.             <?php do_action( 'bp_custom_signup_steps' ) ?>
  284.  
  285.             </form>
  286.  
  287.         </div>
  288.  
  289.         <?php do_action( 'bp_after_register_page' ) ?>
  290.  
  291.         </div><!-- .padder -->
  292.     </div><!-- #content -->
  293.  
  294.     <?php locate_template( array( 'sidebar.php' ), true ) ?>
  295.  
  296.     <?php do_action( 'bp_after_directory_activity_content' ) ?>
  297.  
  298.     <script type="text/javascript">
  299.         jQuery(document).ready( function() {
  300.             if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
  301.                 jQuery('div#blog-details').toggle();
  302.  
  303.             jQuery( 'input#signup_with_blog' ).click( function() {
  304.                 jQuery('div#blog-details').fadeOut().toggle();
  305.             });
  306.         });
  307.     </script>
  308.  
  309. <?php get_footer() ?>
Add Comment
Please, Sign In to add comment