Subject: Selecting header images accordingly to the language: pt (portuguese) or en (English) selected by the user.
Ref.: Jamba template from Joomla!Shack
http://www.joomlashack.com/index.php?op ... &Itemid=43
That template has five styles I would like to use. So, the header image selection for the selected language should consider that.
Original code tag h1 of that template
<h1>
<?php if ($headerstyle=='graphic') { ?>
<a href="<?php echo JURI::base(); ?>" title="<?php echo $headline; ?>"><img src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template;?>/images/<?php echo $scheme;?>/logo.png" title="<?php echo $headline; ?>" alt="<?php echo $slogan; ?>"/></a>
<?php } ?>
<?php if ($headerstyle=='text') { ?>
<a href="<?php echo JURI::base(); ?>" title="<?php echo $headline; ?>"><?php echo $headline;?></a>
<?php } ?>
</h1>
I created two folders inside /templates/js_jamba/images/style1/en and /templates/js_jamba/images/style1/pt folders and placed inside each a portugues or english logo.png files as the case.
Modified code to improve header images selection accordingly to the selected language
<h1>
<?php if ($headerstyle=='graphic') { ?>
<?php
$imageDir = "<?php echo $this->baseurl;?>/templates/<?php echo $this->template;?>/images/<?php echo $scheme;?>"
$langImageDir = '/' . $GLOBALS['mosConfig_lang'];
if( dir_exists($imageDir . $langImageDir ) ) { $imageDir = $imageDir . $langImageDir;}?>
<a href="<?php echo JURI::base(); ?>" title="<?php echo $headline; ?>"><img src = "<?php echo $imageDir;?>/logo.png" title="<?php echo $headline; ?>" alt="<?php echo $slogan; ?>"></a>;
<?php } ?>
<?php if ($headerstyle=='text') { ?>
<a href="<?php echo JURI::base(); ?>" title="<?php echo $headline; ?>"><?php echo $headline;?></a>
<?php } ?>
</h1>
The modified code is not working.
Could somebody see why, and where is the mistake?
Thank you.
Samuel
