XPressME Integration Kit

Trac

Changeset 92


Ignore:
Timestamp:
Feb 22, 2009, 12:09:14 AM (15 years ago)
Author:
toemon
Message:

#60 への対応 第一段階
XOOPS管理下でなく、WordPressが必要なときにXOOPSシステムを使うというスタンスに変更するために
まず、XOOPSシステムを呼び込まなくても、mainfile.phpよりXOOPSのDB設定内容を読み込めるようにした。

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/set_cash_cookie_path.php

    r27 r92  
    11<?php 
    2 $modname=basename(dirname(dirname(__FILE__))); 
    3 $modurl = XOOPS_URL . '/modules/' . $modname; 
     2$modname= $xoops_config->module_name; 
     3$modurl = $xoops_config->module_url; 
    44$hash = md5($modurl); 
    55/** 
  • trunk/wp-config.php

    r71 r92  
    11<?php 
    2 require dirname( __FILE__ ).'/include/include_xoops_define.php' ; 
     2require_once dirname( __FILE__ ).'/include/xpress_debug_log.php' ; 
     3require_once dirname( __FILE__ ).'/include/config_from_xoops.class.php' ; 
     4$xoops_config = new ConfigFromXoops; 
    35require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ; 
    46 
     
    79 
    810// ** MySQL settings ** // 
    9 define('DB_NAME', XOOPS_DB_NAME);    // The name of the database 
    10 define('DB_USER', XOOPS_DB_USER);     // Your MySQL username 
    11 define('DB_PASSWORD', XOOPS_DB_PASS); // ...and password 
    12 define('DB_HOST', XOOPS_DB_HOST);    // 99% chance you won't need to change this value 
     11define('DB_NAME', $xoops_config->xoops_db_name);    // The name of the database 
     12define('DB_USER', $xoops_config->xoops_db_user);     // Your MySQL username 
     13define('DB_PASSWORD', $xoops_config->xoops_db_pass); // ...and password 
     14define('DB_HOST', $xoops_config->xoops_db_host);    // 99% chance you won't need to change this value 
    1315define('DB_CHARSET', 'utf8'); 
    1416define('DB_COLLATE', ''); 
     
    2628        $xp_prefix = 'wp'; 
    2729} 
    28 $table_prefix  = XOOPS_DB_PREFIX . '_' . $xp_prefix . '_';   // Only numbers, letters, and underscores please! 
     30$table_prefix  = $xoops_config->xoops_db_prefix . '_' . $xp_prefix . '_';   // Only numbers, letters, and underscores please! 
    2931 
    3032// Change this to localize WordPress.  A corresponding MO file for the 
     
    3840if ( !defined('ABSPATH') ) 
    3941        define('ABSPATH', dirname(__FILE__).'/'); 
    40  
    4142require_once(ABSPATH.'wp-settings.php'); 
    42  
     43require dirname( __FILE__ ).'/include/include_xoops_define.php' ; 
    4344if (is_xpress_index_page_call()){ 
    4445        // The return to wp-blog-header.php is stolen here 
Note: See TracChangeset for help on using the changeset viewer.