• Resolved idoa

    (@idoa)


    This was working well with the lang codes ([:en] English text [:fr] French text)and Ever since the latest upgrade to 3.9 qTranslate is not working.
    I recently switched from qTranslate to mqTranslate, which is the same only much faster updates, and now everything works but the slider.
    it shows the whole line including all the [:en]&[:fr] in the Title, Description and Buttons of the front page slider.

    Any solution will be greatly appreciated

    Thanks in advance

Viewing 15 replies - 1 through 15 (of 17 total)
  • You would have to modify class-fire-init.php around line 320 to add:
    add_theme_support( 'mqtranslate' );

    and change line 419 from:
    if ( current_theme_supports( 'qtranslate' ) && is_plugin_active('qtranslate/qtranslate.php') ) {

    to:

    if ( ( current_theme_supports( 'qtranslate' ) || current_theme_supports( 'mqtranslate' ) ) && (
    is_plugin_active('qtranslate/qtranslate.php') || is_plugin_active('mqtranslate/mqtranslate.php') ) ) {

    (Thanks to d4z_c0nf for this code.)

    Let us know how you get on.

    Thank you it’s worked for me ??

    Thread Starter idoa

    (@idoa)

    Thank you very much, works perfectly.

    I added class-fire-init.php in my child theme and changed what you said…

    In slider I write [:en]text[:de]text

    and it do not work… What’s wrong ?

    Thanks

    Added that file where? In
    customizr-child/inc/ ?

    I copied class-fire-init.php in customizr-child-theme directly and made changes on class-fire-init.php…

    customizr-child/class-fire-init.php is the path…

    Should work, in fact you have fps translated.
    So it doesn’ work for you with the slide mm, are you using some other filter on the slides in your child-theme functions.php?

    <?php

    // Adds a widget area.
    if (function_exists(‘register_sidebar’)) {
    register_sidebar(array(
    ‘name’ => ‘Extra Header Widget Area’,
    ‘id’ => ‘extra-widget-area’,
    ‘description’ => ‘Extra widget area after the header’,
    ‘before_widget’ => ‘<div class=”widget my-extra-widget span9″>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h2>’,
    ‘after_title’ => ‘</h2>’
    ));
    }

    // Place the widget area after the header
    add_action (‘__after_navbar’, ‘add_my_widget_area’, 0);
    function add_my_widget_area() {
    if (function_exists(‘dynamic_sidebar’)) {
    dynamic_sidebar(‘Extra Header Widget Area’);
    }
    }

    add_filter(‘tc_credits_display’, ‘my_custom_credits’);
    function my_custom_credits(){
    echo ‘<div class=”span4 credits”>
    <p> · ? ‘.esc_attr( date( ‘Y’ ) ).’ ‘.esc_attr(get_bloginfo()).’ · Designed by Customizr ·</p></div>’;
    }

    // Adds a widget area. It gets registered automatically as part of the arra
    add_filter( ‘tc_footer_widgets’, ‘my_footer_widgets’);
    function my_footer_widgets( $default_widgets_area ) {
    $default_widgets_area[‘footer_four’] = array(
    ‘name’ => __( ‘Footer Widget Area Four’ , ‘customizr’ ),
    ‘description’ => __( ‘Just use it as you want !’ , ‘customizr’ )
    );
    return $default_widgets_area;
    }

    // Style all the footer widgets so they take up the right space
    add_filter( ‘footer_one_widget_class’, ‘my_footer_widget_class’);
    add_filter( ‘footer_two_widget_class’, ‘my_footer_widget_class’);
    add_filter( ‘footer_three_widget_class’, ‘my_footer_widget_class’);
    add_filter( ‘footer_four_widget_class’, ‘my_footer_widget_class’);
    function my_footer_widget_class() {
    return ‘span3’;
    }

    add_action( ‘init’, ‘register_secondary_menu’ ); // this registers your menu with WP
    function register_secondary_menu() {
    if ( function_exists( ‘register_nav_menu’ ) ) {
    register_nav_menu( ‘secondary-menu’, ‘Secondary Menu’ );
    }
    }

    // Select the add_action you need, depending on where you want to add the menu and disable the rest:

    add_action(‘wp_footer’, ‘display_secondary_menu’, 1000, 0); // use this to add before credits

    // display function for your menu:
    function display_secondary_menu() {
    echo ( has_nav_menu( ‘secondary-menu’ ) ? wp_nav_menu (
    array (
    ‘theme_location’ => ‘secondary-menu’,
    ‘container_id’ => ‘secondary-menu’,
    ‘container_class’ => ‘secondary-menu’
    )
    ).'<div class=”clearall”></div>’ : ” );
    }

    // Adds a widget area to house qtranslate flags. Will need styling.
    if (function_exists(‘register_sidebar’)) {
    register_sidebar(array(
    ‘name’ => ‘Extra Widget In Socials’,
    ‘id’ => ‘extra-widget’,
    ‘description’ => ‘Extra widget in the social links area’,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ”,
    ‘after_title’ => ”
    ));
    }
    // Place the widget area in the social links area
    add_filter (‘tc_social_in_header’, ‘add_my_widget’);
    function add_my_widget() {
    if (function_exists(‘dynamic_sidebar’)) {
    dynamic_sidebar(‘Extra Widget In Socials’);
    }
    }

    This is my function.php, it looks there is nothing for slider…

    Yeah nothing.

    Sorry, don’t know, it works here (and not only)

    Wanna try to go to: mqtranslate settings -> Advanced Settings -> Reset mqTranslate
    and check all those three options and then save?
    Notice, they says:
    If something isn’t working correctly, you can always try to reset all mqTranslate settings. A Reset won’t delete any posts but will remove all settings (including all languages added).

    So it’s up to you..

    removes all languages added… I added 3 languages which are not by default… Is it possible to backup them ? hm

    <?php
    /**
    * The Header for Customizr.
    *
    * Displays all of the <head> section and everything up till <div id=”main-wrapper”>
    *
    * @package Customizr
    * @since Customizr 1.0
    */
    ?>
    <!DOCTYPE html>
    <!–[if IE 7]>
    <html class=”ie ie7″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if IE 8]>
    <html class=”ie ie8″ <?php language_attributes(); ?>>
    <![endif]–>
    <!–[if !(IE 7) | !(IE 8) ]><!–>
    <html <?php language_attributes(); ?>>
    <!–<![endif]–>

    <?php
    //the ‘__before_body’ hook is used by TC_header_main::$instance->tc_head_display()
    do_action( ‘__before_body’ );
    ?>

    <body <?php body_class(); ?> <?php echo tc__f(‘tc_body_attributes’ , ‘itemscope itemtype=”https://schema.org/WebPage”&#8216;) ?>>

    <?php do_action( ‘__before_header’ ); ?>

    <header class=”<?php echo tc__f(‘tc_header_classes’, ‘tc-header clearfix row-fluid’) ?>” role=”banner”>

    <?php
    //the ‘__header’ hook is used by (ordered by priorities) : TC_header_main::$instance->tc_logo_title_display(), TC_header_main::$instance->tc_tagline_display(), TC_header_main::$instance->tc_navbar_display()
    do_action( ‘__header’ );
    ?>
    <script>
    (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);

    ga(‘create’, ‘UA-49536329-1’, ‘apartmentsinmakarska.net’);
    ga(‘send’, ‘pageview’);

    </script>
    </header>

    <?php
    //This hook is filtered with the slider : TC_slider::$instance->tc_slider_display()
    do_action ( ‘__after_header’ )
    ?>

    This is also in my child theme->header.php
    I added it because of IE not working properly … On the bottom you can find something about hooking a slider…

    I tried to delete it and it does not work again…

    Yeah that thing is a comment that tells you that the hook __after_header is used by the slider class to display the slider, nothing strange.
    Didn’t get the part about ie, I can see just the ga code which, by the way, could be inserted in another way, but there’s nothing really wrong in that.

    About mqtranslate don’t get if you tried to reset it, and about the back-up don’t know.. you mean files or db tables? ‘Cause if you’re talking about the qtranslate tables in the db, it’s what “we” want to flush.

    The thing is that, if mqtranslate doesn’t filter the slide texts you should see something like [:it]XXX[:en]YYY , but you don’t see those you see a normal text but a wrong text.. :/

    I mean that I do some sort of backup and reset mqtranslate… Later if it does not solve the problem just to bring it back like it used to be…

    Now I use Updraft plus backup for general backup… Later if I restore backed up files should it restore all the added languages I worked on?

    Thanks

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘qTranslate problem on slider’ is closed to new replies.