Changeset 2594 for trunk/bp-forums/bp-forums-templatetags.php
- Timestamp:
- 02/04/2010 04:32:35 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-forums/bp-forums-templatetags.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-templatetags.php
r2587 r2594 27 27 $this->search_terms = $search_terms; 28 28 29 /* Only show stickies if we are viewing a single group forum, otherwise we could end up with hundreds globally */30 if ( $no_stickies )31 $show_stickies = 'all'; // bbPress needs str 'no'32 33 29 switch ( $type ) { 34 30 case 'newest': default: 35 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'forum_id' => $forum_id, 'filter' => $search_terms, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $ show_stickies ) );31 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'forum_id' => $forum_id, 'filter' => $search_terms, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $no_stickies ) ); 36 32 break; 37 33 38 34 case 'popular': 39 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'popular', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $ show_stickies ) );35 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'popular', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $no_stickies ) ); 40 36 break; 41 37 42 38 case 'unreplied': 43 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'unreplied', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $ show_stickies ) );39 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'unreplied', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $no_stickies ) ); 44 40 break; 45 41 46 42 case 'tag': 47 $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' => $ show_stickies ) );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 ) ); 48 44 break; 49 45 } … … 165 161 $forum_id = false; 166 162 $search_terms = false; 167 $no_stickies = false;163 $no_stickies = 'all'; 168 164 169 165 /* User filtering */ … … 192 188 $search_terms = $_GET['fs']; 193 189 194 /* Don't show stickies on the directory page, otherwise we might end up with 100's*/195 if ( $bp-> is_directory)196 $no_stickies = true;190 /* Show stickies on a group forum */ 191 if ( $bp->groups->current_group ) 192 $no_stickies = null; 197 193 198 194 $defaults = array(
Note: See TracChangeset
for help on using the changeset viewer.