[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')){ |
---|
[604] | 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 | } |
---|
[527] | 50 | } |
---|
| 51 | } |
---|
[589] | 52 | if (!function_exists('is_show_multi_blog_block')){ |
---|
[604] | 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'; |
---|
[687] | 60 | $sql = "SHOW TABLES LIKE '$wp_blogs_tbl'"; |
---|
| 61 | $result = $xoopsDB->queryf($sql, 0, 0); |
---|
[604] | 62 | if ($xoopsDB->getRowsNum($result)) return true; |
---|
| 63 | return false; |
---|
| 64 | } |
---|
[589] | 65 | } |
---|
[527] | 66 | |
---|
[1] | 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 | |
---|
[183] | 83 | $modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XP2_NAME') ; |
---|
| 84 | $modversion['description'] = constant( '_MI_XP2_DESC'); |
---|
[684] | 85 | $modversion['version'] = "2.38"; |
---|
[193] | 86 | $modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://ja.xpressme.info) ;"; |
---|
| 87 | $modversion['author'] = "toemon (http://ja.xpressme.info)"; |
---|
[1] | 88 | $modversion['license'] = "GPL see LICENSE"; |
---|
[30] | 89 | $modversion['official'] = 0 ; |
---|
[1] | 90 | $modversion['image'] = 'module_icon.php' ; |
---|
| 91 | $modversion['dirname'] = $mydirname; |
---|
| 92 | |
---|
| 93 | // status |
---|
[678] | 94 | $modversion['codename'] = ""; |
---|
[1] | 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 | |
---|
[583] | 104 | $db_prefix = preg_replace('/wordpress/','wp',$mydirname); |
---|
[122] | 105 | |
---|
[188] | 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 | */ |
---|
[1] | 114 | |
---|
[527] | 115 | |
---|
[1] | 116 | // Search |
---|
[30] | 117 | $modversion['hasSearch'] = 1 ; |
---|
| 118 | $modversion['search']['file'] = 'include/search.php' ; |
---|
| 119 | $modversion['search']['func'] = $mydirname.'_global_search' ; |
---|
[1] | 120 | //Admin things |
---|
[61] | 121 | $modversion['hasAdmin'] = 1; |
---|
| 122 | $modversion['adminindex'] = "admin/index.php"; |
---|
| 123 | $modversion['adminmenu'] = "admin/menu.php"; |
---|
[1] | 124 | |
---|
| 125 | $modversion['hasMain'] = 1; |
---|
[162] | 126 | |
---|
[401] | 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 | } |
---|
[162] | 135 | |
---|
[401] | 136 | if(is_object($GLOBALS["xoopsUser"])){ |
---|
| 137 | global $current_user , $xoops_config; |
---|
[527] | 138 | if (mod_access_level() > 0) { |
---|
[401] | 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 | } |
---|
[527] | 149 | if (mod_access_level() > 9) { |
---|
[401] | 150 | $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); |
---|
[647] | 151 | $modversion['sub'][4]['url'] = $add_url . "wp-admin/admin.php?page=xpressme/xpressme.php"; |
---|
[401] | 152 | } |
---|
| 153 | if($GLOBALS["xoopsUserIsAdmin"]){ |
---|
| 154 | $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN'); |
---|
| 155 | $modversion['sub'][5]['url'] = "admin/index.php"; |
---|
| 156 | } |
---|
[628] | 157 | if (function_exists('xpress_create_new_blog'))$create_new_blog = xpress_create_new_blog(); |
---|
[542] | 158 | if(!empty($create_new_blog)){ |
---|
| 159 | $modversion['sub'][6]['name'] = $create_new_blog['title']; |
---|
[546] | 160 | $modversion['sub'][6]['url'] = $create_new_blog['menu_url']; |
---|
[542] | 161 | } |
---|
[628] | 162 | if (function_exists('xpress_primary_blog_link'))$primaryw_blog = xpress_primary_blog_link(); |
---|
[546] | 163 | if(!empty($primaryw_blog)){ |
---|
[565] | 164 | $modversion['sub'][7]['name'] = $primaryw_blog['title']; |
---|
| 165 | $modversion['sub'][7]['url'] = $primaryw_blog['menu_url']; |
---|
[546] | 166 | } |
---|
[162] | 167 | } |
---|
[1] | 168 | } |
---|
| 169 | |
---|
| 170 | // Use smarty |
---|
[61] | 171 | $modversion["use_smarty"] = 1; |
---|
[1] | 172 | |
---|
| 173 | /** |
---|
| 174 | * Templates |
---|
| 175 | */ |
---|
[35] | 176 | // All Templates can't be touched by modulesadmin. |
---|
| 177 | $modversion['templates'] = array() ; |
---|
[1] | 178 | |
---|
[387] | 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 | ); |
---|
[491] | 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 | ); |
---|
[35] | 196 | |
---|
| 197 | //BLOCKS |
---|
[118] | 198 | $b_no =1; |
---|
| 199 | $modversion['blocks'][$b_no] = array( |
---|
[54] | 200 | 'file' => 'recent_posts_content_block.php' , |
---|
[183] | 201 | 'name' => constant('_MI_XP2_BLOCK_CONTENT') , |
---|
[54] | 202 | 'description' => '' , |
---|
| 203 | 'show_func' => "b_". $mydirname . "_content_show" , |
---|
| 204 | 'edit_func' => "b_". $mydirname . "_content_edit" , |
---|
[89] | 205 | 'template' => '' , |
---|
[435] | 206 | 'options' => $mydirname. '||10|0|100||||0|0|0' , |
---|
[54] | 207 | 'can_clone' => true , |
---|
[118] | 208 | 'func_num' => $b_no, |
---|
[54] | 209 | ); |
---|
[118] | 210 | $b_no++; |
---|
| 211 | $modversion['blocks'][$b_no] = array( |
---|
[100] | 212 | 'file' => 'recent_posts_list_block.php' , |
---|
[183] | 213 | 'name' => constant('_MI_XP2_BLOCK_POSTS') , |
---|
[100] | 214 | 'description' => '' , |
---|
| 215 | 'show_func' => "b_". $mydirname . "_posts_show" , |
---|
| 216 | 'edit_func' => "b_". $mydirname . "_posts_edit" , |
---|
[142] | 217 | 'options' => $mydirname. '||10|1|7||||0' , |
---|
[100] | 218 | 'can_clone' => true , |
---|
[118] | 219 | 'func_num' => $b_no, |
---|
[100] | 220 | ); |
---|
[118] | 221 | $b_no++; |
---|
| 222 | $modversion['blocks'][$b_no] = array( |
---|
[109] | 223 | 'file' => 'popular_posts_block.php' , |
---|
[183] | 224 | 'name' => constant('_MI_XP2_BLOCK_POPULAR') , |
---|
[109] | 225 | 'description' => '' , |
---|
| 226 | 'show_func' => "b_". $mydirname . "_popular_show" , |
---|
| 227 | 'edit_func' => "b_". $mydirname . "_popular_edit" , |
---|
[142] | 228 | 'options' => $mydirname. '||10|0||||0' , |
---|
[109] | 229 | 'can_clone' => true , |
---|
[118] | 230 | 'func_num' => $b_no, |
---|
[109] | 231 | ); |
---|
[118] | 232 | $b_no++; |
---|
| 233 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 234 | 'file' => 'page_block.php' , |
---|
[183] | 235 | 'name' => constant('_MI_XP2_BLOCK_PAGE') , |
---|
[110] | 236 | 'description' => '' , |
---|
[142] | 237 | 'show_func' => "b_". $mydirname . "_page_show" , |
---|
| 238 | 'edit_func' => "b_". $mydirname . "_page_edit" , |
---|
[205] | 239 | 'options' => $mydirname. '||post_title|asc||||0|0|none||1||' , |
---|
[125] | 240 | 'can_clone' => true , |
---|
[142] | 241 | 'func_num' => $b_no, |
---|
[110] | 242 | ); |
---|
[118] | 243 | $b_no++; |
---|
| 244 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 245 | 'file' => 'recent_comments_block.php' , |
---|
[183] | 246 | 'name' => constant('_MI_XP2_BLOCK_COMMENTS') , |
---|
[110] | 247 | 'description' => '' , |
---|
[142] | 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 , |
---|
[118] | 253 | 'func_num' => $b_no, |
---|
[110] | 254 | ); |
---|
[118] | 255 | $b_no++; |
---|
| 256 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 257 | 'file' => 'sidebar_block.php' , |
---|
[183] | 258 | 'name' => constant('_MI_XP2_BLOCK_SIDEBAR') , |
---|
[118] | 259 | 'description' => '' , |
---|
[142] | 260 | 'show_func' => "b_". $mydirname . "_sidebar_show" , |
---|
| 261 | 'edit_func' => '' , |
---|
| 262 | 'options' => '' , |
---|
| 263 | 'can_clone' => false , |
---|
| 264 | 'func_num' => $b_no, |
---|
[118] | 265 | ); |
---|
[119] | 266 | $b_no++; |
---|
| 267 | $modversion['blocks'][$b_no] = array( |
---|
| 268 | 'file' => 'search_block.php' , |
---|
[183] | 269 | 'name' => constant('_MI_XP2_BLOCK_SEARCH') , |
---|
[119] | 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 | ); |
---|
[122] | 277 | $b_no++; |
---|
| 278 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 279 | 'file' => 'calender_block.php' , |
---|
[183] | 280 | 'name' => constant('_MI_XP2_BLOCK_CALENDER') , |
---|
[142] | 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' , |
---|
[183] | 291 | 'name' => constant('_MI_XP2_BLOCK_ARCHIVE') , |
---|
[142] | 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' , |
---|
[183] | 302 | 'name' => constant('_MI_XP2_BLOCK_AUTHORS') , |
---|
[142] | 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 | ); |
---|
[365] | 310 | if (wp_version_compare($wp_version, '>=','2.3')){ |
---|
[501] | 311 | $b_no++; |
---|
[365] | 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 | } |
---|
[122] | 323 | $b_no++; |
---|
| 324 | $modversion['blocks'][$b_no] = array( |
---|
| 325 | 'file' => 'category_block.php' , |
---|
[183] | 326 | 'name' => constant('_MI_XP2_BLOCK_CATEGORY') , |
---|
[122] | 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' , |
---|
[183] | 337 | 'name' => constant('_MI_XP2_BLOCK_META') , |
---|
[122] | 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 | ); |
---|
[365] | 345 | if (wp_version_compare($wp_version, '>=','2.7')){ |
---|
[501] | 346 | $b_no++; |
---|
[365] | 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" , |
---|
[438] | 353 | 'options' => $mydirname. '||1|' , |
---|
[365] | 354 | 'can_clone' => true , |
---|
| 355 | 'func_num' => $b_no, |
---|
| 356 | ); |
---|
| 357 | } |
---|
[138] | 358 | $b_no++; |
---|
| 359 | $modversion['blocks'][$b_no] = array( |
---|
| 360 | 'file' => 'enhanced_block.php' , |
---|
[183] | 361 | 'name' => constant('_MI_XP2_BLOCK_ENHANCED') , |
---|
[138] | 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 | ); |
---|
[589] | 369 | if (wp_version_compare($wp_version, '>=','3.0-alpha') && is_show_multi_blog_block($mydirname)){ |
---|
[533] | 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 | ); |
---|
[536] | 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||' , |
---|
| 389 | 'can_clone' => true , |
---|
| 390 | 'func_num' => $b_no, |
---|
| 391 | ); |
---|
[543] | 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 | ); |
---|
[552] | 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 | ); |
---|
[533] | 415 | } |
---|
[122] | 416 | |
---|
[61] | 417 | // Notification |
---|
| 418 | $modversion['hasNotification'] = 1; |
---|
| 419 | $modversion['notification'] = array( |
---|
| 420 | 'lookup_file' => 'include/notification.inc.php' , |
---|
[95] | 421 | 'lookup_func' => "xpress_notify" , |
---|
[61] | 422 | 'category' => array( |
---|
| 423 | array( |
---|
| 424 | 'name' => 'global' , |
---|
[183] | 425 | 'title' => constant('_MI_XP2_NOTCAT_GLOBAL') , |
---|
| 426 | 'description' => constant('_MI_XP2_NOTCAT_GLOBALDSC') , |
---|
[61] | 427 | 'subscribe_from' => 'index.php' , |
---|
| 428 | ) , |
---|
| 429 | array( |
---|
| 430 | 'name' => 'category' , |
---|
[183] | 431 | 'title' => constant('_MI_XP2_NOTCAT_CAT') , |
---|
| 432 | 'description' => constant('_MI_XP2_NOTCAT_CATDSC') , |
---|
[61] | 433 | 'subscribe_from' => 'index.php' , |
---|
| 434 | 'item_name' => 'cat' , |
---|
| 435 | 'allow_bookmark' => 1 , |
---|
| 436 | ) , |
---|
| 437 | array( |
---|
| 438 | 'name' => 'author' , |
---|
[183] | 439 | 'title' => constant('_MI_XP2_NOTCAT_AUTHOR') , |
---|
| 440 | 'description' => constant('_MI_XP2_NOTCAT_AUTHORDSC') , |
---|
[61] | 441 | 'subscribe_from' => 'index.php' , |
---|
| 442 | 'item_name' => 'author' , |
---|
| 443 | 'allow_bookmark' => 1 , |
---|
| 444 | ) , |
---|
| 445 | array( |
---|
| 446 | 'name' => 'post' , |
---|
[183] | 447 | 'title' => constant('_MI_XP2_NOTCAT_POST') , |
---|
| 448 | 'description' => constant('_MI_XP2_NOTCAT_POSTDSC') , |
---|
[61] | 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' , |
---|
[183] | 458 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITING') , |
---|
| 459 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
| 460 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
[61] | 461 | 'mail_template' => 'global_waiting' , |
---|
[183] | 462 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGSBJ') , |
---|
[61] | 463 | 'admin_only' => 1 , |
---|
| 464 | ) , |
---|
| 465 | array( |
---|
| 466 | 'name' => 'newpost' , |
---|
| 467 | 'category' => 'global' , |
---|
[183] | 468 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOST') , |
---|
| 469 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
| 470 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
[61] | 471 | 'mail_template' => 'global_newpost' , |
---|
[183] | 472 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTSBJ') , |
---|
[61] | 473 | ) , |
---|
| 474 | array( |
---|
| 475 | 'name' => 'comment' , |
---|
| 476 | 'category' => 'global' , |
---|
[183] | 477 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENT') , |
---|
| 478 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
| 479 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
[61] | 480 | 'mail_template' => 'global_newcomment' , |
---|
[183] | 481 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTSBJ') , |
---|
[61] | 482 | ) , |
---|
| 483 | |
---|
| 484 | array( |
---|
| 485 | 'name' => 'newpost' , |
---|
| 486 | 'category' => 'category' , |
---|
[183] | 487 | 'title' => constant('_MI_XP2_NOTIFY_CAT_NEWPOST') , |
---|
| 488 | 'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') , |
---|
| 489 | 'description' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') , |
---|
[61] | 490 | 'mail_template' => 'category_newpost' , |
---|
[183] | 491 | 'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTSBJ') , |
---|
[61] | 492 | ) , |
---|
| 493 | array( |
---|
| 494 | 'name' => 'comment' , |
---|
| 495 | 'category' => 'category' , |
---|
[183] | 496 | 'title' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENT') , |
---|
| 497 | 'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
| 498 | 'description' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
[61] | 499 | 'mail_template' => 'category_newcomment' , |
---|
[183] | 500 | 'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTSBJ') , |
---|
[61] | 501 | ) , |
---|
| 502 | |
---|
| 503 | array( |
---|
| 504 | 'name' => 'newpost' , |
---|
| 505 | 'category' => 'author' , |
---|
[183] | 506 | 'title' => constant('_MI_XP2_NOTIFY_AUT_NEWPOST') , |
---|
| 507 | 'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') , |
---|
| 508 | 'description' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') , |
---|
[61] | 509 | 'mail_template' => 'author_newpost' , |
---|
[183] | 510 | 'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTSBJ') , |
---|
[61] | 511 | ) , |
---|
| 512 | array( |
---|
| 513 | 'name' => 'comment' , |
---|
| 514 | 'category' => 'author' , |
---|
[183] | 515 | 'title' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENT') , |
---|
| 516 | 'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
| 517 | 'description' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
[61] | 518 | 'mail_template' => 'author_newcomment' , |
---|
[183] | 519 | 'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTSBJ') , |
---|
[61] | 520 | ) , |
---|
| 521 | |
---|
| 522 | array( |
---|
| 523 | 'name' => 'comment' , |
---|
| 524 | 'category' => 'post' , |
---|
[183] | 525 | 'title' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENT') , |
---|
| 526 | 'caption' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
| 527 | 'description' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
[61] | 528 | 'mail_template' => 'post_newcomment' , |
---|
[183] | 529 | 'mail_subject' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTSBJ') , |
---|
[61] | 530 | ) , |
---|
| 531 | ) , |
---|
| 532 | ) ; |
---|
| 533 | |
---|
| 534 | |
---|
[1] | 535 | ?> |
---|