Jump to content

Flags "in line" instead drop down


Recommended Posts

In blocklanguages.tpl

replace

<div id="languages_block_top">

with

<div id="languages_block_top_mod">

remove

{foreach from=$languages key=k item=language name="languages"}
   {if $language.iso_code == $lang_iso}
       <p class="selected_language">
           <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
       </p>
   {/if}
{/foreach}
<ul id="first-languages" class="countries_ul">

remove

<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>

remove

</ul>

In blocklanguages.css

Add

#header_right #languages_block_top_mod {
   float:right;
   margin: 0;
   padding:2px 6px 1px 6px;
}

 

/Mats

  • Like 1
Link to comment
Share on other sites

You may also want to change

<img src="{$img_lang_dir} {$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />

to

<img {if $language.iso_code == $lang_iso}class="opacity"{/if} src="{$img_lang_dir} {$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />

and add

.opacity {
filter:alpha(opacity=30);
-moz-opacity:0.3;
-khtml-opacity: 0.3;
opacity: 0.3;
}

to blocklanguages.css

 

30/0.3 is just an example that I think looks good, make it lower for higher transparancy and vice versa.

 

/Mats

Edited by mohsart (see edit history)
Link to comment
Share on other sites

Not really.

You could look in blocklanguages.tpl and reverse the foreach loop (cannot be done directly in smarty though), or mess around with blocklanguages.css

Perhaps it is possible to edit the database to accomplish the exact order you want.

 

/Mats

Link to comment
Share on other sites

  • 5 months later...

You may also want to change

<img src="{$img_lang_dir} {$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />

to

<img {if $language.iso_code == $lang_iso}class="opacity"{/if} src="{$img_lang_dir} {$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />

and add

.opacity {
filter:alpha(opacity=30);
-moz-opacity:0.3;
-khtml-opacity: 0.3;
opacity: 0.3;
}

to blocklanguages.css

 

30/0.3 is just an example that I think looks good, make it lower for higher transparancy and vice versa.

 

/Mats

 

This is great Mats, almost what I was looking for. However, how do I change it around so the opacity is on the inactive language(s)? Right now the active language has opacity which seems wrong to me.

 

EDIT: Found the solution myself. Just switched "==" and "!=" and it did the opposite. :-)

Edited by dklap3 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...