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://www.toemon.com)" |
---|
10 | * @package module::xpressme |
---|
11 | */ |
---|
12 | |
---|
13 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; |
---|
14 | |
---|
15 | $mydirpath = dirname(__FILE__); |
---|
16 | $mydirname = basename($mydirpath); |
---|
17 | |
---|
18 | $lang = @$GLOBALS["xoopsConfig"]['language']; |
---|
19 | |
---|
20 | // language file (modinfo.php) |
---|
21 | |
---|
22 | if( file_exists( $mydirpath .'/language/'.$lang.'/modinfo.php' ) ) { |
---|
23 | include_once $mydirpath .'/language/'.$lang.'/modinfo.php' ; |
---|
24 | } else if( file_exists( $mydirpath .'/language/english/modinfo.php' ) ) { |
---|
25 | include_once $mydirpath .'/language/english/modinfo.php' ; |
---|
26 | } |
---|
27 | global $wp_db_version,$wp_version; |
---|
28 | |
---|
29 | include $mydirpath .'/wp-includes/version.php' ; |
---|
30 | |
---|
31 | $modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XPRESS_NAME') ; |
---|
32 | $modversion['description'] = constant( '_MI_XPRESS_DESC'); |
---|
33 | $modversion['version'] = "0.02"; |
---|
34 | $modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://www.toemon.com) ;"; |
---|
35 | $modversion['author'] = "toemon (http://www.toemon.com)"; |
---|
36 | $modversion['license'] = "GPL see LICENSE"; |
---|
37 | $modversion['official'] = 0 ; |
---|
38 | $modversion['image'] = 'module_icon.php' ; |
---|
39 | $modversion['dirname'] = $mydirname; |
---|
40 | |
---|
41 | // status |
---|
42 | $modversion['codename'] = "r48"; |
---|
43 | |
---|
44 | // onInstall, onUpdate, onUninstall |
---|
45 | $modversion['onInstall'] = 'include/oninstall.php' ; |
---|
46 | $modversion['onUpdate'] = 'include/onupdate.php' ; |
---|
47 | $modversion['onUninstall'] = 'include/onuninstall.php' ; |
---|
48 | |
---|
49 | // Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin) |
---|
50 | //$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; |
---|
51 | |
---|
52 | $db_prefix = $mydirname; |
---|
53 | if ($mydirname == 'wordpress') { |
---|
54 | $db_prefix = 'wp'; |
---|
55 | } |
---|
56 | $modversion['tables'] = array( |
---|
57 | $db_prefix . "_comments", |
---|
58 | $db_prefix . "_links", |
---|
59 | $db_prefix . "_options", |
---|
60 | $db_prefix . "_postmeta", |
---|
61 | $db_prefix . "_posts", |
---|
62 | $db_prefix . "_users", |
---|
63 | $db_prefix . "_usermeta", |
---|
64 | $db_prefix . "_terms", |
---|
65 | $db_prefix . "_term_relationships", |
---|
66 | $db_prefix . "_term_taxonomy", |
---|
67 | $db_prefix . "_views", |
---|
68 | $db_prefix . "_d3forum_link" |
---|
69 | ); |
---|
70 | |
---|
71 | |
---|
72 | // Search |
---|
73 | $modversion['hasSearch'] = 1 ; |
---|
74 | $modversion['search']['file'] = 'include/search.php' ; |
---|
75 | $modversion['search']['func'] = $mydirname.'_global_search' ; |
---|
76 | //Admin things |
---|
77 | $modversion['hasAdmin'] = 0; |
---|
78 | //$modversion['adminindex'] = "admin/index.php"; |
---|
79 | //$modversion['adminmenu'] = "admin/menu.php"; |
---|
80 | |
---|
81 | $modversion['hasMain'] = 1; |
---|
82 | if(is_object($GLOBALS["xoopsUser"])){ |
---|
83 | $modversion['sub'][1]['name'] = constant( '_MI_XPRESS_MENU_POST_NEW'); |
---|
84 | $modversion['sub'][1]['url'] = "wp-admin/post-new.php"; |
---|
85 | $modversion['sub'][2]['name'] = constant( '_MI_XPRESS_MENU_EDIT'); |
---|
86 | $modversion['sub'][2]['url'] = "wp-admin/edit.php"; |
---|
87 | } |
---|
88 | |
---|
89 | // Use smarty |
---|
90 | //$modversion["use_smarty"] = 1; |
---|
91 | |
---|
92 | /** |
---|
93 | * Templates |
---|
94 | */ |
---|
95 | // All Templates can't be touched by modulesadmin. |
---|
96 | $modversion['templates'] = array() ; |
---|
97 | |
---|
98 | $modversion['hasconfig'] = 0; |
---|
99 | |
---|
100 | //BLOCKS |
---|
101 | $modversion['blocks'][1] = array( |
---|
102 | 'file' => 'recent_comments_block.php' , |
---|
103 | 'name' => constant('_MI_XPRESS_BLOCK_COMMENTS') , |
---|
104 | 'description' => '' , |
---|
105 | 'show_func' => "b_". $mydirname . "_comments_show" , |
---|
106 | 'edit_func' => "b_". $mydirname . "_comments_edit" , |
---|
107 | 'template' => 'recent_comments_block.html' , |
---|
108 | 'options' => $mydirname. '|10|30|0|' , |
---|
109 | 'can_clone' => true , |
---|
110 | 'func_num' => 1, |
---|
111 | ); |
---|
112 | ?> |
---|