This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

cpbp - bp-cubepoint-templatetags.php - bad part line 56 & 65

By: a guest on May 20th, 2010  |  syntax: PHP  |  size: 2.04 KB  |  views: 77  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. class BP_CubePoint_Template {
  3.         var $current_point = -1;
  4.         var $point_count;
  5.         var $points;
  6.         var $point;
  7.  
  8.         var $in_the_loop;
  9.  
  10.         var $pag_page;
  11.         var $pag_per_page;
  12.         var $pag_links;
  13.         var $pag_table_links;
  14.  
  15.         function BP_CubePoint_Template( $args = '' ) {
  16.                 $this->__construct( $args);
  17.         }
  18.        
  19.         function __construct( $args = '' ) {
  20.                 global $bp;
  21.  
  22.                
  23.                 $defaults = bp_cubepoint_default_query_args();
  24.                
  25.                 $r = apply_filters('bp_cubepoint_template_args',wp_parse_args( $args, $defaults ));
  26.                 extract( $r , EXTR_SKIP);
  27.  
  28.                 $this->pag_page = $page;
  29.                 $this->pag_per_page = $per_page;
  30.                 $this->uid = $uid;
  31.                
  32.                 /***
  33.                  * You can use the "type" variable to fetch different things to output.
  34.                  * For example on the groups template loop, you can fetch groups by "newest", "active", "alphabetical"
  35.                  * and more. This would be the "type". You can then call different functions to fetch those
  36.                  * different results.
  37.                  */
  38.  
  39.                 $total = bp_cubepoint_get_point_count($r);
  40.                 $this->points = bp_cubepoint_get_points($r);
  41.  
  42.                 // Item Requests
  43.                 if ( !$max || $max >= $total )
  44.                         $this->total_point_count = $total;
  45.                 else
  46.                         $this->total_point_count = $max;
  47.  
  48.                 if ( !$max || $max >= count($this->points))
  49.                         $this->point_count = count($this->points);
  50.                 else
  51.                         $this->point_count = $max;
  52.  
  53.                 $this->pag_links = paginate_links( array(
  54.                         'base' => $bp->displayed_user->domain . $bp->cubepoint->slug .'/'. $bp->cubepoint->points_slug .'/%_%',
  55.                         'format' => '%#%',
  56.                         'total' => ceil( (int) $this->total_point_count / (int) $this->pag_per_page ),
  57.                         'current' => (int) $this->pag_page,
  58.                         'prev_text' => '&larr;',
  59.                         'next_text' => '&rarr;',
  60.                         'mid_size' => 1
  61.                 ));
  62.                 $this->pag_table_links = paginate_links( array(
  63.                         'base' => $bp->displayed_user->domain . $bp->cubepoint->slug .'/'. $bp->cubepoint->table_slug .'/%_%',
  64.                         'format' => '%#%',
  65.                         'total' => ceil( (int) $this->total_point_count / (int) $this->pag_per_page ),
  66.                         'current' => (int) $this->pag_page,
  67.                         'prev_text' => '&larr;',
  68.                         'next_text' => '&rarr;',
  69.                         'mid_size' => 1
  70.                 ));
clone this paste RAW Paste Data