Guest User

regist/regist.php for swatch BP integration

a guest
Jan 31st, 2012
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.61 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 do_action( 'bp_custom_profile_edit_fields' ) ?>
  158.  
  159. <p class="description"><?php bp_the_profile_field_description() ?></p>
  160.  
  161. </div>
  162.  
  163. <?php endwhile; ?>
  164.  
  165. <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
  166.  
  167. <?php endwhile; endif; endif; ?>
  168.  
  169. </div><!-- #profile-details-section -->
  170.  
  171. <?php do_action( 'bp_after_signup_profile_fields' ) ?>
  172.  
  173. <?php endif; ?>
  174.  
  175. <?php if ( bp_get_blog_signup_allowed() ) : ?>
  176.  
  177. <?php do_action( 'bp_before_blog_details_fields' ) ?>
  178.  
  179. <?php /***** Blog Creation Details ******/ ?>
  180.  
  181. <div class="register-section" id="blog-details-section">
  182.  
  183. <h4><?php _e( 'Blog Details', 'buddypress' ) ?></h4>
  184.  
  185. <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>
  186.  
  187. <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
  188.  
  189. <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  190. <?php do_action( 'bp_signup_blog_url_errors' ) ?>
  191.  
  192. <?php if ( is_subdomain_install() ) : ?>
  193. http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> .<?php bp_blogs_subdomain_base() ?>
  194. <?php else : ?>
  195. <?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" />
  196. <?php endif; ?>
  197.  
  198. <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
  199. <?php do_action( 'bp_signup_blog_title_errors' ) ?>
  200. <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value() ?>" />
  201.  
  202. <span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ) ?>:</span>
  203. <?php do_action( 'bp_signup_blog_privacy_errors' ) ?>
  204.  
  205. <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>
  206. <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>
  207.  
  208. </div>
  209.  
  210. </div><!-- #blog-details-section -->
  211.  
  212. <?php do_action( 'bp_after_blog_details_fields' ) ?>
  213.  
  214. <?php endif; ?>
  215.  
  216. <?php do_action( 'bp_before_registration_submit_buttons' ) ?>
  217.  
  218. <div class="submit">
  219. <input type="submit" name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ) ?>" />
  220. </div>
  221.  
  222. <?php do_action( 'bp_after_registration_submit_buttons' ) ?>
  223.  
  224. <?php wp_nonce_field( 'bp_new_signup' ) ?>
  225.  
  226. <?php endif; // request-details signup step ?>
  227.  
  228. <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
  229.  
  230. <h2><?php _e( 'Sign Up Complete!', 'buddypress' ) ?></h2>
  231.  
  232. <?php do_action( 'template_notices' ) ?>
  233. <?php do_action( 'bp_before_registration_confirmed' ) ?>
  234.  
  235. <?php if ( bp_registration_needs_activation() ) : ?>
  236. <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>
  237. <?php else : ?>
  238. <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ) ?></p>
  239. <?php endif; ?>
  240.  
  241. <?php do_action( 'bp_after_registration_confirmed' ) ?>
  242.  
  243. <?php endif; // completed-confirmation signup step ?>
  244.  
  245. <?php do_action( 'bp_custom_signup_steps' ) ?>
  246.  
  247. </form>
  248.  
  249. </div>
  250.  
  251. <?php do_action( 'bp_after_register_page' ) ?>
  252.  
  253. </div><!-- /.entry -->
  254. </div><!-- /.post -->
  255. </div><!-- /#main -->
  256. <?php get_sidebar(); ?>
  257. </div><!-- /#content -->
  258. <script type="text/javascript">
  259. jQuery(document).ready( function() {
  260. if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') )
  261. jQuery('div#blog-details').toggle();
  262. jQuery( 'input#signup_with_blog' ).click( function() {
  263. jQuery('div#blog-details').fadeOut().toggle();
  264. });
  265. });
  266. </script>
  267. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment