Changeset 531 for trunk/xpressme_integration_kit/include/oninstall.php
- Timestamp:
- Mar 9, 2010, 10:47:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/oninstall.php
r465 r531 167 167 if ( !$user_id ) { 168 168 $random_password = 'admin'; 169 if (!$xoops_config->is_wpmu){ 170 $user_id = wp_create_user($user_name, $random_password, $email); 171 } else { 172 $user_id = wpmu_create_user($user_name, $random_password, $email); 173 } 169 $user_id = wp_create_user($user_name, $random_password, $email); 174 170 } else { 175 171 $random_password = __('User already exists. Password inherited.'); … … 186 182 187 183 // Set Default data 188 if (!$xoops_config->is_wpmu){ // for WordPress 189 // make WordPress Default data 190 if (function_exists('wp_install_defaults')){ 191 wp_install_defaults($user_id); 192 } else { 193 wp_install_old_defaults($user_id); 194 } 195 196 $ret[] = 'The first sample post & comment was written.<br />'; 197 198 // Rewrite Option for Xpress 199 if (WPLANG == 'ja_EUC') { 200 $setup_charset = 'EUC-JP'; 201 } elseif(WPLANG == 'ja_SJIS') { 202 $setup_charset = 'Shift_JIS'; 203 } else { 204 $setup_charset = 'UTF-8'; 205 } 206 update_option("blog_charset", $setup_charset); 207 208 update_option('blogname', $site_name ); 209 update_option('blogdescription', 'WordPress for XOOPS'); 210 update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']); 211 update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/"); 212 update_option("home", $site_url); 213 update_option("siteurl", $site_url); 214 update_option("what_to_show", "posts"); 215 update_option('default_pingback_flag', 0); 216 $ret[] = 'The initial data was written in the data base of wordpress.<br />'; 184 // make WordPress Default data 185 if (function_exists('wp_install_defaults')){ 186 wp_install_defaults($user_id); 187 } else { 188 wp_install_old_defaults($user_id); 189 } 190 191 $ret[] = 'The first sample post & comment was written.<br />'; 192 193 // Rewrite Option for Xpress 194 if (WPLANG == 'ja_EUC') { 195 $setup_charset = 'EUC-JP'; 196 } elseif(WPLANG == 'ja_SJIS') { 197 $setup_charset = 'Shift_JIS'; 198 } else { 199 $setup_charset = 'UTF-8'; 200 } 201 update_option("blog_charset", $setup_charset); 202 203 update_option('blogname', $site_name ); 204 update_option('blogdescription', 'WordPress for XOOPS'); 205 update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']); 206 update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/"); 207 update_option("home", $site_url); 208 update_option("siteurl", $site_url); 209 update_option("what_to_show", "posts"); 210 update_option('default_pingback_flag', 0); 211 $ret[] = 'The initial data was written in the data base of wordpress.<br />'; 212 213 update_option("template", "xpress_default"); 214 update_option("stylesheet", "xpress_default"); 215 $ret[] = 'The default theme of wordpress was set to xpress_default.<br />'; 216 // update_option('uploads_use_yearmonth_folders', 1); 217 update_option('upload_path', 'wp-content/uploads'); 217 218 218 update_option("template", "xpress_default");219 update_option("stylesheet", "xpress_default");220 $ret[] = 'The default theme of wordpress was set to xpress_default.<br />';221 // update_option('uploads_use_yearmonth_folders', 1);222 update_option('upload_path', 'wp-content/uploads');223 224 } else { // for WordPress MU225 global $base,$current_site, $dirs, $wpmu_version;226 227 $base = $xoops_config->mu_path_current_site;228 $domain = $xoops_config->mu_domain_current_site;229 $admin_email = $GLOBALS["xoopsConfig"]['adminmail'];230 $admin_user_name = $user_name;231 $admin_user_id = $user_id;232 include_once($mydirpath . '/include/xpress_mu_function.php');233 234 do_htaccess( $xoops_config->module_path . '/htaccess.dist', $xoops_config->module_path . '/.htaccess', $base, '');235 xpress_mu_install_defaults($domain,$base,$site_name,$admin_user_id,$admin_user_name,$admin_email);236 }237 238 219 // activate the xpressme plugin 239 220 require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
Note: See TracChangeset
for help on using the changeset viewer.