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