class NP_HeelloWorld extends NucleusPlugin {
// name of plugin
function getName() {
return 'Add item by mail';
}
// author of plugin
function getAuthor() {
return 'ToR + ma';
}
// an URL to the plugin website
// can also be of the form mailto:foo@bar.com
function getURL()
{
return 'http://xx.nakahara21.net/';
}
// version of the plugin
function getVersion() {
return '0.8';
}
// a description to be shown on the installed plugins listing
function getDescription() {
return 'メールを拾ってアイテムを追加します。<%plugin(HeelloWorld)%>の記述のあるスキンを適用するページを開くと実行されます。';
}
function init(){
global $member, $DIR_MEDIA;
/* ***
写メールBBS by ToR 2002/09/25
http://php.s3.to
↑こちらのメールチェックスクリプトを一部流用しています
*/
/*-- 受信メールサーバーの設定--*/
//メールのホスト
$this->host = "mail.momoso-net.com";
// ユーザーID
$this->user = "blogfarmmail";
// パスワード
$this->pass = "4qper4293jdvxk5z";
/*-- アイテムを追加するNucleus情報のデフォルト--*/
// メールでアイテムを追加するNucleusユーザー名
$this->bloguser = "blogfarmmail";
// 上記Nucleusユーザーのパスワード
$this->blogpassword = "4qper4293jdvxk5z";
// メールでアイテムを追加するblogのID
$this->blogid = 1;
// メールでアイテムを追加するカテゴリの名前
$this->categoryname = "General";
// 添付メールだけを記録する?Yes=1 No=0(Noの時はすべてのメールを追加)
$this->imgonly = 0;
// 直接blogにアイテムを追加する?Yes=1 No=0(Noの時はドラフト追加)
$this->DefaultPublish = 1;
/*-- メールのタイトルに各種オプションを含める場合の設定--*/
// オプション記述開始のの区切り文字
$this->optionsKeyword = '@';
// オプションでblogidを指定する場合のキー (小文字で指定、メール入力は大文字でOK)
$this->blogKeyword = 'b';
// オプションでカテゴリを指定する場合のキー (小文字で指定、メール入力は大文字でOK)
$this->categoryKeyword = 'c';
// オプションでストレートにpublish指定する場合のキー (小文字で指定、メール入力は大文字でOK)
$this->publishKeyword = 's'; //ストレートのsです。
// 投稿許可アドレス(ログに記録する)
$this->accept = array('farm@momoso-net.com','totokaka123-321akakotot@docomo.ne.jp');
// 件名がないときの題名
$this->nosubject = "(タイトルなし)";
// 件名がないときの題名
$this->imail = "(モブログ)";
// htmlメールの場合に除去しないタグ
//そのままアイテム本文に記録されますが、blogの設定が改行文字置換onの場合は再編集で
$this->no_strip_tags = '
$this->no_strip_tags = '