Viewing 9 replies - 1 through 9 (of 9 total)
  • monodistortion

    (@monodistortion)

    If you can upload the theme files somewhere for me to look at I can probably fix that problem.

    Thread Starter chejo59

    (@chejo59)

    Thank you very much!!

    Here it is.

    Jazzvox

    (@jazzvox)

    Hi monodistortion, thanks a lot for the amazing plugin. It works fine in a customers blog using a modified hybrid theme. But, in my own blog, with a mostly selfdevelopped theme it doesn’t. No errors or anything, just the google-button doesn’t open.

    Please try to help me, I’ve read all topics in this forum, checked and tried anything you recommended to others, my templates are fine, even the page-ID is displayed if you click the [Translate/übersetzung]-Button >> https://strassen-030.de.

    Also there is no other jquery-version inserted – as far as I can read. I de- and reactivated your plugin and others .. still can’t find the clue.

    Output of ajax-translation in the source code:

    <div class="translate_block" style="display: none;">
    <a class="translate_translate" id="translate_button_post-741" lang="de" xml:lang="de" href="javascript:show_translate_popup('de', 'post', 741);">[übersetzung]</a><img src="https://strassen-030.de/wp-content/plugins/google-ajax-translation/transparent.gif" id="translate_loading_post-741" class="translate_loading" style="display: none;" width="16" height="16" alt="" />
    </div>

    Maybe it’s caused by another inline <javascript> ???
    This is my index.php (home):

    <?php get_header(); ?>
    <div id="content">
    <script type="text/javascript" src="https://www.plagaware.de/addpage.js"></script>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
            <div class="entry <?php if(is_home() && $post==$posts[0] && !is_paged()) echo ' firstpost';?>">
                <div class="date">
                    <p><span class="month"><?php the_time('M') ?></span>
                        <span class="day"> <?php the_time('j') ?> </span>
                    </p>
                </div>
                <h3 class="etitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
                <script src="https://feeds.feedburner.com/~s/Starthilfe-ProficientNetwork-Musikkultur-Berlin?i=<?php the_permalink() ?>" type="text/javascript" charset="utf-8"></script>
                <div class="emeta">
                    <?php //the_time('F dS, Y');
                    echo "Kategorie: ";the_category(',');?>
                </div>
                <div class="ebody">
                    <?php the_content(__('Weiterlesen'));?>
                </div>
                <!-- <?php trackback_rdf(); ?> -->
                <?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>
            </div><!-- end of entry class -->
        </div><!-- end of post-ID -->
    <?php endwhile; else: ?>
    	<p><?php _e('Sorry, nichts gefunden zum Thema.'); ?></p>
    	<?php endif; ?>
    	<p><?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?></p>
    </div><!-- end of content -->
    <?php get_sidebar(); ?>
    <!-- end of main column -->
    <?php get_footer(); ?>

    Thanks a lot for your time and effort,

    greetings, mathias

    Thread Starter chejo59

    (@chejo59)

    Well, can’t get it work.

    I’ll be using ver. 4.2 that seems to work ok.

    Thanks!

    Sorry for the delay answering your question. I was busy moving and then away for holidays.

    Jazzvox, it looks like you’re using a sidebar widget to translate the whole page now so you may not need to fix this problem anyway.

    My guess is that your footer did not have the <?php wp_footer(); ?> function in it. This is the hook where the translate popup and the JavaScript is loaded. Look at the default theme in the ‘footer.php’ to see how it should look.

    chejo59,

    Here are the changes to fix this theme. In the file header.php change line 35 from:

    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery-1.2.3.js"></script>
    

    to:

    <?php wp_enqueue_script( 'jquery' ); ?>
    

    This adds a link to the version of jquery included with WordPress. If a plugin needs jquery it will use this version also without adding it twice.

    The JavaScript in the head uses the wrong syntax since WordPress uses “no-conflict mode” so change line 56 from:

    $(document).ready(
    

    to:

    jQuery(document).ready(
    

    Also, change line 58 from:

    function(){
    

    to:

    function($){
    
    Thread Starter chejo59

    (@chejo59)

    You’re incredible monodistortion!

    Thanks a lot for your support. Everything is working great.

    Just one question: with the theme is included a folder with js files.
    Do I have to delete it?
    Or just leave as is?

    Thanks again!

    That folder has a few JavaScript files. The jquery-1.2.3.js file shouldn’t be used so you can delete it of leave it. It doesn’t matter. The other files should stay since the theme probably uses them.

    Thread Starter chejo59

    (@chejo59)

    Thank you very much for your support monodistortion, have a wonderful 2010!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Google AJAX Translation] Two different versions of jQuery’ is closed to new replies.