コメント機能のソースを読んでいてたまたま見つけたのですが、新規コメントの投稿があった際に、イベント通知を実行できるようです。
やり かたは実に簡単で、xoops_version.phpのイベント通知の配列に以下のようなコードを付け足しま す。
<?php $modversion['notification']['event'][5]['name'] = 'comment'; $modversion['notification']['event'][5]['category'] = 'story'; $modversion['notification']['event'][5]['title'] = constant($constpref.'_NOTIFY5_TITLE'); $modversion['notification']['event'][5]['caption'] = constant($constpref.'_NOTIFY5_CAPTION'); $modversion['notification']['event'][5]['description'] = constant($constpref.'_NOTIFY5_DESC'); $modversion['notification']['event'][5]['mail_template'] = 'story_comment'; $modversion['notification']['event'][5]['mail_subject'] = constant($constpref.'_NOTIFY5_SUBJECT');
これはBulletin2.1のコードをそ のままサンプルにしているので、各モジュールによって内容を変更する必要があるでしょう。
トラバURL : http://suin.asia/trackback/283
氷川 XOOPS Module 開発室