• Hi Folks.

    I was thinking of switch my Theme to Mystique. But i have a problem with Mystique and qTranslate. I am not sure if this problem is a problem of the Theme or the Plug-in, the Plug-in works with other Themes with no problem.

    So here my problem. If i activate qTranslate the whole layout will be reseted. This mean: no background images in the sidebar, no twitter, rss-feed icon in the header some widget do not work.

    Is someone having the same problem?

    Thanks Florian

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have same problem.
    I love Mistyque but I need qTranslate.

    When I enable the qTranslate, Mystique’s styeseet tag is looks like this.

    <link media="screen" rel="stylesheet" href="https://www.juangotoh.net/wp-content/themes/mystique/style.css" type="text/css" />
    <link media="screen" rel="stylesheet" href="https://www.juangotoh.net/https://www.juangotoh.net/?mystique=css" type="text/css" />

    It’s strange, second line must like this.
    <link media="screen" rel="stylesheet" href="https://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, "https://")!==false || strpos($request, "https://") !== false ) $pageURL=$request;
      	else $pageURL .= $_SERVER["SERVER_NAME"].$request;
    
      return $pageURL;
    }

    And it workd.

    The fix works fine expect for https. If you use an https connection then it still produces mixed up URLs, e.g. “https://localhost:443https://localhost/blackbloc.de/?lang=de&#8221;.

    This fix works! But only for the front page, when I click on a post the same problem occurs again. Please help.

    Thread Starter deficiency

    (@deficiency)

    I switched from qTranslate to xLanguage. It works fine with all Themes. But it′s a lot of migration work by hand, but you can do this also with an SQL-Statement

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Mystique and qTranslate’ is closed to new replies.