Plugin Directory

Changeset 652945


Ignore:
Timestamp:
01/15/2013 12:44:36 PM (13 years ago)
Author:
legendarydrew
Message:

Correcting a couple of typos and oversights.

Location:
cuusoo-list/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cuusoo-list/trunk/cuusoolist.php

    r650282 r652945  
    44 Description: Displays a list of specified LEGO® CUUSOO projects in a widget.
    55 Author: Drew Maughan
    6  Version: 1.3.1
     6 Version: 1.3.2
    77 Author URI: http://perfectzerolabs.com
    88*/
     
    366366        try
    367367        {
    368             $values = array();
     368            $values       = array();
     369            $supports_num = 0;
    369370
    370371            switch ( $method )
     
    382383                        'bookmarks' => $data->participants->bookmarks
    383384                    );
     385
     386                    $supports_num = intval($data->participants->supporters);
    384387
    385388                    break;
     
    426429            // If we're updating an existing project, calculate the difference in supporters between now and the last
    427430            // update.
     431            $values['diff'] = 0;
    428432            if ( array_key_exists($project_id, $list) )
    429433            {
    430434                $last_supports  = intval(str_replace(',', '', $list[$project_id]['supports']));
    431                 $values['diff'] = $values['supports'] - $last_supports;
    432             }
    433             else
    434             {
    435                 $values['diff'] = '--';
     435                $values['diff'] = $supports_num - $last_supports;
    436436            }
    437437
  • cuusoo-list/trunk/readme.txt

    r650265 r652945  
    1212
    1313== Description ==
     14
     15Maintains a list of LEGO CUUSOO projects to display in a widget.
    1416
    1517This plugin will allow the user to maintain a list of specific projects on the LEGO CUUSOO web site, and display
     
    7375== Changelog ==
    7476
     77= 1.3.2 =
     78* Corrected a typo: the correct key to use for the difference in supporters is 'diff', not 'difference'.
     79* No difference in the number of supporters is represented by 0, not two dashes.
     80
    7581= 1.3.1 =
    7682* Better plugin deactivation handling: only the events for fetching project data should be removed. Project data now
  • cuusoo-list/trunk/widget-cuusoolist.php

    r650015 r652945  
    1919//  $values['supports']    number of people supporting the project
    2020//  $values['bookmarks']   number of people who have bookmarked the project
    21 //  $values['difference']  difference in number of supporters since the last update.
     21//  $values['diff']        difference in number of supporters since the last update.
    2222//
    2323//  ONLY AVAILABLE THROUGH THE PAGE SCRAPE METHOD:
  • cuusoo-list/trunk/widget-dashboard.php

    r650015 r652945  
    5959                    <td style="text-align: right;">
    6060                        <?php
    61                             $diff = intval($values['difference']);
     61                            $diff = intval($values['diff']);
    6262                            if ( $diff > 0 ) :
    6363                            ?><span style="color: green">+<?php echo $diff; ?></span><?php
    6464                            elseif ( $diff < 0 ) :
    65                             ?><span style="color: ref">-<?php echo $diff; ?></span><?php
     65                            ?><span style="color: red">-<?php echo $diff; ?></span><?php
    6666                            else :
    6767                            ?>--<?php
     
    8181                    <td style="text-align: right;">
    8282                        <?php
    83                             $diff = intval($values['difference']);
     83                            $diff = intval($values['diff']);
    8484                            if ( $diff > 0 ) :
    8585                            ?><span style="color: green">+<?php echo $diff; ?></span><?php
Note: See TracChangeset for help on using the changeset viewer.