差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| nucleus:np_typepadantispam [2008/06/06 15:58] – osamu | nucleus:np_typepadantispam [2008/06/06 16:41] (現在) – osamu | ||
|---|---|---|---|
| 行 20: | 行 20: | ||
| {{nucleus: | {{nucleus: | ||
| + | |||
| + | ===== Source Code ===== | ||
| <code php> | <code php> | ||
| 行 25: | 行 27: | ||
| /* ======================================================================== | /* ======================================================================== | ||
| * NP_TypePadAntiSpam -- TypePad AntiSpam Plugin for Nucleus CMS | * NP_TypePadAntiSpam -- TypePad AntiSpam Plugin for Nucleus CMS | ||
| - | * Copyright (C) 2008 Osamu Higuchi | + | * Copyright (C) 2008 Niels Leenheer, Matt Mullenweg, and Osamu Higuchi |
| * ------------------------------------------------------------------------ | * ------------------------------------------------------------------------ | ||
| - | * This program is free software; you can redistribute it and/or | + | |
| - | * modify it under the terms of the GNU General Public License | + | * modify it under the terms of the GNU General Public License |
| - | * as published by the Free Software Foundation; either version 2 | + | * as published by the Free Software Foundation; either version 2 |
| - | * of the License, or (at your option) any later version. | + | * of the License, or (at your option) any later version. |
| - | * | + | * |
| - | * This program is distributed in the hope that it will be useful, | + | * This program is distributed in the hope that it will be useful, |
| - | * but WITHOUT ANY WARRANTY; without even the implied warranty of | + | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| - | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| - | * GNU General Public License for more details. | + | * GNU General Public License for more details. |
| * | * | ||
| * You should have received a copy of the GNU General Public License along | * You should have received a copy of the GNU General Public License along | ||
| 行 44: | 行 46: | ||
| * By Osamu Higuchi http:// | * By Osamu Higuchi http:// | ||
| * Based on NP_Akismet by Niels Leenheer and Matt Mullenweg | * Based on NP_Akismet by Niels Leenheer and Matt Mullenweg | ||
| - | * and NP_AddSpamCheckEvent by hsur | ||
| * ------------------------------------------------------------------------ | * ------------------------------------------------------------------------ | ||
| * Version History | * Version History | ||
| * 0.1 May 30, 2008 : Prototype | * 0.1 May 30, 2008 : Prototype | ||
| + | * 0.2 May 30, 2008 : Prototype | ||
| * ======================================================================== | * ======================================================================== | ||
| */ | */ | ||
| 行 55: | 行 57: | ||
| function getAuthor() | function getAuthor() | ||
| function getURL() | function getURL() | ||
| - | function getVersion() { return '0.1'; } | + | function getVersion() { return '0.2'; } |
| - | function getDescription() { return ' | + | function getDescription() { return 'Spam Check with TypePad AntiSpam'; |
| function supportsFeature($what) { | function supportsFeature($what) { | ||
| 行 68: | 行 70: | ||
| function getEventList() { | function getEventList() { | ||
| - | return array(' | + | return array(' |
| } | } | ||
| 行 75: | 行 77: | ||
| $this-> | $this-> | ||
| } | } | ||
| - | |||
| - | // Borrowed from NP_AddSpamCheckEvent | ||
| - | function event_ValidateForm(& | ||
| - | global $manager, $member; | ||
| - | if ($member-> | ||
| - | return; | ||
| - | |||
| - | $spamcheck = array(); | ||
| - | switch( $data[' | ||
| - | case ' | ||
| - | $spamcheck = array ( | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ); | ||
| - | break; | ||
| - | case ' | ||
| - | $spamcheck = array ( | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | // | ||
| - | ' | ||
| - | ); | ||
| - | break; | ||
| - | default: | ||
| - | return; | ||
| - | } | ||
| - | |||
| - | $manager-> | ||
| - | if (isset($spamcheck[' | ||
| - | if ($manager-> | ||
| - | $plugin = & $manager-> | ||
| - | $plugin-> | ||
| - | } else { | ||
| - | $this-> | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | function _showForbiddenMessage($message = '' | ||
| - | header(" | ||
| - | header(" | ||
| - | echo '< | ||
| - | exit; | ||
| - | } | ||
| - | |||
| - | // Borrowed from NP_Akismet | ||
| function event_SpamPlugin(& | function event_SpamPlugin(& | ||

