コード例 #1
0
 /**
  * Widget.
  */
 function widget($args = array())
 {
     if (is_array($args)) {
         extract($args, EXTR_SKIP);
     }
     echo $before_widget . $before_title . $widget_name . $after_title;
     $form = new WPSDAdminConfigForm();
     if ($form->getWpsdWidgetOverview()) {
         $result = wpsd_read_cache();
         echo '<!-- WP-Stats-Dashboard - START General Stats -->';
         if (defined('WPSD_PLUGIN_URL')) {
             echo '<div align="center" id="wpsd-loading"> <img src="' . WPSD_PLUGIN_URL . '/resources/images/ajax-loader.gif" alt="' . __('loading', 'wpsd') . '" width="24" height="24" /></div>';
             echo '<div id="wpsd-stats-ranking"></div>';
         } else {
             _e('WPSD_PLUGIN_URL not defined', 'wpsd');
         }
         // Get domain.
         $domain_url = get_bloginfo('url');
         // Get shortened url.
         $s = get_option('wpsd_bitly_s');
         if ('' != $s) {
             $domain_url = $s;
         }
         echo '<br/><input type="button" value="' . __('Reload', 'wpsd') . '" class="button-primary" id="btn_wpsd_reload_2" />';
         echo '<!-- WP-Stats-Dashboard - STOP General Stats-->';
     } else {
         _e('Widget disabled check', 'wpsd');
         echo ' <a href="' . wpsd_get_settings_url() . '" title="wp-stats-dashboard settings" target="_self">' . __('settings', 'wpsd') . '</a>';
     }
     echo $after_widget;
 }
コード例 #2
0
 /**
  * Widget.
  */
 function widget($args = array())
 {
     if (is_array($args)) {
         extract($args, EXTR_SKIP);
     }
     echo $before_widget . $before_title . $widget_name . $after_title;
     $form = new WPSDAdminConfigForm();
     if ($form->getWpsdWidgetTrends()) {
         $dao = new WPSDTrendsDao();
         $factory = new WPSDStatsFactory();
         $trends_type = $form->getWpsdTrendsType();
         if (null == $trends_type) {
             $trends_type = $factory->pagerank;
         }
         $rows = $dao->getStats($trends_type);
         $data = array();
         if (is_array($rows)) {
             foreach ($rows as $row) {
                 $data[$row->wpsd_trends_date] = $row->wpsd_trends_stats;
             }
         }
         // Default is pagerank.
         $this->render_admin('admin_trend', array('set' => $data, 'label' => 'days', 'form' => $form));
     } else {
         _e('Widget disabled check', 'wpsd');
         echo ' <a href="' . wpsd_get_settings_url() . '" title="wp-stats-dashboard settings" target="_self">' . __('settings', 'wpsd') . '</a>';
     }
     echo $after_widget;
 }
コード例 #3
0
 /**
  * WPSDFeedBurner.
  * @param string $domain
  * @param boolean $curl
  */
 function WPSDFeedBurner()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->address = $form->getWpsdFeedburnerUri();
     if ($this->isOutdated() && '' != $this->address) {
         $this->set();
     } else {
         $this->set_cached();
     }
 }
コード例 #4
0
 /**
  * WPSDFlickr.
  * @param string $domain
  * @param boolean $curl
  */
 function WPSDFlickr()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->address = 'http://www.flickr.com/photos/' . trim($form->getWpsdFlickrUsername());
     if ($this->isOutdated() && '' != $this->address) {
         $this->set();
     } else {
         $this->set_cached();
     }
 }
コード例 #5
0
 /**
  * WPSDBrazenCareerist.
  * @param string $domain
  * @param boolean $curl
  */
 function WPSDBrazenCareerist()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->user = trim($form->getWpsdBrazenCareeristUn());
     $this->address .= $this->user;
     if ($this->isOutdated() && '' != $this->user) {
         $this->xml = $this->fetchDataRemote($this->address);
         $this->set();
     } else {
         $this->set_cached();
     }
 }
コード例 #6
0
 /**
  * WPSDLastFm.
  * @param string $domain
  * @param boolean $curl
  */
 function WPSDLastFm()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->user = trim($form->getWpsdLastFmUn());
     $this->address .= $this->user;
     if ($this->isOutdated() && '' != $this->user) {
         $this->xml = $this->fetchDataRemote($this->address, false, 1, true);
         $this->set();
     } else {
         $this->set_cached();
     }
 }
