- Timestamp:
- 12/28/2011 07:37:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-forum.php
r3586 r3651 10 10 ?> 11 11 12 <?php if ( bbp_is_forum_edit() ) : ?>12 <?php if ( bbp_is_forum_edit() ) : ?> 13 13 14 <?php bbp_breadcrumb(); ?>14 <div id="bbpress-forums"> 15 15 16 <?php bbp_single_forum_description( array( 'forum_id' => bbp_get_forum_id() )); ?>16 <?php bbp_breadcrumb(); ?> 17 17 18 <?php endif; ?>18 <?php bbp_single_forum_description( array( 'forum_id' => bbp_get_forum_id() ) ); ?> 19 19 20 <?php if ( bbp_current_user_can_access_create_forum_form() ) :?>20 <?php endif; ?> 21 21 22 <div id="new-forum-<?php bbp_forum_id(); ?>" class="bbp-forum-form">22 <?php if ( bbp_current_user_can_access_create_forum_form() ) : ?> 23 23 24 <form id="new-post" name="new-post" method="post" action="">24 <div id="new-forum-<?php bbp_forum_id(); ?>" class="bbp-forum-form"> 25 25 26 <?php do_action( 'bbp_theme_before_forum_form' ); ?>26 <form id="new-post" name="new-post" method="post" action=""> 27 27 28 <fieldset class="bbp-form"> 29 <legend> 28 <?php do_action( 'bbp_theme_before_forum_form' ); ?> 30 29 31 <?php 32 if ( bbp_is_forum_edit() ) 33 printf( __( 'Now Editing “%s”', 'bbpress' ), bbp_get_forum_title() ); 34 else 35 bbp_is_single_forum() ? printf( __( 'Create New Forum in “%s”', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Forum', 'bbpress' ); 36 ?> 30 <fieldset class="bbp-form"> 31 <legend> 37 32 38 </legend> 33 <?php 34 if ( bbp_is_forum_edit() ) 35 printf( __( 'Now Editing “%s”', 'bbpress' ), bbp_get_forum_title() ); 36 else 37 bbp_is_single_forum() ? printf( __( 'Create New Forum in “%s”', 'bbpress' ), bbp_get_forum_title() ) : _e( 'Create New Forum', 'bbpress' ); 38 ?> 39 39 40 <?php do_action( 'bbp_theme_before_forum_form_notices' ); ?>40 </legend> 41 41 42 <?php if ( !bbp_is_forum_edit() && bbp_is_forum_closed() ) :?>42 <?php do_action( 'bbp_theme_before_forum_form_notices' ); ?> 43 43 44 <div class="bbp-template-notice"> 45 <p><?php _e( 'This forum is closed to new content, however your account still allows you to do so.', 'bbpress' ); ?></p> 46 </div> 44 <?php if ( !bbp_is_forum_edit() && bbp_is_forum_closed() ) : ?> 47 45 48 <?php endif; ?> 46 <div class="bbp-template-notice"> 47 <p><?php _e( 'This forum is closed to new content, however your account still allows you to do so.', 'bbpress' ); ?></p> 48 </div> 49 49 50 <?php if ( current_user_can( 'unfiltered_html' ) ) :?>50 <?php endif; ?> 51 51 52 <div class="bbp-template-notice"> 53 <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p> 54 </div> 52 <?php if ( current_user_can( 'unfiltered_html' ) ) : ?> 55 53 56 <?php endif; ?> 54 <div class="bbp-template-notice"> 55 <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p> 56 </div> 57 57 58 <?php do_action( 'bbp_template_notices' ); ?>58 <?php endif; ?> 59 59 60 <div>60 <?php do_action( 'bbp_template_notices' ); ?> 61 61 62 <fieldset class="bbp-form bbp-forum-form-attributes"> 63 <legend><?php _e( 'Forum Attributes', 'bbpress' ); ?></legend> 62 <div> 64 63 65 <?php do_action( 'bbp_theme_before_forum_form_type' ); ?> 64 <fieldset class="bbp-form bbp-forum-form-attributes"> 65 <legend><?php _e( 'Forum Attributes', 'bbpress' ); ?></legend> 66 67 <?php do_action( 'bbp_theme_before_forum_form_type' ); ?> 68 69 <p> 70 <label for="bbp_forum_id"><?php _e( 'Forum Type:', 'bbpress' ); ?></label><br /> 71 <?php bbp_form_forum_type_dropdown(); ?> 72 </p> 73 74 <?php do_action( 'bbp_theme_after_forum_form_type' ); ?> 75 76 <?php do_action( 'bbp_theme_before_forum_form_status' ); ?> 77 78 <p> 79 <label for="bbp_forum_id"><?php _e( 'Status:', 'bbpress' ); ?></label><br /> 80 <?php bbp_form_forum_status_dropdown(); ?> 81 </p> 82 83 <?php do_action( 'bbp_theme_after_forum_form_status' ); ?> 84 85 <?php do_action( 'bbp_theme_before_forum_form_status' ); ?> 86 87 <p> 88 <label for="bbp_forum_id"><?php _e( 'Visibility:', 'bbpress' ); ?></label><br /> 89 <?php bbp_form_forum_visibility_dropdown(); ?> 90 </p> 91 92 <?php do_action( 'bbp_theme_after_forum_visibility_status' ); ?> 93 94 <?php if ( !bbp_is_single_forum() ) : ?> 95 96 <hr /> 97 98 <?php do_action( 'bbp_theme_before_forum_form_parent' ); ?> 66 99 67 100 <p> 68 <label for="bbp_forum_id"><?php _e( ' Forum Type:', 'bbpress' ); ?></label><br />69 <?php bbp_ form_forum_type_dropdown(); ?>101 <label for="bbp_forum_id"><?php _e( 'Parent Forum:', 'bbpress' ); ?></label><br /> 102 <?php bbp_dropdown( array( 'show_none' => __( '(No Parent)', 'bbpress' ), 'selected' => bbp_get_form_forum_parent() ) ); ?> 70 103 </p> 71 104 72 <?php do_action( 'bbp_theme_after_forum_form_ type' ); ?>105 <?php do_action( 'bbp_theme_after_forum_form_parent' ); ?> 73 106 74 <?php do_action( 'bbp_theme_before_forum_form_status' ); ?> 107 <?php endif; ?> 108 109 </fieldset> 110 111 <fieldset class="bbp-forum-form-main"> 112 113 <?php do_action( 'bbp_theme_before_forum_form_title' ); ?> 114 115 <p> 116 <label for="bbp_forum_title"><?php printf( __( 'Forum Name (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br /> 117 <input type="text" id="bbp_forum_title" value="<?php bbp_form_forum_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_forum_title" maxlength="<?php bbp_title_max_length(); ?>" /> 118 </p> 119 120 <?php do_action( 'bbp_theme_after_forum_form_title' ); ?> 121 122 <?php do_action( 'bbp_theme_before_forum_form_content' ); ?> 123 124 <?php if ( !function_exists( 'wp_editor' ) ) : ?> 75 125 76 126 <p> 77 <label for="bbp_forum_ id"><?php _e( 'Status:', 'bbpress' ); ?></label><br />78 < ?php bbp_form_forum_status_dropdown(); ?>127 <label for="bbp_forum_content"><?php _e( 'Forum Description:', 'bbpress' ); ?></label><br /> 128 <textarea id="bbp_forum_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_forum_content" cols="60" rows="10"><?php bbp_form_forum_content(); ?></textarea> 79 129 </p> 80 130 81 <?php do_action( 'bbp_theme_after_forum_form_status' );?>131 <?php else : ?> 82 132 83 <?php do_action( 'bbp_theme_before_forum_form_status'); ?>133 <?php bbp_the_content( array( 'context' => 'forum' ) ); ?> 84 134 85 <p> 86 <label for="bbp_forum_id"><?php _e( 'Visibility:', 'bbpress' ); ?></label><br /> 87 <?php bbp_form_forum_visibility_dropdown(); ?> 135 <?php endif; ?> 136 137 <?php do_action( 'bbp_theme_after_forum_form_content' ); ?> 138 139 <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?> 140 141 <p class="form-allowed-tags"> 142 <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br /> 143 <code><?php bbp_allowed_tags(); ?></code> 88 144 </p> 89 145 90 <?php do_action( 'bbp_theme_after_forum_visibility_status' ); ?>146 <?php endif; ?> 91 147 92 <?php if ( !bbp_is_single_forum() ) : ?>148 </fieldset> 93 149 94 <hr />150 <?php do_action( 'bbp_theme_before_forum_form_submit_wrapper' ); ?> 95 151 96 <?php do_action( 'bbp_theme_before_forum_form_parent' ); ?>152 <div class="bbp-submit-wrapper"> 97 153 98 <p> 99 <label for="bbp_forum_id"><?php _e( 'Parent Forum:', 'bbpress' ); ?></label><br /> 100 <?php bbp_dropdown( array( 'show_none' => __( '(No Parent)', 'bbpress' ), 'selected' => bbp_get_form_forum_parent() ) ); ?> 101 </p> 154 <?php do_action( 'bbp_theme_before_forum_form_submit_button' ); ?> 102 155 103 <?php do_action( 'bbp_theme_after_forum_form_parent' ); ?>156 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_forum_submit" name="bbp_forum_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button> 104 157 105 <?php endif; ?> 106 107 </fieldset> 108 109 <fieldset class="bbp-forum-form-main"> 110 111 <?php do_action( 'bbp_theme_before_forum_form_title' ); ?> 112 113 <p> 114 <label for="bbp_forum_title"><?php printf( __( 'Forum Name (Maximum Length: %d):', 'bbpress' ), bbp_get_title_max_length() ); ?></label><br /> 115 <input type="text" id="bbp_forum_title" value="<?php bbp_form_forum_title(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_forum_title" maxlength="<?php bbp_title_max_length(); ?>" /> 116 </p> 117 118 <?php do_action( 'bbp_theme_after_forum_form_title' ); ?> 119 120 <?php do_action( 'bbp_theme_before_forum_form_content' ); ?> 121 122 <?php if ( !function_exists( 'wp_editor' ) ) : ?> 123 124 <p> 125 <label for="bbp_forum_content"><?php _e( 'Forum Description:', 'bbpress' ); ?></label><br /> 126 <textarea id="bbp_forum_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_forum_content" cols="60" rows="10"><?php bbp_form_forum_content(); ?></textarea> 127 </p> 128 129 <?php else : ?> 130 131 <?php bbp_the_content( array( 'context' => 'forum' ) ); ?> 132 133 <?php endif; ?> 134 135 <?php do_action( 'bbp_theme_after_forum_form_content' ); ?> 136 137 <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?> 138 139 <p class="form-allowed-tags"> 140 <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br /> 141 <code><?php bbp_allowed_tags(); ?></code> 142 </p> 143 144 <?php endif; ?> 145 146 </fieldset> 147 148 <?php do_action( 'bbp_theme_before_forum_form_submit_wrapper' ); ?> 149 150 <div class="bbp-submit-wrapper"> 151 152 <?php do_action( 'bbp_theme_before_forum_form_submit_button' ); ?> 153 154 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_forum_submit" name="bbp_forum_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button> 155 156 <?php do_action( 'bbp_theme_after_forum_form_submit_button' ); ?> 157 158 </div> 159 160 <?php do_action( 'bbp_theme_after_forum_form_submit_wrapper' ); ?> 158 <?php do_action( 'bbp_theme_after_forum_form_submit_button' ); ?> 161 159 162 160 </div> 163 161 164 <?php bbp_forum_form_fields(); ?>162 <?php do_action( 'bbp_theme_after_forum_form_submit_wrapper' ); ?> 165 163 166 </ fieldset>164 </div> 167 165 168 <?php do_action( 'bbp_theme_after_forum_form'); ?>166 <?php bbp_forum_form_fields(); ?> 169 167 170 </form> 168 </fieldset> 169 170 <?php do_action( 'bbp_theme_after_forum_form' ); ?> 171 172 </form> 173 </div> 174 175 <?php elseif ( bbp_is_forum_closed() ) : ?> 176 177 <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum"> 178 <div class="bbp-template-notice"> 179 <p><?php printf( __( 'The forum ‘%s’ is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></p> 171 180 </div> 181 </div> 172 182 173 <?php elseif ( bbp_is_forum_closed() ): ?>183 <?php else : ?> 174 184 175 <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum"> 176 <div class="bbp-template-notice"> 177 <p><?php printf( __( 'The forum ‘%s’ is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></p> 178 </div> 185 <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum"> 186 <div class="bbp-template-notice"> 187 <p><?php is_user_logged_in() ? _e( 'You cannot create new forums at this time.', 'bbpress' ) : _e( 'You must be logged in to create new forums.', 'bbpress' ); ?></p> 179 188 </div> 189 </div> 180 190 181 <?php else :?>191 <?php endif; ?> 182 192 183 <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum"> 184 <div class="bbp-template-notice"> 185 <p><?php is_user_logged_in() ? _e( 'You cannot create new forums at this time.', 'bbpress' ) : _e( 'You must be logged in to create new forums.', 'bbpress' ); ?></p> 186 </div> 187 </div> 193 <?php if ( bbp_is_forum_edit() ) : ?> 188 194 189 <?php endif; ?> 195 </div> 196 197 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.