OSDN Git Service

Update plugins included in default.
authorsakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 1 Feb 2011 15:48:10 +0000 (15:48 +0000)
committersakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 1 Feb 2011 15:48:10 +0000 (15:48 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1132 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/plugins/NP_Ping.php
utf8/nucleus/plugins/skinfiles/index.php

index d43576f..90c8304 100644 (file)
@@ -35,11 +35,11 @@ class NP_Ping extends NucleusPlugin {
        public function getName()               { return 'Ping'; }
        public function getAuthor()             { return 'admun (Edmond Hui)'; }
        public function getURL()                        { return 'http://edmondhui.homeip.net/nudn'; }
        public function getName()               { return 'Ping'; }
        public function getAuthor()             { return 'admun (Edmond Hui)'; }
        public function getURL()                        { return 'http://edmondhui.homeip.net/nudn'; }
-       public function getVersion()    { return '1.81'; }
+       public function getVersion()    { return '1.81JP'; }
        public function getMinNucleusVersion()  { return '330'; }
        public function getDescription()        { return _PING_DESC; }
        public function supportsFeature($feature)       { return in_array ($feature, array ('SqlTablePrefix', 'SqlApi'));}
        public function getMinNucleusVersion()  { return '330'; }
        public function getDescription()        { return _PING_DESC; }
        public function supportsFeature($feature)       { return in_array ($feature, array ('SqlTablePrefix', 'SqlApi'));}
-       public function getEventList()  { return array('JustPosted', 'PostAddItem', 'PostUpdateItem'); }
+       public function getEventList()  { return array('JustPosted', 'PostAddItem', 'PostUpdateItem', 'PrePluginOptionsEdit'); }
        
        public function init() {
                $language = preg_replace( '#\\\\|/#', '', getLanguageName());
        
        public function init() {
                $language = preg_replace( '#\\\\|/#', '', getLanguageName());
@@ -53,24 +53,24 @@ class NP_Ping extends NucleusPlugin {
        
        public function install() {
                // Default, http://pingomatic.com
        
        public function install() {
                // Default, http://pingomatic.com
-               $this->createOption('pingpong_pingomatic',  _PING_PINGOM,       'yesno', 'yes');
+               $this->createOption('pingpong_pingomatic', '_PING_PINGOM',      'yesno', 'yes');
                // http://weblogs.com
                // http://weblogs.com
-               $this->createOption('pingpong_weblogs',  _PING_WEBLOGS,   'yesno', 'no');
+               $this->createOption('pingpong_weblogs',  '_PING_WEBLOGS',   'yesno', 'no');
                // http://www.technorati.com
                // http://www.technorati.com
-               $this->createOption('pingpong_technorati',  _PING_TECHNOR,   'yesno', 'no');
+               $this->createOption('pingpong_technorati',  '_PING_TECHNOR',   'yesno', 'no');
                // http://www.blogrolling.com
                // http://www.blogrolling.com
-               $this->createOption('pingpong_blogrolling', _PING_BLOGR,         'yesno', 'no');
+               $this->createOption('pingpong_blogrolling', '_PING_BLOGR',       'yesno', 'no');
                // http://blo.gs
                // http://blo.gs
-               $this->createOption('pingpong_blogs',      _PING_BLOGS,  'yesno', 'no');
+               $this->createOption('pingpong_blogs',      '_PING_BLOGS',        'yesno', 'no');
                // http://weblogues.com/
                // http://weblogues.com/
-               $this->createOption('pingpong_weblogues',   _PING_WEBLOGUES, 'yesno', 'no');
+               $this->createOption('pingpong_weblogues',   '_PING_WEBLOGUES', 'yesno', 'no');
                // http://blogg.de
                // http://blogg.de
-               $this->createOption('pingpong_bloggde',  _PING_BLOGGDE,   'yesno', 'no');
+               $this->createOption('pingpong_bloggde',  '_PING_BLOGGDE',   'yesno', 'no');
 
                // Pinging on background
 
                // Pinging on background
-               $this->createOption('ping_background',    _PING_BG,             'yesno', 'no');
+               $this->createOption('ping_background',    '_PING_BG',           'yesno', 'no');
 
 
-               $this->createBlogOption('ping_sendping',        _PING_SENDPING,  'yesno', 'yes');
+               $this->createBlogOption('ping_sendping',        '_PING_SENDPING',  'yesno', 'yes');
                return;
        }
        
                return;
        }
        
@@ -124,6 +124,20 @@ class NP_Ping extends NucleusPlugin {
                $this->_sendPingCheck($data['itemid']);
                return;
        }
                $this->_sendPingCheck($data['itemid']);
                return;
        }
+
+       public function event_PrePluginOptionsEdit($data) {
+               if ($data['plugid'] === $this->getID()) {
+                       foreach($data['options'] as $key => $value){
+                               if (defined($value['description'])) {
+                                       $data['options'][$key]['description'] = constant($value['description']);
+                               }
+                               if (!strcmp($value['type'], 'select') && defined($value['typeinfo'])) {
+                                       $data['options'][$key]['typeinfo'] = constant($value['typeinfo']);
+                               }
+                       }
+               }
+               return;
+       }
        
        private function _sendPingCheck($itemid) {
                $iid  = intval($itemid);
        
        private function _sendPingCheck($itemid) {
                $iid  = intval($itemid);
index 4825b31..e5a1096 100644 (file)
        * http://www.gnu.org/licenses/gpl.html\r
        * ==========================================================================================\r
        */\r
        * http://www.gnu.org/licenses/gpl.html\r
        * ==========================================================================================\r
        */\r
-\r
+       $DIR_LIBS = '';\r
        $strRel = '../../../'; \r
        require($strRel . 'config.php');\r
        $strRel = '../../../'; \r
        require($strRel . 'config.php');\r
-       include($DIR_LIBS . 'PLUGINADMIN.php');\r
+       include_libs('PLUGINADMIN.php');\r
 \r
 \r
-       $language = preg_replace( '@\\|/@', '', getLanguageName());\r
+       $language = preg_replace( '#\\\\|/#', '', getLanguageName());\r
        $langfile = $language.'.php';\r
        if (file_exists($langfile))\r
                include_once($langfile);\r
        $langfile = $language.'.php';\r
        if (file_exists($langfile))\r
                include_once($langfile);\r