juangotoh
Forum Replies Created
-
at content-warning-v2/main.php, line 77, it shows like this.
‘enter_url’ => (empty($enter_url) ? ‘http://www.google.com’ : $enter_url),
this will set the enter url to google if setting is empty so I changed it like this.
‘enter_url’ => $enter_url,
then it works fine.
Forum: Plugins
In reply to: Mystique and qTranslateWhen I enable the qTranslate, Mystique’s styeseet tag is looks like this.
<link media="screen" rel="stylesheet" href="http://www.juangotoh.net/wp-content/themes/mystique/style.css" type="text/css" /> <link media="screen" rel="stylesheet" href="http://www.juangotoh.net/http://www.juangotoh.net/?mystique=css" type="text/css" />It’s strange, second line must like this.
<link media="screen" rel="stylesheet" href="http://www.juangotoh.net/?mystique=css" type="text/css" />This line is created at function mystique_load_stylesheets() defined at settings.php…
function mystique_load_stylesheets(){ ?> <link media="screen" rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" /> <link media="screen" rel="stylesheet" href="<?php echo esc_url_raw(add_query_arg('mystique', 'css', (is_404() ? get_bloginfo('url') : mystique_curPageURL()))); ?>" type="text/css" /> <!--[if lte IE 6]><link media="screen" rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie6.css" type="text/css" /><![endif]--> <!--[if IE 7]><link media="screen" rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie7.css" type="text/css" /><![endif]--> <?php }the function mystique_curPageURL() create wrong URL when qTranslate is enabled.
this function was also used for loading jQuery script. so We need check this function.It defined at core.php…
function mystique_curPageURL() { $request = esc_url($_SERVER["REQUEST_URI"]); // wp-themes fake request url fix :) if (strpos($_SERVER["SERVER_NAME"], 'wp-themes.com') !== false) $request = str_replace($request, '/wordpress/', '/'); $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") $pageURL .= "s"; $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$request; else $pageURL .= $_SERVER["SERVER_NAME"].$request; return $pageURL; }I don’t know why, but when qTranslate is enabled, esc_url() return full url string instead relative path. so I change this function like this…
function mystique_curPageURL() { $request = esc_url($_SERVER["REQUEST_URI"]); // wp-themes fake request url fix :) if (strpos($_SERVER["SERVER_NAME"], 'wp-themes.com') !== false) $request = str_replace($request, '/wordpress/', '/'); $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") $pageURL .= "s"; $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$request; elseif(strpos($request, "http://")!==false || strpos($request, "https://") !== false ) $pageURL=$request; else $pageURL .= $_SERVER["SERVER_NAME"].$request; return $pageURL; }And it workd.
Forum: Plugins
In reply to: Mystique and qTranslateI have same problem.
I love Mistyque but I need qTranslate.