Changeset 2168 for trunk/bp-forums/bp-forums-templatetags.php
- Timestamp:
- 12/14/2009 03:24:05 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-forums/bp-forums-templatetags.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-templatetags.php
r2077 r2168 19 19 var $order; 20 20 21 function BP_Forums_Template_Forum( $type, $forum_id, $p er_page, $max, $no_stickies, $filter ) {21 function BP_Forums_Template_Forum( $type, $forum_id, $page, $per_page, $max, $no_stickies, $filter ) { 22 22 global $bp; 23 23 24 $this->pag_page = isset( $_REQUEST['p'] ) ? intval( $_REQUEST['p'] ) : 1;24 $this->pag_page = isset( $_REQUEST['p'] ) ? intval( $_REQUEST['p'] ) : $page; 25 25 $this->pag_num = isset( $_REQUEST['n'] ) ? intval( $_REQUEST['n'] ) : $per_page; 26 26 … … 100 100 'total' => ceil($this->total_topic_count / $this->pag_num), 101 101 'current' => $this->pag_page, 102 'prev_text' => '&la quo;',103 'next_text' => '&ra quo;',102 'prev_text' => '←', 103 'next_text' => '→', 104 104 'mid_size' => 1 105 105 )); … … 158 158 'type' => 'newest', 159 159 'forum_id' => false, 160 'page' => 1, 160 161 'per_page' => 15, 161 162 'max' => false, … … 184 185 $filter = $_GET['fs']; 185 186 186 $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $p er_page, $max, $no_stickies, $filter );187 $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $page, $per_page, $max, $no_stickies, $filter ); 187 188 188 189 return apply_filters( 'bp_has_topics', $forum_template->has_topics(), &$forum_template ); … … 532 533 extract( $r, EXTR_SKIP ); 533 534 534 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit ', 'buddypress' ) . '</a>';535 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit Topic', 'buddypress' ) . '</a>'; 535 536 536 537 if ( $bp->is_item_admin || $bp->is_item_mod || is_site_admin() ) { 537 538 if ( 0 == (int)$forum_template->topic->topic_sticky ) 538 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky ', 'buddypress' ) . '</a>';539 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky Topic', 'buddypress' ) . '</a>'; 539 540 else 540 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'unstick', 'bp_forums_unstick_topic' ) . '">' . __( 'Un-stick ', 'buddypress' ) . '</a>';541 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'unstick', 'bp_forums_unstick_topic' ) . '">' . __( 'Un-stick Topic', 'buddypress' ) . '</a>'; 541 542 542 543 if ( 0 == (int)$forum_template->topic->topic_open ) 543 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'open', 'bp_forums_open_topic' ) . '">' . __( 'Open ', 'buddypress' ) . '</a>';544 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'open', 'bp_forums_open_topic' ) . '">' . __( 'Open Topic', 'buddypress' ) . '</a>'; 544 545 else 545 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'close', 'bp_forums_close_topic' ) . '">' . __( 'Close ', 'buddypress' ) . '</a>';546 547 $links[] = '<a class="confirm" id="topic-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete', 'bp_forums_delete_topic' ) . '">' . __( 'Delete ', 'buddypress' ) . '</a>';546 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'close', 'bp_forums_close_topic' ) . '">' . __( 'Close Topic', 'buddypress' ) . '</a>'; 547 548 $links[] = '<a class="confirm" id="topic-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete', 'bp_forums_delete_topic' ) . '">' . __( 'Delete Topic', 'buddypress' ) . '</a>'; 548 549 } 549 550 … … 896 897 extract( $r, EXTR_SKIP ); 897 898 898 $links = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . $topic_template->post->id . 'edit/post/' . $topic_template->post->post_id, 'bp_forums_edit_post' ) . '">' . __( 'Edit ', 'buddypress' ) . '</a> ' . $seperator . ' ';899 $links .= '<a class="confirm" id="post-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete/post/' . $topic_template->post->post_id, 'bp_forums_delete_post' ) . '">' . __( 'Delete ', 'buddypress' ) . '</a>';899 $links = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . $topic_template->post->id . 'edit/post/' . $topic_template->post->post_id, 'bp_forums_edit_post' ) . '">' . __( 'Edit Post', 'buddypress' ) . '</a> ' . $seperator . ' '; 900 $links .= '<a class="confirm" id="post-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete/post/' . $topic_template->post->post_id, 'bp_forums_delete_post' ) . '">' . __( 'Delete Post', 'buddypress' ) . '</a>'; 900 901 901 902 return $links;
Note: See TracChangeset
for help on using the changeset viewer.