// デフォルト設定を読み込んで include P2_CONF_DIR . '/conf_user_style.inc.php'; // スキンで上書き if ($skin != P2_CONF_DIR . '/conf_user_style.inc.php') { include $skin; } // }}} // {{{ デザイン設定の調整処理 $skin_uniq = P2_VERSION_ID; foreach ($STYLE as $K => $V) { if ($V === null || $V === '') { // pass } elseif (strpos($K, 'fontfamily') !== false) { $STYLE[$K] = p2_correct_css_fontfamily($V); } elseif (strpos($K, 'color') !== false) { $STYLE[$K] = p2_correct_css_color($V); } elseif (strpos($K, 'background') !== false) { $STYLE[$K] = "url('" . p2_escape_css_url($V) . "')"; } } if (!$_conf['ktai']) { if (!function_exists('p2_fontconfig_apply_custom')) { include P2_LIB_DIR . '/fontconfig.inc.php'; } if ($_conf['expack.am.enabled']) { $_conf['expack.am.fontfamily'] = p2_correct_css_fontfamily($_conf['expack.am.fontfamily']); if ($STYLE['fontfamily']) { $_conf['expack.am.fontfamily'] .= '","' . $STYLE['fontfamily']; } } p2_fontconfig_apply_custom();
/** * @return void */ function _setStyle() { global $_conf, $STYLE, $MYSTYLE; // デフォルトCSS設定($STYLE, $MYSTYLE)を読み込む include_once $_conf['conf_user_style_inc_php']; if ($_conf['skin'] = P2Util::getSkinSetting()) { // スキンで$STYLEを上書き $skinfile = P2Util::getSkinFilePathBySkinName($_conf['skin']); if (file_exists($skinfile)) { include_once $skinfile; } } // $STYLE設定の調整処理 //if ($_SERVER['SCRIPT_NAME'] == 'css.php') { foreach ($STYLE as $k => $v) { if (empty($v)) { $STYLE[$k] = ''; } elseif (strpos($k, 'fontfamily') !== false) { $STYLE[$k] = p2_correct_css_fontfamily($v); } elseif (strpos($k, 'color') !== false) { $STYLE[$k] = p2_correct_css_color($v); } elseif (strpos($k, 'background') !== false) { $STYLE[$k] = 'url("' . p2_escape_css_url($v) . '")'; } } //} }