git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1132
1ca29b6e-896d-4ea0-84a5-
967f57386b96
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());
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');
- $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');
- $this->createOption('pingpong_blogs', _PING_BLOGS, 'yesno', 'no');
+ $this->createOption('pingpong_blogs', '_PING_BLOGS', 'yesno', 'no');
- $this->createOption('pingpong_weblogues', _PING_WEBLOGUES, 'yesno', 'no');
+ $this->createOption('pingpong_weblogues', '_PING_WEBLOGUES', 'yesno', 'no');
- $this->createOption('pingpong_bloggde', _PING_BLOGGDE, 'yesno', 'no');
+ $this->createOption('pingpong_bloggde', '_PING_BLOGGDE', 'yesno', 'no');
- $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');
$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);
* http://www.gnu.org/licenses/gpl.html\r
* ==========================================================================================\r
*/\r
* http://www.gnu.org/licenses/gpl.html\r
* ==========================================================================================\r
*/\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
- $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