XPressME Integration Kit

Trac

Changeset 61


Ignore:
Timestamp:
Jan 1, 2009, 12:08:45 AM (15 years ago)
Author:
toemon
Message:

XOOPSイベント通知の実装 #6
但し現状ではメインコンテンツにイベント通知選択は表示されたない。(ブロックとして表示)

Location:
trunk
Files:
18 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/xpress_render.php

    r26 r61  
    101101        $xoopsTpl->assign('xoops_pagetitle', $page_title); 
    102102        $xoopsTpl->assign('xpress_body_contents', get_body($contents)); 
    103         echo get_body($contents); 
     103        echo get_body($contents); 
    104104} 
    105105 
  • trunk/language/ja_utf8/modinfo.php

    r54 r61  
    1616        define("_MI_XPRESS_BLOCK_COMMENTS","最近のコメント"); 
    1717        define("_MI_XPRESS_BLOCK_CONTENT","最近の記事内容"); 
     18         
     19        // Notify Categories 
     20        define('_MI_XPRESS_NOTCAT_GLOBAL', 'ブログ全体'); 
     21        define('_MI_XPRESS_NOTCAT_GLOBALDSC', 'ブログ全体における通知オプション'); 
     22        define('_MI_XPRESS_NOTCAT_CAT', '選択中のカテゴリ'); 
     23        define('_MI_XPRESS_NOTCAT_CATDSC', '選択中のカテゴリに対する通知オプション'); 
     24        define('_MI_XPRESS_NOTCAT_AUTHOR', '選択中の投稿者');  
     25        define('_MI_XPRESS_NOTCAT_AUTHORDSC', '選択中の投稿者に対する通知オプション'); 
     26        define('_MI_XPRESS_NOTCAT_POST', '表示中の記事');  
     27        define('_MI_XPRESS_NOTCAT_POSTDSC', '表示中の記事に対する通知オプション'); 
     28 
     29        // Each Notifications 
     30        define('_MI_XPRESS_NOTIFY_GLOBAL_WAITING', '承認待ち'); 
     31        define('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP', '承認を要する投稿・編集が行われた場合に通知します。管理者専用'); 
     32        define('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGSBJ', '[{X_SITENAME}] {X_MODULE}: 承認待ち'); 
     33 
     34        define('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOST', '記事投稿'); 
     35        define('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP', 'このブログ全体のいずれかに記事の投稿があった場合に通知する'); 
     36        define('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}"'); 
     37 
     38        define('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENT', 'コメント投稿'); 
     39        define('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP', 'このブログ全体のいずれかにコメントの投稿があった場合に通知する'); 
     40        define('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: "{XPRESS_POST_TITLE}"'); 
     41 
     42        define('_MI_XPRESS_NOTIFY_CAT_NEWPOST', '選択カテゴリへの記事投稿'); 
     43        define('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP', 'このカテゴリに記事投稿があった場合に通知する'); 
     44        define('_MI_XPRESS_NOTIFY_CAT_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}" (条件:カテゴリ="{XPRESS_CAT_TITLE}")'); 
     45 
     46        define('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENT', '選択カテゴリへのコメント投稿'); 
     47        define('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP', 'このカテゴリにコメント投稿があった場合に通知する'); 
     48        define('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: (記事"{XPRESS_POST_TITLE}") (条件:カテゴリ="{XPRESS_CAT_TITLE}")'); 
     49 
     50        define('_MI_XPRESS_NOTIFY_AUT_NEWPOST', '選択投稿者による記事投稿'); 
     51        define('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP', 'この投稿者から記事投稿があった場合に通知する'); 
     52        define('_MI_XPRESS_NOTIFY_AUT_NEWPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}" (条件:投稿者="{XPRESS_AUTH_NAME}")'); 
     53 
     54        define('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENT', '選択投稿者記事へのコメント投稿'); 
     55        define('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP', 'この投稿者による記事へコメント投稿があった場合に通知する'); 
     56        define('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: (記事"{XPRESS_POST_TITLE}") (条件:投稿者="{XPRESS_AUTH_NAME}")'); 
     57 
     58        define('_MI_XPRESS_NOTIFY_POST_EDITPOST', '記事変更'); 
     59        define('_MI_XPRESS_NOTIFY_POST_EDITPOSTCAP', '表示中の記事に変更があった場合に通知する'); 
     60        define('_MI_XPRESS_NOTIFY_POST_EDITPOSTSBJ', '[{XPRESS_BLOG_NAME}]記事: "{XPRESS_POST_TITLE}"変更 (条件:記事指定)'); 
     61 
     62        define('_MI_XPRESS_NOTIFY_POST_NEWCOMMENT', '記事へのコメント投稿'); 
     63        define('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP', '表示中の記事にコメントの投稿があった場合に通知する'); 
     64        define('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTSBJ', '[{XPRESS_BLOG_NAME}]コメント: (記事"{XPRESS_POST_TITLE}") (条件:記事指定)'); 
     65 
    1866} 
    1967?> 
  • trunk/wp-content/plugins/xpressme/xpressme.php

    r51 r61  
    3737add_action("the_content",       "set_post_views_count"); 
    3838 
     39//XOOPS notifiction 
     40require_once dirname( __FILE__ ).'/include/notify_functions.php' ; 
     41add_action("private_to_published",      "onaction_publish_post_notify"); 
     42//      add_action("edit_post", "onaction_edit_post_notify"); 
     43add_action("comment_post",      "onaction_comment_notify"); 
     44//      add_action("approve_comment" , "onaction_comment_apobe_notify"); 
     45add_action("wp_set_comment_status" , "onaction_comment_apobe_notify"); 
     46 
     47 
    3948 
    4049//require_once('../include/custom_functions.php'); 
  • trunk/wp-content/themes/xpress_default/blocks/style.css

    r50 r61  
    77Author URI: http://xoops-fan.com/ 
    88Tags: XPressME,XPressEUC,KURO 
    9 ƒRƒ~ƒbƒgƒeƒXƒgƒo[ƒWƒ‡ƒ“ 
    109 
    1110*/ 
  • trunk/xoops_version.php

    r54 r61  
    7575$modversion['search']['func'] = $mydirname.'_global_search' ; 
    7676//Admin things 
    77 $modversion['hasAdmin'] = 0; 
    78 //$modversion['adminindex'] = "admin/index.php"; 
    79 //$modversion['adminmenu'] = "admin/menu.php"; 
     77$modversion['hasAdmin'] = 1; 
     78$modversion['adminindex'] = "admin/index.php"; 
     79$modversion['adminmenu'] = "admin/menu.php"; 
    8080 
    8181$modversion['hasMain'] = 1; 
     
    8888 
    8989// Use smarty 
    90 //$modversion["use_smarty"] = 1; 
     90$modversion["use_smarty"] = 1; 
    9191 
    9292/** 
     
    9696$modversion['templates'] = array() ; 
    9797 
    98 $modversion['hasconfig'] = 0; 
     98$modversion['hasconfig'] = 1; 
    9999 
    100100//BLOCKS 
     
    121121        'func_num'              => 2, 
    122122); 
     123 
     124// Notification 
     125$modversion['hasNotification'] = 1; 
     126$modversion['notification'] = array( 
     127        'lookup_file' => 'include/notification.inc.php' , 
     128        'lookup_func' => "{$mydirname}_notify_info" , 
     129        'category' => array( 
     130                array( 
     131                        'name' => 'global' , 
     132                        'title' => constant('_MI_XPRESS_NOTCAT_GLOBAL') , 
     133                        'description' => constant('_MI_XPRESS_NOTCAT_GLOBALDSC') , 
     134                        'subscribe_from' => 'index.php' , 
     135                ) , 
     136                array( 
     137                        'name' => 'category' , 
     138                        'title' => constant('_MI_XPRESS_NOTCAT_CAT') , 
     139                        'description' => constant('_MI_XPRESS_NOTCAT_CATDSC') , 
     140                        'subscribe_from' => 'index.php' , 
     141                        'item_name' => 'cat' , 
     142                        'allow_bookmark' => 1 , 
     143                ) , 
     144                array( 
     145                        'name' => 'author' , 
     146                        'title' => constant('_MI_XPRESS_NOTCAT_AUTHOR') , 
     147                        'description' => constant('_MI_XPRESS_NOTCAT_AUTHORDSC') , 
     148                        'subscribe_from' => 'index.php' , 
     149                        'item_name' => 'author' , 
     150                        'allow_bookmark' => 1 , 
     151                ) , 
     152                array( 
     153                        'name' => 'post' , 
     154                        'title' => constant('_MI_XPRESS_NOTCAT_POST') , 
     155                        'description' => constant('_MI_XPRESS_NOTCAT_POSTDSC') , 
     156                        'subscribe_from' => 'index.php' , 
     157                        'item_name' => 'p' , 
     158                        'allow_bookmark' => 1 , 
     159                ) , 
     160        ) , 
     161        'event' => array( 
     162                array( 
     163                        'name' => 'waiting' , 
     164                        'category' => 'global' , 
     165                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITING') , 
     166                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') , 
     167                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') , 
     168                        'mail_template' => 'global_waiting' , 
     169                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGSBJ') , 
     170                        'admin_only' => 1 , 
     171                ) , 
     172                array( 
     173                        'name' => 'newpost' , 
     174                        'category' => 'global' , 
     175                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOST') , 
     176                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') , 
     177                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') , 
     178                        'mail_template' => 'global_newpost' , 
     179                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTSBJ') , 
     180                ) , 
     181                array( 
     182                        'name' => 'comment' , 
     183                        'category' => 'global' , 
     184                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENT') , 
     185                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') , 
     186                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') , 
     187                        'mail_template' => 'global_newcomment' , 
     188                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTSBJ') , 
     189                ) , 
     190                 
     191                array( 
     192                        'name' => 'newpost' , 
     193                        'category' => 'category' , 
     194                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOST') , 
     195                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') , 
     196                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') , 
     197                        'mail_template' => 'category_newpost' , 
     198                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTSBJ') , 
     199                ) , 
     200                array( 
     201                        'name' => 'comment' , 
     202                        'category' => 'category' , 
     203                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENT') , 
     204                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') , 
     205                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') , 
     206                        'mail_template' => 'category_newcomment' , 
     207                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTSBJ') , 
     208                ) , 
     209 
     210                array( 
     211                        'name' => 'newpost' , 
     212                        'category' => 'author' , 
     213                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOST') , 
     214                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') , 
     215                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') , 
     216                        'mail_template' => 'author_newpost' , 
     217                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTSBJ') , 
     218                ) , 
     219                array( 
     220                        'name' => 'comment' , 
     221                        'category' => 'author' , 
     222                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENT') , 
     223                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') , 
     224                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') , 
     225                        'mail_template' => 'author_newcomment' , 
     226                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTSBJ') , 
     227                ) , 
     228 
     229                array( 
     230                        'name' => 'comment' , 
     231                        'category' => 'post' , 
     232                        'title' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENT') , 
     233                        'caption' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') , 
     234                        'description' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') , 
     235                        'mail_template' => 'post_newcomment' , 
     236                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTSBJ') , 
     237                ) , 
     238        ) , 
     239) ; 
     240 
     241 
    123242?> 
Note: See TracChangeset for help on using the changeset viewer.