差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
nucleus:np_typepadantispam [2008/06/01 18:57] – osamu | nucleus:np_typepadantispam [2008/06/06 16:41] (現在) – osamu | ||
---|---|---|---|
行 1: | 行 1: | ||
====== NP_TypePadAntiSpam ====== | ====== NP_TypePadAntiSpam ====== | ||
+ | ===== What is this? ===== | ||
+ | |||
NP_TypePadAntiSpam is a plugin that integrates TypePad AntiSpam with Nucleus CMS. [[http:// | NP_TypePadAntiSpam is a plugin that integrates TypePad AntiSpam with Nucleus CMS. [[http:// | ||
NP_TypePadAntiSpam は、Nucleus CMS で TypePad AntiSpam を利用できるようにするプラグインです。[[http:// | NP_TypePadAntiSpam は、Nucleus CMS で TypePad AntiSpam を利用できるようにするプラグインです。[[http:// | ||
- | ===== Prototype | + | ===== The Code ===== |
- | This version | + | This program |
- | Install | + | Install |
+ | This plugin provides the core anti-spam engine only. It is recommended to use with an anti-spam UI plugin such as [[http:// | ||
+ | Japanese language files for NP_Moderate is also available. Put these language files in " | ||
- | {{nucleus: | + | このプログラムは[[http:// |
+ | プラグインのファイルをNucleusのプラグインディレクトリにインストールして、プラグインの管理画面でType[[http:// | ||
+ | このプラグインにはコアとなるスパム防止のエンジンだけが入っています。スパムコメントの管理などのユーザーインターフェースを追加する[[http:// | ||
+ | NP_Moderateの日本語ランゲージファイルも用意しました。このランゲージファイルを " | ||
+ | |||
+ | {{nucleus: | ||
+ | |||
+ | {{nucleus: | ||
+ | |||
+ | ===== Source Code ===== | ||
<code php> | <code php> | ||
行 14: | 行 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 | ||
行 33: | 行 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 | ||
* ======================================================================== | * ======================================================================== | ||
*/ | */ | ||
行 44: | 行 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) { | ||
行 57: | 行 70: | ||
function getEventList() { | function getEventList() { | ||
- | return array(' | + | return array(' |
} | } | ||
行 64: | 行 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(& |