[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
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-2007 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://evocms.cvs.sourceforge.net/) 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.5 2007/04/26 00:11:04 fplanque 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 class ping_pingomatic_plugin extends Plugin 44 { 45 /** 46 * Variables below MUST be overriden by plugin implementations, 47 * either in the subclass declaration or in the subclass constructor. 48 */ 49 var $code = 'ping_pingomatic'; 50 var $priority = 50; 51 var $version = '1.9-dev'; 52 var $author = 'http://daniel.hahler.de/'; 53 54 /* 55 * These variables MAY be overriden. 56 */ 57 var $apply_rendering = 'never'; 58 var $group = 'ping'; 59 var $number_of_installs = 1; 60 61 62 /** 63 * Init 64 */ 65 function PluginInit( & $params ) 66 { 67 $this->name = T_('Ping-O-Matic plugin'); 68 $this->short_desc = T_('Pings the Ping-O-Matic service, which relays your ping to the most common services.'); 69 70 $this->ping_service_name = 'Ping-O-Matic'; 71 $this->ping_service_note = T_('Pings a service that relays the ping to the most common services.'); 72 } 73 74 75 /** 76 * Ping the pingomatic RPC service. 77 */ 78 function ItemSendPing( & $params ) 79 { 80 global $debug; 81 82 $item_Blog = $params['Item']->get_Blog(); 83 84 $client = new xmlrpc_client( '/', 'rpc.pingomatic.com', 80 ); 85 $client->debug = ($debug && $params['display']); 86 87 $message = new xmlrpcmsg("weblogUpdates.ping", array( 88 new xmlrpcval( $item_Blog->get('name') ), 89 new xmlrpcval( $item_Blog->get('url') ) )); 90 $result = $client->send($message); 91 92 $params['xmlrpcresp'] = $result; 93 94 return true; 95 } 96 97 } 98 99 100 /* 101 * $Log: _ping_pingomatic.plugin.php,v $ 102 * Revision 1.5 2007/04/26 00:11:04 fplanque 103 * (c) 2007 104 * 105 * Revision 1.4 2007/04/20 02:53:13 fplanque 106 * limited number of installs 107 * 108 * Revision 1.3 2006/11/24 18:27:27 blueyed 109 * Fixed link to b2evo CVS browsing interface in file docblocks 110 * 111 * Revision 1.2 2006/10/11 17:21:09 blueyed 112 * Fixes 113 * 114 * Revision 1.1 2006/10/01 22:26:48 blueyed 115 * Initial import of ping plugins. 116 * 117 */ 118 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |