ページへ戻る

− Links

 印刷 

Ver 3.71.10 (moblogプラグイン新規追加とプラグインメンテなど) :: XOOPS マニア

xpwiki:xpWiki開発日記/2008-04-05


Tag: 新規プラグイン[4] Bugfix[5] プラグイン[6] enbug[7]
2008 4月 5 (土)
 
ページ内コンテンツ
  • Ver 3.71.10 (moblogプラグイン新規追加とプラグインメンテなど)
    • moblog プラグイン 新規追加
    • エンバグ修正
    • プラグインのメンテナンスなど
    • CVS 更新内容
  • 一行コメント

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

Page Top

moblog プラグイン 新規追加 anchor.png[10] Edit [11]

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

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

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

  • html側に置くプラグイン(設定部分のみ抜粋したもの)
    [インストール[14]ディレクトリ名]の部分を環境に合わせて修正してください。
    • XOOPS_ROOT_PATH[13]/modules/[インストール[14]ディレクトリ名]/private/plugin[15]/moblog.inc.php
      filemoblog.inc.php[16]
       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_[インストール[14]ディレクトリ名]_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[17] などに記述しておくと自動的に更新されます。
  • メール Subject で振り分ける機能はありませんので、メールアカウントは、moblog 専用のものを用意してください。
Page Top

エンバグ修正 anchor.png[18] Edit [19]

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

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

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

CVS 更新内容 anchor.png[22] Edit [23]

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

一行コメント anchor.png[25] Edit [26]




Last-modified: 2008-04-05 (土) 11:18:06 (JST) (6634d) by nao-pon