[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 |
---|
| 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'); |
---|
[101] | 33 | $modversion['version'] = "0.06"; |
---|
[30] | 34 | $modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://www.toemon.com) ;"; |
---|
[1] | 35 | $modversion['author'] = "toemon (http://www.toemon.com)"; |
---|
| 36 | $modversion['license'] = "GPL see LICENSE"; |
---|
[30] | 37 | $modversion['official'] = 0 ; |
---|
[1] | 38 | $modversion['image'] = 'module_icon.php' ; |
---|
| 39 | $modversion['dirname'] = $mydirname; |
---|
| 40 | |
---|
| 41 | // status |
---|
[101] | 42 | $modversion['codename'] = "r101"; |
---|
[1] | 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", |
---|
[76] | 68 | $db_prefix . "_d3forum_link", |
---|
| 69 | $db_prefix . "_group_role" |
---|
[1] | 70 | ); |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | // Search |
---|
[30] | 74 | $modversion['hasSearch'] = 1 ; |
---|
| 75 | $modversion['search']['file'] = 'include/search.php' ; |
---|
| 76 | $modversion['search']['func'] = $mydirname.'_global_search' ; |
---|
[1] | 77 | //Admin things |
---|
[61] | 78 | $modversion['hasAdmin'] = 1; |
---|
| 79 | $modversion['adminindex'] = "admin/index.php"; |
---|
| 80 | $modversion['adminmenu'] = "admin/menu.php"; |
---|
[1] | 81 | |
---|
| 82 | $modversion['hasMain'] = 1; |
---|
| 83 | if(is_object($GLOBALS["xoopsUser"])){ |
---|
| 84 | $modversion['sub'][1]['name'] = constant( '_MI_XPRESS_MENU_POST_NEW'); |
---|
| 85 | $modversion['sub'][1]['url'] = "wp-admin/post-new.php"; |
---|
| 86 | $modversion['sub'][2]['name'] = constant( '_MI_XPRESS_MENU_EDIT'); |
---|
| 87 | $modversion['sub'][2]['url'] = "wp-admin/edit.php"; |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | // Use smarty |
---|
[61] | 91 | $modversion["use_smarty"] = 1; |
---|
[1] | 92 | |
---|
| 93 | /** |
---|
| 94 | * Templates |
---|
| 95 | */ |
---|
[35] | 96 | // All Templates can't be touched by modulesadmin. |
---|
| 97 | $modversion['templates'] = array() ; |
---|
[1] | 98 | |
---|
[61] | 99 | $modversion['hasconfig'] = 1; |
---|
[35] | 100 | |
---|
| 101 | //BLOCKS |
---|
| 102 | $modversion['blocks'][1] = array( |
---|
[48] | 103 | 'file' => 'recent_comments_block.php' , |
---|
[35] | 104 | 'name' => constant('_MI_XPRESS_BLOCK_COMMENTS') , |
---|
| 105 | 'description' => '' , |
---|
| 106 | 'show_func' => "b_". $mydirname . "_comments_show" , |
---|
| 107 | 'edit_func' => "b_". $mydirname . "_comments_edit" , |
---|
[89] | 108 | 'template' => '' , |
---|
[48] | 109 | 'options' => $mydirname. '|10|30|0|' , |
---|
[35] | 110 | 'can_clone' => true , |
---|
| 111 | 'func_num' => 1, |
---|
| 112 | ); |
---|
[54] | 113 | $modversion['blocks'][2] = array( |
---|
| 114 | 'file' => 'recent_posts_content_block.php' , |
---|
| 115 | 'name' => constant('_MI_XPRESS_BLOCK_CONTENT') , |
---|
| 116 | 'description' => '' , |
---|
| 117 | 'show_func' => "b_". $mydirname . "_content_show" , |
---|
| 118 | 'edit_func' => "b_". $mydirname . "_content_edit" , |
---|
[89] | 119 | 'template' => '' , |
---|
[54] | 120 | 'options' => $mydirname. '|10|0|100||0' , |
---|
| 121 | 'can_clone' => true , |
---|
| 122 | 'func_num' => 2, |
---|
| 123 | ); |
---|
[100] | 124 | $modversion['blocks'][3] = array( |
---|
| 125 | 'file' => 'recent_posts_list_block.php' , |
---|
| 126 | 'name' => constant('_MI_XPRESS_BLOCK_POSTS') , |
---|
| 127 | 'description' => '' , |
---|
| 128 | 'show_func' => "b_". $mydirname . "_posts_show" , |
---|
| 129 | 'edit_func' => "b_". $mydirname . "_posts_edit" , |
---|
| 130 | 'options' => $mydirname. '|10|1|7||0' , |
---|
| 131 | 'can_clone' => true , |
---|
| 132 | 'func_num' => 3, |
---|
| 133 | ); |
---|
[61] | 134 | |
---|
| 135 | // Notification |
---|
| 136 | $modversion['hasNotification'] = 1; |
---|
| 137 | $modversion['notification'] = array( |
---|
| 138 | 'lookup_file' => 'include/notification.inc.php' , |
---|
[95] | 139 | 'lookup_func' => "xpress_notify" , |
---|
[61] | 140 | 'category' => array( |
---|
| 141 | array( |
---|
| 142 | 'name' => 'global' , |
---|
| 143 | 'title' => constant('_MI_XPRESS_NOTCAT_GLOBAL') , |
---|
| 144 | 'description' => constant('_MI_XPRESS_NOTCAT_GLOBALDSC') , |
---|
| 145 | 'subscribe_from' => 'index.php' , |
---|
| 146 | ) , |
---|
| 147 | array( |
---|
| 148 | 'name' => 'category' , |
---|
| 149 | 'title' => constant('_MI_XPRESS_NOTCAT_CAT') , |
---|
| 150 | 'description' => constant('_MI_XPRESS_NOTCAT_CATDSC') , |
---|
| 151 | 'subscribe_from' => 'index.php' , |
---|
| 152 | 'item_name' => 'cat' , |
---|
| 153 | 'allow_bookmark' => 1 , |
---|
| 154 | ) , |
---|
| 155 | array( |
---|
| 156 | 'name' => 'author' , |
---|
| 157 | 'title' => constant('_MI_XPRESS_NOTCAT_AUTHOR') , |
---|
| 158 | 'description' => constant('_MI_XPRESS_NOTCAT_AUTHORDSC') , |
---|
| 159 | 'subscribe_from' => 'index.php' , |
---|
| 160 | 'item_name' => 'author' , |
---|
| 161 | 'allow_bookmark' => 1 , |
---|
| 162 | ) , |
---|
| 163 | array( |
---|
| 164 | 'name' => 'post' , |
---|
| 165 | 'title' => constant('_MI_XPRESS_NOTCAT_POST') , |
---|
| 166 | 'description' => constant('_MI_XPRESS_NOTCAT_POSTDSC') , |
---|
| 167 | 'subscribe_from' => 'index.php' , |
---|
| 168 | 'item_name' => 'p' , |
---|
| 169 | 'allow_bookmark' => 1 , |
---|
| 170 | ) , |
---|
| 171 | ) , |
---|
| 172 | 'event' => array( |
---|
| 173 | array( |
---|
| 174 | 'name' => 'waiting' , |
---|
| 175 | 'category' => 'global' , |
---|
| 176 | 'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITING') , |
---|
| 177 | 'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
| 178 | 'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGCAP') , |
---|
| 179 | 'mail_template' => 'global_waiting' , |
---|
| 180 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_WAITINGSBJ') , |
---|
| 181 | 'admin_only' => 1 , |
---|
| 182 | ) , |
---|
| 183 | array( |
---|
| 184 | 'name' => 'newpost' , |
---|
| 185 | 'category' => 'global' , |
---|
| 186 | 'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOST') , |
---|
| 187 | 'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
| 188 | 'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTCAP') , |
---|
| 189 | 'mail_template' => 'global_newpost' , |
---|
| 190 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWPOSTSBJ') , |
---|
| 191 | ) , |
---|
| 192 | array( |
---|
| 193 | 'name' => 'comment' , |
---|
| 194 | 'category' => 'global' , |
---|
| 195 | 'title' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENT') , |
---|
| 196 | 'caption' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
| 197 | 'description' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTCAP') , |
---|
| 198 | 'mail_template' => 'global_newcomment' , |
---|
| 199 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_GLOBAL_NEWCOMMENTSBJ') , |
---|
| 200 | ) , |
---|
| 201 | |
---|
| 202 | array( |
---|
| 203 | 'name' => 'newpost' , |
---|
| 204 | 'category' => 'category' , |
---|
| 205 | 'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOST') , |
---|
| 206 | 'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') , |
---|
| 207 | 'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTCAP') , |
---|
| 208 | 'mail_template' => 'category_newpost' , |
---|
| 209 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWPOSTSBJ') , |
---|
| 210 | ) , |
---|
| 211 | array( |
---|
| 212 | 'name' => 'comment' , |
---|
| 213 | 'category' => 'category' , |
---|
| 214 | 'title' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENT') , |
---|
| 215 | 'caption' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
| 216 | 'description' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTCAP') , |
---|
| 217 | 'mail_template' => 'category_newcomment' , |
---|
| 218 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_CAT_NEWCOMMENTSBJ') , |
---|
| 219 | ) , |
---|
| 220 | |
---|
| 221 | array( |
---|
| 222 | 'name' => 'newpost' , |
---|
| 223 | 'category' => 'author' , |
---|
| 224 | 'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOST') , |
---|
| 225 | 'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') , |
---|
| 226 | 'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTCAP') , |
---|
| 227 | 'mail_template' => 'author_newpost' , |
---|
| 228 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWPOSTSBJ') , |
---|
| 229 | ) , |
---|
| 230 | array( |
---|
| 231 | 'name' => 'comment' , |
---|
| 232 | 'category' => 'author' , |
---|
| 233 | 'title' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENT') , |
---|
| 234 | 'caption' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
| 235 | 'description' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTCAP') , |
---|
| 236 | 'mail_template' => 'author_newcomment' , |
---|
| 237 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_AUT_NEWCOMMENTSBJ') , |
---|
| 238 | ) , |
---|
| 239 | |
---|
| 240 | array( |
---|
| 241 | 'name' => 'comment' , |
---|
| 242 | 'category' => 'post' , |
---|
| 243 | 'title' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENT') , |
---|
| 244 | 'caption' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
| 245 | 'description' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTCAP') , |
---|
| 246 | 'mail_template' => 'post_newcomment' , |
---|
| 247 | 'mail_subject' => constant('_MI_XPRESS_NOTIFY_POST_NEWCOMMENTSBJ') , |
---|
| 248 | ) , |
---|
| 249 | ) , |
---|
| 250 | ) ; |
---|
| 251 | |
---|
| 252 | |
---|
[1] | 253 | ?> |
---|