hypweb.net
XOOPSマニア  最新情報のRSS(サイト全体)
[ 自宅サーバーWebRing |ID=54 前後5表示乱移動サイト一覧 ]

TOP » xpwiki » xpWiki開発日記 » 2008-04-05

2008 4月 5 (土)
 

Ver 3.71.10 (moblogプラグイン新規追加とプラグインメンテなど) anchor.png Edit

Page Top

moblog プラグイン 新規追加 anchor.png Edit

PukiWikiMod の moblog プラグインを、xpWiki 用に修正してみました。

moblog は E-Mail にてページを投稿できるプラグインです。使用にあたっては、plugin_moblog_init() にて、メールアカウントの設定が必要になります。

html(XOOPS_ROOT_PATH)側にて、オーバーライトして使用してください。

  • html側に置くプラグイン(設定部分のみ抜粋したもの)
    [インストールディレクトリ名]の部分を環境に合わせて修正してください。
    • XOOPS_ROOT_PATH/modules/[インストールディレクトリ名]/private/plugin/moblog.inc.php
      filemoblog.inc.php
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      70
      71
      72
      73
      74
      75
      76
      77
      78
      79
      80
      81
      
      <?php
      class xpwiki_[インストールディレクトリ名]_plugin_moblog extends xpwiki_plugin_moblog {
          function plugin_moblog_init () {
              parent::plugin_moblog_init();
              
              ////// 必須設定項目 ///////
              
              // 受信用メールアドレス
              $this->config['mail'] = '';
              // POPサーバー
              $this->config['host'] = 'localhost';
              // POPサーバーアカウント
              $this->config['user'] = '';
              // POPサーバーパスワード
              $this->config['pass'] = '';
              // POPサーバーポート番号
              $this->config['port'] = 110;
              
              // 送信元アドレスによって振り分けるページの指定
              // ページ名空白 '' で無視(投稿登録中止)
              $this->config['adr2page'] = array(
              //      'メールアドレス'     => array('ページ名', UserIDナンバー),
              //      'hoge@example.com' => array('日記', 1),     // 設定例
                  'other'               => array('', 0),           // 登録メールアドレス以外
              );
              
              ////// 必須設定項目終了 //////
              
              //////////////////////////////
              ///// 以下はお好みで設定 /////
              
              // refプラグインの追加オプション
              $this->config['ref'] = ',left,around,mw:240,mh:240';
              
              // googlemaps の追加オプション
              $this->config['gmap'] = ',width=100%,height=300px,zoom=15,type=normal,overviewctrl=1,autozoom=1';
              
              // 最大添付量(バイト・1ファイルにつき)※超えるものは保存しない
              $this->config['maxbyte'] = "1048576"; //1MB
              
              // 本文文字制限(半角で
              $this->config['body_limit'] = 1000;
              
              // 最小自動更新間隔(分)
              $this->config['refresh_min'] = 5;
              
              // 件名がないときの題名
              $this->config['nosubject'] = "";
              
              // 投稿非許可アドレス(ログに記録しない)
              $this->config['deny'] = array('163.com','bigfoot.com','boss.com','yahoo-delivers@mail.yahoo.co.jp');
              
              // 投稿非許可メーラー(perl互換正規表現)(ログに記録しない)
              $this->config['deny_mailer'] = '/(Mail\s*Magic|Easy\s*DM|Friend\s*Mailer|Extra\s*Japan|The\s*Bat)/i';
              
              // 投稿非許可タイトル(perl互換正規表現)(ログに記録しない)
              $this->config['deny_title'] = '/((未|末)\s?承\s?(諾|認)\s?広\s?告)|相互リンク/i';
              
              // 投稿非許可キャラクターセット(perl互換正規表現)(ログに記録しない)
              $this->config['deny_lang'] = '/us-ascii|big5|euc-kr|gb2312|iso-2022-kr|ks_c_5601-1987/i';
              
              // 対応MIMEタイプ(正規表現)Content-Type: image/jpegの後ろの部分。octet-streamは危険かも
              $this->config['subtype'] = "gif|jpe?g|png|bmp|octet-stream|x-pmd|x-mld|x-mid|x-smd|x-smaf|x-mpeg";
              
              // 保存しないファイル(正規表現)
              $this->config['viri'] = ".+\.exe$|.+\.zip$|.+\.pif$|.+\.scr$";
              
              // 25字以上の下線は削除(広告区切り)
              $this->config['del_ereg'] = "[_]{25,}";
              
              // 本文から削除する文字列
              $this->config['word'][] = "http://auction.msn.co.jp/";
              $this->config['word'][] = "Do You Yahoo!?";
              $this->config['word'][] = "Yahoo! BB is Broadband by Yahoo!";
              $this->config['word'][] = "http://bb.yahoo.co.jp/";
              
              // 添付メールのみ記録する?Yes=1 No=0(本文のみはログに載せない)
              $this->config['imgonly'] = 0;
          }
      }
      ?>
  • #moblog と記述しておくと、指定されたメールサーバーをチェックしに行きますので、MenuBar などに記述しておくと自動的に更新されます。
  • メール Subject で振り分ける機能はありませんので、メールアカウントは、moblog 専用のものを用意してください。
