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