Plugin Directory

Changeset 179139


Ignore:
Timestamp:
12/03/2009 11:31:43 AM (16 years ago)
Author:
0xTC
Message:

1.1.1

Location:
wp-twitter-users/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-twitter-users/trunk/readme.txt

    r161622 r179139  
    8585
    8686* Added support for tweetimag.es (3rd party twitter image provider)
     87
     88= 1.1.1 =
     89
     90* Added auto-cleanup feature for faulty requests that are already cached.
     91* Accommodates for "Twitter is Over Capacity" error.
  • wp-twitter-users/trunk/wp-twitter-users.php

    r161622 r179139  
    22/*
    33Plugin Name: WP Twitter Users
    4 Version: 1.1.0
     4Version: 1.1.1
    55Plugin URI:  http://0xtc.com/2009/09/10/wp-twitter-users.xhtml
    66Description: Create formatted lists of Twitter users in badges using a simple shortcode. For example for follow friday pages.
     
    421421            }
    422422            $userinfo =     $this->wp_follow_friday_getTwitterUser($twitterUsername);
     423           
    423424            $r_content =    $this->templateUser($userinfo,$WPTUTemplate);
    424425            return $r_content;
     
    459460            if (file_exists($filename)) {
    460461                $content = file_get_contents($filename);
     462                if (stristr($content,'<!DOCTYPE HTML PUBLIC')){
     463                    // "I'm afraid I can't do that Dave...."
     464                    unlink($filename);
     465                    // something went horribly wrong on twitter's end
     466                    return false;
     467                    // try again later...
     468                }
    461469            } else {
    462470                $curl_handle=curl_init();
     
    474482                if ($httpCode['http_code']==404) {return false;}
    475483                if ($httpCode['http_code']==500) {return false;}
     484                if ($httpCode['http_code']==503) {return false;}
    476485               
    477                 if (strstr($content,'<HTML>')){return false;}
    478                 if (strstr($content,'<hash>')){return false;}
    479                
     486                if (stristr($content,'<!DOCTYPE HTML PUBLIC')){return false;}
     487                if (stristr($content,'<HTML>')){return false;}
     488                if (stristr($content,'<hash>')){return false;}
     489
    480490                if (is_writable($TwitterCacheDir)){
    481491                    file_put_contents($filename, $content);
Note: See TracChangeset for help on using the changeset viewer.