-
AuthorPosts
-
Anonymous Moderator
JA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 25, 2010 at 5:24 pm #149823Please try to do with my way:
Example for ja kyanite ii template:
step 1:
Please open ja_kyanite_iilayoutsblocksheader.php file, find following code section:[PHP]<?php
$siteName = $this->sitename();
if ($this->getParam(‘logoType’)==’image’): ?>
<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
<?php else:
$logoText = (trim($this->getParam(‘logoType-text-logoText’))==”) ? $config->sitename : $this->getParam(‘logoType-text-logoText’);
$sloganText = (trim($this->getParam(‘logoType-text-sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $this->getParam(‘logoType-text-sloganText’);?>
<div class=”logo-text”>
<h1><a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a></h1>
<p class=”site-slogan”><?php echo $sloganText;?></p>
</div>
<?php endif; ?>
[/PHP]and change to:
[PHP]
<?php
$config =& JFactory::getConfig();
$language = $config->getValue(‘config.language’);$logo_class = “logo”; //default
if ($language == “vi-VN”) {
// for vietnamese language
$logo_class = “logo_vi”;} else if ($language == “tr-TR”) {
// for Turkish
$logo_class = “logo_tr”;
}$siteName = $this->sitename();
if ($this->getParam(‘logoType’)==’image’): ?>
<h1 class=”<?php echo $logo_class;?>”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
<?php else:
$logoText = (trim($this->getParam(‘logoType-text-logoText’))==”) ? $config->sitename : $this->getParam(‘logoType-text-logoText’);
$sloganText = (trim($this->getParam(‘logoType-text-sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $this->getParam(‘logoType-text-sloganText’);?>
<div class=”logo-text”>
<h1><a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a></h1>
<p class=”site-slogan”><?php echo $sloganText;?></p>
</div>
<?php endif; ?>[/PHP]
step 2
Open templates/ja_kyanite_ii/css/template.css file, add following code section to the end of file:
h1.logo_vn { font-size: 250%; line-height: 1; margin: 15px 0 0; }
h1.logo_vn { float: left; }
/* Logo Image ---*/
h1.logo_vn { height: 45px; width: 236px; }h1.logo_vn a {
background: url(../images/logo_vn.gif) no-repeat left center;
display: block;
height: 45px;
width: 236px;
}h1.logo_vn a span { position: absolute; top: -1000px; }
h1.logo_tr { font-size: 250%; line-height: 1; margin: 15px 0 0; }
h1.logo_tr { float: left; }
/* Logo Image ---*/
h1.logo_tr { height: 45px; width: 236px; }h1.logo_tr a {
background: url(../images/logo_tr.gif) no-repeat left center;
display: block;
height: 45px;
width: 236px;
}h1.logo_tr a span { position: absolute; top: -1000px; }
For my guider, you can use a logo image for a language.
Please click thank you button if my guider is good for you. Thanks a lot.
March 25, 2010 at 5:47 pm #337772sorry but can you please give more explications , its for a site with how much languages ?
March 25, 2010 at 9:43 pm #337795i need a solution for a 3 or 4 languages website please
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 26, 2010 at 7:09 am #337849<em>@simoslav 171377 wrote:</em><blockquote>sorry but can you please give more explications , its for a site with how much languages ?</blockquote>
=> You can modify my code for multi languages.
It is easy to it.
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 26, 2010 at 7:11 am #337850For example:
if ($language == “vi-VN”) {
// for vietnamese language
$logo_class = “logo_vi”;} else if ($language == “tr-TR”) {
// for Turkish
$logo_class = “logo_tr”;
} else if ($language == “th-TH”) {
$logo_class = “logo_th”;
} else if ($language == “ta-LK”) {$logo_class = “logo_td”;
} else if ($language == “tl-PH”) {$logo_class = “logo_tl”;
}……………
March 26, 2010 at 3:41 pm #337904thanks alot 🙂 its worked just there is a small problem , when for example im in english and i switch to the french version there is a problem , the home still leading to the english website but only with one menu item shown : Home , the others menu items do not appear
normally its must show site.com/fr and site.com/en and site.com/ar
its was working this way before i change to this new codeMarch 28, 2010 at 11:26 pm #338144solved , was an issue between sh404sef and joomfish , thanks alot ! now all is working fine
harsa Friendharsa
- Join date:
- August 2008
- Posts:
- 34
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
May 4, 2010 at 10:02 am #342614how about for JA Opal? do i have to change at the index.php or where?
/harsa
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
May 6, 2010 at 8:20 am #342799Dear harsa!
Here is the short solution to resolve your issue:
pls open the file templatesja_opalindex.php and find the following code:
[PHP]
<?php
$siteName = $tmpTools->sitename();
if ($tmpTools->getParam(‘logoType’)==’image’) { ?>
<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
<?php } else {
$logoText = (trim($tmpTools->getParam(‘logoText’))==”) ? $config->sitename : $tmpTools->getParam(‘logoText’);
$sloganText = (trim($tmpTools->getParam(‘sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $tmpTools->getParam(‘sloganText’); ?>
<div class=”logo-text”>
<p class=”site-slogan”><?php echo $sloganText;?></p>
<h1>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a>
</h1>
</div>
<?php } ?>
[/PHP]
[PHP]
<?php
$config =& JFactory::getConfig();
$language = $config->getValue(‘config.language’);$siteName = $tmpTools->sitename();
if ($tmpTools->getParam(‘logoType’)==’image’) { ?>
<h1 class=”logo <?php echo strtolower($language) ;?>”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
<?php } else {
$logoText = (trim($tmpTools->getParam(‘logoText’))==”) ? $config->sitename : $tmpTools->getParam(‘logoText’);
$sloganText = (trim($tmpTools->getParam(‘sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $tmpTools->getParam(‘sloganText’); ?>
<div class=”logo-text”>
<p class=”site-slogan”><?php echo $sloganText;?></p>
<h1>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a>
</h1>
</div>
<?php } ?>
[/PHP]now, i give you example on this,
suppose that you site has two languages: English and Turkish, and you would like to override logo for the Turkish language, you ‘ll do this as following:
1) language code of Turkish language is “tr-TR”
you’ll add the following css into the template:
h1.tr-tr a {
background: url(../images/logo-tr-tr.png) no-repeat center !important;
}with other you ‘ll do as so
Good luck
1 user says Thank You to Saguaros for this useful post
-
AuthorPosts
This topic contains 10 replies, has 4 voices, and was last updated by harsa 14 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum