diff options
author | filip <filip.komar@gmail.com> | 2016-06-28 18:33:45 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2016-06-28 18:33:45 +0200 |
commit | 919bbda416c2add0463b2ae2fcf5b802f4efd59a (patch) | |
tree | 7a91b14f81972daff62cfd9a817f3f91218e6f4d /langs.php | |
parent | 80c9f1c7aef4eb6500d7f3f907357cb878df5812 (diff) | |
download | www-919bbda416c2add0463b2ae2fcf5b802f4efd59a.tar www-919bbda416c2add0463b2ae2fcf5b802f4efd59a.tar.gz www-919bbda416c2add0463b2ae2fcf5b802f4efd59a.tar.bz2 www-919bbda416c2add0463b2ae2fcf5b802f4efd59a.tar.xz www-919bbda416c2add0463b2ae2fcf5b802f4efd59a.zip |
start with the common footer on some pages
+ separate function for it
+ separate css for it
+ expanding i18n function for that purpose (to accept more than one gettext file)
Diffstat (limited to 'langs.php')
-rw-r--r-- | langs.php | 42 |
1 files changed, 40 insertions, 2 deletions
@@ -23,8 +23,8 @@ if ($_SERVER['HTTP_HOST'] == 'www-test.mageia.org') { //$g_app_root = realpath(dirname(__FILE__)); //define('G_APP_ROOT', $g_app_root); -$g_donate_amount = '--'; -$g_amount_remain = 'EUR 10,244.46'; +// $g_donate_amount = '--'; +// $g_amount_remain = 'EUR 10,244.46'; $G_coord_assos = <<<T Association Mageia.Org @@ -86,3 +86,41 @@ $hsfoot = ''; if (!defined('HLANG')) echo $hsnav; + +/** + * Output common footer in passed language + * + * @param string $locale + * + * @return string $common_footer +*/ +function common_footer($locale = 'en') +{ + $nav = array( + 'nav-support' => array('support/', _r('Support')), + 'nav-community' => array('community/', _r('Community')), + 'nav-about' => array('about/', _r('About Mageia.Org')) + ); + + $common_footer = '<hr class="divider">' . PHP_EOL; + $common_footer .= '<div id="down">' . PHP_EOL; + $common_footer .= ' <div class="container">' . PHP_EOL; + $common_footer .= ' <ul id="navb">'; + foreach ($nav as $k => $v) { + $common_footer .= sprintf( + '<li><a class="%s" href="%s">%s</a></li>', + $k, $v[0], $v[1] + ); + } + $common_footer .= '</ul>' . PHP_EOL; + $common_footer .= ' <hr class="divider">' . PHP_EOL; + $common_footer .= ' <p id="fnotes">' . PHP_EOL; + $common_footer .= " <a href=\"/$locale/map/\">" . _r('Sitemap') . '</a>' . PHP_EOL; + $common_footer .= " | <a href=\"/$locale/about/policies/privacy/\">"; + $common_footer .= _r('Privacy policy') . '</a>' . PHP_EOL; + $common_footer .= ' </p>' . PHP_EOL; + $common_footer .= ' </div>' . PHP_EOL; + $common_footer .= '</div>' . PHP_EOL; + + return $common_footer; +} |