Hi, i install i18n logo 6.x-1.x-dev. Upload and config new diferent logo for every language/domain (cz.localhost and de.localhost).
New logo is show in Edit language -> Logo image settings are preview.
But logo in "header" is not insert.



Default logo:

<div id="header" class="clearfix">
     <div class="header-banner"></div>
              <div id="branding">
              <div class="logo-site-name"><strong>
                <span id="logo"><a href="http://cz.localhost/" rel="home"><img src="/sites/all/themes/adaptivetheme/adaptivetheme_kbhcz/logo.png" alt="KBHcz logo" title="Home page" width="320" height="218" /></a></span>                <span id="site-name"><a href="http://cz.localhost/" rel="home">KBHcz</a></span>              </strong></div>
                      <div id="site-slogan">Automatizace pro Vaši výrobu</div>
        </div> <!-- /branding -->
    </div>



Upload logo:

<div id="header" class="clearfix">
     <div class="header-banner"></div>
              <div id="branding">
                                    <h1 class="logo-site-name">
                                <span id="site-name"><a href="http://de.localhost/" rel="home" class="active">KBHcz</a></span>              </h1>
                      <div id="site-slogan">Automatizace pro Vaši výrobu</div>
        </div> <!-- /branding -->
    </div>



How config theme for corect show upload logo.

Thank you Radek

Comments

Lion.creek’s picture

Hi. Any help? It works in garland theme correct. How change code for display logo?
Thank you Radek

"edit"

If change code:

          <?php if ($linked_site_logo or $linked_site_name): ?>
            <?php if ($title): ?>
              <div class="logo-site-name"><strong>
                <?php if ($logo): ?><span id="logo"><?php print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />'; ?></span><?php endif; ?>
                <?php if ($linked_site_name): ?><span id="site-name"><?php print $linked_site_name; ?></span><?php endif; ?>
              </strong></div>
            <?php else: /* Use h1 when the content title is empty */ ?>
              <h1 class="logo-site-name">
                <?php if ($logo): ?><span id="logo"><?php print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />'; ?></span><?php endif; ?>
                <?php if ($linked_site_name): ?><span id="site-name"><?php print $linked_site_name; ?></span><?php endif; ?>
              </h1>
            <?php endif; ?>
          <?php endif; ?>

It works correct.

Bye

Lion.creek’s picture

Status: Active » Closed (fixed)
Jeff Burnz’s picture

Status: Closed (fixed) » Active

The problem occurs in adaptivetheme_preprocess_page where we use theme_image (I like this because of $getsize and we're leveraging a standard Drupal function).

// Line 45 template.preprocess-page.inc
$vars['logo_img'] = $vars['logo'] ? theme('image', substr($vars['logo'], strlen(base_path())), $vars['logo_alt_text'], t('Home page')) : '';

You can implement a fix at the preprocess level by replacing line 45 with this:

$vars['logo_img'] = $vars['logo'] ? '<img src="'. check_url($vars['logo']) .'" alt="'. $vars['logo_alt_text'] .'" title="'. t('Home page') .'"/>' : '';

Granted this is hacking the core theme, however I am going to commit this fix to the 6.x-2.x branch since the former method breaks the i18n Logo functionality.

Jeff Burnz’s picture

Status: Active » Closed (works as designed)