[Bb-trac] [bbPress] #700: bb_last_page() for easier templating

bbPress bb-trac at lists.bbpress.org
Thu Jul 19 14:00:05 GMT 2007


#700: bb_last_page() for easier templating
----------------------------+-----------------------------------------------
 Reporter:  fel64           |       Owner:     
     Type:  defect          |      Status:  new
 Priority:  normal          |   Milestone:     
Component:  Administration  |     Version:     
 Severity:  normal          |    Keywords:     
----------------------------+-----------------------------------------------
 Ouchy at http://bbpress.org/forums/topic/help-with-an-ifthen-statement
 wanted to display something only on the last page of a topic.
 Unfortunately that's way too difficult and it should be abstracted. All it
 takes is a simple function something like this (?)

 {{{
 function bb_last_page() {
 global $page, $topic;
 $add = topic_pages_add();
 $last_page = get_page_number( $topic->topic_posts + $add );
 return( $page == $last_page );
 }
 }}}

-- 
Ticket URL: <http://trac.bbpress.org/ticket/700>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list