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 getVersion() { return '1.81'; }
- public function getMinNucleusVersion() { return '330'; }
- public function getDescription() { return _PING_DESC; }
- public function supportsFeature($what) { return ( $what == 'SqlTablePrefix' ); }
- public function getEventList(){ return array('JustPosted', 'PostAddItem', 'PostUpdateItem'); }
+ 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 getMinNucleusVersion()
+ {
+ return '330';
+ }
+
+ public function getDescription()
+ {
+ return _PING_DESC;
+ }
+
+ public function supportsFeature($what)
+ {
+ return ( $what == 'SqlTablePrefix' );
+ }
+
+ public function getEventList()
+ {
+ return array('JustPosted', 'PostAddItem', 'PostUpdateItem');
+ }
+
public function init()
{
// include translation file for this plugin
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
- $this->createOption('pingpong_weblogs', _PING_WEBLOGS, 'yesno', 'no');
+ $this->createOption('pingpong_weblogs', '_PING_WEBLOGS', 'yesno', 'no');
// http://www.technorati.com
- $this->createOption('pingpong_technorati', _PING_TECHNOR, 'yesno', 'no');
+ $this->createOption('pingpong_technorati', '_PING_TECHNOR', 'yesno', 'no');
// http://www.blogrolling.com
- $this->createOption('pingpong_blogrolling', _PING_BLOGR, 'yesno', 'no');
+ $this->createOption('pingpong_blogrolling', '_PING_BLOGR', 'yesno', 'no');
// http://blo.gs
- $this->createOption('pingpong_blogs', _PING_BLOGS, 'yesno', 'no');
+ $this->createOption('pingpong_blogs', '_PING_BLOGS', 'yesno', 'no');
// http://weblogues.com/
- $this->createOption('pingpong_weblogues', _PING_WEBLOGUES, 'yesno', 'no');
+ $this->createOption('pingpong_weblogues', '_PING_WEBLOGUES', 'yesno', 'no');
// http://blogg.de
- $this->createOption('pingpong_bloggde', _PING_BLOGGDE, 'yesno', 'no');
+ $this->createOption('pingpong_bloggde', '_PING_BLOGGDE', 'yesno', 'no');
// Pinging on background
- $this->createOption('ping_background', _PING_BG, 'yesno', 'no');
+ $this->createOption('ping_background', '_PING_BG', 'yesno', 'no');
- /* plugin weblog option */
- $this->createBlogOption('ping_sendping', _PING_SENDPING, 'yesno', 'yes');
+ // plugin weblog option
+ $this->createBlogOption('ping_sendping', '_PING_SENDPING', 'yesno', 'yes');
return;
}
- public function event_JustPosted($data)
+ public function event_JustPosted(&$data)
{
global $DIR_PLUGINS, $DIR_NUCLEUS;
}
$bid = intval($data['blogid']);
- if ($this->getBlogOption($bid, 'ping_sendping') == "yes")
+ if ( $this->getBlogOption($bid, 'ping_sendping') == "yes" )
{
if ( $this->getOption('ping_background') == "yes" )
{
return;
}
- public function event_PostAddItem($data)
+ public function event_PostAddItem(&$data)
{
$this->_sendPingCheck($data['itemid']);
return ;
}
- public function event_PostUpdateItem($data)
+ public function event_PostUpdateItem(&$data)
{
$this->_sendPingCheck($data['itemid']);
return;
$iid = intval($itemid);
global $manager;
$item = $manager->getItem($iid,0,0);
- if ($item) {
+ if ( $item )
+ {
$bid = intval(getBlogIDFromItemID($iid));
- if ($this->getBlogOption($bid, 'ping_sendping') == "yes" ) {
+ if ( $this->getBlogOption($bid, 'ping_sendping') == "yes" )
+ {
$this->sendPings(array('blogid' => $bid));
}
}
$ping_result .= " | ";
}
- ACTIONLOG::add(INFO, $ping_result);
+ ActionLog::add(INFO, $ping_result);
return;
}
public function pingPingomatic()
{
- $b = new BLOG($this->myBlogId);
+ global $manager;
+
+ $b =& $manager->getBlog($this->myBlogId);
$message = new xmlrpcmsg(
'weblogUpdates.ping',
array(
public function pingWeblogs()
{
- $b = new BLOG($this->myBlogId);
+ global $manager;
+
+ $b =& $manager->getBlog($this->myBlogId);
$message = new xmlrpcmsg(
'weblogupdates.ping',
array(
public function pingTechnorati()
{
- $b = new BLOG($this->myBlogId);
+ global $manager;
+
+ $b =& $manager->getBlog($this->myBlogId);
$message = new xmlrpcmsg(
'weblogUpdates.ping',
array(
public function pingBlogRollingDotCom()
{
- $b = new BLOG($this->myBlogId);
+ global $manager;
+
+ $b =& $manager->getBlog($this->myBlogId);
$message = new xmlrpcmsg(
'weblogUpdates.ping',
array(
public function pingBloGs()
{
- $b = new BLOG($this->myBlogId);
+ global $manager;
+
+ $b =& $manager->getBlog($this->myBlogId);
$message = new xmlrpcmsg(
'weblogUpdates.extendedPing',
array(
public function pingWebloguesDotCom()
{
- $b = new BLOG($this->myBlogId);
+ global $manager;
+
+ $b =& $manager->getBlog($this->myBlogId);
$message = new xmlrpcmsg(
'weblogUpdates.extendedPing',
array(
public function pingBloggDe()
{
- $b = new BLOG($this->myBlogId);
+ global $manager;
+
+ $b =& $manager->getBlog($this->myBlogId);
$message = new xmlrpcmsg(
'bloggUpdates.ping',
array(