OSDN Git Service

yahoo.com の送信先 URI 変更(API キー不要)
authorshizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 1 Jul 2008 15:14:22 +0000 (15:14 +0000)
committershizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 1 Jul 2008 15:14:22 +0000 (15:14 +0000)
yahoo.com の URI 変更に伴い API キー入力オプション削除
Live! sezrch へ sitemap 送信

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@640 1ca29b6e-896d-4ea0-84a5-967f57386b96

trunk/NP_SEOSitemaps/NP_SEOSitemaps.php
trunk/NP_SEOSitemaps/seositemaps/english.php
trunk/NP_SEOSitemaps/seositemaps/japanese-euc.php
trunk/NP_SEOSitemaps/seositemaps/japanese-utf8.php

index fe9d436..be8c551 100644 (file)
@@ -214,7 +214,7 @@ class NP_SEOSitemaps extends NucleusPlugin
                                                        $bPriority = $bPriority / 10;
                                                        $sitemap[] = array(
                                                                'loc'        => $this->_prepareLink($SelfURL, $TempURL),
-                                                               'priority'   => $bPriority,
+                                                               'priority'   => number_format($bPriority ,1),
                                                                'changefreq' => 'daily'
                                                        );
                                                }
@@ -240,7 +240,7 @@ class NP_SEOSitemaps extends NucleusPlugin
                                                                $cPriority  = $cPriority / 10;
                                                                $sitemap[] = array(
                                                                        'loc'        => $catLoc,
-                                                                       'priority'   => $cPriority,
+                                                                       'priority'   => number_format($cPriority, 1),
                                                                        'changefreq' => 'daily'
                                                                );
                                                        }
@@ -265,7 +265,7 @@ class NP_SEOSitemaps extends NucleusPlugin
                                                                        if (end($path_arr) != 'ror.xml') {
                                                                                $sitemap[] = array(
                                                                                        'loc'        => $scatLoc,
-                                                                                       'priority'   => $sPriority,
+                                                                                       'priority'   => number_format($sPriority, 1),
                                                                                        'changefreq' => 'daily'
                                                                                );
                                                                        }
@@ -349,7 +349,7 @@ class NP_SEOSitemaps extends NucleusPlugin
                                                                $sitemap[] = array(
                                                                        'loc'        => $itemLoc,
                                                                        'lastmod'    => $lastmod,
-                                                                       'priority'   => $iPriority,
+                                                                       'priority'   => number_format($iPriority, 1),
                                                                        'changefreq' => $fq
                                                                );
                                                        } else {
@@ -520,11 +520,27 @@ class NP_SEOSitemaps extends NucleusPlugin
                        }
                }
 
