Display the first three languages in the footer

I also changed the flag for English to Great Britain

Closes #769
This commit is contained in:
Ilya Prokopenko 2022-11-06 10:20:00 +07:00
parent 46d3e97e05
commit fbb26ef256
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56
4 changed files with 14 additions and 3 deletions

View file

@ -76,6 +76,9 @@ final class AboutPresenter extends OpenVKPresenter
$this->assertNoCSRF();
setLanguage($_GET['lg']);
}
if(!is_null($_GET['jReturnTo']))
$this->redirect(rawurldecode($_GET['jReturnTo']));
}
function renderExportJSLanguage($lg = NULL): void

View file

@ -263,9 +263,17 @@
<a href="/blog" class="link">{_footer_blog}</a>
<a href="/support" class="link">{_footer_help}</a>
<a href="/dev" target="_blank" class="link">{_footer_developers}</a>
<a href="/language" class="link">{_footer_choose_language}</a>
<a href="/privacy" class="link">{_footer_privacy}</a>
</div>
<p>
{var $currentUrl = $_SERVER["REQUEST_URI"]}
{foreach array_slice(getLanguages(), 0, 3) as $language}
<a href="/language?lg={$language['code']}&hash={urlencode($csrfToken)}&jReturnTo={php echo rawurlencode($currentUrl)}" rel="nofollow" title="{$language['native_name']}" class="link">
<img src="/assets/packages/static/openvk/img/flags/{$language['flag']}.gif" alt="{$language['native_name']}">
</a>
{/foreach}
<a href="/language" class="link">all languages &raquo;</a>
</p>
<p>OpenVK <a href="/about:openvk">{php echo OPENVK_VERSION}</a> | PHP: {phpversion()} | DB: {$dbVersion}</p>
<p n:ifcontent>
{php echo OPENVK_ROOT_CONF["openvk"]["appearance"]["motd"]}

View file

@ -40,7 +40,7 @@
{var $result = preg_match("/(.+)\((.+)\)/", $language['native_name'], $name)}
<a href="language?lg={$language['code']}&hash={urlencode($csrfToken)}" class="link_new" rel="nofollow">
<center><img src="/assets/packages/static/openvk/img/flags/{$language['flag']}.gif"></center>
<center><img src="/assets/packages/static/openvk/img/flags/{$language['flag']}.gif" alt="{$language['native_name']}"></center>
<br>
{if $result == 1}
{$name[1]}

View file

@ -5,7 +5,7 @@ list:
native_name: "Русский"
author: "OpenVK Team"
- code: "en"
flag: "us"
flag: "gb"
name: "English"
native_name: "English"
author: "OpenVK Team"