__construct( $args); } function __construct( $args = '' ) { global $bp; $defaults = bp_cubepoint_default_query_args(); $r = apply_filters('bp_cubepoint_template_args',wp_parse_args( $args, $defaults )); extract( $r , EXTR_SKIP); $this->pag_page = $page; $this->pag_per_page = $per_page; $this->uid = $uid; /*** * You can use the "type" variable to fetch different things to output. * For example on the groups template loop, you can fetch groups by "newest", "active", "alphabetical" * and more. This would be the "type". You can then call different functions to fetch those * different results. */ $total = bp_cubepoint_get_point_count($r); $this->points = bp_cubepoint_get_points($r); // Item Requests if ( !$max || $max >= $total ) $this->total_point_count = $total; else $this->total_point_count = $max; if ( !$max || $max >= count($this->points)) $this->point_count = count($this->points); else $this->point_count = $max; $this->pag_links = paginate_links( array( 'base' => $bp->displayed_user->domain . $bp->cubepoint->slug .'/'. $bp->cubepoint->points_slug .'/%_%', 'format' => '%#%', 'total' => ceil( (int) $this->total_point_count / (int) $this->pag_per_page ), 'current' => (int) $this->pag_page, 'prev_text' => '←', 'next_text' => '→', 'mid_size' => 1 )); $this->pag_table_links = paginate_links( array( 'base' => $bp->displayed_user->domain . $bp->cubepoint->slug .'/'. $bp->cubepoint->table_slug .'/%_%', 'format' => '%#%', 'total' => ceil( (int) $this->total_point_count / (int) $this->pag_per_page ), 'current' => (int) $this->pag_page, 'prev_text' => '←', 'next_text' => '→', 'mid_size' => 1 ));