diff --git a/plugins/SEO/API.php b/plugins/SEO/API.php index fdadbf518fc92f05aab850ba168706c4665e9441..879df5940ed26c948c6ae9a632f0ddc39fb58773 100644 --- a/plugins/SEO/API.php +++ b/plugins/SEO/API.php @@ -23,7 +23,7 @@ require_once PIWIK_INCLUDE_PATH . '/plugins/Referrers/functions.php'; /** * The SEO API lets you access a list of SEO metrics for the specified URL: Google PageRank, Google/Bing indexed pages - * Alexa Rank, age of the Domain name and count of DMOZ entries. + * Alexa Ranka and age of the Domain name. * * @method static API getInstance() */ diff --git a/plugins/SEO/Metric/Aggregator.php b/plugins/SEO/Metric/Aggregator.php index ef3c93e6063a203a44faf1a5b7eafd542f803c3e..6b81744087584b1f167296d048ba3499962dc286 100644 --- a/plugins/SEO/Metric/Aggregator.php +++ b/plugins/SEO/Metric/Aggregator.php @@ -50,7 +50,6 @@ class Aggregator implements MetricsProvider $container->get('Piwik\Plugins\SEO\Metric\Bing'), $container->get('Piwik\Plugins\SEO\Metric\Alexa'), $container->get('Piwik\Plugins\SEO\Metric\DomainAge'), - $container->get('Piwik\Plugins\SEO\Metric\Dmoz'), ); /** diff --git a/plugins/SEO/Metric/Dmoz.php b/plugins/SEO/Metric/Dmoz.php deleted file mode 100644 index c14792aa31e7370af86a393133a412266beefb5e..0000000000000000000000000000000000000000 --- a/plugins/SEO/Metric/Dmoz.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * Piwik - free/libre analytics platform - * - * @link http://piwik.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -namespace Piwik\Plugins\SEO\Metric; - -use Piwik\Http; -use Piwik\NumberFormatter; -use Psr\Log\LoggerInterface; - -/** - * Retrieves the number of Dmoz.org entries. - */ -class Dmoz implements MetricsProvider -{ - const URL = 'http://www.dmoz.org/search?q='; - - /** - * @var LoggerInterface - */ - private $logger; - - /** - * @param LoggerInterface $logger - */ - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - public function getMetrics($domain) - { - try { - $response = Http::sendHttpRequest(self::URL . urlencode($domain), $timeout = 10, @$_SERVER['HTTP_USER_AGENT']); - - preg_match('#[0-9] - [0-9]+ of ([0-9]+)#', $response, $p); - if (!empty($p[1])) { - $value = NumberFormatter::getInstance()->formatNumber((int)$p[1]); - } else { - $value = 0; - } - - // Add DMOZ only if > 0 entries found - if ($value == 0) { - return array(); - } - } catch (\Exception $e) { - $this->logger->warning('Error while getting Dmoz SEO stats: {message}', array('message' => $e->getMessage())); - $value = null; - } - - $logo = "plugins/Morpheus/icons/dist/SEO/dmoz.org.png"; - - return array( - new Metric('dmoz', 'SEO_Dmoz', $value, $logo) - ); - } -} diff --git a/plugins/SEO/lang/en.json b/plugins/SEO/lang/en.json index 7007ad48f250601c626fc6f44cbe94305fa0965b..589d445fd2295f8812f741f91c3be7d2804f24e6 100644 --- a/plugins/SEO/lang/en.json +++ b/plugins/SEO/lang/en.json @@ -3,11 +3,10 @@ "PluginDescription": "This Plugin extracts and displays SEO metrics: Alexa web ranking, Google Pagerank, number of Indexed pages and backlinks of the currently selected website.", "AlexaRank": "Alexa Rank", "Bing_IndexedPages": "Bing indexed pages", - "Dmoz": "DMOZ entries", "DomainAge": "Domain Age", "Google_IndexedPages": "Google indexed pages", "Rank": "Rank", "SeoRankings": "SEO Rankings", "SEORankingsFor": "SEO Rankings for %s" } -} \ No newline at end of file +}