- 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-reply.php
r3586 r3651 10 10 ?> 11 11 12 <?php if ( bbp_is_reply_edit() ) : ?>12 <?php if ( bbp_is_reply_edit() ) : ?> 13 13 14 <?php bbp_breadcrumb(); ?>14 <div id="bbpress-forums"> 15 15 16 <?php endif; ?>16 <?php bbp_breadcrumb(); ?> 17 17 18 <?php if ( bbp_current_user_can_access_create_reply_form() ) :?>18 <?php endif; ?> 19 19 20 <div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form">20 <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?> 21 21 22 <form id="new-post" name="new-post" method="post" action="">22 <div id="new-reply-<?php bbp_topic_id(); ?>" class="bbp-reply-form"> 23 23 24 <?php do_action( 'bbp_theme_before_reply_form' ); ?>24 <form id="new-post" name="new-post" method="post" action=""> 25 25 26 <fieldset class="bbp-form"> 27 <legend><?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?></legend> 26 <?php do_action( 'bbp_theme_before_reply_form' ); ?> 28 27 29 <?php do_action( 'bbp_theme_before_reply_form_notices' ); ?> 28 <fieldset class="bbp-form"> 29 <legend><?php printf( __( 'Reply To: %s', 'bbpress' ), bbp_get_topic_title() ); ?></legend> 30 30 31 <?php if ( !bbp_is_topic_open() && !bbp_is_reply_edit() ) :?>31 <?php do_action( 'bbp_theme_before_reply_form_notices' ); ?> 32 32 33 <div class="bbp-template-notice"> 34 <p><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p> 35 </div> 33 <?php if ( !bbp_is_topic_open() && !bbp_is_reply_edit() ) : ?> 34 35 <div class="bbp-template-notice"> 36 <p><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p> 37 </div> 38 39 <?php endif; ?> 40 41 <?php if ( current_user_can( 'unfiltered_html' ) ) : ?> 42 43 <div class="bbp-template-notice"> 44 <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p> 45 </div> 46 47 <?php endif; ?> 48 49 <?php do_action( 'bbp_template_notices' ); ?> 50 51 <div> 52 53 <?php bbp_get_template_part( 'bbpress/form', 'anonymous' ); ?> 54 55 <?php do_action( 'bbp_theme_before_reply_form_content' ); ?> 56 57 <?php if ( !function_exists( 'wp_editor' ) ) : ?> 58 59 <p> 60 <label for="bbp_reply_content"><?php _e( 'Reply:', 'bbpress' ); ?></label><br /> 61 <textarea id="bbp_reply_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_reply_content" rows="6"><?php bbp_form_reply_content(); ?></textarea> 62 </p> 63 64 <?php else : ?> 65 66 <?php bbp_the_content( array( 'context' => 'reply' ) ); ?> 36 67 37 68 <?php endif; ?> 38 69 39 <?php if ( current_user_can( 'unfiltered_html' ) ) :?>70 <?php do_action( 'bbp_theme_after_reply_form_content' ); ?> 40 71 41 <div class="bbp-template-notice"> 42 <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p> 43 </div> 72 <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?> 73 74 <p class="form-allowed-tags"> 75 <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br /> 76 <code><?php bbp_allowed_tags(); ?></code> 77 </p> 44 78 45 79 <?php endif; ?> 46 80 47 <?php do_action( 'bbp_t emplate_notices' ); ?>81 <?php do_action( 'bbp_theme_before_reply_form_tags' ); ?> 48 82 49 <div> 83 <p> 84 <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br /> 85 <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> /> 86 </p> 50 87 51 <?php bbp_get_template_part( 'bbpress/form', 'anonymous' ); ?>88 <?php do_action( 'bbp_theme_after_reply_form_tags' ); ?> 52 89 53 <?php do_action( 'bbp_theme_before_reply_form_content' );?>90 <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_reply_edit() || ( bbp_is_reply_edit() && !bbp_is_reply_anonymous() ) ) ) : ?> 54 91 55 <?php if ( !function_exists( 'wp_editor' ) ) : ?> 56 57 <p> 58 <label for="bbp_reply_content"><?php _e( 'Reply:', 'bbpress' ); ?></label><br /> 59 <textarea id="bbp_reply_content" tabindex="<?php bbp_tab_index(); ?>" name="bbp_reply_content" rows="6"><?php bbp_form_reply_content(); ?></textarea> 60 </p> 61 62 <?php else : ?> 63 64 <?php bbp_the_content( array( 'context' => 'reply' ) ); ?> 65 66 <?php endif; ?> 67 68 <?php do_action( 'bbp_theme_after_reply_form_content' ); ?> 69 70 <?php if ( !current_user_can( 'unfiltered_html' ) ) : ?> 71 72 <p class="form-allowed-tags"> 73 <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br /> 74 <code><?php bbp_allowed_tags(); ?></code> 75 </p> 76 77 <?php endif; ?> 78 79 <?php do_action( 'bbp_theme_before_reply_form_tags' ); ?> 92 <?php do_action( 'bbp_theme_before_reply_form_subscription' ); ?> 80 93 81 94 <p> 82 <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br /> 83 <input type="text" value="<?php bbp_form_topic_tags(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_topic_tags" id="bbp_topic_tags" <?php disabled( bbp_is_topic_spam() ); ?> /> 95 96 <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" /> 97 98 <?php if ( bbp_is_reply_edit() && $post->post_author != bbp_get_current_user_id() ) : ?> 99 100 <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label> 101 102 <?php else : ?> 103 104 <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label> 105 106 <?php endif; ?> 107 84 108 </p> 85 109 86 <?php do_action( 'bbp_theme_after_reply_form_ tags' ); ?>110 <?php do_action( 'bbp_theme_after_reply_form_subscription' ); ?> 87 111 88 <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_reply_edit() || ( bbp_is_reply_edit() && !bbp_is_reply_anonymous() ) ) ) :?>112 <?php endif; ?> 89 113 90 <?php do_action( 'bbp_theme_before_reply_form_subscription' );?>114 <?php if ( bbp_allow_revisions() && bbp_is_reply_edit() ) : ?> 91 115 92 <p>116 <?php do_action( 'bbp_theme_before_reply_form_revisions' ); ?> 93 117 94 <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> tabindex="<?php bbp_tab_index(); ?>" /> 118 <fieldset class="bbp-form"> 119 <legend><?php _e( 'Revision', 'bbpress' ); ?></legend> 120 <div> 121 <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" /> 122 <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br /> 123 </div> 95 124 96 <?php if ( bbp_is_reply_edit() && $post->post_author != bbp_get_current_user_id() ) : ?> 125 <div> 126 <label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br /> 127 <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" /> 128 </div> 129 </fieldset> 97 130 98 <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>131 <?php do_action( 'bbp_theme_after_reply_form_revisions' ); ?> 99 132 100 <?php else : ?>133 <?php else : ?> 101 134 102 <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>135 <?php bbp_topic_admin_links(); ?> 103 136 104 <?php endif; ?>137 <?php endif; ?> 105 138 106 </p>139 <?php do_action( 'bbp_theme_before_reply_form_submit_wrapper' ); ?> 107 140 108 <?php do_action( 'bbp_theme_after_reply_form_subscription' ); ?>141 <div class="bbp-submit-wrapper"> 109 142 110 <?php endif; ?>143 <?php do_action( 'bbp_theme_before_reply_form_submit_button' ); ?> 111 144 112 < ?php if ( bbp_allow_revisions() && bbp_is_reply_edit() ) : ?>145 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button> 113 146 114 <?php do_action( 'bbp_theme_before_reply_form_revisions' ); ?> 115 116 <fieldset class="bbp-form"> 117 <legend><?php _e( 'Revision', 'bbpress' ); ?></legend> 118 <div> 119 <input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" /> 120 <label for="bbp_log_reply_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br /> 121 </div> 122 123 <div> 124 <label for="bbp_reply_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br /> 125 <input type="text" value="<?php bbp_form_reply_edit_reason(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_reply_edit_reason" id="bbp_reply_edit_reason" /> 126 </div> 127 </fieldset> 128 129 <?php do_action( 'bbp_theme_after_reply_form_revisions' ); ?> 130 131 <?php else : ?> 132 133 <?php bbp_topic_admin_links(); ?> 134 135 <?php endif; ?> 136 137 <?php do_action( 'bbp_theme_before_reply_form_submit_wrapper' ); ?> 138 139 <div class="bbp-submit-wrapper"> 140 141 <?php do_action( 'bbp_theme_before_reply_form_submit_button' ); ?> 142 143 <button type="submit" tabindex="<?php bbp_tab_index(); ?>" id="bbp_reply_submit" name="bbp_reply_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button> 144 145 <?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?> 146 147 </div> 148 149 <?php do_action( 'bbp_theme_after_reply_form_submit_wrapper' ); ?> 147 <?php do_action( 'bbp_theme_after_reply_form_submit_button' ); ?> 150 148 151 149 </div> 152 150 153 <?php bbp_reply_form_fields(); ?>151 <?php do_action( 'bbp_theme_after_reply_form_submit_wrapper' ); ?> 154 152 155 </ fieldset>153 </div> 156 154 157 <?php do_action( 'bbp_theme_after_reply_form'); ?>155 <?php bbp_reply_form_fields(); ?> 158 156 159 </form> 157 </fieldset> 158 159 <?php do_action( 'bbp_theme_after_reply_form' ); ?> 160 161 </form> 162 </div> 163 164 <?php elseif ( bbp_is_topic_closed() ) : ?> 165 166 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 167 <div class="bbp-template-notice"> 168 <p><?php printf( __( 'The topic ‘%s’ is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></p> 160 169 </div> 170 </div> 161 171 162 <?php elseif ( bbp_is_topic_closed() ) : ?>172 <?php elseif ( bbp_is_forum_closed( bbp_get_topic_forum_id() ) ) : ?> 163 173 164 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 165 <div class="bbp-template-notice"> 166 <p><?php printf( __( 'The topic ‘%s’ is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></p> 167 </div> 174 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 175 <div class="bbp-template-notice"> 176 <p><?php printf( __( 'The forum ‘%s’ is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></p> 168 177 </div> 178 </div> 169 179 170 <?php elseif ( bbp_is_forum_closed( bbp_get_topic_forum_id() ) ): ?>180 <?php else : ?> 171 181 172 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 173 <div class="bbp-template-notice"> 174 <p><?php printf( __( 'The forum ‘%s’ is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></p> 175 </div> 182 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 183 <div class="bbp-template-notice"> 184 <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p> 176 185 </div> 186 </div> 177 187 178 <?php else :?>188 <?php endif; ?> 179 189 180 <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply"> 181 <div class="bbp-template-notice"> 182 <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p> 183 </div> 184 </div> 190 <?php if ( bbp_is_reply_edit() ) : ?> 185 191 186 <?php endif; ?> 192 </div> 193 194 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.