XPressME Integration Kit

Trac

source: trunk/xoops_version.php @ 136

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

ウィジェットブロック、実装 #77

File size: 12.0 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.15";
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'] = "r136";
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
57$modversion['tables'] = array(
58        $db_prefix . "_comments",
59        $db_prefix . "_links",
60        $db_prefix . "_options",
61        $db_prefix . "_postmeta",
62        $db_prefix . "_posts",
63        $db_prefix . "_users",
64        $db_prefix . "_usermeta",
65        $db_prefix . "_terms",
66        $db_prefix . "_term_relationships",
67        $db_prefix . "_term_taxonomy",
68        $db_prefix . "_views", 
69        $db_prefix . "_d3forum_link",
70        $db_prefix . "_group_role"
71);
72
73
74// Search
75$modversion['hasSearch'] = 1 ;
76$modversion['search']['file'] = 'include/search.php' ;
77$modversion['search']['func'] = $mydirname.'_global_search' ;
78//Admin things
79$modversion['hasAdmin'] = 1;
80$modversion['adminindex'] = "admin/index.php";
81$modversion['adminmenu'] = "admin/menu.php";
82
83$modversion['hasMain'] = 1;
84if(is_object($GLOBALS["xoopsUser"])){
85        $modversion['sub'][1]['name'] = constant( '_MI_XPRESS_MENU_POST_NEW');
86        $modversion['sub'][1]['url'] = "wp-admin/post-new.php";
87        $modversion['sub'][2]['name'] = constant( '_MI_XPRESS_MENU_EDIT');
88        $modversion['sub'][2]['url'] = "wp-admin/edit.php";
89}
90
91// Use smarty
92$modversion["use_smarty"] = 1;
93
94/**
95* Templates
96*/
97// All Templates can't be touched by modulesadmin.
98$modversion['templates'] = array() ;
99
100$modversion['hasconfig'] = 1;
101
102//BLOCKS
103$b_no =1;
104$modversion['blocks'][$b_no] = array(
105        'file'                  => 'recent_comments_block.php' ,
106        'name'                  => constant('_MI_XPRESS_BLOCK_COMMENTS') ,
107        'description'   => '' ,
108        'show_func'     => "b_". $mydirname . "_comments_show" ,
109        'edit_func'     => "b_". $mydirname . "_comments_edit" ,
110        'template'              => '' ,
111        'options'               => $mydirname. '||10|30|0' ,
112        'can_clone'             => true ,
113        'func_num'              => $b_no,       
114);
115$b_no++;
116$modversion['blocks'][$b_no] = array(
117        'file'                  => 'recent_posts_content_block.php' ,
118        'name'                  => constant('_MI_XPRESS_BLOCK_CONTENT') ,
119        'description'   => '' ,
120        'show_func'     => "b_". $mydirname . "_content_show" ,
121        'edit_func'     => "b_". $mydirname . "_content_edit" ,
122        'template'              => '' ,
123        'options'               => $mydirname. '||10|0|100||0' ,
124        'can_clone'             => true ,
125        'func_num'              => $b_no,
126);
127$b_no++;
128$modversion['blocks'][$b_no] = array(
129        'file'                  => 'recent_posts_list_block.php' ,
130        'name'                  => constant('_MI_XPRESS_BLOCK_POSTS') ,
131        'description'   => '' ,
132        'show_func'     => "b_". $mydirname . "_posts_show" ,
133        'edit_func'     => "b_". $mydirname . "_posts_edit" ,
134        'options'               => $mydirname. '||10|1|7||0' ,
135        'can_clone'             => true ,
136        'func_num'              => $b_no,       
137);
138$b_no++;
139$modversion['blocks'][$b_no] = array(
140        'file'                  => 'calender_block.php' ,
141        'name'                  => constant('_MI_XPRESS_BLOCK_CALENDER') ,
142        'description'   => '' ,
143        'show_func'     => "b_". $mydirname . "_calender_show" ,
144        'edit_func'     => "b_". $mydirname . "_calender_edit" ,
145        'options'               => $mydirname. '||#DB0000|#004D99' ,
146        'can_clone'             => false ,
147        'func_num'              => $b_no,
148);
149$b_no++;
150$modversion['blocks'][$b_no] = array(
151        'file'                  => 'popular_posts_block.php' ,
152        'name'                  => constant('_MI_XPRESS_BLOCK_POPULAR') ,
153        'description'   => '' ,
154        'show_func'     => "b_". $mydirname . "_popular_show" ,
155        'edit_func'     => "b_". $mydirname . "_popular_edit" ,
156        'options'               => $mydirname. '||10|0||0' ,
157        'can_clone'             => true ,
158        'func_num'              => $b_no,       
159);
160$b_no++;
161$modversion['blocks'][$b_no] = array(
162        'file'                  => 'archives_block.php' ,
163        'name'                  => constant('_MI_XPRESS_BLOCK_ARCHIVE') ,
164        'description'   => '' ,
165        'show_func'     => "b_". $mydirname . "_archives_show" ,
166        'edit_func'     => "b_". $mydirname . "_archives_edit" ,
167        'options'               => $mydirname. '||monthly|0|1|0' ,
168        'can_clone'             => true ,
169        'func_num'              => $b_no,       
170);
171$b_no++;
172$modversion['blocks'][$b_no] = array(
173        'file'                  => 'authors_block.php' ,
174        'name'                  => constant('_MI_XPRESS_BLOCK_AUTHORS') ,
175        'description'   => '' ,
176        'show_func'     => "b_". $mydirname . "_authors_show" ,
177        'edit_func'     => "b_". $mydirname . "_authors_edit" ,
178        'options'               => $mydirname. '||0|1|0|1' ,
179        'can_clone'             => false ,
180        'func_num'              => $b_no,       
181);
182$b_no++;
183$modversion['blocks'][$b_no] = array(
184        'file'                  => 'page_block.php' ,
185        'name'                  => constant('_MI_XPRESS_BLOCK_PAGE') ,
186        'description'   => '' ,
187        'show_func'     => "b_". $mydirname . "_page_show" ,
188        'edit_func'     => "b_". $mydirname . "_page_edit" ,
189        'options'               => $mydirname. '||post_title|asc||0||0|0|none||1||' ,
190        'can_clone'             => true ,
191        'func_num'              => $b_no,
192);
193$b_no++;
194$modversion['blocks'][$b_no] = array(
195        'file'                  => 'search_block.php' ,
196        'name'                  => constant('_MI_XPRESS_BLOCK_SEARCH') ,
197        'description'   => '' ,
198        'show_func'     => "b_". $mydirname . "_search_show" ,
199        'edit_func'     => "b_". $mydirname . "_search_edit" ,
200        'options'               => $mydirname. '||18' ,
201        'can_clone'             => false ,
202        'func_num'              => $b_no ,     
203);
204$b_no++;
205$modversion['blocks'][$b_no] = array(
206        'file'                  => 'tag_cloud_block.php' ,
207        'name'                  => constant('_MI_XPRESS_BLOCK_TAG') ,
208        'description'   => '' ,
209        'show_func'     => "b_". $mydirname . "_tag_cloud_show" ,
210        'edit_func'     => "b_". $mydirname . "_tag_cloud_edit" ,
211        'options'               => $mydirname. '||8|22|pt|45|flat|name|ASC||' ,
212        'can_clone'             => false ,
213        'func_num'              => $b_no,       
214);
215$b_no++;
216$modversion['blocks'][$b_no] = array(
217        'file'                  => 'category_block.php' ,
218        'name'                  => constant('_MI_XPRESS_BLOCK_CATEGORY') ,
219        'description'   => '' ,
220        'show_func'     => "b_". $mydirname . "_category_show" ,
221        'edit_func'     => "b_". $mydirname . "_category_edit" ,
222        'options'               => $mydirname. '||ALL|name|ASC|0|0|1|1|||1|0' ,
223        'can_clone'             => false ,
224        'func_num'              => $b_no,       
225);
226$b_no++;
227$modversion['blocks'][$b_no] = array(
228        'file'                  => 'meta_block.php' ,
229        'name'                  => constant('_MI_XPRESS_BLOCK_META') ,
230        'description'   => '' ,
231        'show_func'     => "b_". $mydirname . "_meta_show" ,
232        'edit_func'     => "b_". $mydirname . "_meta_edit" ,
233        'options'               => $mydirname. '||1|1|1|1|1|1|1|1' ,
234        'can_clone'             => false ,
235        'func_num'              => $b_no,       
236);
237$b_no++;
238$modversion['blocks'][$b_no] = array(
239        'file'                  => 'sidebar_block.php' ,
240        'name'                  => constant('_MI_XPRESS_BLOCK_SIDEBAR') ,
241        'description'   => '' ,
242        'show_func'     => "b_". $mydirname . "_sidebar_show" ,
243        'edit_func'     => '' ,
244        'options'               => '' ,
245        'can_clone'             => false ,
246        'func_num'              => $b_no,       
247);
248$b_no++;
249$modversion['blocks'][$b_no] = array(
250        'file'                  => 'widget_block.php' ,
251        'name'                  => constant('_MI_XPRESS_BLOCK_WIDGET') ,
252        'description'   => '' ,
253        'show_func'     => "b_". $mydirname . "_widget_show" ,
254        'edit_func'     => "b_". $mydirname . "_widget_edit" ,
255        'options'               => $mydirname. '||' ,
256        'can_clone'             => true ,
257        'func_num'              => $b_no,       
258);
259
260
261// Notification
262$modversion['hasNotification'] = 1;
263$modversion['notification'] = array(
264        'lookup_file' => 'include/notification.inc.php' ,
265        'lookup_func' => "xpress_notify" ,
266        'category' => array(
267                array(
268                        'name' => 'global' ,
269                        'title' => constant('_MI_XPRESS_NOTCAT_GLOBAL') ,
270                        'description' => constant('_MI_XPRESS_NOTCAT_GLOBALDSC') ,
271                        'subscribe_from' => 'index.php' ,
272                ) ,
273                array(
274                        'name' => 'category' ,
275                        'title' => constant('_MI_XPRESS_NOTCAT_CAT') ,
276                        'description' => constant('_MI_XPRESS_NOTCAT_CATDSC') ,
277                        'subscribe_from' => 'index.php' ,
278                        'item_name' => 'cat' ,
279                        'allow_bookmark' => 1 ,
280                ) ,
281                array(
282                        'name' => 'author' ,
283                        'title' => constant('_MI_XPRESS_NOTCAT_AUTHOR') ,
284                        'description' => constant('_MI_XPRESS_NOTCAT_AUTHORDSC') ,
285                        'subscribe_from' => 'index.php' ,
286                        'item_name' => 'author' ,
287                        'allow_bookmark' => 1 ,
288                ) ,
289                array(
290                        'name' => 'post' ,
291                        'title' => constant('_MI_XPRESS_NOTCAT_POST') ,
292                        'description' => constant('_MI_XPRESS_NOTCAT_POSTDSC') ,
293                        'subscribe_from' => 'index.php' ,
294                        'item_name' => 'p' ,
295                        'allow_bookmark' => 1 ,
296                ) ,
297        ) ,
298        'event' => array(
299                array(
300                        'name' => 'waiting' ,
301                        'category' => 'global' ,
302                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITING') ,
303                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
304                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
305                        'mail_template' => 'global_waiting' ,
306                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGSBJ') ,
307                        'admin_only' => 1 ,
308                ) ,
309                array(
310                        'name' => 'newpost' ,
311                        'category' => 'global' ,
312                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOST') ,
313                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
314                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
315                        'mail_template' => 'global_newpost' ,
316                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTSBJ') ,
317                ) ,
318                array(
319                        'name' => 'comment' ,
320                        'category' => 'global' ,
321                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENT') ,
322                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
323                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
324                        'mail_template' => 'global_newcomment' ,
325                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTSBJ') ,
326                ) ,
327               
328                array(
329                        'name' => 'newpost' ,
330                        'category' => 'category' ,
331                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOST') ,
332                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
333                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
334                        'mail_template' => 'category_newpost' ,
335                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTSBJ') ,
336                ) ,
337                array(
338                        'name' => 'comment' ,
339                        'category' => 'category' ,
340                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENT') ,
341                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
342                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
343                        'mail_template' => 'category_newcomment' ,
344                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTSBJ') ,
345                ) ,
346
347                array(
348                        'name' => 'newpost' ,
349                        'category' => 'author' ,
350                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOST') ,
351                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
352                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
353                        'mail_template' => 'author_newpost' ,
354                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTSBJ') ,
355                ) ,
356                array(
357                        'name' => 'comment' ,
358                        'category' => 'author' ,
359                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENT') ,
360                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
361                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
362                        'mail_template' => 'author_newcomment' ,
363                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTSBJ') ,
364                ) ,
365
366                array(
367                        'name' => 'comment' ,
368                        'category' => 'post' ,
369                        'title' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENT') ,
370                        'caption' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
371                        'description' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
372                        'mail_template' => 'post_newcomment' ,
373                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTSBJ') ,
374                ) ,
375        ) ,
376) ;
377
378
379?>
Note: See TracBrowser for help on using the repository browser.