Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_weblogping
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9112/plugins/serendipity_event_weblogping
Modified Files:
serendipity_event_weblogping.php
Log Message:
list="`find . -name \*.php`"
list="$list `find . -name \*.txt`"
perl -i -pe 's=^M==g' $list
cvs tag pre-control-m-removal
cvs commit
cvs tag post-control-m-removal
Index: serendipity_event_weblogping.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- serendipity_event_weblogping.php 21 Mar 2004 16:35:32 -0000 1.3
+++ serendipity_event_weblogping.php 3 Apr 2004 17:36:18 -0000 1.4
@@ -22,56 +22,56 @@
class serendipity_event_weblogping extends serendipity_event
{
-var $services;
-
+var $services;
+
function introspect(&$propbag)
{
global $serendipity;
$propbag->add('name', PLUGIN_EVENT_WEBLOGPING_TITLE);
- $propbag->add('description', PLUGIN_EVENT_WEBLOGPING_DESC);
- $propbag->add('event_hooks', array(
- 'backend_display' => true,
- 'frontend_display' => true,
- 'backend_insert' => true,
- 'backend_update' => true,
- 'backend_publish' => true,
- 'backend_draft' => true
- ));
-
- $this->services = array(
- array(
+ $propbag->add('description', PLUGIN_EVENT_WEBLOGPING_DESC);
+ $propbag->add('event_hooks', array(
+ 'backend_display' => true,
+ 'frontend_display' => true,
+ 'backend_insert' => true,
+ 'backend_update' => true,
+ 'backend_publish' => true,
+ 'backend_draft' => true
+ ));
+
+ $this->services = array(
+ array(
'name' => 'blo.gs',
'host' => 'ping.blo.gs',
'path' => '/',
'extended' => true
),
-
- array(
+
+ array(
'name' => 'blogrolling.com',
'host' => 'rpc.blogrolling.com',
'path' => '/pinger/'
),
-
- array(
+
+ array(
'name' => 'technorati.com',
'host' => 'rpc.technorati.com',
'path' => '/rpc/ping'
),
-
- array(
+
+ array(
'name' => 'weblogs.com',
'host' => 'rpc.weblogs.com',
'path' => '/RPC2'
),
-
- array(
+
+ array(
'name' => 'blogg.de',
'host' => 'xmlrpc.blogg.de',
'path' => '/'
),
-
- array(
+
+ array(
'name' => 'Yahoo!',
'host' => 'api.my.yahoo.com',
'path' => '/RPC2'
@@ -82,14 +82,14 @@
'host' => 'xmlrpc.blogbot.de',
'path' => '/',
'supersedes' => 'blo.gs, blogrolling.com, technorati.com, weblogs.com'
- )
+ )
);
-
- $conf_array = array();
- foreach($this->services AS $key => $service) {
- $conf_array[] = $service['name'];
- }
-
+
+ $conf_array = array();
+ foreach($this->services AS $key => $service) {
+ $conf_array[] = $service['name'];
+ }
+
$propbag->add('configuration', $conf_array);
}
@@ -107,12 +107,12 @@
function event_hook($event, &$bag, &$eventData) {
global $serendipity;
-
- $hooks = &$bag->get('event_hooks');
- if (isset($hooks[$event])) {
- switch($event) {
- case 'backend_display':
-?>
+
+ $hooks = &$bag->get('event_hooks');
+ if (isset($hooks[$event])) {
+ switch($event) {
+ case 'backend_display':
+?>
<fieldset style="margin: 5px">
<legend><?php echo PLUGIN_EVENT_WEBLOGPING_PING; ?></legend>
<?php
@@ -140,10 +140,10 @@
}
?>
</fieldset>
-<?php
- return true;
- break;
-
+<?php
+ return true;
+ break;
+
case 'backend_publish':
// First cycle through list of services to remove superseding services which may have been checked
foreach ($this->services as $index => $service) {
@@ -155,7 +155,7 @@
}
}
}
-
+
foreach ($this->services as $index => $service) {
if (isset($serendipity['POST']['announce_entries_' . $service['name']])) {
printf(PLUGIN_EVENT_WEBLOGPING_SENDINGPING . '...<br />', $service['host']);
@@ -198,24 +198,24 @@
# 15 second timeout may not be long enough for weblogs.com
$result = $client->send($message, 15);
- }
+ }
}
return true;
- break;
-
- case 'frontend_display':
- case 'backend_insert':
- case 'backend_update':
- case 'backend_draft':
- default:
- return false;
- break;
- }
- } else {
- return false;
- }
- }
+ break;
+
+ case 'frontend_display':
+ case 'backend_insert':
+ case 'backend_update':
+ case 'backend_draft':
+ default:
+ return false;
+ break;
+ }
+ } else {
+ return false;
+ }
+ }
}
/* vim: set sts=4 ts=4 expandtab : */
|