b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.9) [ class tree: plugins ] [ index: plugins ] [ all elements ]

Source for file _ping_pingomatic.plugin.php

Documentation is available at _ping_pingomatic.plugin.php

  1. <?php
  2. /**
  3.  * This file implements the ping_pingomatic_plugin.
  4.  *
  5.  * For the most recent and complete Plugin API documentation
  6.  * see {@link Plugin} in ../evocore/_plugin.class.php.
  7.  *
  8.  * This file is part of the evoCore framework - {@link http://evocore.net/}
  9.  * See also {@link http://sourceforge.net/projects/evocms/}.
  10.  *
  11.  * @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/}
  12.  *  Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - {@link http://thequod.de/contact}.
  13.  *
  14.  *  {@internal License choice
  15.  *  - If you have received this file as part of a package, please find the license.txt file in
  16.  *    the same folder or the closest folder above for complete license terms.
  17.  *  - If you have received this file individually (e-g: from http://cvs.sourceforge.net/viewcvs.py/evocms/)
  18.  *    then you must choose one of the following licenses before using the file:
  19.  *    - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  20.  *    - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  21.  *  }}}
  22.  *
  23.  *  {@internal Open Source relicensing agreement:
  24.  *  Daniel HAHLER grants Francois PLANQUE the right to license
  25.  *  Daniel HAHLER's contributions to this file and the b2evolution project
  26.  *  under any OSI approved OSS license (http://www.opensource.org/licenses/).
  27.  *  }}}
  28.  *
  29.  * @package plugins
  30.  *
  31.  * @author blueyed: Daniel HAHLER
  32.  *
  33.  * @version $Id: _ping_pingomatic.plugin.php,v 1.2.2.2 2006/10/12 21:21:20 blueyed Exp $
  34.  */
  35. if!defined('EVO_MAIN_INIT') ) die'Please, do not access this page directly.' );
  36.  
  37.  
  38. /**
  39.  * Pingomatic plugin.
  40.  *
  41.  * @package plugins
  42.  */
  43. {
  44.     /**
  45.      * Variables below MUST be overriden by plugin implementations,
  46.      * either in the subclass declaration or in the subclass constructor.
  47.      */
  48.     var $code = 'ping_pingomatic';
  49.     var $priority = 50;
  50.     var $version = '1.9-dev';
  51.     var $author = 'http://daniel.hahler.de/';
  52.  
  53.     /*
  54.      * These variables MAY be overriden.
  55.      */
  56.     var $apply_rendering = 'never';
  57.     var $group = 'ping';
  58.  
  59.  
  60.     /**
  61.      * Init
  62.      */
  63.     function PluginInit$params )
  64.     {
  65.         $this->name = T_('Ping-O-Matic plugin');
  66.         $this->short_desc = T_('Pings the Ping-O-Matic service, which relays your ping to the most common services.');
  67.  
  68.         $this->ping_service_name = 'Ping-O-Matic';
  69.         $this->ping_service_note = T_('Pings a service that relays the ping to the most common services.');
  70.     }
  71.  
  72.  
  73.     /**
  74.      * Ping the pingomatic RPC service.
  75.      */
  76.     function ItemSendPing$params )
  77.     {
  78.         global $debug;
  79.  
  80.         $item_Blog $params['Item']->get_Blog();
  81.  
  82.         $client new xmlrpc_client'/''rpc.pingomatic.com'80 );
  83.         $client->debug ($debug && $params['display']);
  84.  
  85.         $message new xmlrpcmsg("weblogUpdates.ping"array(
  86.                 new xmlrpcval$item_Blog->get('name') ),
  87.                 new xmlrpcval$item_Blog->get('url') ) ));
  88.         $result $client->send($message);
  89.  
  90.         $params['xmlrpcresp'$result;
  91.  
  92.         return true;
  93.     }
  94.  
  95. }
  96.  
  97.  
  98. /*
  99.  * nolog
  100.  */
  101. ?>

Documentation generated on Tue, 18 Dec 2007 22:49:56 +0100 by phpDocumentor 1.4.0