Change active flags?

Permalink Browser Info Environment
Hi Their

I was just trying to see if i could use the code on the view.css for the templates

a.ccm-multilingual-active-flag {}

To change the active flag country to be a grayed out flag to show active and the others to be in color?


Thanks
Carl

Type: Discussion
Status: New
carl101lee
View Replies: View Best Answer
mkly replied on at Permalink Best Answer Reply
mkly
In order to make that black and white you would probably have to make a set of desaturated images(black and white) and then switch that out.

Another possibility which would not be b&w but would deemphasize it a bit could be to to make it a bit transparent.
a.ccm-multilingual-active-flag img {
  width: 100%;
  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
  filter: alpha(opacity=50);
  -moz-opacity:0.5;
  -khtml-opacity: 0.5;
  opacity: 0.5;
}


I think that covers all the Internet explorer stuff as well, but you might need to play with that a bit. That would at least make the flag less obvious.

Best Wishes,
Mike
carl101lee replied on at Permalink Reply
carl101lee
Hi Thanks to your response worked a treat after i dropped the top line width 100%.

Also would it be possible to stop the link so its none click able when on the relevant page?

On another note.. is it possible to detect the lang on the index page and redirect to the relevant tree?

I was just looking other the forums and i could't find it?

Thanks Carl
mkly replied on at Permalink Reply
mkly
Hello,
Glad that helped get you to where you needed to be.

$dlh = Loader::helper('default_language', 'multilingual');
$lang = $dlh->getSessionDefaultLocale();


Hope that helps.

Best Wishes,
Mike
carl101lee replied on at Permalink Reply
carl101lee
Good Morning mkly

Thanks for all your help...

As for the language detect I had used the coed below which worked, but its a lot longer code than yours and i guess it uses the plugin set-up so i guess its best to switch to this one?


this is my current index/landing page template code? I guess it uses the same principle. So will try replacing with your code see what happends.

<?php     defined('C5_EXECUTE') or die(_("Access Denied."));
$this->inc('elements/header.php'); // get header file ?>
<?php
$Destination['en-au'] = 'en/introduction/';
$Destination['en-us'] = 'en/introduction/';
$Destination['en'] = 'en/introduction/';
$Destination['es'] = '/es/introduccion/';
$Destination['br'] = '/br/introducao/';
$Destination['ar'] = '/br/introducao/';
$DefaultDestination = 'en/introduction/';
$lang = preg_replace('/;.*$/','',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$lang = preg_replace('/,.*$/','',strtolower($lang));
$dest = '';
if( isset($Destination[$lang]) ) { $dest = $Destination[$lang]; }
if( empty($dest) )


Thanks
Carl
mkly replied on at Permalink Reply
mkly
Hello,
I would certainly go with whatever works best for you. There are many solutions to every problem.

The above code I posted works with a helper included in the International Add-On, so that would need to be installed for it to work.

One this it does different, is that it checks for a cookie/session to see if the user has selected a different language. Which means it would react to the user not the location of the site. If you want to go by the location of the site, you route you currently have seems to work better.

Best Wishes,
Mike

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.