Changeset 2641 for trunk/bp-forums/bp-forums-templatetags.php
- Timestamp:
- 02/10/2010 12:29:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-templatetags.php
r2626 r2641 40 40 break; 41 41 42 case 'tag ':43 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'tag ', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $no_stickies ) );42 case 'tags': 43 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'tags', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $no_stickies ) ); 44 44 break; 45 45 } … … 178 178 } 179 179 180 /* If we're viewing a tag in the directory, let's auto set the filter to the tag name */181 if ( 'tag' == $bp->current_action && !empty( $bp->action_variables[0] ) ) {182 $search_terms = $bp->action_variables[0];183 $type = 'tags';184 }185 186 180 /* If $_GET['fs'] is set, let's auto populate the search_terms var */ 187 181 if ( $bp->is_directory && !empty( $_GET['fs'] ) ) … … 206 200 extract( $r ); 207 201 202 /* If we're viewing a tag URL in the directory, let's override the type and set it to tags and the filter to the tag name */ 203 if ( 'tag' == $bp->current_action && !empty( $bp->action_variables[0] ) ) { 204 $search_terms = $bp->action_variables[0]; 205 $type = 'tags'; 206 } 207 208 208 $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, $no_stickies, $search_terms ); 209 209 return apply_filters( 'bp_has_topics', $forum_template->has_topics(), &$forum_template );
Note: See TracChangeset
for help on using the changeset viewer.