1 | <?php |
---|
2 | require_once dirname( __FILE__ ).'/include/xpress_debug_log.php' ; |
---|
3 | require_once dirname( __FILE__ ).'/class/config_from_xoops.class.php' ; |
---|
4 | $xoops_config = new ConfigFromXoops; |
---|
5 | require_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('uni'); |
---|
15 | |
---|
16 | |
---|
17 | // ** MySQL settings - You can get this info from your web host ** // |
---|
18 | // Do not change 'DB_NAME','DB_USER','DB_PASSWORD' & 'DB_HOST' |
---|
19 | // because copies a set value of XOOPS. |
---|
20 | |
---|
21 | /** Do not change. The name of the database for WordPress */ |
---|
22 | define('DB_NAME', $xoops_config->xoops_db_name); |
---|
23 | |
---|
24 | /** Do not change. MySQL database username */ |
---|
25 | define('DB_USER', $xoops_config->xoops_db_user); |
---|
26 | |
---|
27 | /** Do not change. MySQL database password */ |
---|
28 | define('DB_PASSWORD', $xoops_config->xoops_db_pass); |
---|
29 | |
---|
30 | /** Do not change. MySQL hostname */ |
---|
31 | define('DB_HOST', $xoops_config->xoops_db_host); |
---|
32 | |
---|
33 | /** Database Charset to use in creating database tables. */ |
---|
34 | define('DB_CHARSET', 'utf8'); |
---|
35 | |
---|
36 | /** The Database Collate type. Don't change this if in doubt. */ |
---|
37 | define('DB_COLLATE', ''); |
---|
38 | |
---|
39 | /**#@+ |
---|
40 | * Chaves únicas de autenticação. |
---|
41 | * |
---|
42 | * Altere cada chave para um frase única! |
---|
43 | * Você pode gerá-las usando {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service} |
---|
44 | * |
---|
45 | * @since 2.6.0 |
---|
46 | */ |
---|
47 | define('AUTH_KEY', 'coloque sua frase única aqui'); |
---|
48 | define('SECURE_AUTH_KEY', 'coloque sua frase única aqui'); |
---|
49 | define('LOGGED_IN_KEY', 'coloque sua frase única aqui'); |
---|
50 | define('NONCE_KEY', 'coloque sua frase única aqui'); |
---|
51 | /**#@-*/ |
---|
52 | |
---|
53 | if ($xoops_config->is_wpmu){ //for WordPressMU |
---|
54 | define('VHOST', 'no'); |
---|
55 | $base = $xoops_config->mu_path_current_site; |
---|
56 | define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site ); |
---|
57 | define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site ); |
---|
58 | define('SITE_ID_CURRENT_SITE', 1); |
---|
59 | define('BLOGID_CURRENT_SITE', '1' ); |
---|
60 | |
---|
61 | define('AUTH_SALT', 'put your unique phrase here'); |
---|
62 | define('LOGGED_IN_SALT', 'put your unique phrase here'); |
---|
63 | define('SECURE_AUTH_SALT', 'put your unique phrase here'); |
---|
64 | } |
---|
65 | |
---|
66 | /** |
---|
67 | * Prefixo da tabela do banco de dados do WordPress. |
---|
68 | * |
---|
69 | * Você pode ter várias instalações em um único banco de dados se você der para cada um um único |
---|
70 | * prefixo. Somente números, letras e sublinhados! |
---|
71 | */ |
---|
72 | // Do not change. $table_prefix is generated from XOOPS DB Priefix and the module directory name. |
---|
73 | $table_prefix = $xoops_config->module_db_prefix; |
---|
74 | |
---|
75 | /** |
---|
76 | * O idioma localizado do WordPress é o inglês por padrão. |
---|
77 | * |
---|
78 | * Altere esta definição para localizar o WordPress. Um arquivo MO correspondente a |
---|
79 | * língua escolhida deve ser instalado em wp-content/languages. Por exemplo, instale |
---|
80 | * pt_BR.mo em wp-content/languages e altere WPLANG para 'pt_BR' para habilitar o suporte |
---|
81 | * ao português do Brasil. |
---|
82 | */ |
---|
83 | define ('WPLANG', 'pt_BR'); |
---|
84 | |
---|
85 | /* Isto é tudo, pode parar de editar! :) */ |
---|
86 | |
---|
87 | /** Caminho absoluto do WordPress para o diretório Wordpress. */ |
---|
88 | if ( !defined('ABSPATH') ) |
---|
89 | define('ABSPATH', dirname(__FILE__) . '/'); |
---|
90 | |
---|
91 | require_once( ABSPATH .'/include/request_url.php'); |
---|
92 | if (is_xpress_index_page_call()){ |
---|
93 | require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php. |
---|
94 | require_once(ABSPATH.'wp-settings.php'); |
---|
95 | wp(); |
---|
96 | |
---|
97 | if (!function_exists('is_wordpress_style')){ // When the XPressME plug-in is invalid |
---|
98 | require_once dirname( __FILE__ ).'/include/xpress_active_plugin.php' ; |
---|
99 | xpress_pulugin_activation('xpressme/xpressme.php'); |
---|
100 | // reloaded |
---|
101 | header('Location: ' . $xoops_config->module_url . '/'); |
---|
102 | |
---|
103 | $err_str = "The activation of the XPressME plugin was executed.<br />\n"; |
---|
104 | $err_str .= "Because the XPressME plugin was invalid.<br />\n"; |
---|
105 | $err_str .= "Please do the rereading seeing on the page.\n"; |
---|
106 | die($err_str); |
---|
107 | } |
---|
108 | |
---|
109 | // It judges it here because it does in is_index_page() through feed to which the permalink is set. |
---|
110 | if (is_wordpress_style() || is_feed()) { |
---|
111 | require_once( ABSPATH . WPINC . '/template-loader.php' ); |
---|
112 | } else { |
---|
113 | ob_start(); |
---|
114 | require_once( ABSPATH . WPINC . '/template-loader.php' ); |
---|
115 | $wp_output = ob_get_contents(); |
---|
116 | ob_end_clean(); |
---|
117 | require_once( ABSPATH .'/include/xpress_render.php' ); |
---|
118 | xpress_render($wp_output); |
---|
119 | } |
---|
120 | |
---|
121 | |
---|
122 | //When there is no block cache, and an optional block is different, cache is refreshed. |
---|
123 | //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time. |
---|
124 | // This Function in xpressme plugin |
---|
125 | require_once( ABSPATH .'/include/xpress_block_render.php' ); |
---|
126 | xpress_unnecessary_block_cache_delete($xoops_config->module_name); |
---|
127 | if (is_home()) xpress_block_cache_refresh($xoops_config->module_name); |
---|
128 | exit(); // The return to wp-blog-header.php is stolen here |
---|
129 | } |
---|
130 | if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path; |
---|
131 | if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path; |
---|
132 | require_once(ABSPATH.'wp-settings.php'); |
---|
133 | ?> |
---|