Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_spamblock
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31269/plugins/serendipity_event_spamblock
Modified Files:
Tag: branch-smarty
serendipity_event_spamblock.php
Log Message:
Allow to cache entire entries.
Needs some further work to maybe remove plugin references from _functions completely.
Possibly add a hook to rebuild entries on certain events (like when a new textile/bbcode etc. plugin is added)
Index: serendipity_event_spamblock.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -d -r1.4.2.2 -r1.4.2.3
--- serendipity_event_spamblock.php 18 Sep 2004 19:47:06 -0000 1.4.2.2
+++ serendipity_event_spamblock.php 22 Sep 2004 10:58:59 -0000 1.4.2.3
@@ -30,7 +30,8 @@
$propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_TITLE);
$propbag->add('description', PLUGIN_EVENT_SPAMBLOCK_DESC);
$propbag->add('event_hooks', array(
- 'frontend_saveComment' => true
+ 'frontend_saveComment' => true,
+ 'external_plugin' => true
));
$propbag->add('configuration', array('bodyclone', 'killswitch', 'ipflood', 'rbl'));
}
@@ -132,12 +133,30 @@
$serendipity['messagestack']['comments'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_RBL;
return false;
}
- }
+ }
}
}
}
return true;
- break;
+ break;
+
+ case 'external_plugin':
+ $parts = explode('_', $eventData);
+ if (!empty($parts[1])) {
+ $param = (int) $parts[1];
+ } else {
+ $param = null;
+ }
+
+ $methods = array('kaptcha');
+
+ if (!in_array($parts[0], $methods)) {
+ return;
+ }
+
+ echo 'kaptcha!';
+ return true;
+ break;
default:
return false;
|