Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/09/2011 10:31:19 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Allow capable users to mark topics as sticky/super sticky on creation/edit. Props GautamGupta via Google Code-in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-themes/bbp-twentyten/form-bbp_topic.php

    r2782 r2784  
    5656                        </p>
    5757
    58                         <p class="form-allowed-tags">                           
     58                        <p class="form-allowed-tags">
    5959                            <label><?php _e( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:','bbpress' ); ?></label><br />
    6060                            <code><?php bbp_allowed_tags(); ?></code>
     
    7979                        <?php endif; ?>
    8080
     81                        <?php if ( current_user_can( 'moderate' ) ) : ?>
     82
     83                            <p>
     84
     85                                <label for="bbp_stick_topic"><?php _e( 'Topic Type:', 'bbpress' ); ?></label><br />
     86
     87                                <?php bbp_topic_type_select( array( 'tab' => 16 ) ); ?>
     88
     89                            </p>
     90
     91                        <?php endif; ?>
     92
    8193                        <?php if ( bbp_is_subscriptions_active() && !bbp_is_anonymous() && ( !bbp_is_topic_edit() || ( bbp_is_topic_edit() && !bbp_is_topic_anonymous() ) ) ) : ?>
    8294
     
    8496                                <?php if ( bbp_is_topic_edit() && $post->post_author != bbp_get_current_user_id() ) : ?>
    8597
    86                                     <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( $post->post_author ) ); ?> tabindex="16" />
     98                                    <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( $post->post_author ) ); ?> tabindex="18" />
    8799                                    <label for="bbp_topic_subscription"><?php _e( 'Notify the author of follow-up replies via email', 'bbpress' ); ?></label>
    88100
    89101                                <?php else : ?>
    90102
    91                                     <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( bbp_get_user_id( 0, false, true ) ) ); ?> tabindex="16" />
     103                                    <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php checked( true, bbp_is_user_subscribed( bbp_get_user_id( 0, false, true ) ) ); ?> tabindex="18" />
    92104                                    <label for="bbp_topic_subscription"><?php _e( 'Notify me of follow-up replies via email', 'bbpress' ); ?></label>
    93105
     
    102114                                <legend><?php _e( 'Revision', 'bbpress' ); ?></legend>
    103115                                <div>
    104                                     <input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" checked="checked" tabindex="18" />
    105                                     <label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />                                                                         
     116                                    <input name="bbp_log_topic_edit" id="bbp_log_topic_edit" type="checkbox" value="1" checked="checked" tabindex="20" />
     117                                    <label for="bbp_log_topic_edit"><?php _e( 'Keep a log of this edit:', 'bbpress' ); ?></label><br />
    106118                                </div>
    107119
    108                                 <div>                                   
     120                                <div>
    109121                                    <label for="bbp_topic_edit_reason"><?php printf( __( 'Optional reason for editing:', 'bbpress' ), bbp_get_current_user_name() ); ?></label><br />
    110                                     <input type="text" value="" tabindex="20" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
     122                                    <input type="text" value="" tabindex="22" size="40" name="bbp_topic_edit_reason" id="bbp_topic_edit_reason" />
    111123                                </div>
    112124                            </fieldset>
     
    115127
    116128                        <p id="bbp_topic_submit_container">
    117                             <button type="submit" tabindex="22" id="bbp_topic_submit" name="bbp_topic_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
     129                            <button type="submit" tabindex="24" id="bbp_topic_submit" name="bbp_topic_submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
    118130                        </p>
    119131                    </div>
Note: See TracChangeset for help on using the changeset viewer.