Plugin Directory

Changeset 825035


Ignore:
Timestamp:
12/18/2013 08:54:47 PM (12 years ago)
Author:
harpercl
Message:

version 1.6.1

Location:
advanced-steam-widget
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • advanced-steam-widget/todo.txt

    r744945 r825035  
    1111    http://steamcommunity.com/groups/taketen/memberslistxml/?xml=1
    1212    could be major performance drain unless connects are async
     13   
     14-look into adding achievements for games that have them
     15    http://steamcommunity.com/id/slserpent/stats/CivV?xml=1
  • advanced-steam-widget/trunk/readme.txt

    r753140 r825035  
    11=== Advanced Steam Widget ===
    22Contributors: harpercl
    3 Donate link: http://www.snakebytestudios.com/contribute
     3Donate link: http://www.SnakeByteStudios.com/contribute
    44Tags: widget, Steam, gaming, template
    55Requires at least: 3.0
    6 Tested up to: 3.6
     6Tested up to: 3.8
    77Stable tag: trunk
    88
     
    8686== Changelog ==
    8787
     88= 1.6.1 =
     89* workaround for Steam bug where hours played last two weeks is reported as 0.0
     90* fixed case where stats conditional was true when there were no stats
     91
    8892= 1.6 =
    8993* added two new presets
  • advanced-steam-widget/trunk/steam_widget.php

    r752579 r825035  
    11<?php
    2 /*Plugin Name: Advanced Steam Widget
     2/*
     3Plugin Name: Advanced Steam Widget
    34Plugin URI: http://www.SnakeByteStudios.com/projects/apps/advanced-steam-widget/
    45Description: Displays Steam gaming statistics in a widget
    5 Version: 1.6
     6Version: 1.6.1
    67Author: Snake
    78Author URI: http://www.SnakeByteStudios.com
     
    378379               
    379380                if (count($steam_xml->mostPlayedGames->mostPlayedGame) > 0) {
     381                    //workaround for steam no 2 wks played bug
     382                    $cumulative_hours_from_games = false;
     383                    if ($steam_array['hours_twoweeks'] == "0.0") {
     384                        $steam_array['hours_twoweeks'] = 0;
     385                        $cumulative_hours_from_games = true;
     386                    }
     387               
    380388                    $k = 0;
    381389                    foreach ($steam_xml->mostPlayedGames->mostPlayedGame as $game) {
     
    393401                        } else $steam_array['games'][$k]['ingame'] = false;
    394402                       
    395                         if ($game->statsName) {
     403                        //see if stats name exists and is valid, i.e. not just the app id
     404                        if ($game->statsName && !preg_match('/\d+/', $game->statsName)) {
    396405                            $steam_array['games'][$k]['stats_url'] = $profile_url . "/stats/" . (string)$game->statsName;
    397406                        } else $steam_array['games'][$k]['stats_url'] = false;
     407                       
     408                        if ($cumulative_hours_from_games === true) {
     409                            $steam_array['hours_twoweeks'] += (float)$game->hoursPlayed;
     410                        }
    398411                       
    399412                        $k++;
Note: See TracChangeset for help on using the changeset viewer.