コード例 #7
0
ファイル: WPSDHunch.php プロジェクト: billadams/forever-frame
 /**
  * WPSDHunch function.
  * 
  * @access public
  * @return void
  */
 function WPSDHunch()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdHunchUn());
     $this->address = "http://hunch.com/{$this->un}/";
     if ($this->isOutdated()) {
         $this->xml = $this->fetchDataRemote($this->address);
         $this->set();
     } else {
         $this->set_cached();
     }
 }
コード例 #8
0
 /**
  * WPSDGoogleWishlist.
  * 
  * @param boolean $curl
  */
 function WPSDGoogleWishlist($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->address = trim($form->getWpsdGoogleWishlistUri());
     if ('' != $this->uri) {
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #9
0
 /**
  * __construct function.
  * 
  * @access public
  * @return void
  */
 function __construct()
 {
     parent::__construct();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdMyspaceUn());
     if ('' != $this->un) {
         $this->address = 'http://www.myspace.com/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = str_replace(',', '', $this->fetchDataRemote($this->address, false, 1, true));
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #10
0
 /**
  * WPSDYoutube function.
  * 
  * @access public
  * @return void
  */
 function WPSDYoutube()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdYoutubeUn());
     if ('' != $this->un) {
         $this->address = 'http://www.youtube.com/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = str_replace('.', '', str_replace(',', '', $this->fetchDataRemote($this->address)));
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #11
0
 /**
  * WPSD99Designs.
  *
  * @param boolean $curl
  */
 function WPSD99Designs($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsd99DesignsUn());
     if ('' != $this->un) {
         $this->address = 'http://99designs.com/people/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address, false, 1, true);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #12
0
 /**
  * WPSDIdentica function.
  * 
  * @access public
  * @return void
  */
 function WPSDIdentica()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdIdenticaUn());
     if ('' != $this->un) {
         $this->address = 'http://identi.ca/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #13
0
 /**
  * WPSDNetlog function.
  * 
  * @access public
  * @return void
  */
 function WPSDNetlog()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdNetlogUn());
     if ('' != $this->un) {
         $this->address = 'http://en.netlog.com/' . $this->un . '/';
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #14
0
 /**
  * WPSDBlogCatalog.
  * 
  * @param $domain
  * @param $curl
  * @return unknown_type
  */
 function WPSDBlogCatalog($domain, $curl = false)
 {
     parent::WPSDStats();
     ///	$this->domain = $this->getNormalizedUrl($domain);
     //$this->address = "http://api.blogcatalog.com/bloginfo?bcwsid=yK7v16bA8r&url={$this->domain}";
     $form = new WPSDAdminConfigForm();
     $this->un = $form->getWpsdBlogCatalogUn();
     $this->address = 'http://www.blogcatalog.com/user/' . $this->un;
     if ($this->isOutdated()) {
         $this->xml = $this->fetchDataRemote($this->address);
         $this->set();
     } else {
         $this->set_cached();
     }
 }
コード例 #15
0
 /**
  * WPSDRunkeeper.
  *
  * @param boolean $curl
  */
 function WPSDRunkeeper($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdRunkeeperUn());
     if ('' != $this->un) {
         $this->address = 'http://runkeeper.com/user/' . $this->un . '/profile';
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #16
0
ファイル: WPSDHyves.php プロジェクト: billadams/forever-frame
 /**
  * WPSDHyves.
  * 
  * @param boolean $curl
  */
 function WPSDHyves($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdHyvesUn());
     if ('' != $this->un) {
         $this->address = 'http://' . $this->un . '.hyves.nl/profile/';
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #17
0
 /**
  * WPSDEducoPark function.
  * 
  * @access public
  * @return void
  */
 function WPSDEducoPark()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdEducoParkUn());
     if ('' != $this->un) {
         $this->address = 'http://www.educopark.com/people/view/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #18
0
 /**
  * WPSDFriendFeed.
  * 
  * @param boolean $curl
  */
 function WPSDFriendFeed()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdFriendFeedUn());
     if ('' != $this->un) {
         $this->address = 'http://friendfeed.com/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #19
0
 function WPSDSociety()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdSocietyUn());
     if ('' != $this->un) {
         $this->address = 'http://www.society.me/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #20
0
 /**
  * WPSDYahooBuzz function.
  * 
  * @access public
  * @return void
  */
 function WPSDYahooBuzz()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->uri = trim($form->getWpsdYahooBuzzUri());
     if ('' != $this->uri) {
         $this->address = $this->uri;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #21
0
 /**
  * WPSDSixent.
  * 
  * @param boolean $curl
  */
 function WPSDSixent($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdSixentUn());
     if ('' != $this->un) {
         $this->address = 'http://' . $this->un . '.sixent.com/contacts';
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #22
0
 /**
  * WPSDWeRead.
  *
  * @param boolean $curl
  */
 function WPSDWeRead($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->id = trim($form->getWpsdWeReadId());
     if ('' != $this->id) {
         $this->address = 'http://weread.com/profile/' . str_replace(' ', '+', $this->id) . '/';
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #23
0
ファイル: WPSDDiigo.php プロジェクト: billadams/forever-frame
 /**
  * WPSDDiigo.
  * 
  * @param boolean $curl
  */
 function WPSDDiigo($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdDiigoUn());
     if ('' != $this->un) {
         $this->address = 'http://www.diigo.com/profile/' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #24
0
 /**
  * __construct function.
  * 
  * @access public
  * @return void
  */
 function __construct()
 {
     parent::__construct();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdAmplifyUn());
     if ('' != $this->un) {
         $this->address = 'http://' . $this->un . '.amplify.com';
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address, false, 3, false);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #25
0
 /**
  * WPSDFoursquare function.
  * 
  * @access public
  * @param bool $curl. (default: false)
  * @return void
  */
 function WPSDFoursquare($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdFoursquareUn());
     if ('' != $this->un) {
         $this->address = 'https://foursquare.com/' . $this->un;
         //echo $this->address;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address, false, 1, true);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #26
0
 /**
  * WPSDPosterous.
  */
 function WPSDPosterous()
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdPosterousUn());
     if ('' != $this->un) {
         $this->address = 'http://posterous.com/people/subscribers/' . $this->un;
         //;http://'.$this->un .'.posterous.com';
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #27
0
 /**
  * WPSDGooglePlus function.
  * 
  * @access public
  * @return void
  */
 function WPSDGooglePlus()
 {
     parent::WPSDStats();
     //$id = '107127911590007452165'; // debug.
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdGooglePlusUn());
     $id = $this->un;
     if ($this->isOutdated()) {
         $this->xml = strip_tags($this->fetchDataRemote(sprintf($this->address, $id), true, 1, true));
         preg_replace('/<script\\b[^>]*>(.*?)<\\/script>/is', "", $this->xml);
         $this->set();
     } else {
         $this->set_cached();
     }
     $this->address = "https://plus.google.com/{$id}/posts";
 }
コード例 #28
0
ファイル: WPSDXbox.php プロジェクト: billadams/forever-frame
 /**
  * WPSDXbox.
  * 
  * @param boolean $curl
  */
 function WPSDXbox($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdXboxUn());
     if ('' != $this->un) {
         $this->address_xbox_live = 'http://live.xbox.com/en-US/profile/profile.aspx?pp=0&GamerTag=' . $this->un;
         $this->address = 'http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag=' . $this->un;
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->address);
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #29
0
 /**
  * WPSDEmpireAvenue.
  * 
  * @param boolean $curl
  */
 function WPSDEmpireAvenue($curl = false)
 {
     parent::WPSDStats();
     $form = new WPSDAdminConfigForm();
     $this->un = trim($form->getWpsdEaveUn());
     $this->pw = trim($form->getWpsdEavePw());
     $this->auth = "?apikey={$this->key}&username={$this->un}&password={$this->pw}";
     if ('' != $this->un && '' != $this->pw) {
         if ($this->isOutdated()) {
             $this->xml = $this->fetchDataRemote($this->getServiceUri('info'));
             $this->set();
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #30
0
 /**
  * WPSDBacktype.
  * @param string $domain
  * @param boolean $curl
  */
 function WPSDBacktype($domain, $curl = false)
 {
     parent::WPSDStats();
     $domain = $this->getHost(parse_url($domain));
     $this->address = "http://www.backtype.com/domain/{$domain}";
     $form = new WPSDAdminConfigForm();
     $twitter_un = trim($form->getWpsdTwitterUn());
     if ('' != $twitter_un) {
         $this->address_backtweets = "http://backtweets.com/user/{$twitter_un}";
     }
     if ($this->isOutdated() && '' != $domain) {
         $this->set();
     } else {
         $this->set_cached();
     }
 }