Changeset 4301
- Timestamp:
- 04/29/2011 07:39:38 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
bp-core/bp-core-template.php (modified) (1 diff)
-
bp-forums/bp-forums-filters.php (modified) (1 diff)
-
bp-forums/bp-forums-template.php (modified) (1 diff)
-
bp-groups/bp-groups-filters.php (modified) (1 diff)
-
bp-themes/bp-default/forums/forums-loop.php (modified) (2 diffs)
-
bp-themes/bp-default/members/single/forums.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r4299 r4301 35 35 } 36 36 } 37 37 38 38 // Loop through each navigation item 39 39 foreach ( (array)$bp->bp_options_nav[$the_index] as $subnav_item ) { -
trunk/bp-forums/bp-forums-filters.php
r4268 r4301 132 132 add_filter( 'bp_get_the_topic_post_edit_text', 'bp_forums_strip_mentions_on_post_edit' ); 133 133 add_filter( 'bp_get_the_topic_text', 'bp_forums_strip_mentions_on_post_edit' ); 134 135 /** 136 * "REPLIED TO" SQL FILTERS 137 */ 138 139 /** 140 * Filters the get_topics_distinct portion of the Forums sql when on a user's Replied To page. 141 * 142 * This filter is added in bp_has_forum_topics() 143 * 144 * @package BuddyPress 145 * @since 1.3 146 * 147 * @global object $wpdb The WordPress database global 148 * @param string $sql 149 * @return string $sql 150 */ 151 function bp_forums_add_replied_distinct_sql( $sql ) { 152 global $wpdb; 153 154 $sql = $wpdb->prepare( "DISTINCT t.topic_id, " ); 155 156 return $sql; 157 } 158 159 /** 160 * Filters the get_topics_join portion of the Forums sql when on a user's Replied To page. 161 * 162 * This filter is added in bp_has_forum_topics() 163 * 164 * @package BuddyPress 165 * @since 1.3 166 * 167 * @global object $bbdb The bbPress database global 168 * @global object $wpdb The WordPress database global 169 * @param string $sql 170 * @return string $sql 171 */ 172 function bp_forums_add_replied_join_sql( $sql ) { 173 global $bbdb, $wpdb; 174 175 $sql .= $wpdb->prepare( " LEFT JOIN $bbdb->posts p ON p.topic_id = t.topic_id " ); 176 177 return $sql; 178 } 179 180 /** 181 * Filters the get_topics_where portion of the Forums sql when on a user's Replied To page. 182 * 183 * This filter is added in bp_has_forum_topics() 184 * 185 * @package BuddyPress 186 * @since 1.3 187 * 188 * @global object $wpdb The WordPress database global 189 * @param string $sql 190 * @return string $sql 191 */ 192 function bp_forums_add_replied_where_sql( $sql ) { 193 global $wpdb; 194 195 $sql .= $wpdb->prepare( " AND p.poster_id = %s ", bp_displayed_user_id() ); 196 197 return $sql; 198 } 199 134 200 ?> -
trunk/bp-forums/bp-forums-template.php
r4211 r4301 230 230 if ( !empty( $bp->displayed_user->id ) ) 231 231 $user_id = $bp->displayed_user->id; 232 233 // "Replied" query must be manually modified 234 if ( 'replies' == bp_current_action() ) { 235 $user_id = 0; // User id must be handled manually by the filter, not by BB_Query 236 237 add_filter( 'get_topics_distinct', 'bp_forums_add_replied_distinct_sql', 20 ); 238 add_filter( 'get_topics_join', 'bp_forums_add_replied_join_sql', 20 ); 239 add_filter( 'get_topics_where', 'bp_forums_add_replied_where_sql', 20 ); 240 } 232 241 233 242 // If we're in a single group, set this group's forum_id -
trunk/bp-groups/bp-groups-filters.php
r4269 r4301 79 79 global $bp; 80 80 81 $sql .= ' ,' . $bp->groups->table_name . ' AS g LEFT JOIN ' . $bp->groups->table_name_groupmeta . ' AS gm ON g.id = gm.group_id ';81 $sql .= 'JOIN ' . $bp->groups->table_name . ' AS g LEFT JOIN ' . $bp->groups->table_name_groupmeta . ' AS gm ON g.id = gm.group_id '; 82 82 83 83 return $sql; -
trunk/bp-themes/bp-default/forums/forums-loop.php
r4287 r4301 39 39 <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ); ?></th> 40 40 41 <?php if ( bp_is_directory() ) : ?>41 <?php if ( bp_is_directory() || bp_is_user_forums() ) : ?> 42 42 43 43 <th id="th-group"><?php _e( 'Forum', 'buddypress' ); ?></th> … … 67 67 </td> 68 68 69 <?php if ( bp_is_directory() ) : ?>69 <?php if ( bp_is_directory() || bp_is_user_forums() ) : ?> 70 70 71 71 <td class="td-group"> -
trunk/bp-themes/bp-default/members/single/forums.php
r3933 r4301 12 12 <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> 13 13 <ul> 14 <?php if ( bp_is_my_profile() ) bp_get_options_nav();?>14 <?php bp_get_options_nav() ?> 15 15 16 16 <li id="forums-order-select" class="last filter">
Note: See TracChangeset
for help on using the changeset viewer.