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://ja.xpressme.info)" |
---|
10 | * @package module::xpressme |
---|
11 | */ |
---|
12 | |
---|
13 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; |
---|
14 | |
---|
15 | if (!function_exists('wp_version_compare')){ |
---|
16 | function wp_version_compare($wp_version , $operator='==',$comp_version){ |
---|
17 | $inc_wp_version = str_replace("ME", "", $wp_version); |
---|
18 | return version_compare($inc_wp_version, $comp_version, $operator); |
---|
19 | } |
---|
20 | } |
---|
21 | |
---|
22 | if (!function_exists('mod_access_level')){ |
---|
23 | function mod_access_level(){ |
---|
24 | global $current_user; |
---|
25 | |
---|
26 | $level = @$current_user->user_level; |
---|
27 | $role = @$current_user->roles[0]; |
---|
28 | switch ($role){ |
---|
29 | case 'administrator': |
---|
30 | $role_level = 10; |
---|
31 | break; |
---|
32 | case 'editor': |
---|
33 | $role_level = 7; |
---|
34 | break; |
---|
35 | case 'author': |
---|
36 | $role_level = 2; |
---|
37 | break; |
---|
38 | case 'contributor': |
---|
39 | $role_level = 1; |
---|
40 | break; |
---|
41 | default: |
---|
42 | $role_level = 0; |
---|
43 | } |
---|
44 | |
---|
45 | if ($level > $role_level){ |
---|
46 | return $level; |
---|
47 | } else { |
---|
48 | return $role_level; |
---|
49 | } |
---|
50 | } |
---|
51 | } |
---|
52 | if (!function_exists('is_show_multi_blog_block')){ |
---|
53 | function is_show_multi_blog_block($mydirname = ''){ |
---|
54 | if(empty($mydirname)) return false; |
---|
55 | // Before loading xpressme. |
---|
56 | // The multi blog is judged by the presence of the blogs table. |
---|
57 | global $xoopsDB; |
---|
58 | $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); |
---|
59 | $wp_blogs_tbl = $xoopsDB->prefix($wp_prefix) . '_blogs'; |
---|
60 | $sql = "SHOW TABLES LIKE '$wp_blogs_tbl'"; |
---|
61 | $result = $xoopsDB->queryf($sql, 0, 0); |
---|
62 | if ($xoopsDB->getRowsNum($result)) return true; |
---|
63 | return false; |
---|
64 | } |
---|
65 | } |
---|
66 | |
---|
67 | $mydirpath = dirname(__FILE__); |
---|
68 | $mydirname = basename($mydirpath); |
---|
69 | |
---|
70 | $lang = @$GLOBALS["xoopsConfig"]['language']; |
---|
71 | |
---|
72 | // language file (modinfo.php) |
---|
73 | |
---|
74 | if( file_exists( $mydirpath .'/language/'.$lang.'/modinfo.php' ) ) { |
---|
75 | include_once $mydirpath .'/language/'.$lang.'/modinfo.php' ; |
---|
76 | } else if( file_exists( $mydirpath .'/language/english/modinfo.php' ) ) { |
---|
77 | include_once $mydirpath .'/language/english/modinfo.php' ; |
---|
78 | } |
---|
79 | global $wp_db_version,$wp_version; |
---|
80 | |
---|
81 | include $mydirpath .'/wp-includes/version.php' ; |
---|
82 | |
---|
83 | $modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XP2_NAME') ; |
---|
84 | $modversion['description'] = constant( '_MI_XP2_DESC'); |
---|
85 | $modversion['version'] = "3.00"; |
---|
86 | $modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://ja.xpressme.info) ;"; |
---|
87 | $modversion['author'] = "toemon (http://ja.xpressme.info)"; |
---|
88 | $modversion['license'] = "GPL see LICENSE"; |
---|
89 | $modversion['official'] = 0 ; |
---|
90 | $modversion['image'] = file_exists( $mydirpath.'/module_icon.png' ) ? 'module_icon.png' : 'module_icon.php' ; |
---|
91 | $modversion['iconbig'] = 'module_icon.php?file=iconbig' ; |
---|
92 | $modversion['iconsmall'] = 'module_icon.php?file=iconsmall' ; |
---|
93 | $modversion['dirname'] = $mydirname; |
---|
94 | |
---|
95 | // status |
---|
96 | $modversion['codename'] = "Alpha1"; |
---|
97 | |
---|
98 | // onInstall, onUpdate, onUninstall |
---|
99 | $modversion['onInstall'] = 'include/oninstall.php' ; |
---|
100 | $modversion['onUpdate'] = 'include/onupdate.php' ; |
---|
101 | $modversion['onUninstall'] = 'include/onuninstall.php' ; |
---|
102 | |
---|
103 | // Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin) |
---|
104 | //$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; |
---|
105 | |
---|
106 | $db_prefix = preg_replace('/wordpress/','wp',$mydirname); |
---|
107 | |
---|
108 | /* |
---|
109 | * Table information is not described. |
---|
110 | * |
---|
111 | * The create of the table is do with oninstall.php. |
---|
112 | * The drop of the table is do with onuninstall.php. |
---|
113 | * |
---|
114 | * $modversion['tables'] = array( ,,,); |
---|
115 | */ |
---|
116 | |
---|
117 | |
---|
118 | // Search |
---|
119 | $modversion['hasSearch'] = 1 ; |
---|
120 | $modversion['search']['file'] = 'include/search.php' ; |
---|
121 | $modversion['search']['func'] = $mydirname.'_global_search' ; |
---|
122 | //Admin things |
---|
123 | $modversion['hasAdmin'] = 1; |
---|
124 | $modversion['adminindex'] = "admin/index.php"; |
---|
125 | $modversion['adminmenu'] = "admin/menu.php"; |
---|
126 | |
---|
127 | $modversion['hasMain'] = 1; |
---|
128 | |
---|
129 | if (function_exists('get_bloginfo')){ |
---|
130 | //$add_url for wpmu multiblog |
---|
131 | $pattern = '/.*\/' . $mydirname . '/'; |
---|
132 | $add_url = preg_replace($pattern,'',get_bloginfo('url')); |
---|
133 | if (!empty($add_url)){ |
---|
134 | $pattern = '/^\//'; |
---|
135 | $add_url = preg_replace($pattern,'',$add_url) . '/'; |
---|
136 | } |
---|
137 | |
---|
138 | if(is_object($GLOBALS["xoopsUser"])){ |
---|
139 | global $current_user , $xoops_config; |
---|
140 | if (mod_access_level() > 0) { |
---|
141 | $modversion['sub'][1]['name'] = constant( '_MI_XP2_MENU_POST_NEW'); |
---|
142 | if (wp_version_compare($wp_version, '>=','2.1')) |
---|
143 | $modversion['sub'][1]['url'] = $add_url . "wp-admin/post-new.php"; |
---|
144 | else |
---|
145 | $modversion['sub'][1]['url'] = $add_url . "wp-admin/post.php"; |
---|
146 | $modversion['sub'][2]['name'] = constant( '_MI_XP2_MENU_EDIT'); |
---|
147 | $modversion['sub'][2]['url'] = $add_url . "wp-admin/edit.php"; |
---|
148 | $modversion['sub'][3]['name'] = constant( '_MI_XP2_MENU_ADMIN'); |
---|
149 | $modversion['sub'][3]['url'] = $add_url . "wp-admin/"; |
---|
150 | } |
---|
151 | if (mod_access_level() > 9) { |
---|
152 | $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); |
---|
153 | $modversion['sub'][4]['url'] = $add_url . "wp-admin/admin.php?page=xpressme/xpressme.php"; |
---|
154 | } |
---|
155 | if($GLOBALS["xoopsUserIsAdmin"]){ |
---|
156 | $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN'); |
---|
157 | $modversion['sub'][5]['url'] = "admin/index.php"; |
---|
158 | } |
---|
159 | if (function_exists('xpress_create_new_blog'))$create_new_blog = xpress_create_new_blog(); |
---|
160 | if(!empty($create_new_blog)){ |
---|
161 | $modversion['sub'][6]['name'] = $create_new_blog['title']; |
---|
162 | $modversion['sub'][6]['url'] = $create_new_blog['menu_url']; |
---|
163 | } |
---|
164 | if (function_exists('xpress_primary_blog_link'))$primaryw_blog = xpress_primary_blog_link(); |
---|
165 | if(!empty($primaryw_blog)){ |
---|
166 | $modversion['sub'][7]['name'] = $primaryw_blog['title']; |
---|
167 | $modversion['sub'][7]['url'] = $primaryw_blog['menu_url']; |
---|
168 | } |
---|
169 | } |
---|
170 | } |
---|
171 | |
---|
172 | // Use smarty |
---|
173 | $modversion["use_smarty"] = 1; |
---|
174 | |
---|
175 | /** |
---|
176 | * Templates |
---|
177 | */ |
---|
178 | // All Templates can't be touched by modulesadmin. |
---|
179 | $modversion['templates'] = array() ; |
---|
180 | |
---|
181 | $modversion['hasconfig'] = 1; |
---|
182 | $modversion['config'][] = array( |
---|
183 | 'name' => 'libxml_patch' , |
---|
184 | 'title' => '_MI_LIBXML_PATCH' , |
---|
185 | 'description' => '_MI_LIBXML_PATCH_DESC' , |
---|
186 | 'formtype' => 'yesno' , |
---|
187 | 'valuetype' => 'int' , |
---|
188 | 'default' => 0 , |
---|
189 | ); |
---|
190 | $modversion['config'][] = array( |
---|
191 | 'name' => 'memory_limit' , |
---|
192 | 'title' => '_MI_MEMORY_LIMIT' , |
---|
193 | 'description' => '_MI_MEMORY_LIMIT_DESC' , |
---|
194 | 'formtype' => 'textbox' , |
---|
195 | 'valuetype' => 'int' , |
---|
196 | 'default' => 64 , |
---|
197 | ); |
---|
198 | |
---|
199 | //BLOCKS |
---|
200 | $b_no =1; |
---|
201 | $modversion['blocks'][$b_no] = array( |
---|
202 | 'file' => 'recent_posts_content_block.php' , |
---|
203 | 'name' => constant('_MI_XP2_BLOCK_CONTENT') , |
---|
204 | 'description' => '' , |
---|
205 | 'show_func' => "b_". $mydirname . "_content_show" , |
---|
206 | 'edit_func' => "b_". $mydirname . "_content_edit" , |
---|
207 | 'template' => '' , |
---|
208 | 'options' => $mydirname. '||10|0|100||||0|0|0' , |
---|
209 | 'can_clone' => true , |
---|
210 | 'func_num' => $b_no, |
---|
211 | ); |
---|
212 | $b_no++; |
---|
213 | $modversion['blocks'][$b_no] = array( |
---|
214 | 'file' => 'recent_posts_list_block.php' , |
---|
215 | 'name' => constant('_MI_XP2_BLOCK_POSTS') , |
---|
216 | 'description' => '' , |
---|
217 | 'show_func' => "b_". $mydirname . "_posts_show" , |
---|
218 | 'edit_func' => "b_". $mydirname . "_posts_edit" , |
---|
219 | 'options' => $mydirname. '||10|1|7||||0' , |
---|
220 | 'can_clone' => true , |
---|
221 | 'func_num' => $b_no, |
---|
222 | ); |
---|
223 | $b_no++; |
---|
224 | $modversion['blocks'][$b_no] = array( |
---|
225 | 'file' => 'popular_posts_block.php' , |
---|
226 | 'name' => constant('_MI_XP2_BLOCK_POPULAR') , |
---|
227 | 'description' => '' , |
---|
228 | 'show_func' => "b_". $mydirname . "_popular_show" , |
---|
229 | 'edit_func' => "b_". $mydirname . "_popular_edit" , |
---|
230 | 'options' => $mydirname. '||10|0||||0' , |
---|
231 | 'can_clone' => true , |
---|
232 | 'func_num' => $b_no, |
---|
233 | ); |
---|
234 | $b_no++; |
---|
235 | $modversion['blocks'][$b_no] = array( |
---|
236 | 'file' => 'page_block.php' , |
---|
237 | 'name' => constant('_MI_XP2_BLOCK_PAGE') , |
---|
238 | 'description' => '' , |
---|
239 | 'show_func' => "b_". $mydirname . "_page_show" , |
---|
240 | 'edit_func' => "b_". $mydirname . "_page_edit" , |
---|
241 | 'options' => $mydirname. '||post_title|asc||||0|0|none||1||' , |
---|
242 | 'can_clone' => true , |
---|
243 | 'func_num' => $b_no, |
---|
244 | ); |
---|
245 | $b_no++; |
---|
246 | $modversion['blocks'][$b_no] = array( |
---|
247 | 'file' => 'recent_comments_block.php' , |
---|
248 | 'name' => constant('_MI_XP2_BLOCK_COMMENTS') , |
---|
249 | 'description' => '' , |
---|
250 | 'show_func' => "b_". $mydirname . "_comments_show" , |
---|
251 | 'edit_func' => "b_". $mydirname . "_comments_edit" , |
---|
252 | 'template' => '' , |
---|
253 | 'options' => $mydirname. '||10|30|||0' , |
---|
254 | 'can_clone' => true , |
---|
255 | 'func_num' => $b_no, |
---|
256 | ); |
---|
257 | $b_no++; |
---|
258 | $modversion['blocks'][$b_no] = array( |
---|
259 | 'file' => 'sidebar_block.php' , |
---|
260 | 'name' => constant('_MI_XP2_BLOCK_SIDEBAR') , |
---|
261 | 'description' => '' , |
---|
262 | 'show_func' => "b_". $mydirname . "_sidebar_show" , |
---|
263 | 'edit_func' => '' , |
---|
264 | 'options' => '' , |
---|
265 | 'can_clone' => false , |
---|
266 | 'func_num' => $b_no, |
---|
267 | ); |
---|
268 | $b_no++; |
---|
269 | $modversion['blocks'][$b_no] = array( |
---|
270 | 'file' => 'search_block.php' , |
---|
271 | 'name' => constant('_MI_XP2_BLOCK_SEARCH') , |
---|
272 | 'description' => '' , |
---|
273 | 'show_func' => "b_". $mydirname . "_search_show" , |
---|
274 | 'edit_func' => "b_". $mydirname . "_search_edit" , |
---|
275 | 'options' => $mydirname. '||18' , |
---|
276 | 'can_clone' => false , |
---|
277 | 'func_num' => $b_no , |
---|
278 | ); |
---|
279 | $b_no++; |
---|
280 | $modversion['blocks'][$b_no] = array( |
---|
281 | 'file' => 'calender_block.php' , |
---|
282 | 'name' => constant('_MI_XP2_BLOCK_CALENDER') , |
---|
283 | 'description' => '' , |
---|
284 | 'show_func' => "b_". $mydirname . "_calender_show" , |
---|
285 | 'edit_func' => "b_". $mydirname . "_calender_edit" , |
---|
286 | 'options' => $mydirname. '||#DB0000|#004D99' , |
---|
287 | 'can_clone' => false , |
---|
288 | 'func_num' => $b_no, |
---|
289 | ); |
---|
290 | $b_no++; |
---|
291 | $modversion['blocks'][$b_no] = array( |
---|
292 | 'file' => 'archives_block.php' , |
---|
293 | 'name' => constant('_MI_XP2_BLOCK_ARCHIVE') , |
---|
294 | 'description' => '' , |
---|
295 | 'show_func' => "b_". $mydirname . "_archives_show" , |
---|
296 | 'edit_func' => "b_". $mydirname . "_archives_edit" , |
---|
297 | 'options' => $mydirname. '||monthly|0|1|0' , |
---|
298 | 'can_clone' => true , |
---|
299 | 'func_num' => $b_no, |
---|
300 | ); |
---|
301 | $b_no++; |
---|
302 | $modversion['blocks'][$b_no] = array( |
---|
303 | 'file' => 'authors_block.php' , |
---|
304 | 'name' => constant('_MI_XP2_BLOCK_AUTHORS') , |
---|
305 | 'description' => '' , |
---|
306 | 'show_func' => "b_". $mydirname . "_authors_show" , |
---|
307 | 'edit_func' => "b_". $mydirname . "_authors_edit" , |
---|
308 | 'options' => $mydirname. '||0|1|0|1' , |
---|
309 | 'can_clone' => false , |
---|
310 | 'func_num' => $b_no, |
---|
311 | ); |
---|
312 | if (wp_version_compare($wp_version, '>=','2.3')){ |
---|
313 | $b_no++; |
---|
314 | $modversion['blocks'][$b_no] = array( |
---|
315 | 'file' => 'tag_cloud_block.php' , |
---|
316 | 'name' => constant('_MI_XP2_BLOCK_TAG') , |
---|
317 | 'description' => '' , |
---|
318 | 'show_func' => "b_". $mydirname . "_tag_cloud_show" , |
---|
319 | 'edit_func' => "b_". $mydirname . "_tag_cloud_edit" , |
---|
320 | 'options' => $mydirname. '||8|22|pt|45|flat|name|ASC||' , |
---|
321 | 'can_clone' => false , |
---|
322 | 'func_num' => $b_no, |
---|
323 | ); |
---|
324 | } |
---|
325 | $b_no++; |
---|
326 | $modversion['blocks'][$b_no] = array( |
---|
327 | 'file' => 'category_block.php' , |
---|
328 | 'name' => constant('_MI_XP2_BLOCK_CATEGORY') , |
---|
329 | 'description' => '' , |
---|
330 | 'show_func' => "b_". $mydirname . "_category_show" , |
---|
331 | 'edit_func' => "b_". $mydirname . "_category_edit" , |
---|
332 | 'options' => $mydirname. '||ALL|name|ASC|0|0|1|1|||1|0' , |
---|
333 | 'can_clone' => false , |
---|
334 | 'func_num' => $b_no, |
---|
335 | ); |
---|
336 | $b_no++; |
---|
337 | $modversion['blocks'][$b_no] = array( |
---|
338 | 'file' => 'meta_block.php' , |
---|
339 | 'name' => constant('_MI_XP2_BLOCK_META') , |
---|
340 | 'description' => '' , |
---|
341 | 'show_func' => "b_". $mydirname . "_meta_show" , |
---|
342 | 'edit_func' => "b_". $mydirname . "_meta_edit" , |
---|
343 | 'options' => $mydirname. '||1|1|1|1|1|1|1|1' , |
---|
344 | 'can_clone' => false , |
---|
345 | 'func_num' => $b_no, |
---|
346 | ); |
---|
347 | if (wp_version_compare($wp_version, '>=','2.7')){ |
---|
348 | $b_no++; |
---|
349 | $modversion['blocks'][$b_no] = array( |
---|
350 | 'file' => 'widget_block.php' , |
---|
351 | 'name' => constant('_MI_XP2_BLOCK_WIDGET') , |
---|
352 | 'description' => '' , |
---|
353 | 'show_func' => "b_". $mydirname . "_widget_show" , |
---|
354 | 'edit_func' => "b_". $mydirname . "_widget_edit" , |
---|
355 | 'options' => $mydirname. '||1|' , |
---|
356 | 'can_clone' => true , |
---|
357 | 'func_num' => $b_no, |
---|
358 | ); |
---|
359 | } |
---|
360 | $b_no++; |
---|
361 | $modversion['blocks'][$b_no] = array( |
---|
362 | 'file' => 'enhanced_block.php' , |
---|
363 | 'name' => constant('_MI_XP2_BLOCK_ENHANCED') , |
---|
364 | 'description' => '' , |
---|
365 | 'show_func' => "b_". $mydirname . "_enhanced_show" , |
---|
366 | 'edit_func' => "b_". $mydirname . "_enhanced_edit" , |
---|
367 | 'options' => $mydirname. '||' , |
---|
368 | 'can_clone' => true , |
---|
369 | 'func_num' => $b_no, |
---|
370 | ); |
---|
371 | if (wp_version_compare($wp_version, '>=','3.0-alpha') && is_show_multi_blog_block($mydirname)){ |
---|
372 | $b_no++; |
---|
373 | $modversion['blocks'][$b_no] = array( |
---|
374 | 'file' => 'blog_list_block.php' , |
---|
375 | 'name' => constant('_MI_XP2_BLOCK_BLOG_LIST') , |
---|
376 | 'description' => '' , |
---|
377 | 'show_func' => "b_". $mydirname . "_blog_list_show" , |
---|
378 | 'edit_func' => "b_". $mydirname . "_blog_list_edit" , |
---|
379 | 'options' => $mydirname. '||name|ASC' , |
---|
380 | 'can_clone' => false , |
---|
381 | 'func_num' => $b_no, |
---|
382 | ); |
---|
383 | $b_no++; |
---|
384 | $modversion['blocks'][$b_no] = array( |
---|
385 | 'file' => 'global_recent_posts_list_block.php' , |
---|
386 | 'name' => constant('_MI_XP2_BLOCK_GLOBAL_POSTS') , |
---|
387 | 'description' => '' , |
---|
388 | 'show_func' => "b_". $mydirname . "_global_posts_show" , |
---|
389 | 'edit_func' => "b_". $mydirname . "_global_posts_edit" , |
---|
390 | 'options' => $mydirname. '||10|1|7||' , |
---|
391 | 'can_clone' => true , |
---|
392 | 'func_num' => $b_no, |
---|
393 | ); |
---|
394 | $b_no++; |
---|
395 | $modversion['blocks'][$b_no] = array( |
---|
396 | 'file' => 'global_recent_comments_block.php' , |
---|
397 | 'name' => constant('_MI_XP2_BLOCK_GLOBAL_COMM') , |
---|
398 | 'description' => '' , |
---|
399 | 'show_func' => "b_". $mydirname . "_global_comments_show" , |
---|
400 | 'edit_func' => "b_". $mydirname . "_global_comments_edit" , |
---|
401 | 'template' => '' , |
---|
402 | 'options' => $mydirname. '||10|30|||0' , |
---|
403 | 'can_clone' => true , |
---|
404 | 'func_num' => $b_no, |
---|
405 | ); |
---|
406 | $b_no++; |
---|
407 | $modversion['blocks'][$b_no] = array( |
---|
408 | 'file' => 'global_popular_posts_block.php' , |
---|
409 | 'name' => constant('_MI_XP2_BLOCK_GLOBAL_POPU') , |
---|
410 | 'description' => '' , |
---|
411 | 'show_func' => "b_". $mydirname . "_global_popular_show" , |
---|
412 | 'edit_func' => "b_". $mydirname . "_global_popular_edit" , |
---|
413 | 'options' => $mydirname. '||10|0||' , |
---|
414 | 'can_clone' => true , |
---|
415 | 'func_num' => $b_no, |
---|
416 | ); |
---|
417 | } |
---|
418 | |
---|
419 | // Notification |
---|
420 | $modversion['hasNotification'] = 1; |
---|
421 | $modversion['notification'] = array( |
---|
422 | 'lookup_file' => 'include/notification.inc.php' , |
---|
423 | 'lookup_func' => "xpress_notify" , |
---|
424 | 'category' => array( |
---|
425 | array( |
---|
426 | 'name' => 'global' , |
---|
427 | 'title' => constant('_MI_XP2_NOTCAT_GLOBAL') , |
---|
428 | 'description' => constant('_MI_XP2_NOTCAT_GLOBALDSC') , |
---|
429 | 'subscribe_from' => 'index.php' , |
---|
430 | ) , |
---|
431 | array( |
---|
432 | 'name' => 'category' , |
---|
433 | 'title' => constant('_MI_XP2_NOTCAT_CAT') , |
---|
434 | 'description' => constant('_MI_XP2_NOTCAT_CATDSC') , |
---|
435 | 'subscribe_from' => 'index.php' , |
---|
436 | 'item_name' => 'cat' , |
---|
437 | 'allow_bookmark' => 1 , |
---|
438 | ) , |
---|
439 | array( |
---|
440 | 'name' => 'author' , |
---|
441 | 'title' => constant('_MI_XP2_NOTCAT_AUTHOR') , |
---|
442 | 'description' => constant('_MI_XP2_NOTCAT_AUTHORDSC') , |
---|
443 | 'subscribe_from' => 'index.php' , |
---|
444 | 'item_name' => 'author' , |
---|
445 | 'allow_bookmark' => 1 , |
---|
446 | ) , |
---|
447 | array( |
---|
448 | 'name' => 'post' , |
---|
449 | 'title' => constant('_MI_XP2_NOTCAT_POST') , |
---|
450 | 'description' => constant('_MI_XP2_NOTCAT_POSTDSC') , |
---|
451 | 'subscribe_from' => 'index.php' , |
---|
452 | 'item_name' => 'p' , |
---|
453 | 'allow_bookmark' => 1 , |
---|
454 | ) , |
---|
455 | ) , |
---|
456 | 'event' => array( |
---|
457 | array( |
---|
458 | 'name' => 'waiting' , |
---|
459 | 'category' => 'global' , |
---|
460 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITING') , |
---|
461 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
462 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
463 | 'mail_template' => 'global_waiting' , |
---|
464 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGSBJ') , |
---|
465 | 'admin_only' => 1 , |
---|
466 | ) , |
---|
467 | array( |
---|
468 | 'name' => 'newpost' , |
---|
469 | 'category' => 'global' , |
---|
470 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOST') , |
---|
471 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
472 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
473 | 'mail_template' => 'global_newpost' , |
---|
474 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTSBJ') , |
---|
475 | ) , |
---|
476 | array( |
---|
477 | 'name' => 'comment' , |
---|
478 | 'category' => 'global' , |
---|
479 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENT') , |
---|
480 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
481 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
482 | 'mail_template' => 'global_newcomment' , |
---|
483 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTSBJ') , |
---|
484 | ) , |
---|
485 | |
---|
486 | array( |
---|
487 | 'name' => 'newpost' , |
---|
488 | 'category' => 'category' , |
---|
489 | 'title' => constant('_MI_XP2_NOTIFY_CAT_NEWPOST') , |
---|
490 | 'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') , |
---|
491 | 'description' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') , |
---|
492 | 'mail_template' => 'category_newpost' , |
---|
493 | 'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTSBJ') , |
---|
494 | ) , |
---|
495 | array( |
---|
496 | 'name' => 'comment' , |
---|
497 | 'category' => 'category' , |
---|
498 | 'title' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENT') , |
---|
499 | 'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
500 | 'description' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
501 | 'mail_template' => 'category_newcomment' , |
---|
502 | 'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTSBJ') , |
---|
503 | ) , |
---|
504 | |
---|
505 | array( |
---|
506 | 'name' => 'newpost' , |
---|
507 | 'category' => 'author' , |
---|
508 | 'title' => constant('_MI_XP2_NOTIFY_AUT_NEWPOST') , |
---|
509 | 'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') , |
---|
510 | 'description' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') , |
---|
511 | 'mail_template' => 'author_newpost' , |
---|
512 | 'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTSBJ') , |
---|
513 | ) , |
---|
514 | array( |
---|
515 | 'name' => 'comment' , |
---|
516 | 'category' => 'author' , |
---|
517 | 'title' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENT') , |
---|
518 | 'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
519 | 'description' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
520 | 'mail_template' => 'author_newcomment' , |
---|
521 | 'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTSBJ') , |
---|
522 | ) , |
---|
523 | |
---|
524 | array( |
---|
525 | 'name' => 'comment' , |
---|
526 | 'category' => 'post' , |
---|
527 | 'title' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENT') , |
---|
528 | 'caption' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
529 | 'description' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
530 | 'mail_template' => 'post_newcomment' , |
---|
531 | 'mail_subject' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTSBJ') , |
---|
532 | ) , |
---|
533 | ) , |
---|
534 | ) ; |
---|
535 | |
---|
536 | |
---|
537 | ?> |
---|