XPressME Integration Kit

Trac

source: trunk/extras/for_wordpressme2011/ja_EUC/wp-config.php @ 344

Last change on this file since 344 was 344, checked in by toemon, 15 years ago

MYSQL 5の環境にWP2011(EUC)ベースをインストールすると文字化けする バグを修正 fixes #187
define('DB_CHARSET', 'ujis');
DB_CHARSETを設定することでMYSQL4.1以上の場合は SET NAMES することで文字化けを解消させる。

File size: 5.5 KB
Line 
1<?php
2require_once dirname( __FILE__ ).'/include/xpress_debug_log.php' ;
3require_once dirname( __FILE__ ).'/class/config_from_xoops.class.php' ;
4$xoops_config = new ConfigFromXoops;
5require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ;
6
7/**
8 * mb_language() sets language. If language  is omitted, it returns current language as string.
9 * language setting is used for encoding e-mail messages.
10 * Valid languages are "Japanese", "ja","English","en" and "uni" (UTF-8).
11 * mb_send_mail() uses this setting to encode e-mail.
12 * Language and its setting is ISO-2022-JP/Base64 for Japanese, UTF-8/Base64 for uni, ISO-8859-1/quoted printable for English.
13 */
14 if (function_exists("mb_language")) mb_language('Japanese');
15 if (function_exists("mb_internal_encoding")) mb_internal_encoding('EUC-JP');
16
17
18// ** MySQL settings - You can get this info from your web host ** //
19// Do not change  'DB_NAME','DB_USER','DB_PASSWORD' & 'DB_HOST'
20// because copies a set value of XOOPS.
21
22/** Do not change. The name of the database for WordPress */
23define('DB_NAME', $xoops_config->xoops_db_name);
24
25/** Do not change. MySQL database username */
26define('DB_USER', $xoops_config->xoops_db_user);
27
28/** Do not change. MySQL database password */
29define('DB_PASSWORD', $xoops_config->xoops_db_pass);
30
31/** Do not change. MySQL hostname */
32define('DB_HOST', $xoops_config->xoops_db_host);
33       
34/** Database Charset to use in creating database tables. */
35define('DB_CHARSET', 'ujis');
36
37/** The Database Collate type. Don't change this if in doubt. */
38define('DB_COLLATE', '');
39
40//define('WP_DEBUG' ,true);
41
42/**#@+
43 * Authentication Unique Keys.
44 *
45 * Change these to different unique phrases!
46 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
47 *
48 * @since 2.6.0
49 */
50define('AUTH_KEY', 'put your unique phrase here');
51define('SECURE_AUTH_KEY', 'put your unique phrase here');
52define('LOGGED_IN_KEY', 'put your unique phrase here');
53define('NONCE_KEY', 'put your unique phrase here');
54
55if ($xoops_config->is_wpmu){    //for WordPressMU
56        define('VHOST', 'no');
57        $base = $xoops_config->mu_path_current_site;
58        define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site );
59        define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site );
60        define('SITE_ID_CURRENT_SITE', 1);
61        define('BLOGID_CURRENT_SITE', '1' );
62
63        define('AUTH_SALT', 'put your unique phrase here');
64        define('LOGGED_IN_SALT', 'put your unique phrase here');
65        define('SECURE_AUTH_SALT', 'put your unique phrase here');
66}
67
68/**
69 * WordPress Database Table prefix.
70 *
71 * You can have multiple installations in one database if you give each a unique
72 * prefix. Only numbers, letters, and underscores please!
73 */
74// Do not change. $table_prefix is generated from XOOPS DB Priefix and the module directory name.
75$table_prefix  = $xoops_config->module_db_prefix;
76
77/**
78 * WordPress Localized Language, defaults to Japanese.
79 *
80 * Change this to localize WordPress.  A corresponding MO file for the chosen
81 * language must be installed to wp-content/languages. For example, install
82 * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
83 * language support.
84 *
85 * Example:
86 * define ('WPLANG', '');               // language support to English
87 */
88define ('WPLANG', 'ja_EUC');            // language support to Japanese
89
90/* That's all, stop editing! Happy blogging. */
91
92/** WordPress absolute path to the Wordpress directory. */
93if ( !defined('ABSPATH') )
94        define('ABSPATH', dirname(__FILE__).'/');
95
96require_once( ABSPATH .'/include/request_url.php');
97if (is_xpress_index_page_call()){
98        require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php.
99        require_once(ABSPATH.'wp-settings.php');
100        wp();
101       
102        if (!function_exists('is_wordpress_style')){    // When the XPressME plug-in is invalid
103                require_once dirname( __FILE__ ).'/include/xpress_active_plugin.php' ;
104                xpress_pulugin_activation('xpressme/xpressme.php');
105                // reloaded
106                header('Location: ' . $xoops_config->module_url . '/');
107               
108                $err_str = "The activation of the XPressME plugin was executed.<br />\n";
109                $err_str .= "Because the XPressME plugin was invalid.<br />\n";
110                $err_str .= "Please do the rereading seeing on the page.\n";                   
111                die($err_str);
112        }
113
114        ob_start();     
115                if($xoops_config->is_wp20 )
116                        require_once dirname( __FILE__ ).'/include/old_template-loader.php' ;
117                else
118                        require_once( ABSPATH . WPINC . '/template-loader.php' );
119                $wp_output = ob_get_contents();
120        ob_end_clean();
121        // It judges it here because it does in is_index_page() through feed to which the permalink is set.
122        if (is_wordpress_style() || is_feed()) {
123                echo $wp_output;
124        } else {
125                require_once( ABSPATH .'/include/xpress_render.php' );
126                xpress_render($wp_output);
127        }
128
129        //When there is no block cache, and an optional block is different, cache is refreshed.
130        //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time.
131        // This Function in xpressme plugin
132        require_once( ABSPATH .'/include/xpress_block_render.php' );   
133        xpress_unnecessary_block_cache_delete($xoops_config->module_name);
134        if (is_home()) xpress_block_cache_refresh($xoops_config->module_name);
135        exit();         // The return to wp-blog-header.php is stolen here
136}
137if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path;
138if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;
139require_once(ABSPATH.'wp-settings.php');
140?>
Note: See TracBrowser for help on using the repository browser.