Last change
on this file since 6506 was
6506,
checked in by rvelices, 14 years ago
|
added rv_akismet extension to svn
|
-
Property svn:eol-style set to
LF
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.0 KB
|
Line | |
---|
1 | <?php /* |
---|
2 | Plugin Name: RV Akismet |
---|
3 | Version: 2.1.a |
---|
4 | Description: Uses Akismet online service to check comments agains spam |
---|
5 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=192 |
---|
6 | Author: rvelices |
---|
7 | Author URI: http://www.modusoptimus.com |
---|
8 | */ |
---|
9 | |
---|
10 | add_event_handler('user_comment_check', 'akismet_user_comment_check_wrapper', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 2); |
---|
11 | |
---|
12 | add_event_handler('get_admin_plugin_menu_links', 'akismet_plugin_admin_menu' ); |
---|
13 | |
---|
14 | function akismet_plugin_admin_menu($menu) |
---|
15 | { |
---|
16 | global $page,$conf; |
---|
17 | if ( empty($conf['akismet_api_key']) and in_array($page['page'], array('intro','plugins_list')) ) |
---|
18 | { |
---|
19 | $page['errors'][] = 'You need to define the Akismet api key'; |
---|
20 | } |
---|
21 | $admin_url = get_admin_plugin_menu_link(dirname(__FILE__).'/admin.php'); |
---|
22 | array_push($menu, |
---|
23 | array( |
---|
24 | 'NAME' => 'Akismet', |
---|
25 | 'URL' => $admin_url |
---|
26 | ) |
---|
27 | ); |
---|
28 | return $menu; |
---|
29 | } |
---|
30 | |
---|
31 | |
---|
32 | function akismet_user_comment_check_wrapper($action, $comment) |
---|
33 | { |
---|
34 | include_once( dirname(__FILE__).'/check.inc.php' ); |
---|
35 | return akismet_user_comment_check($action, $comment); |
---|
36 | } |
---|
37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.