Remove language selectors from themes

This is now a user setting
This commit is contained in:
fabrixxm 2015-11-08 14:42:54 +01:00
parent fb3ac68cc0
commit ae9c9829fa
21 changed files with 672 additions and 941 deletions

View file

@ -27,7 +27,6 @@ function nav(&$a) {
$a->page['nav'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$langselector' => lang_selector(),
'$sitelocation' => $nav_info['sitelocation'],
'$nav' => $nav_info['nav'],
'$banner' => $nav_info['banner'],

View file

@ -1738,50 +1738,6 @@ function unamp($s) {
}}
if(! function_exists('lang_selector')) {
/**
* get html for language selector
* @global string $lang
* @return string
* @template lang_selector.tpl
*/
function lang_selector() {
global $lang;
$langs = glob('view/*/strings.php');
$lang_options = array();
$selected = "";
if(is_array($langs) && count($langs)) {
$langs[] = '';
if(! in_array('view/en/strings.php',$langs))
$langs[] = 'view/en/';
asort($langs);
foreach($langs as $l) {
if($l == '') {
$lang_options[""] = t('default');
continue;
}
$ll = substr($l,5);
$ll = substr($ll,0,strrpos($ll,'/'));
$selected = (($ll === $lang && (x($_SESSION, 'language'))) ? $ll : $selected);
$lang_options[$ll]=$ll;
}
}
$tpl = get_markup_template("lang_selector.tpl");
$o = replace_macros($tpl, array(
'$title' => t('Select an alternate language'),
'$langs' => array($lang_options, $selected),
));
return $o;
}}
if(! function_exists('return_bytes')) {
/**
* return number of bytes in size (K, M, G)

View file

@ -13,7 +13,6 @@ function navigation_content(&$a) {
$tpl = get_markup_template('navigation.tpl');
return replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$langselector' => lang_selector(),
'$sitelocation' => $nav_info['sitelocation'],
'$nav' => $nav_info['nav'],
'$banner' => $nav_info['banner'],

View file

@ -1,11 +0,0 @@
<div id="lang-select-icon" class="icon s22 language" title="{{$title}}" onclick="openClose('language-selector');" >lang</div>
<div id="language-selector" style="display: none;" >
<form action="#" method="post" >
<select name="system_language" onchange="this.form.submit();" >
{{foreach $langs.0 as $v=>$l}}
<option value="{{$v|escape:'html'}}" {{if $v==$langs.1}}selected="selected"{{/if}}>{{$l}}</option>
{{/foreach}}
</select>
</form>
</div>

View file

@ -3394,11 +3394,6 @@ aside input[type='text'] {
margin-bottom: 15px;
}
#language-selector {
position: absolute;
top: 0px;
left: 16px;
}
#group-members {
margin-top: 20px;
@ -3576,20 +3571,6 @@ aside input[type='text'] {
text-decoration: underline;
}
#lang-select-icon {
cursor: pointer;
position: fixed;
left: 0px;
top: 0px;
opacity: 0.2;
filter:alpha(opacity=20);
}
#lang-select-icon:hover {
opacity: 1;
filter:alpha(opacity=100);
}
.notif-image {
height: 80px;
width: 80px;
@ -3601,7 +3582,6 @@ aside input[type='text'] {
}
/**
* Plugins settings
*/

View file

@ -1,11 +0,0 @@
<div id="lang-select-icon" class="icon s22 language" title="{{$title}}" onclick="openClose('language-selector');" ></div>
<div id="language-selector" style="display: none;" >
<form action="#" method="post" >
<select name="system_language" onchange="this.form.submit();" >
{{foreach $langs.0 as $v=>$l}}
<option value="{{$v}}" {{if $v==$langs.1}}selected="selected"{{/if}}>{{$l}}</option>
{{/foreach}}
</select>
</form>
</div>

View file

@ -125,8 +125,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
#notify-update{background-position:-60px 0px;}
#home-update{background-position:-90px 0px;}
#intro-update{background-position:-120px 0px;}
#lang-select-icon{cursor:pointer;position:fixed;left:28px;bottom:6px;z-index:10;}
#language-selector{position:fixed;bottom:2px;left:52px;z-index:10;}
.menu-popup{position:absolute;display:none;background:white;color:#2e2f2e;margin:0px;padding:0px;font-size:small;line-height:1.2;border:3px solid #88a9d2;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;z-index:100000;-moz-box-shadow:5px 5px 5px 0px #111111;-o-box-shadow:5px 5px 5px 0px #111111;-webkit-box-shadow:5px 5px 5px 0px #111111;-ms-box-shadow:5px 5px 5px 0px #111111;box-shadow:5px 5px 5px 0px #111111;}.menu-popup a{display:block;color:#2e2f2e;padding:5px 10px;text-decoration:none;}.menu-popup a:hover{color:#eeeecc;background-color:#88a9d2;}
.menu-popup .menu-sep{border-top:1px solid #4e4f4e;}
.menu-popup li{float:none;overflow:auto;height:auto;display:block;}.menu-popup li img{float:left;width:16px;height:16px;padding-right:5px;}

View file

@ -798,19 +798,7 @@ nav #nav-notifications-linkmenu {
#intro-update {
background-position: -120px 0px;
}
#lang-select-icon {
cursor: pointer;
position: fixed;
left: 28px;
bottom: 6px;
z-index: 10;
}
#language-selector {
position: fixed;
bottom: 2px;
left: 52px;
z-index: 10;
}
.menu-popup {
position: absolute;
display: none;

View file

@ -125,8 +125,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
#notify-update{background-position:-60px 0px;}
#home-update{background-position:-90px 0px;}
#intro-update{background-position:-120px 0px;}
#lang-select-icon{cursor:pointer;position:fixed;left:28px;bottom:6px;z-index:10;}
#language-selector{position:fixed;bottom:2px;left:52px;z-index:10;}
.menu-popup{position:absolute;display:none;background:white;color:#111111;margin:0px;padding:0px;font-size:small;line-height:1.2;border:3px solid #3465a4;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;z-index:100000;-moz-box-shadow:5px 5px 5px 0px #111111;-o-box-shadow:5px 5px 5px 0px #111111;-webkit-box-shadow:5px 5px 5px 0px #111111;-ms-box-shadow:5px 5px 5px 0px #111111;box-shadow:5px 5px 5px 0px #111111;}.menu-popup a{display:block;color:#111111;padding:5px 10px;text-decoration:none;}.menu-popup a:hover{color:#eeeeec;background-color:#3465a4;}
.menu-popup .menu-sep{border-top:1px solid #4e4f4e;}
.menu-popup li{float:none;overflow:auto;height:auto;display:block;}.menu-popup li img{float:left;width:16px;height:16px;padding-right:5px;}

View file

@ -799,19 +799,7 @@ nav #nav-notifications-linkmenu {
#intro-update {
background-position: -120px 0px;
}
#lang-select-icon {
cursor: pointer;
position: fixed;
left: 28px;
bottom: 6px;
z-index: 10;
}
#language-selector {
position: fixed;
bottom: 2px;
left: 52px;
z-index: 10;
}
.menu-popup {
position: absolute;
display: none;

View file

@ -1,11 +0,0 @@
<div id="lang-select-icon" class="icon s22 language" title="{{$title}}" onclick="openClose('language-selector');" ></div>
<div id="language-selector" style="display: none;" >
<form action="#" method="post" >
<select name="system_language" onchange="this.form.submit();" >
{{foreach $langs.0 as $v=>$l}}
<option value="{{$v}}" {{if $v==$langs.1}}selected="selected"{{/if}}>{{$l}}</option>
{{/foreach}}
</select>
</form>
</div>

View file

@ -2713,12 +2713,6 @@ aside input[type='text'] {
margin-bottom: 15px;
}
#language-selector {
position: absolute;
top: 0px;
left: 16px;
}
#group-members {
margin-top: 20px;
padding: 10px;
@ -2888,19 +2882,6 @@ aside input[type='text'] {
text-decoration: underline;
}
#lang-select-icon {
cursor: pointer;
position: absolute;
left: 0px;
top: 0px;
opacity: 0.2;
filter:alpha(opacity=20);
}
#lang-select-icon:hover {
opacity: 1;
filter:alpha(opacity=100);
}
.notif-image {
height: 80px;

View file

@ -1,11 +0,0 @@
<div id="lang-select-icon" class="icon s22 language" title="{{$title}}" onclick="openClose('language-selector');" ></div>
<div id="language-selector" style="display: none;" >
<form action="#" method="post" >
<select name="system_language" onchange="this.form.submit();" >
{{foreach $langs.0 as $v=>$l}}
<option value="{{$v}}" {{if $v==$langs.1}}selected="selected"{{/if}}>{{$l}}</option>
{{/foreach}}
</select>
</form>
</div>

View file

@ -2493,11 +2493,6 @@ aside input[type='text'] {
margin-bottom: 15px;
}
#language-selector {
position: absolute;
top: 0px;
left: 16px;
}
#group-members {
margin-top: 20px;
@ -2668,19 +2663,6 @@ aside input[type='text'] {
text-decoration: underline;
}
#lang-select-icon {
cursor: pointer;
position: absolute;
left: 0px;
top: 0px;
opacity: 0.2;
filter:alpha(opacity=20);
}
#lang-select-icon:hover {
opacity: 1;
filter:alpha(opacity=100);
}
.notif-image {
height: 80px;

View file

@ -3389,11 +3389,6 @@ aside input[type='text'] {
margin-bottom: 15px;
}
#language-selector {
position: absolute;
top: 0px;
left: 16px;
}
#group-members {
margin-top: 20px;
@ -3570,20 +3565,6 @@ aside input[type='text'] {
text-decoration: underline;
}
#lang-select-icon {
cursor: pointer;
position: fixed;
left: 0px;
top: 0px;
opacity: 0.2;
filter:alpha(opacity=20);
}
#lang-select-icon:hover {
opacity: 1;
filter:alpha(opacity=100);
}
.notif-image {
height: 80px;
width: 80px;

View file

@ -1,11 +0,0 @@
<div id="lang-select-icon" class="icon s22 language" title="{{$title}}" onclick="openClose('language-selector');" ></div>
<div id="language-selector" style="display: none;" >
<form action="#" method="post" >
<select name="system_language" onchange="this.form.submit();" >
{{foreach $langs.0 as $v=>$l}}
<option value="{{$v}}" {{if $v==$langs.1}}selected="selected"{{/if}}>{{$l}}</option>
{{/foreach}}
</select>
</form>
</div>

View file

@ -3159,12 +3159,6 @@ aside input[type='text'] {
margin-bottom: 15px;
}
#language-selector {
position: absolute;
top: 0px;
left: 16px;
}
#group-members {
margin-top: 20px;
padding: 10px;
@ -3351,19 +3345,6 @@ aside input[type='text'] {
text-decoration: underline;
}
#lang-select-icon {
cursor: pointer;
position: absolute;
left: 0px;
top: 0px;
opacity: 0.2;
filter:alpha(opacity=20);
}
#lang-select-icon:hover {
opacity: 1;
filter:alpha(opacity=100);
}
.notif-image {
height: 80px;

View file

@ -1,11 +0,0 @@
<div id="lang-select-icon" class="icon s22 language" title="{{$title}}" onclick="openClose('language-selector');" ></div>
<div id="language-selector" style="display: none;" >
<form action="#" method="post" >
<select name="system_language" onchange="this.form.submit();" >
{{foreach $langs.0 as $v=>$l}}
<option value="{{$v}}" {{if $v==$langs.1}}selected="selected"{{/if}}>{{$l}}</option>
{{/foreach}}
</select>
</form>
</div>

View file

@ -575,19 +575,7 @@ ul#user-menu-popup li a.nav-sep {
background-position: 0px 0px;
}
#lang-select-icon {
bottom: 5px;
cursor: pointer;
left: 25px;
position: fixed;
z-index: 10;
}
#language-selector {
position: fixed;
bottom: 2px;
left: 55px;
z-index: 10;
}
/* =================== */
/* = System Messages = */

View file

@ -1,11 +0,0 @@
<div id="lang-select-icon" class="icon s22 language" title="{{$title}}" onclick="openClose('language-selector');" ></div>
<div id="language-selector" style="display: none;" >
<form action="#" method="post" >
<select name="system_language" onchange="this.form.submit();" >
{{foreach $langs.0 as $v=>$l}}
<option value="{{$v}}" {{if $v==$langs.1}}selected="selected"{{/if}}>{{$l}}</option>
{{/foreach}}
</select>
</form>
</div>

View file

@ -388,18 +388,7 @@ ul#user-menu-popup li a.nav-sep { border-top: 1px solid #989898; border-style:in
#intro-update { background-position: 0px -84px; }
#home-update { background-position: 0px 0px; }
#lang-select-icon {
cursor: pointer;
position: absolute;
left: 5px;
top: 5px;
}
#language-selector {
position: absolute;
top: 0;
left: 16px;
}
/* =================== */
/* = System Messages = */