Changeset 3924 for trunk/bp-themes/bp-default/forums/index.php
- Timestamp:
- 01/25/2011 10:28:27 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-themes/bp-default/forums/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/forums/index.php
r3828 r3924 17 17 <div class="padder"> 18 18 19 <?php do_action( 'bp_before_directory_forums' ); ?>19 <?php do_action( 'bp_before_directory_forums' ); ?> 20 20 21 <form action="" method="post" id="forums-search-form" class="dir-form">21 <form action="" method="post" id="forums-search-form" class="dir-form"> 22 22 23 <h3><?php _e( 'Group Forums Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() ) : ?> <a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ); ?></a><?php endif; ?></h3>23 <h3><?php _e( 'Group Forums Directory', 'buddypress' ); ?><?php if ( is_user_logged_in() ) : ?> <a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ); ?></a><?php endif; ?></h3> 24 24 25 <div id="forums-dir-search" class="dir-search" role="search">25 <div id="forums-dir-search" class="dir-search" role="search"> 26 26 27 <?php bp_directory_forums_search_form(); ?>27 <?php bp_directory_forums_search_form(); ?> 28 28 29 </div>30 </form>29 </div> 30 </form> 31 31 32 <?php do_action( 'bp_before_new_topic_form' ); ?>32 <?php do_action( 'bp_before_topics' ); ?> 33 33 34 <div id="new-topic-post" style="display: none;">34 <form action="" method="post" id="forums-directory-form" class="dir-form"> 35 35 36 <?php if ( is_user_logged_in() ) : ?> 36 <div class="item-list-tabs" role="navigation"> 37 <ul> 38 <li class="selected" id="forums-all"><a href="<?php bp_root_domain(); ?>"><?php printf( __( 'All Topics (%s)', 'buddypress' ), bp_get_forum_topic_count() ); ?></a></li> 37 39 38 <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100') ) : ?>40 <?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?> 39 41 40 <form action="" method="post" id="forum-topic-form" class="standard-form">42 <li id="forums-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ); ?>"><?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?></a></li> 41 43 42 <?php do_action( 'groups_forum_new_topic_before' )?>44 <?php endif; ?> 43 45 44 <a name="post-new"></a> 45 <h5><?php _e( 'Post a New Topic:', 'buddypress' ); ?></h5> 46 <?php do_action( 'bp_forums_directory_group_types' ); ?> 46 47 47 <label><?php _e( 'Title:', 'buddypress' ); ?></label>48 <input type="text" name="topic_title" id="topic_title" value="" />48 </ul> 49 </div> 49 50 50 <label><?php _e( 'Content:', 'buddypress' ); ?></label>51 <textarea name="topic_text" id="topic_text"></textarea>51 <div class="item-list-tabs" id="subnav" role="navigation"> 52 <ul> 52 53 53 <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label> 54 <input type="text" name="topic_tags" id="topic_tags" value="" /> 54 <?php do_action( 'bp_forums_directory_group_sub_types' ); ?> 55 55 56 <label><?php _e( 'Post In Group Forum:', 'buddypress' ); ?></label> 57 <select id="topic_group_id" name="topic_group_id"> 56 <li id="forums-order-select" class="last filter"> 58 57 59 < option value="">----</option>58 <?php _e( 'Order By:', 'buddypress' ); ?> 60 59 61 <?php while ( bp_groups() ) : bp_the_group(); ?> 60 <select> 61 <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option> 62 <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option> 63 <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option> 62 64 63 <?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) :?>65 <?php do_action( 'bp_forums_directory_order_options' ); ?> 64 66 65 <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option> 67 </select> 68 </li> 69 </ul> 70 </div> 66 71 67 <?php endif; ?>72 <?php do_action( 'bp_before_directory_forums_list' ); ?> 68 73 69 <?php endwhile; ?>74 <div id="forums-dir-list" class="forums dir-list" role="main"> 70 75 71 </select><!-- #topic_group_id -->76 <?php locate_template( array( 'forums/forums-loop.php' ), true ); ?> 72 77 73 <?php do_action( 'groups_forum_new_topic_after' ); ?>78 </div> 74 79 75 <div class="submit"> 76 <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ); ?>" /> 77 <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ); ?>" /> 80 <?php do_action( 'bp_directory_forums_content' ); ?> 81 82 <?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?> 83 84 </form> 85 86 <?php do_action( 'bp_after_directory_forums' ); ?> 87 88 <?php do_action( 'bp_before_new_topic_form' ); ?> 89 90 <div id="new-topic-post" style="display: none;"> 91 92 <?php if ( is_user_logged_in() ) : ?> 93 94 <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?> 95 96 <form action="" method="post" id="forum-topic-form" class="standard-form"> 97 98 <?php do_action( 'groups_forum_new_topic_before' ) ?> 99 100 <a name="post-new"></a> 101 <h5><?php _e( 'Post a New Topic:', 'buddypress' ); ?></h5> 102 103 <label><?php _e( 'Title:', 'buddypress' ); ?></label> 104 <input type="text" name="topic_title" id="topic_title" value="" /> 105 106 <label><?php _e( 'Content:', 'buddypress' ); ?></label> 107 <textarea name="topic_text" id="topic_text"></textarea> 108 109 <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label> 110 <input type="text" name="topic_tags" id="topic_tags" value="" /> 111 112 <label><?php _e( 'Post In Group Forum:', 'buddypress' ); ?></label> 113 <select id="topic_group_id" name="topic_group_id"> 114 115 <option value="">----</option> 116 117 <?php while ( bp_groups() ) : bp_the_group(); ?> 118 119 <?php if ( bp_group_is_forum_enabled() && 'public' == bp_get_group_status() ) : ?> 120 121 <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option> 122 123 <?php endif; ?> 124 125 <?php endwhile; ?> 126 127 </select><!-- #topic_group_id --> 128 129 <?php do_action( 'groups_forum_new_topic_after' ); ?> 130 131 <div class="submit"> 132 <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ); ?>" /> 133 <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ); ?>" /> 134 </div> 135 136 <?php wp_nonce_field( 'bp_forums_new_topic' ); ?> 137 138 </form><!-- #forum-topic-form --> 139 140 <?php else : ?> 141 142 <div id="message" class="info"> 143 144 <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> 145 78 146 </div> 79 80 <?php wp_nonce_field( 'bp_forums_new_topic' ); ?>81 82 </form><!-- #forum-topic-form -->83 84 <?php else : ?>85 86 <div id="message" class="info">87 88 <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>89 90 </div>91 92 <?php endif; ?>93 94 <?php endif; ?>95 </div><!-- #new-topic-post -->96 97 <?php do_action( 'bp_before_topics' ); ?>98 99 <form action="" method="post" id="forums-directory-form" class="dir-form">100 101 <div class="item-list-tabs" role="navigation">102 <ul>103 <li class="selected" id="forums-all"><a href="<?php bp_root_domain(); ?>"><?php printf( __( 'All Topics (%s)', 'buddypress' ), bp_get_forum_topic_count() ); ?></a></li>104 105 <?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>106 107 <li id="forums-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ); ?>"><?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>108 147 109 148 <?php endif; ?> 110 149 111 <?php do_action( 'bp_forums_directory_group_types' ); ?> 112 113 </ul> 114 </div> 115 116 <div class="item-list-tabs" id="subnav" role="navigation"> 117 <ul> 118 119 <?php do_action( 'bp_forums_directory_group_sub_types' ); ?> 120 121 <li id="forums-order-select" class="last filter"> 122 123 <?php _e( 'Order By:', 'buddypress' ); ?> 124 125 <select> 126 <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option> 127 <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option> 128 <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option> 129 130 <?php do_action( 'bp_forums_directory_order_options' ); ?> 131 132 </select> 133 </li> 134 </ul> 135 </div> 136 137 <?php do_action( 'bp_before_directory_forums_list' ); ?> 138 139 <div id="forums-dir-list" class="forums dir-list" role="main"> 140 141 <?php locate_template( array( 'forums/forums-loop.php' ), true ); ?> 142 143 </div> 144 145 <?php do_action( 'bp_directory_forums_content' ); ?> 146 147 <?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?> 148 149 </form> 150 151 <?php do_action( 'bp_after_directory_forums' ); ?> 152 150 <?php endif; ?> 151 </div><!-- #new-topic-post --> 153 152 </div><!-- .padder --> 154 153 </div><!-- #content -->
Note: See TracChangeset
for help on using the changeset viewer.