-               if ($this->getBlogOption($blog_id, 'PingYahoo') == 'yes' &&
-                       $this->getBlogOption($blog_id, 'YahooAPID') != '') {
-                       $baseURL = 'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid='
-                                        . $this->getBlogOption($blog_id, 'YahooAPID')
-                                        . '&url=';
+               if ($this->getBlogOption($blog_id, 'PingYahoo') == 'yes') {     // &&
+//                     $this->getBlogOption($blog_id, 'YahooAPID') != '') {
+//                     $baseURL = 'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid='
+//                                      . $this->getBlogOption($blog_id, 'YahooAPID')
+//                                      . '&url=';
+                       $baseURL = 'http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=';
+                       $url     = $baseURL . urlencode($b_url . $siteMap);
+                       $url     = preg_replace('|[^a-zA-Z0-9-~+_.?#=&;,/:@%]|i', '', $url);
+                       $fp      = @fopen($url, 'r');
+                       @fclose($fp);
+                       $MobileMap = $this->getBlogOption($blog_id, 'MobileSitemap');
+                       if (!empty($MobileMap)) {
+                               $url = $baseURL . urlencode($b_url . $MobileMap);
+                               $url = preg_replace('|[^a-zA-Z0-9-~+_.?#=&;,/:@%]|i', '', $url);
+                               $fp  = @fopen($url, 'r');
+                               @fclose($fp);
+                       }
+               }
+
+               if ($this->getBlogOption($blog_id, 'PingLive') == 'yes') {
+                       $baseURL = 'http://webmaster.live.com/webmaster/ping.aspx?siteMap=';
                        $utl     = $baseURL . urlencode($b_url . $siteMap);
                        $url     = preg_replace('|[^a-zA-Z0-9-~+_.?#=&;,/:@%]|i', '', $url);
                        $fp      = @fopen($url, 'r');
@@ -554,14 +570,15 @@ class NP_SEOSitemaps extends NucleusPlugin
        function install()
        {
                $this->createOption('AllBlogMap',         _G_SITEMAP_ALLB,   'yesno', 'yes');
-               $this->createBlogOption('IncludeSitemap', _G_SITEMAP_INC,    'yesno', 'yes');
+               $this->createBlogOption('IncludeSitemap', _G_SITEMAP_INC,    'yesno', 'no');
                $this->createBlogOption('PingGoogle',     _G_SITEMAP_PING_G, 'yesno', 'yes');
-               $this->createBlogOption('PingYahoo',      _G_SITEMAP_PING_Y, 'yesno', 'no');
-               $this->createBlogOption('YahooAPID',      _G_SITEMAP_YAPID,  'text',  '');
+               $this->createBlogOption('PingYahoo',      _G_SITEMAP_PING_Y, 'yesno', 'yes');
+               $this->createBlogOption('PingLive',       _G_SITEMAP_PING_L, 'yesno', 'yes');
+//             $this->createBlogOption('YahooAPID',      _G_SITEMAP_YAPID,  'text',  '');
                $this->createBlogOption('PcSitemap',      _G_SITEMAP_PCSM,   'text',  'sitemap.xml');
-               $this->createBlogOption('MobileSitemap',  _G_SITEMAP_MBSM,   'text',  '');
+               $this->createBlogOption('MobileSitemap',  _G_SITEMAP_MBSM,   'text',  'msitemap.xml');
                $this->createBlogOption('blogPriority',   _G_SITEMAP_BPRI,   'text',  '10', 'datatype=numerical');
                $this->createCategoryOption('catPriority', _G_SITEMAP_CPRI,  'text',  '9', 'datatype=numerical');
-               $this->createItemOption('itemPriority',    _G_SITEMAP_IPRI,   'text',  '10', 'datatype=numerical');
+               $this->createItemOption('itemPriority',   _G_SITEMAP_IPRI,   'text',  '10', 'datatype=numerical');
        }
 }
index 9e46a84..de23994 100644 (file)
@@ -1,10 +1,11 @@
 <?php
-       define('_G_SITEMAP_DESC',   "This plugin provides a Google sitemap for your website.<br />" .
+       define('_G_SITEMAP_DESC',   "This plugin provides a Google sitemap for your website." .
                                                                "Sitemap URL: http://example.cm/sitemap.xml");
        define('_G_SITEMAP_ALLB',   "Generate All Blog's Google Sitemap");
        define('_G_SITEMAP_PING_G', "Ping Google after adding a new item");
        define('_G_SITEMAP_PING_Y', "Ping Yahoo! after adding a new item");
-       define('_G_SITEMAP_YAPID',  "Yahoo! Application ID");
+       define('_G_SITEMAP_PING_L', "Ping Live Search after adding a new item");
+//     define('_G_SITEMAP_YAPID',  "Yahoo! Application ID");
        define('_G_SITEMAP_INC',    "Include this blog in Google Sitemap when All Blog mode");
        define('_G_SITEMAP_PCSM',   "Virtual file name for PC Sitemap");
        define('_G_SITEMAP_MBSM',   "Virtual file name for Mobile Sitemap");
index b488a64..8cc5831 100644 (file)
@@ -4,7 +4,8 @@
        define('_G_SITEMAP_ALLB',   "AllBlog ¥â¡¼¥É¤Ç¥µ¥¤¥È¥Þ¥Ã¥×¤òºîÀ®¤¹¤ë(¥µ¥Ö/¥Þ¥ë¥Á¥É¥á¥¤¥ó¤Ï½ü³°)");
        define('_G_SITEMAP_PING_G', "¥¢¥¤¥Æ¥àÄɲûþ¤Ë Google ¤Ë¹¹¿·¤òÄÌÃΤ¹¤ë");
        define('_G_SITEMAP_PING_Y', "¥¢¥¤¥Æ¥àÄɲûþ¤Ë Yahoo! ¤Ë¹¹¿·¤òÄÌÃΤ¹¤ë");
-       define('_G_SITEMAP_YAPID',  "Yahoo! Application ID");
+       define('_G_SITEMAP_PING_L', "¥¢¥¤¥Æ¥àÄɲûþ¤Ë Live Search ¤Ë¹¹¿·¤òÄÌÃΤ¹¤ë");
+//     define('_G_SITEMAP_YAPID',  "Yahoo! Application ID");
        define('_G_SITEMAP_INC',    "AllBlog ¥â¡¼¥É¤Î¤È¤­¤Ë¤³¤Î¥Ö¥í¥°¤ò´Þ¤á¤ë");
        define('_G_SITEMAP_PCSM',   "PC ÍÑ¥µ¥¤¥È¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë¤Î²¾ÁÛ¥Õ¥¡¥¤¥ë̾");
        define('_G_SITEMAP_MBSM',   "¥â¥Ð¥¤¥ëÍÑ¥µ¥¤¥È¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë¤Î²¾ÁÛ¥Õ¥¡¥¤¥ë̾");
index 376e196..edf58d8 100644 (file)
@@ -4,7 +4,8 @@
        define('_G_SITEMAP_ALLB',   "AllBlog モードでサイトマップを作成する(サブ/マルチドメインは除外)");
        define('_G_SITEMAP_PING_G', "アイテム追加時に Google に更新を通知する");
        define('_G_SITEMAP_PING_Y', "アイテム追加時に Yahoo! に更新を通知する");
-       define('_G_SITEMAP_YAPID',  "Yahoo! Application ID");
+       define('_G_SITEMAP_PING_L', "アイテム追加時に Live Search に更新を通知する");
+//     define('_G_SITEMAP_YAPID',  "Yahoo! Application ID");
        define('_G_SITEMAP_INC',    "AllBlog モードのときにこのブログを含める");
        define('_G_SITEMAP_PCSM',   "PC 用サイトマップファイルの仮想ファイル名");
        define('_G_SITEMAP_MBSM',   "モバイル用サイトマップファイルの仮想ファイル名");