[www-doc] [Git][VideoLAN.org/websites][master] 2 commits: menus: add sponsor if available
Jean-Baptiste Kempf
gitlab at videolan.org
Wed May 11 15:22:32 CEST 2016
Jean-Baptiste Kempf pushed to branch master at VideoLAN organization / websites
Commits:
4f428a68 by David Loiret at 2016-05-11T15:22:13+02:00
menus: add sponsor if available
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
f725647c by David Loiret at 2016-05-11T15:22:13+02:00
menus: hide donate box if user is located in Singapor
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
- - - - -
1 changed file:
- www.videolan.org/include/menus.php
Changes:
=====================================
www.videolan.org/include/menus.php
=====================================
--- a/www.videolan.org/include/menus.php
+++ b/www.videolan.org/include/menus.php
@@ -5,6 +5,11 @@ require_once($_SERVER["DOCUMENT_ROOT"]."/include/donate.php");
/* Menus */
function draw_menus( $nobanner, $alternate_lang, $imgSrc, $b_show_donate )
{
+ global $sponsor;
+ if (function_exists('geoip_db_avail') && (geoip_db_avail(GEOIP_COUNTRY_EDITION) &&
+ geoip_country_code_by_name($_SERVER['REMOTE_ADDR']) == 'SG' )) {
+ $b_show_donate = false;
+ }
?>
<nav id="nav" class="navbar navbar-default navbar-fixed-top">
<div class="container">
@@ -99,6 +104,13 @@ function draw_menus( $nobanner, $alternate_lang, $imgSrc, $b_show_donate )
</li>
</ul>
<?php } ?>
+ <?php if (isset($sponsor) && !$b_show_donate) { ?>
+ <div class="navbar-header pull-right">
+ <div id="sponsor">
+ <?php echo $sponsor ?>
+ </div>
+ </div>
+ <?php } ?>
</div>
</div>
</nav>
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/compare/81ba36e5d044eaff7289e3a3413ca9d4bb9d208f...f725647c61d7a64d8d31031f0b60f1ea43207202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/www-doc/attachments/20160511/2082687c/attachment.html>
More information about the www-doc
mailing list