[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'); |
---|
[744] | 85 | $modversion['version'] = "3.00"; |
---|
[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 ; |
---|
[741] | 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' ; |
---|
[1] | 93 | $modversion['dirname'] = $mydirname; |
---|
| 94 | |
---|
| 95 | // status |
---|
[744] | 96 | $modversion['codename'] = "Alpha1"; |
---|
[1] | 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 | |
---|
[583] | 106 | $db_prefix = preg_replace('/wordpress/','wp',$mydirname); |
---|
[122] | 107 | |
---|
[188] | 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 | */ |
---|
[1] | 116 | |
---|
[527] | 117 | |
---|
[1] | 118 | // Search |
---|
[30] | 119 | $modversion['hasSearch'] = 1 ; |
---|
| 120 | $modversion['search']['file'] = 'include/search.php' ; |
---|
| 121 | $modversion['search']['func'] = $mydirname.'_global_search' ; |
---|
[1] | 122 | //Admin things |
---|
[61] | 123 | $modversion['hasAdmin'] = 1; |
---|
| 124 | $modversion['adminindex'] = "admin/index.php"; |
---|
| 125 | $modversion['adminmenu'] = "admin/menu.php"; |
---|
[1] | 126 | |
---|
| 127 | $modversion['hasMain'] = 1; |
---|
[162] | 128 | |
---|
[401] | 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 | } |
---|
[162] | 137 | |
---|
[401] | 138 | if(is_object($GLOBALS["xoopsUser"])){ |
---|
| 139 | global $current_user , $xoops_config; |
---|
[527] | 140 | if (mod_access_level() > 0) { |
---|
[401] | 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 | } |
---|
[527] | 151 | if (mod_access_level() > 9) { |
---|
[401] | 152 | $modversion['sub'][4]['name'] = constant( '_MI_XP2_MENU_XPRESS'); |
---|
[647] | 153 | $modversion['sub'][4]['url'] = $add_url . "wp-admin/admin.php?page=xpressme/xpressme.php"; |
---|
[401] | 154 | } |
---|
| 155 | if($GLOBALS["xoopsUserIsAdmin"]){ |
---|
| 156 | $modversion['sub'][5]['name'] = constant( '_MI_XP2_MOD_ADMIN'); |
---|
| 157 | $modversion['sub'][5]['url'] = "admin/index.php"; |
---|
| 158 | } |
---|
[628] | 159 | if (function_exists('xpress_create_new_blog'))$create_new_blog = xpress_create_new_blog(); |
---|
[542] | 160 | if(!empty($create_new_blog)){ |
---|
| 161 | $modversion['sub'][6]['name'] = $create_new_blog['title']; |
---|
[546] | 162 | $modversion['sub'][6]['url'] = $create_new_blog['menu_url']; |
---|
[542] | 163 | } |
---|
[628] | 164 | if (function_exists('xpress_primary_blog_link'))$primaryw_blog = xpress_primary_blog_link(); |
---|
[546] | 165 | if(!empty($primaryw_blog)){ |
---|
[565] | 166 | $modversion['sub'][7]['name'] = $primaryw_blog['title']; |
---|
| 167 | $modversion['sub'][7]['url'] = $primaryw_blog['menu_url']; |
---|
[546] | 168 | } |
---|
[162] | 169 | } |
---|
[1] | 170 | } |
---|
| 171 | |
---|
| 172 | // Use smarty |
---|
[61] | 173 | $modversion["use_smarty"] = 1; |
---|
[1] | 174 | |
---|
| 175 | /** |
---|
| 176 | * Templates |
---|
| 177 | */ |
---|
[35] | 178 | // All Templates can't be touched by modulesadmin. |
---|
| 179 | $modversion['templates'] = array() ; |
---|
[1] | 180 | |
---|
[387] | 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 | ); |
---|
[491] | 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 | ); |
---|
[35] | 198 | |
---|
| 199 | //BLOCKS |
---|
[118] | 200 | $b_no =1; |
---|
| 201 | $modversion['blocks'][$b_no] = array( |
---|
[54] | 202 | 'file' => 'recent_posts_content_block.php' , |
---|
[183] | 203 | 'name' => constant('_MI_XP2_BLOCK_CONTENT') , |
---|
[54] | 204 | 'description' => '' , |
---|
| 205 | 'show_func' => "b_". $mydirname . "_content_show" , |
---|
| 206 | 'edit_func' => "b_". $mydirname . "_content_edit" , |
---|
[89] | 207 | 'template' => '' , |
---|
[435] | 208 | 'options' => $mydirname. '||10|0|100||||0|0|0' , |
---|
[54] | 209 | 'can_clone' => true , |
---|
[118] | 210 | 'func_num' => $b_no, |
---|
[54] | 211 | ); |
---|
[118] | 212 | $b_no++; |
---|
| 213 | $modversion['blocks'][$b_no] = array( |
---|
[100] | 214 | 'file' => 'recent_posts_list_block.php' , |
---|
[183] | 215 | 'name' => constant('_MI_XP2_BLOCK_POSTS') , |
---|
[100] | 216 | 'description' => '' , |
---|
| 217 | 'show_func' => "b_". $mydirname . "_posts_show" , |
---|
| 218 | 'edit_func' => "b_". $mydirname . "_posts_edit" , |
---|
[142] | 219 | 'options' => $mydirname. '||10|1|7||||0' , |
---|
[100] | 220 | 'can_clone' => true , |
---|
[118] | 221 | 'func_num' => $b_no, |
---|
[100] | 222 | ); |
---|
[118] | 223 | $b_no++; |
---|
| 224 | $modversion['blocks'][$b_no] = array( |
---|
[109] | 225 | 'file' => 'popular_posts_block.php' , |
---|
[183] | 226 | 'name' => constant('_MI_XP2_BLOCK_POPULAR') , |
---|
[109] | 227 | 'description' => '' , |
---|
| 228 | 'show_func' => "b_". $mydirname . "_popular_show" , |
---|
| 229 | 'edit_func' => "b_". $mydirname . "_popular_edit" , |
---|
[142] | 230 | 'options' => $mydirname. '||10|0||||0' , |
---|
[109] | 231 | 'can_clone' => true , |
---|
[118] | 232 | 'func_num' => $b_no, |
---|
[109] | 233 | ); |
---|
[118] | 234 | $b_no++; |
---|
| 235 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 236 | 'file' => 'page_block.php' , |
---|
[183] | 237 | 'name' => constant('_MI_XP2_BLOCK_PAGE') , |
---|
[110] | 238 | 'description' => '' , |
---|
[142] | 239 | 'show_func' => "b_". $mydirname . "_page_show" , |
---|
| 240 | 'edit_func' => "b_". $mydirname . "_page_edit" , |
---|
[205] | 241 | 'options' => $mydirname. '||post_title|asc||||0|0|none||1||' , |
---|
[125] | 242 | 'can_clone' => true , |
---|
[142] | 243 | 'func_num' => $b_no, |
---|
[110] | 244 | ); |
---|
[118] | 245 | $b_no++; |
---|
| 246 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 247 | 'file' => 'recent_comments_block.php' , |
---|
[183] | 248 | 'name' => constant('_MI_XP2_BLOCK_COMMENTS') , |
---|
[110] | 249 | 'description' => '' , |
---|
[142] | 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 , |
---|
[118] | 255 | 'func_num' => $b_no, |
---|
[110] | 256 | ); |
---|
[118] | 257 | $b_no++; |
---|
| 258 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 259 | 'file' => 'sidebar_block.php' , |
---|
[183] | 260 | 'name' => constant('_MI_XP2_BLOCK_SIDEBAR') , |
---|
[118] | 261 | 'description' => '' , |
---|
[142] | 262 | 'show_func' => "b_". $mydirname . "_sidebar_show" , |
---|
| 263 | 'edit_func' => '' , |
---|
| 264 | 'options' => '' , |
---|
| 265 | 'can_clone' => false , |
---|
| 266 | 'func_num' => $b_no, |
---|
[118] | 267 | ); |
---|
[119] | 268 | $b_no++; |
---|
| 269 | $modversion['blocks'][$b_no] = array( |
---|
| 270 | 'file' => 'search_block.php' , |
---|
[183] | 271 | 'name' => constant('_MI_XP2_BLOCK_SEARCH') , |
---|
[119] | 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 | ); |
---|
[122] | 279 | $b_no++; |
---|
| 280 | $modversion['blocks'][$b_no] = array( |
---|
[142] | 281 | 'file' => 'calender_block.php' , |
---|
[183] | 282 | 'name' => constant('_MI_XP2_BLOCK_CALENDER') , |
---|
[142] | 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' , |
---|
[183] | 293 | 'name' => constant('_MI_XP2_BLOCK_ARCHIVE') , |
---|
[142] | 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' , |
---|
[183] | 304 | 'name' => constant('_MI_XP2_BLOCK_AUTHORS') , |
---|
[142] | 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 | ); |
---|
[365] | 312 | if (wp_version_compare($wp_version, '>=','2.3')){ |
---|
[501] | 313 | $b_no++; |
---|
[365] | 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 | } |
---|
[122] | 325 | $b_no++; |
---|
| 326 | $modversion['blocks'][$b_no] = array( |
---|
| 327 | 'file' => 'category_block.php' , |
---|
[183] | 328 | 'name' => constant('_MI_XP2_BLOCK_CATEGORY') , |
---|
[122] | 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' , |
---|
[183] | 339 | 'name' => constant('_MI_XP2_BLOCK_META') , |
---|
[122] | 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 | ); |
---|
[365] | 347 | if (wp_version_compare($wp_version, '>=','2.7')){ |
---|
[501] | 348 | $b_no++; |
---|
[365] | 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" , |
---|
[438] | 355 | 'options' => $mydirname. '||1|' , |
---|
[365] | 356 | 'can_clone' => true , |
---|
| 357 | 'func_num' => $b_no, |
---|
| 358 | ); |
---|
| 359 | } |
---|
[138] | 360 | $b_no++; |
---|
| 361 | $modversion['blocks'][$b_no] = array( |
---|
| 362 | 'file' => 'enhanced_block.php' , |
---|
[183] | 363 | 'name' => constant('_MI_XP2_BLOCK_ENHANCED') , |
---|
[138] | 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 | ); |
---|
[589] | 371 | if (wp_version_compare($wp_version, '>=','3.0-alpha') && is_show_multi_blog_block($mydirname)){ |
---|
[533] | 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 | ); |
---|
[536] | 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 | ); |
---|
[543] | 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 | ); |
---|
[552] | 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 | ); |
---|
[533] | 417 | } |
---|
[122] | 418 | |
---|
[61] | 419 | // Notification |
---|
| 420 | $modversion['hasNotification'] = 1; |
---|
| 421 | $modversion['notification'] = array( |
---|
| 422 | 'lookup_file' => 'include/notification.inc.php' , |
---|
[95] | 423 | 'lookup_func' => "xpress_notify" , |
---|
[61] | 424 | 'category' => array( |
---|
| 425 | array( |
---|
| 426 | 'name' => 'global' , |
---|
[183] | 427 | 'title' => constant('_MI_XP2_NOTCAT_GLOBAL') , |
---|
| 428 | 'description' => constant('_MI_XP2_NOTCAT_GLOBALDSC') , |
---|
[61] | 429 | 'subscribe_from' => 'index.php' , |
---|
| 430 | ) , |
---|
| 431 | array( |
---|
| 432 | 'name' => 'category' , |
---|
[183] | 433 | 'title' => constant('_MI_XP2_NOTCAT_CAT') , |
---|
| 434 | 'description' => constant('_MI_XP2_NOTCAT_CATDSC') , |
---|
[61] | 435 | 'subscribe_from' => 'index.php' , |
---|
| 436 | 'item_name' => 'cat' , |
---|
| 437 | 'allow_bookmark' => 1 , |
---|
| 438 | ) , |
---|
| 439 | array( |
---|
| 440 | 'name' => 'author' , |
---|
[183] | 441 | 'title' => constant('_MI_XP2_NOTCAT_AUTHOR') , |
---|
| 442 | 'description' => constant('_MI_XP2_NOTCAT_AUTHORDSC') , |
---|
[61] | 443 | 'subscribe_from' => 'index.php' , |
---|
| 444 | 'item_name' => 'author' , |
---|
| 445 | 'allow_bookmark' => 1 , |
---|
| 446 | ) , |
---|
| 447 | array( |
---|
| 448 | 'name' => 'post' , |
---|
[183] | 449 | 'title' => constant('_MI_XP2_NOTCAT_POST') , |
---|
| 450 | 'description' => constant('_MI_XP2_NOTCAT_POSTDSC') , |
---|
[61] | 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' , |
---|
[183] | 460 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITING') , |
---|
| 461 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
| 462 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
[61] | 463 | 'mail_template' => 'global_waiting' , |
---|
[183] | 464 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_WAITINGSBJ') , |
---|
[61] | 465 | 'admin_only' => 1 , |
---|
| 466 | ) , |
---|
| 467 | array( |
---|
| 468 | 'name' => 'newpost' , |
---|
| 469 | 'category' => 'global' , |
---|
[183] | 470 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOST') , |
---|
| 471 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
| 472 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
[61] | 473 | 'mail_template' => 'global_newpost' , |
---|
[183] | 474 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWPOSTSBJ') , |
---|
[61] | 475 | ) , |
---|
| 476 | array( |
---|
| 477 | 'name' => 'comment' , |
---|
| 478 | 'category' => 'global' , |
---|
[183] | 479 | 'title' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENT') , |
---|
| 480 | 'caption' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
| 481 | 'description' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
[61] | 482 | 'mail_template' => 'global_newcomment' , |
---|
[183] | 483 | 'mail_subject' => constant('_MI_XP2_NOTIFY_GLOBAL_NEWCOMMENTSBJ') , |
---|
[61] | 484 | ) , |
---|
| 485 | |
---|
| 486 | array( |
---|
| 487 | 'name' => 'newpost' , |
---|
| 488 | 'category' => 'category' , |
---|
[183] | 489 | 'title' => constant('_MI_XP2_NOTIFY_CAT_NEWPOST') , |
---|
| 490 | 'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') , |
---|
| 491 | 'description' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTCAP') , |
---|
[61] | 492 | 'mail_template' => 'category_newpost' , |
---|
[183] | 493 | 'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWPOSTSBJ') , |
---|
[61] | 494 | ) , |
---|
| 495 | array( |
---|
| 496 | 'name' => 'comment' , |
---|
| 497 | 'category' => 'category' , |
---|
[183] | 498 | 'title' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENT') , |
---|
| 499 | 'caption' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
| 500 | 'description' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
[61] | 501 | 'mail_template' => 'category_newcomment' , |
---|
[183] | 502 | 'mail_subject' => constant('_MI_XP2_NOTIFY_CAT_NEWCOMMENTSBJ') , |
---|
[61] | 503 | ) , |
---|
| 504 | |
---|
| 505 | array( |
---|
| 506 | 'name' => 'newpost' , |
---|
| 507 | 'category' => 'author' , |
---|
[183] | 508 | 'title' => constant('_MI_XP2_NOTIFY_AUT_NEWPOST') , |
---|
| 509 | 'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') , |
---|
| 510 | 'description' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTCAP') , |
---|
[61] | 511 | 'mail_template' => 'author_newpost' , |
---|
[183] | 512 | 'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWPOSTSBJ') , |
---|
[61] | 513 | ) , |
---|
| 514 | array( |
---|
| 515 | 'name' => 'comment' , |
---|
| 516 | 'category' => 'author' , |
---|
[183] | 517 | 'title' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENT') , |
---|
| 518 | 'caption' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
| 519 | 'description' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
[61] | 520 | 'mail_template' => 'author_newcomment' , |
---|
[183] | 521 | 'mail_subject' => constant('_MI_XP2_NOTIFY_AUT_NEWCOMMENTSBJ') , |
---|
[61] | 522 | ) , |
---|
| 523 | |
---|
| 524 | array( |
---|
| 525 | 'name' => 'comment' , |
---|
| 526 | 'category' => 'post' , |
---|
[183] | 527 | 'title' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENT') , |
---|
| 528 | 'caption' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
| 529 | 'description' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
[61] | 530 | 'mail_template' => 'post_newcomment' , |
---|
[183] | 531 | 'mail_subject' => constant('_MI_XP2_NOTIFY_POST_NEWCOMMENTSBJ') , |
---|
[61] | 532 | ) , |
---|
| 533 | ) , |
---|
| 534 | ) ; |
---|
| 535 | |
---|
| 536 | |
---|
[1] | 537 | ?> |
---|