XPressME Integration Kit

Trac

Changeset 95 for trunk/wp-config.php


Ignore:
Timestamp:
Mar 3, 2009, 8:33:23 PM (16 years ago)
Author:
toemon
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-config.php

    r92 r95  
    55require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ; 
    66 
    7 mb_language('Japanese'); 
    8 mb_internal_encoding('UTF-8'); 
     7 
     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'); 
    912 
    1013// ** MySQL settings ** // 
     
    1619define('DB_COLLATE', ''); 
    1720 
     21//define('WP_DEBUG' ,true); 
     22 
    1823// Change each KEY to a different unique phrase.  You won't have to remember the phrases later, 
    1924// so make them long and complicated.  You can visit http://api.wordpress.org/secret-key/1.1/ 
     
    2429 
    2530// You can have multiple installations in one database if you give each a unique prefix 
    26 $xp_prefix = basename(dirname(__FILE__)); 
    27 if ($xp_prefix == 'wordpress'){ 
    28         $xp_prefix = 'wp'; 
    29 } 
    30 $table_prefix  = $xoops_config->xoops_db_prefix . '_' . $xp_prefix . '_';   // Only numbers, letters, and underscores please! 
     31$table_prefix  = $xoops_config->module_db_prefix;   // Only numbers, letters, and underscores please! 
    3132 
    3233// Change this to localize WordPress.  A corresponding MO file for the 
     
    4041if ( !defined('ABSPATH') ) 
    4142        define('ABSPATH', dirname(__FILE__).'/'); 
    42 require_once(ABSPATH.'wp-settings.php'); 
    43 require dirname( __FILE__ ).'/include/include_xoops_define.php' ; 
    44 if (is_xpress_index_page_call()){ 
     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'); 
    4556        // The return to wp-blog-header.php is stolen here 
    4657        wp(); 
     
    5263        xpress_render($wp_output); 
    5364        require_once( ABSPATH .'/include/xpress_breadcrumbs.php' ); 
    54         include XOOPS_ROOT_PATH . '/footer.php'; 
     65        include $xoops_config->xoops_root_path . '/footer.php'; 
    5566        exit(); 
    5667} 
Note: See TracChangeset for help on using the changeset viewer.