XPressME Integration Kit

Trac

source: trunk/xoops_version.php @ 109

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

カレンダーブロック、人気記事リストの実装、インデックスページテンプレート実装

File size: 8.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.07";
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'] = "r108";
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        $db_prefix . "_group_role"
70        );
71
72
73// Search
74$modversion['hasSearch'] = 1 ;
75$modversion['search']['file'] = 'include/search.php' ;
76$modversion['search']['func'] = $mydirname.'_global_search' ;
77//Admin things
78$modversion['hasAdmin'] = 1;
79$modversion['adminindex'] = "admin/index.php";
80$modversion['adminmenu'] = "admin/menu.php";
81
82$modversion['hasMain'] = 1;
83if(is_object($GLOBALS["xoopsUser"])){
84        $modversion['sub'][1]['name'] = constant( '_MI_XPRESS_MENU_POST_NEW');
85        $modversion['sub'][1]['url'] = "wp-admin/post-new.php";
86        $modversion['sub'][2]['name'] = constant( '_MI_XPRESS_MENU_EDIT');
87        $modversion['sub'][2]['url'] = "wp-admin/edit.php";
88}
89
90// Use smarty
91$modversion["use_smarty"] = 1;
92
93/**
94* Templates
95*/
96// All Templates can't be touched by modulesadmin.
97$modversion['templates'] = array() ;
98
99$modversion['hasconfig'] = 1;
100
101//BLOCKS
102$modversion['blocks'][1] = array(
103        'file'                  => 'recent_comments_block.php' ,
104        'name'                  => constant('_MI_XPRESS_BLOCK_COMMENTS') ,
105        'description'   => '' ,
106        'show_func'     => "b_". $mydirname . "_comments_show" ,
107        'edit_func'     => "b_". $mydirname . "_comments_edit" ,
108        'template'              => '' ,
109        'options'               => $mydirname. '|10|30|0|' ,
110        'can_clone'             => true ,
111        'func_num'              => 1,   
112);
113$modversion['blocks'][2] = array(
114        'file'                  => 'recent_posts_content_block.php' ,
115        'name'                  => constant('_MI_XPRESS_BLOCK_CONTENT') ,
116        'description'   => '' ,
117        'show_func'     => "b_". $mydirname . "_content_show" ,
118        'edit_func'     => "b_". $mydirname . "_content_edit" ,
119        'template'              => '' ,
120        'options'               => $mydirname. '|10|0|100||0' ,
121        'can_clone'             => true ,
122        'func_num'              => 2,
123);
124$modversion['blocks'][3] = array(
125        'file'                  => 'recent_posts_list_block.php' ,
126        'name'                  => constant('_MI_XPRESS_BLOCK_POSTS') ,
127        'description'   => '' ,
128        'show_func'     => "b_". $mydirname . "_posts_show" ,
129        'edit_func'     => "b_". $mydirname . "_posts_edit" ,
130        'options'               => $mydirname. '|10|1|7||0' ,
131        'can_clone'             => true ,
132        'func_num'              => 3,   
133);
134$modversion['blocks'][4] = array(
135        'file'                  => 'calender_block.php' ,
136        'name'                  => constant('_MI_XPRESS_BLOCK_CALENDER') ,
137        'description'   => '' ,
138        'show_func'     => "b_". $mydirname . "_calender_show" ,
139        'edit_func'     => "b_". $mydirname . "_calender_edit" ,
140        'options'               => $mydirname. '|#DB0000|#004D99' ,
141        'can_clone'             => false ,
142        'func_num'              => 4,
143);
144$modversion['blocks'][5] = array(
145        'file'                  => 'popular_posts_block.php' ,
146        'name'                  => constant('_MI_XPRESS_BLOCK_POPULAR') ,
147        'description'   => '' ,
148        'show_func'     => "b_". $mydirname . "_popular_show" ,
149        'edit_func'     => "b_". $mydirname . "_popular_edit" ,
150        'options'               => $mydirname. '|10|0||0' ,
151        'can_clone'             => true ,
152        'func_num'              => 5,   
153);
154
155// Notification
156$modversion['hasNotification'] = 1;
157$modversion['notification'] = array(
158        'lookup_file' => 'include/notification.inc.php' ,
159        'lookup_func' => "xpress_notify" ,
160        'category' => array(
161                array(
162                        'name' => 'global' ,
163                        'title' => constant('_MI_XPRESS_NOTCAT_GLOBAL') ,
164                        'description' => constant('_MI_XPRESS_NOTCAT_GLOBALDSC') ,
165                        'subscribe_from' => 'index.php' ,
166                ) ,
167                array(
168                        'name' => 'category' ,
169                        'title' => constant('_MI_XPRESS_NOTCAT_CAT') ,
170                        'description' => constant('_MI_XPRESS_NOTCAT_CATDSC') ,
171                        'subscribe_from' => 'index.php' ,
172                        'item_name' => 'cat' ,
173                        'allow_bookmark' => 1 ,
174                ) ,
175                array(
176                        'name' => 'author' ,
177                        'title' => constant('_MI_XPRESS_NOTCAT_AUTHOR') ,
178                        'description' => constant('_MI_XPRESS_NOTCAT_AUTHORDSC') ,
179                        'subscribe_from' => 'index.php' ,
180                        'item_name' => 'author' ,
181                        'allow_bookmark' => 1 ,
182                ) ,
183                array(
184                        'name' => 'post' ,
185                        'title' => constant('_MI_XPRESS_NOTCAT_POST') ,
186                        'description' => constant('_MI_XPRESS_NOTCAT_POSTDSC') ,
187                        'subscribe_from' => 'index.php' ,
188                        'item_name' => 'p' ,
189                        'allow_bookmark' => 1 ,
190                ) ,
191        ) ,
192        'event' => array(
193                array(
194                        'name' => 'waiting' ,
195                        'category' => 'global' ,
196                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITING') ,
197                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
198                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
199                        'mail_template' => 'global_waiting' ,
200                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGSBJ') ,
201                        'admin_only' => 1 ,
202                ) ,
203                array(
204                        'name' => 'newpost' ,
205                        'category' => 'global' ,
206                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOST') ,
207                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
208                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
209                        'mail_template' => 'global_newpost' ,
210                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTSBJ') ,
211                ) ,
212                array(
213                        'name' => 'comment' ,
214                        'category' => 'global' ,
215                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENT') ,
216                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
217                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
218                        'mail_template' => 'global_newcomment' ,
219                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTSBJ') ,
220                ) ,
221               
222                array(
223                        'name' => 'newpost' ,
224                        'category' => 'category' ,
225                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOST') ,
226                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
227                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
228                        'mail_template' => 'category_newpost' ,
229                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTSBJ') ,
230                ) ,
231                array(
232                        'name' => 'comment' ,
233                        'category' => 'category' ,
234                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENT') ,
235                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
236                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
237                        'mail_template' => 'category_newcomment' ,
238                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTSBJ') ,
239                ) ,
240
241                array(
242                        'name' => 'newpost' ,
243                        'category' => 'author' ,
244                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOST') ,
245                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
246                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
247                        'mail_template' => 'author_newpost' ,
248                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTSBJ') ,
249                ) ,
250                array(
251                        'name' => 'comment' ,
252                        'category' => 'author' ,
253                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENT') ,
254                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
255                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
256                        'mail_template' => 'author_newcomment' ,
257                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTSBJ') ,
258                ) ,
259
260                array(
261                        'name' => 'comment' ,
262                        'category' => 'post' ,
263                        'title' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENT') ,
264                        'caption' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
265                        'description' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
266                        'mail_template' => 'post_newcomment' ,
267                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTSBJ') ,
268                ) ,
269        ) ,
270) ;
271
272
273?>
Note: See TracBrowser for help on using the repository browser.