Changeset 652945
- Timestamp:
- 01/15/2013 12:44:36 PM (13 years ago)
- Location:
- cuusoo-list/trunk
- Files:
-
- 4 edited
-
cuusoolist.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
widget-cuusoolist.php (modified) (1 diff)
-
widget-dashboard.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cuusoo-list/trunk/cuusoolist.php
r650282 r652945 4 4 Description: Displays a list of specified LEGO® CUUSOO projects in a widget. 5 5 Author: Drew Maughan 6 Version: 1.3. 16 Version: 1.3.2 7 7 Author URI: http://perfectzerolabs.com 8 8 */ … … 366 366 try 367 367 { 368 $values = array(); 368 $values = array(); 369 $supports_num = 0; 369 370 370 371 switch ( $method ) … … 382 383 'bookmarks' => $data->participants->bookmarks 383 384 ); 385 386 $supports_num = intval($data->participants->supporters); 384 387 385 388 break; … … 426 429 // If we're updating an existing project, calculate the difference in supporters between now and the last 427 430 // update. 431 $values['diff'] = 0; 428 432 if ( array_key_exists($project_id, $list) ) 429 433 { 430 434 $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; 436 436 } 437 437 -
cuusoo-list/trunk/readme.txt
r650265 r652945 12 12 13 13 == Description == 14 15 Maintains a list of LEGO CUUSOO projects to display in a widget. 14 16 15 17 This plugin will allow the user to maintain a list of specific projects on the LEGO CUUSOO web site, and display … … 73 75 == Changelog == 74 76 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 75 81 = 1.3.1 = 76 82 * 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 19 19 // $values['supports'] number of people supporting the project 20 20 // $values['bookmarks'] number of people who have bookmarked the project 21 // $values['diff erence']difference in number of supporters since the last update.21 // $values['diff'] difference in number of supporters since the last update. 22 22 // 23 23 // ONLY AVAILABLE THROUGH THE PAGE SCRAPE METHOD: -
cuusoo-list/trunk/widget-dashboard.php
r650015 r652945 59 59 <td style="text-align: right;"> 60 60 <?php 61 $diff = intval($values['diff erence']);61 $diff = intval($values['diff']); 62 62 if ( $diff > 0 ) : 63 63 ?><span style="color: green">+<?php echo $diff; ?></span><?php 64 64 elseif ( $diff < 0 ) : 65 ?><span style="color: re f">-<?php echo $diff; ?></span><?php65 ?><span style="color: red">-<?php echo $diff; ?></span><?php 66 66 else : 67 67 ?>--<?php … … 81 81 <td style="text-align: right;"> 82 82 <?php 83 $diff = intval($values['diff erence']);83 $diff = intval($values['diff']); 84 84 if ( $diff > 0 ) : 85 85 ?><span style="color: green">+<?php echo $diff; ?></span><?php
Note: See TracChangeset
for help on using the changeset viewer.