XPressME Integration Kit

Trac

source: trunk/xoops_version.php @ 76

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

xpressmeプラグイン側で、XOOPSグループに対する権限設定を行うためのデータベースと設定画面を追加
(まだ完全に動いてません)

File size: 7.8 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        $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'              => 'recent_comments_block.html' ,
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'              => 'recent_posts_content_block.html' ,
120        'options'               => $mydirname. '|10|0|100||0' ,
121        'can_clone'             => true ,
122        'func_num'              => 2,
123);
124
125// Notification
126$modversion['hasNotification'] = 1;
127$modversion['notification'] = array(
128        'lookup_file' => 'include/notification.inc.php' ,
129        'lookup_func' => "{$mydirname}_notify_info" ,
130        'category' => array(
131                array(
132                        'name' => 'global' ,
133                        'title' => constant('_MI_XPRESS_NOTCAT_GLOBAL') ,
134                        'description' => constant('_MI_XPRESS_NOTCAT_GLOBALDSC') ,
135                        'subscribe_from' => 'index.php' ,
136                ) ,
137                array(
138                        'name' => 'category' ,
139                        'title' => constant('_MI_XPRESS_NOTCAT_CAT') ,
140                        'description' => constant('_MI_XPRESS_NOTCAT_CATDSC') ,
141                        'subscribe_from' => 'index.php' ,
142                        'item_name' => 'cat' ,
143                        'allow_bookmark' => 1 ,
144                ) ,
145                array(
146                        'name' => 'author' ,
147                        'title' => constant('_MI_XPRESS_NOTCAT_AUTHOR') ,
148                        'description' => constant('_MI_XPRESS_NOTCAT_AUTHORDSC') ,
149                        'subscribe_from' => 'index.php' ,
150                        'item_name' => 'author' ,
151                        'allow_bookmark' => 1 ,
152                ) ,
153                array(
154                        'name' => 'post' ,
155                        'title' => constant('_MI_XPRESS_NOTCAT_POST') ,
156                        'description' => constant('_MI_XPRESS_NOTCAT_POSTDSC') ,
157                        'subscribe_from' => 'index.php' ,
158                        'item_name' => 'p' ,
159                        'allow_bookmark' => 1 ,
160                ) ,
161        ) ,
162        'event' => array(
163                array(
164                        'name' => 'waiting' ,
165                        'category' => 'global' ,
166                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITING') ,
167                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
168                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') ,
169                        'mail_template' => 'global_waiting' ,
170                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGSBJ') ,
171                        'admin_only' => 1 ,
172                ) ,
173                array(
174                        'name' => 'newpost' ,
175                        'category' => 'global' ,
176                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOST') ,
177                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
178                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') ,
179                        'mail_template' => 'global_newpost' ,
180                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTSBJ') ,
181                ) ,
182                array(
183                        'name' => 'comment' ,
184                        'category' => 'global' ,
185                        'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENT') ,
186                        'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
187                        'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') ,
188                        'mail_template' => 'global_newcomment' ,
189                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTSBJ') ,
190                ) ,
191               
192                array(
193                        'name' => 'newpost' ,
194                        'category' => 'category' ,
195                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOST') ,
196                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
197                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') ,
198                        'mail_template' => 'category_newpost' ,
199                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTSBJ') ,
200                ) ,
201                array(
202                        'name' => 'comment' ,
203                        'category' => 'category' ,
204                        'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENT') ,
205                        'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
206                        'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') ,
207                        'mail_template' => 'category_newcomment' ,
208                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTSBJ') ,
209                ) ,
210
211                array(
212                        'name' => 'newpost' ,
213                        'category' => 'author' ,
214                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOST') ,
215                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
216                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') ,
217                        'mail_template' => 'author_newpost' ,
218                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTSBJ') ,
219                ) ,
220                array(
221                        'name' => 'comment' ,
222                        'category' => 'author' ,
223                        'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENT') ,
224                        'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
225                        'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') ,
226                        'mail_template' => 'author_newcomment' ,
227                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTSBJ') ,
228                ) ,
229
230                array(
231                        'name' => 'comment' ,
232                        'category' => 'post' ,
233                        'title' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENT') ,
234                        'caption' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
235                        'description' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') ,
236                        'mail_template' => 'post_newcomment' ,
237                        'mail_subject' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTSBJ') ,
238                ) ,
239        ) ,
240) ;
241
242
243?>
Note: See TracBrowser for help on using the repository browser.