XPressME Integration Kit

Trac

source: trunk/wp-config.php @ 95

Last change on this file since 95 was 95, checked in by toemon, 16 years ago

XOOPS mainfile.phpのdefine文を事前に読み取りwp-config.phpのDB接続関係を生成することにより、XOOPSシステムを必要なときだけ呼び出す仕組みを作る。
およびイベント通知関係の修正(まだゲストのアクセス権限がないと駄目)

File size: 3.0 KB
RevLine 
[1]1<?php
[92]2require_once dirname( __FILE__ ).'/include/xpress_debug_log.php' ;
3require_once dirname( __FILE__ ).'/include/config_from_xoops.class.php' ;
4$xoops_config = new ConfigFromXoops;
[31]5require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ;
[1]6
7
[95]8if (function_exists("mb_language")) mb_language('Japanese');
9// The setting of mb_internal_encoding might be unnecessary.
10// Because mb_internal_encoding setting wp-setting.php line 484
11if (function_exists("mb_internal_encoding")) mb_internal_encoding('UTF-8');
12
[1]13// ** MySQL settings ** //
[92]14define('DB_NAME', $xoops_config->xoops_db_name);    // The name of the database
15define('DB_USER', $xoops_config->xoops_db_user);     // Your MySQL username
16define('DB_PASSWORD', $xoops_config->xoops_db_pass); // ...and password
17define('DB_HOST', $xoops_config->xoops_db_host);    // 99% chance you won't need to change this value
[1]18define('DB_CHARSET', 'utf8');
19define('DB_COLLATE', '');
20
[95]21//define('WP_DEBUG' ,true);
22
[1]23// Change each KEY to a different unique phrase.  You won't have to remember the phrases later,
24// so make them long and complicated.  You can visit http://api.wordpress.org/secret-key/1.1/
25// to get keys generated for you, or just make something up.  Each key should have a different phrase.
26define('AUTH_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
27define('SECURE_AUTH_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
28define('LOGGED_IN_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
29
30// You can have multiple installations in one database if you give each a unique prefix
[95]31$table_prefix  = $xoops_config->module_db_prefix;   // Only numbers, letters, and underscores please!
[1]32
33// Change this to localize WordPress.  A corresponding MO file for the
34// chosen language must be installed to wp-content/languages.
35// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
36// to enable German language support.
37define ('WPLANG', 'ja');
38
39/* That's all, stop editing! Happy blogging. */
40
41if ( !defined('ABSPATH') )
42        define('ABSPATH', dirname(__FILE__).'/');
[95]43
44require_once dirname( __FILE__ ).'/include/request_url.php' ;
45if (!is_xpress_index_page_call()){
46//      if ( is_wp_cron_page_call()){
47//              if ( !defined("XOOPS_ROOT_PATH") ) {
48//                      require_once $xoops_config->xoops_mainfile_path;
49//              }
50//      }
51        require_once(ABSPATH.'wp-settings.php');
52} else {
53        // If $xoops_config->xoops_mainfile_path is not executed before wp-settings.php is executed, log in cannot be done.
54        require_once $xoops_config->xoops_mainfile_path;
55        require_once(ABSPATH.'wp-settings.php');
[15]56        // The return to wp-blog-header.php is stolen here
[1]57        wp();
58        ob_start();     
59                require_once( ABSPATH . WPINC . '/template-loader.php' );
60                $wp_output = ob_get_contents();
61        ob_end_clean();
62        require_once( ABSPATH .'/include/xpress_render.php' );
63        xpress_render($wp_output);
[59]64        require_once( ABSPATH .'/include/xpress_breadcrumbs.php' );
[95]65        include $xoops_config->xoops_root_path . '/footer.php';
[1]66        exit();
67}
[92]68?>
Note: See TracBrowser for help on using the repository browser.