Skip to:
Content

BuddyPress.org

Changeset 2969


Ignore:
Timestamp:
04/28/2010 10:16:57 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2346 props boonebgorges

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-themes/bp-default/forums/index.php

    r2900 r2969  
    1515        </form>
    1616
    17             <div id="new-topic-post">
    18                 <?php if ( is_user_logged_in() ) : ?>
     17        <div id="new-topic-post">
     18            <?php if ( is_user_logged_in() ) : ?>
    1919
    20                     <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
     20                <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
    2121
    22                         <form action="" method="post" id="forum-topic-form" class="standard-form">
     22                    <form action="" method="post" id="forum-topic-form" class="standard-form">
    2323
    24                             <?php do_action( 'groups_forum_new_topic_before' ) ?>
     24                        <?php do_action( 'groups_forum_new_topic_before' ) ?>
    2525
    26                             <a name="post-new"></a>
    27                             <h5><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h5>
     26                        <a name="post-new"></a>
     27                        <h5><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h5>
    2828
    29                             <label><?php _e( 'Title:', 'buddypress' ) ?></label>
    30                             <input type="text" name="topic_title" id="topic_title" value="" />
     29                        <label><?php _e( 'Title:', 'buddypress' ) ?></label>
     30                        <input type="text" name="topic_title" id="topic_title" value="" />
    3131
    32                             <label><?php _e( 'Content:', 'buddypress' ) ?></label>
    33                             <textarea name="topic_text" id="topic_text"></textarea>
     32                        <label><?php _e( 'Content:', 'buddypress' ) ?></label>
     33                        <textarea name="topic_text" id="topic_text"></textarea>
    3434
    35                             <label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label>
    36                             <input type="text" name="topic_tags" id="topic_tags" value="" />
     35                        <label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label>
     36                        <input type="text" name="topic_tags" id="topic_tags" value="" />
    3737
    38                             <label><?php _e( 'Post In Group Forum:', 'buddypress' ) ?></label>
    39                             <select id="topic_group_id" name="topic_group_id">
    40                                 <?php while ( bp_groups() ) : bp_the_group(); ?>
    41                                     <?php if ( 'public' == bp_get_group_status() ) : ?>
    42                                         <option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option>
    43                                     <?php endif; ?>
    44                                 <?php endwhile; ?>
    45                             </select>
     38                        <label><?php _e( 'Post In Group Forum:', 'buddypress' ) ?></label>
     39                        <select id="topic_group_id" name="topic_group_id">
    4640
    47                             <?php do_action( 'groups_forum_new_topic_after' ) ?>
     41                            <?php while ( bp_groups() ) : bp_the_group(); ?>
    4842
    49                             <div class="submit">
    50                                 <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" />
    51                                 <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ) ?>" />
    52                             </div>
     43                                <?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) : ?>
    5344
    54                             <?php wp_nonce_field( 'bp_forums_new_topic' ) ?>
     45                                    <option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option>
    5546
    56                         </form>
     47                                <?php endif; ?>
    5748
    58                     <?php else : ?>
     49                            <?php endwhile; ?>
    5950
    60                         <div id="message" class="info">
    61                             <p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( BP_GROUPS_SLUG . '/create/' ) ) ?></p>
     51                        </select><!-- #topic_group_id -->
     52
     53                        <?php do_action( 'groups_forum_new_topic_after' ) ?>
     54
     55                        <div class="submit">
     56                            <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" />
     57                            <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ) ?>" />
    6258                        </div>
    6359
    64                     <?php endif; ?>
     60                        <?php wp_nonce_field( 'bp_forums_new_topic' ) ?>
     61
     62                    </form><!-- #forum-topic-form -->
     63
     64                <?php else : ?>
     65
     66                    <div id="message" class="info">
     67                        <p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( BP_GROUPS_SLUG . '/create/' ) ) ?></p>
     68                    </div>
    6569
    6670                <?php endif; ?>
    67             </div>
     71
     72            <?php endif; ?>
     73        </div><!-- #new-topic-post -->
    6874
    6975        <form action="" method="post" id="forums-directory-form" class="dir-form">
Note: See TracChangeset for help on using the changeset viewer.