XPressME Integration Kit

Trac

source: trunk/xoops_version.php @ 110

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

アーカイブブロック、投稿者ブロックの実装。
テンプレートのusage修正

File size: 9.4 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$modversion['blocks'][6] = array(
155        'file'                  => 'archives_block.php' ,
156        'name'                  => constant('_MI_XPRESS_BLOCK_ARCHIVE') ,
157        'description'   => '' ,
158        'show_func'     => "b_". $mydirname . "_archives_show" ,
159        'edit_func'     => "b_". $mydirname . "_archives_edit" ,
160        'options'               => $mydirname. '|1|10|1|0' ,
161        'can_clone'             => false ,
162        'func_num'              => 6,   
163);
164$modversion['blocks'][7] = array(
165        'file'                  => 'authors_block.php' ,
166        'name'                  => constant('_MI_XPRESS_BLOCK_AUTHORS') ,
167        'description'   => '' ,
168        'show_func'     => "b_". $mydirname . "_authors_show" ,
169        'edit_func'     => "b_". $mydirname . "_authors_edit" ,
170        'options'               => $mydirname. '|0|1|0|1' ,
171        'can_clone'             => false ,
172        'func_num'              => 7,   
173);
174
175// Notification
176$modversion['hasNotification'] = 1;
177$modversion['notification'] = array(
178        'lookup_file' => 'include/notification.inc.php' ,
179        'lookup_func' => "xpress_notify" ,
180        'category' => array(
181                array(
182                        'name' => 'global' ,
183                        'title' => constant('_MI_XPRESS_NOTCAT_GLOBAL') ,
184                        'description' => constant('_MI_XPRESS_NOTCAT_GLOBALDSC') ,
185                        'subscribe_from' => 'index.php' ,
186                ) ,
187                array(
188                        'name' => 'category' ,
189                        'title' => constant('_MI_XPRESS_NOTCAT_CAT') ,
190                        'description' => constant('_MI_XPRESS_NOTCAT_CATDSC') ,
191                        'subscribe_from' => 'index.php' ,
192                        'item_name' => 'cat' ,
193                        'allow_bookmark' => 1 ,
194                ) ,
195                array(
196                        'name' => 'author' ,
197                        'title' => constant('_MI_XPRESS_NOTCAT_AUTHOR') ,
198                        'description' => constant('_MI_XPRESS_NOTCAT_AUTHORDSC') ,
199                        'subscribe_from' => 'index.php' ,
200                        'item_name' => 'author' ,
201                        'allow_bookmark' => 1 ,
202                ) ,
203                array(
204                        'name' => 'post' ,
205                        'title' => constant('_MI_XPRESS_NOTCAT_POST') ,
206                        'description' => constant('_MI_XPRESS_NOTCAT_POSTDSC') ,
207                        'subscribe_from' => 'index.php' ,
208                        'item_name' => 'p' ,
209                        'allow_bookmark' => 1 ,
210                ) ,
211        ) ,
212        'event' => array(
213                array(
214                        'name' => 'waiting' ,
215                        'category' => 'global' ,
216                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITING') ,
217                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
218                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
219                        'mail_template' => 'global_waiting' ,
220                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGSBJ') ,
221                        'admin_only' => 1 ,
222                ) ,
223                array(
224                        'name' => 'newpost' ,
225                        'category' => 'global' ,
226                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOST') ,
227                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
228                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
229                        'mail_template' => 'global_newpost' ,
230                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTSBJ') ,
231                ) ,
232                array(
233                        'name' => 'comment' ,
234                        'category' => 'global' ,
235                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENT') ,
236                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
237                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
238                        'mail_template' => 'global_newcomment' ,
239                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTSBJ') ,
240                ) ,
241               
242                array(
243                        'name' => 'newpost' ,
244                        'category' => 'category' ,
245                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOST') ,
246                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
247                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
248                        'mail_template' => 'category_newpost' ,
249                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTSBJ') ,
250                ) ,
251                array(
252                        'name' => 'comment' ,
253                        'category' => 'category' ,
254                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENT') ,
255                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
256                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
257                        'mail_template' => 'category_newcomment' ,
258                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTSBJ') ,
259                ) ,
260
261                array(
262                        'name' => 'newpost' ,
263                        'category' => 'author' ,
264                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOST') ,
265                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
266                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
267                        'mail_template' => 'author_newpost' ,
268                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTSBJ') ,
269                ) ,
270                array(
271                        'name' => 'comment' ,
272                        'category' => 'author' ,
273                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENT') ,
274                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
275                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
276                        'mail_template' => 'author_newcomment' ,
277                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTSBJ') ,
278                ) ,
279
280                array(
281                        'name' => 'comment' ,
282                        'category' => 'post' ,
283                        'title' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENT') ,
284                        'caption' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
285                        'description' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
286                        'mail_template' => 'post_newcomment' ,
287                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTSBJ') ,
288                ) ,
289        ) ,
290) ;
291
292
293?>
Note: See TracBrowser for help on using the repository browser.