XPressME Integration Kit

Trac

source: trunk/xoops_version.php @ 61

Last change on this file since 61 was 61, checked in by toemon, 15 years ago

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

File size: 7.7 KB
Line 
1<?php
2/**
3 * XPressME - WordPress for XOOPS
4 *
5 * Adding multi-author features to XPress
6 *
7 * @copyright   toemon
8 * @license             GNU public license
9 * @author              "toemon ( http://www.toemon.com)"
10 * @package             module::xpressme
11 */
12 
13if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
14
15$mydirpath = dirname(__FILE__);
16$mydirname = basename($mydirpath);
17
18$lang = @$GLOBALS["xoopsConfig"]['language'];
19
20// language file (modinfo.php)
21
22if( file_exists( $mydirpath .'/language/'.$lang.'/modinfo.php' ) ) {
23        include_once $mydirpath .'/language/'.$lang.'/modinfo.php' ;
24} else if( file_exists(  $mydirpath .'/language/english/modinfo.php' ) ) {
25        include_once $mydirpath .'/language/english/modinfo.php' ;
26}
27global $wp_db_version,$wp_version;
28
29include $mydirpath .'/wp-includes/version.php' ;
30
31$modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XPRESS_NAME') ;
32$modversion['description'] = constant( '_MI_XPRESS_DESC');
33$modversion['version'] = "0.02";
34$modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://www.toemon.com) ;";
35$modversion['author'] = "toemon (http://www.toemon.com)";
36$modversion['license'] = "GPL see LICENSE";
37$modversion['official'] = 0 ;
38$modversion['image'] =  'module_icon.php' ;
39$modversion['dirname'] = $mydirname;
40
41// status
42$modversion['codename'] = "r48";
43
44// onInstall, onUpdate, onUninstall
45$modversion['onInstall'] = 'include/oninstall.php' ;
46$modversion['onUpdate'] = 'include/onupdate.php' ;
47$modversion['onUninstall'] = 'include/onuninstall.php' ;
48
49// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
50//$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
51
52$db_prefix = $mydirname;
53if ($mydirname == 'wordpress') {
54        $db_prefix = 'wp';
55}
56        $modversion['tables'] = array(
57        $db_prefix . "_comments",
58        $db_prefix . "_links",
59        $db_prefix . "_options",
60        $db_prefix . "_postmeta",
61        $db_prefix . "_posts",
62        $db_prefix . "_users",
63        $db_prefix . "_usermeta",
64        $db_prefix . "_terms",
65        $db_prefix . "_term_relationships",
66        $db_prefix . "_term_taxonomy",
67        $db_prefix . "_views", 
68        $db_prefix . "_d3forum_link"
69        );
70
71
72// Search
73$modversion['hasSearch'] = 1 ;
74$modversion['search']['file'] = 'include/search.php' ;
75$modversion['search']['func'] = $mydirname.'_global_search' ;
76//Admin things
77$modversion['hasAdmin'] = 1;
78$modversion['adminindex'] = "admin/index.php";
79$modversion['adminmenu'] = "admin/menu.php";
80
81$modversion['hasMain'] = 1;
82if(is_object($GLOBALS["xoopsUser"])){
83        $modversion['sub'][1]['name'] = constant( '_MI_XPRESS_MENU_POST_NEW');
84        $modversion['sub'][1]['url'] = "wp-admin/post-new.php";
85        $modversion['sub'][2]['name'] = constant( '_MI_XPRESS_MENU_EDIT');
86        $modversion['sub'][2]['url'] = "wp-admin/edit.php";
87}
88
89// Use smarty
90$modversion["use_smarty"] = 1;
91
92/**
93* Templates
94*/
95// All Templates can't be touched by modulesadmin.
96$modversion['templates'] = array() ;
97
98$modversion['hasconfig'] = 1;
99
100//BLOCKS
101$modversion['blocks'][1] = array(
102        'file'                  => 'recent_comments_block.php' ,
103        'name'                  => constant('_MI_XPRESS_BLOCK_COMMENTS') ,
104        'description'   => '' ,
105        'show_func'     => "b_". $mydirname . "_comments_show" ,
106        'edit_func'     => "b_". $mydirname . "_comments_edit" ,
107        'template'              => 'recent_comments_block.html' ,
108        'options'               => $mydirname. '|10|30|0|' ,
109        'can_clone'             => true ,
110        'func_num'              => 1,   
111);
112$modversion['blocks'][2] = array(
113        'file'                  => 'recent_posts_content_block.php' ,
114        'name'                  => constant('_MI_XPRESS_BLOCK_CONTENT') ,
115        'description'   => '' ,
116        'show_func'     => "b_". $mydirname . "_content_show" ,
117        'edit_func'     => "b_". $mydirname . "_content_edit" ,
118        'template'              => 'recent_posts_content_block.html' ,
119        'options'               => $mydirname. '|10|0|100||0' ,
120        'can_clone'             => true ,
121        'func_num'              => 2,
122);
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
242?>
Note: See TracBrowser for help on using the repository browser.