Page Top

エンバグ修正 anchor.png Edit

  • ページ削除ができなくなっていた :-o ので、修正しました。
Page Top

プラグインのメンテナンスなど anchor.png Edit

  • code プラグインで行番号の最後の行が表示されないことがある問題を修正。
  • search プラグインのフォーム表示で、項目途中で改行されないようにして見やすくしてみました。
  • calendar_viewer プラグインで、ページナビゲーションのリンクを間違うことがあったので修正しました。
  • $this->cont['PAGENAME'] に、現在表示中のページ名をセットするようにしました。この値は通常変わることはありません。
    • 似たような変数で $this->root->vars['page'] がありますが、この値は他のページをインクルードするためにレンダリングする場合に、他のページのレンダリング中は、そのページ名に変わります。
  • PHP の memory_limit を 64M に設定するようにしてみました。
  • その他、諸々。
Page Top

CVS 更新内容 anchor.png Edit

+  今回の更新分
  • 2008-04-05 09:02 nao-pon
    • * xoops_version.php (1.325):
      • Version 3.71.10
  • 2008-04-05 09:02 nao-pon
    • * plugin/moblog.inc.php (1.1), skin/image/gif/spacer.gif (1.1):
      • Added New plugin "moblog", It enables page update with E-mail.
  • 2008-04-05 08:56 nao-pon
    • * plugin/search.inc.php (1.6):
      • Added <span class="nowrap"> in search form.
  • 2008-04-05 08:54 nao-pon
    • * plugin/isbn.inc.php (1.5):
      • $this->config['AMAZON_ASE_ID'] = '';
  • 2008-04-05 08:53 nao-pon
    • * plugin/edit.inc.php (1.58):
      • simply.
  • 2008-04-05 08:53 nao-pon
    • * plugin/calendar_viewer.inc.php (1.12):
      • Bugfixed, The link of "Following" was wrong.
  • 2008-04-05 08:51 nao-pon
    • * plugin/aws.inc.php (1.2):
      • Move "load_language()" to convert().
  • 2008-04-05 08:50 nao-pon
    • * plugin/attach.inc.php (1.38):
      • Return attach file name too, from do_upload().
  • 2008-04-05 08:48 nao-pon
    • * plugin/amazon.inc.php (1.6):
      • cleanup.
  • 2008-04-05 08:48 nao-pon
    • * class/include/init.php (1.49):
      • Added "cont['PAGENAME']" that is showing pagename.
  • 2008-04-05 08:47 nao-pon
    • * class/func/pukiwiki_func.php (1.158):
      • Bugfixed(embug), Page deletion were impossible.
      • Do not auto link with the self-page.
  • 2008-04-05 08:44 nao-pon
    • * class/root.php (1.13):
      • Added "cont['PAGENAME']" that is showing pagename.
  • 2008-04-05 08:43 nao-pon
    • * class/plugin.php (1.9):
      • Reading the language file : only once.
  • 2008-04-05 08:41 nao-pon
    • * plugin/code/codehighlight.php (1.10):
      • Bugfixed the problem that the line - number shifts.
  • 2008-04-05 08:40 nao-pon
    • * include.php (1.12):
      • set memory_limit '64M'
Page Top

一行コメント anchor.png Edit




トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 298, today: 1, yesterday: 0
初版日時: 2008-04-05 (土) 11:17:18
最終更新: 2008-04-05 (土) 11:18:06 (JST) (6634d) by nao-pon
このページのTopへ
メインメニュー
ログイン

ユーザー名:


パスワード:





パスワード紛失  |新規登録
オンライン状況
62 人のユーザが現在オンラインです。 (1 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 62

もっと...
サイト情報