Plugin Directory

Changeset 612986


Ignore:
Timestamp:
10/16/2012 12:03:26 AM (13 years ago)
Author:
ppfeufer
Message:

v1.3
Switched to the new Tiwtter-API.

Location:
social-impact-widget
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • social-impact-widget/tags/1.3/readme.txt

    r601897 r612986  
    55Requires at least: 3.2
    66Tested up to: 3.5
    7 Stable tag: 1.2
     7Stable tag: 1.3
    88
    99Displaying your social impact.
     
    4545
    4646== Changelog ==
     47
     48= 1.3 =
     49* (16. 10. 2012)
     50* Switched to the new Tiwtter-API.
    4751
    4852= 1.2 =
  • social-impact-widget/tags/1.3/social-impact-widget.php

    r601897 r612986  
    22/**
    33 * Plugin Name: Social Impact Widget
    4  * Plugin URI: http://ppfeufer.de/wordpress-plugin-social-impact-widget/
     4 * Plugin URI: http://ppfeufer.de/wordpress-plugin/social-impact-widget/
    55 * Description: Displaying the count of twitterfollowers, googleplus circles, facebookfans, google+ circles and feedreaders (feedburner) in your sidebar.
    6  * Version: 1.2
     6 * Version: 1.3
    77 * Author: H.-Peter Pfeufer
    88 * Author URI: http://ppfeufer.de
     
    343343                delete_transient('twitter-count');
    344344
    345                 $return_Twitter = $this->_helper_curl(sprintf('http://twitter.com/users/show.xml?screen_name=%1$s',
     345                $return_Twitter = $this->_helper_curl(sprintf('https://api.twitter.com/1/users/show.json?screen_name=%1$s',
    346346                    $var_sTwitterId
    347347                ), $this->var_sUserAgent);
    348348
    349349                try {
    350                     $xml = new SimpleXmlElement($return_Twitter, LIBXML_NOCDATA);
    351 
    352                     if($xml) {
    353                         if(!empty($xml->followers_count)) {
    354                             $this->array_Options[$this->var_sArrayOptionsKey]['twitter-count'] = (int) $xml->followers_count;
    355                         } // END if(!empty($xml->followers_count))
    356                     } // ENDif($xml)
     350                    $obj_TwitterData = json_decode($return_Twitter);
     351
     352                    if($obj_TwitterData) {
     353                        if(!empty($obj_TwitterData->followers_count)) {
     354                            $this->array_Options[$this->var_sArrayOptionsKey]['twitter-count'] = (int) $obj_TwitterData->followers_count;
     355                        } // END if(!empty($obj_TwitterData->followers_count))
     356                    } // ENDif($obj_TwitterData)
    357357                } catch(Exception $e) {
    358358                    $this->array_Options[$this->var_sArrayOptionsKey]['twitter-count'] = (int) $var_iTwitterFollowerCount;
  • social-impact-widget/trunk/readme.txt

    r601897 r612986  
    55Requires at least: 3.2
    66Tested up to: 3.5
    7 Stable tag: 1.2
     7Stable tag: 1.3
    88
    99Displaying your social impact.
     
    4545
    4646== Changelog ==
     47
     48= 1.3 =
     49* (16. 10. 2012)
     50* Switched to the new Tiwtter-API.
    4751
    4852= 1.2 =
  • social-impact-widget/trunk/social-impact-widget.php

    r601897 r612986  
    22/**
    33 * Plugin Name: Social Impact Widget
    4  * Plugin URI: http://ppfeufer.de/wordpress-plugin-social-impact-widget/
     4 * Plugin URI: http://ppfeufer.de/wordpress-plugin/social-impact-widget/
    55 * Description: Displaying the count of twitterfollowers, googleplus circles, facebookfans, google+ circles and feedreaders (feedburner) in your sidebar.
    6  * Version: 1.2
     6 * Version: 1.3
    77 * Author: H.-Peter Pfeufer
    88 * Author URI: http://ppfeufer.de
     
    343343                delete_transient('twitter-count');
    344344
    345                 $return_Twitter = $this->_helper_curl(sprintf('http://twitter.com/users/show.xml?screen_name=%1$s',
     345                $return_Twitter = $this->_helper_curl(sprintf('https://api.twitter.com/1/users/show.json?screen_name=%1$s',
    346346                    $var_sTwitterId
    347347                ), $this->var_sUserAgent);
    348348
    349349                try {
    350                     $xml = new SimpleXmlElement($return_Twitter, LIBXML_NOCDATA);
    351 
    352                     if($xml) {
    353                         if(!empty($xml->followers_count)) {
    354                             $this->array_Options[$this->var_sArrayOptionsKey]['twitter-count'] = (int) $xml->followers_count;
    355                         } // END if(!empty($xml->followers_count))
    356                     } // ENDif($xml)
     350                    $obj_TwitterData = json_decode($return_Twitter);
     351
     352                    if($obj_TwitterData) {
     353                        if(!empty($obj_TwitterData->followers_count)) {
     354                            $this->array_Options[$this->var_sArrayOptionsKey]['twitter-count'] = (int) $obj_TwitterData->followers_count;
     355                        } // END if(!empty($obj_TwitterData->followers_count))
     356                    } // ENDif($obj_TwitterData)
    357357                } catch(Exception $e) {
    358358                    $this->array_Options[$this->var_sArrayOptionsKey]['twitter-count'] = (int) $var_iTwitterFollowerCount;
Note: See TracChangeset for help on using the changeset viewer.