Commit ef5c47b5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Code comments

parent 5c088a97
...@@ -83,78 +83,82 @@ function StartHtml( $title, $color, $language, ...@@ -83,78 +83,82 @@ function StartHtml( $title, $color, $language,
<meta name="Description" content="<?php echo $title; ?>" /> <meta name="Description" content="<?php echo $title; ?>" />
<title>VideoLAN - <?php echo $title; ?></title> <title>VideoLAN - <?php echo $title; ?></title>
<?php /* Favicon */ ?>
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
<link href="https://plus.google.com/104597325891170264649" rel="publisher" /> <link href="https://plus.google.com/104597325891170264649" rel="publisher" />
<?php /* RSS */ ?>
<link rel="alternate" type="application/rss+xml" title="RSS - VideoLAN News" href="/videolan-news.rss" /> <link rel="alternate" type="application/rss+xml" title="RSS - VideoLAN News" href="/videolan-news.rss" />
<link rel="alternate" type="application/rss+xml" title="RSS - Developers Blog" href="http://planet.videolan.org/rss20.xml" /> <link rel="alternate" type="application/rss+xml" title="RSS - Developers Blog" href="http://planet.videolan.org/rss20.xml" />
<?php if( isset($alternate_lang) ) { <?php /* Alternate */ ?>
$root_filename = explode('.', $_SERVER['SCRIPT_FILENAME'] ); <?php if( isset($alternate_lang) ) {
echo "<!-- ".$root_filename[0]." -->"; $root_filename = explode('.', $_SERVER['SCRIPT_FILENAME'] );
foreach($alternate_lang as $lang) { echo "<!-- ".$root_filename[0]." -->";
if( $lang == "en" ) foreach($alternate_lang as $lang) {
echo '<link rel="alternate" hreflang="'.$lang.'" href="/'.$root_filename[0].'.html" />'."\n"; if( $lang == "en" )
else echo '<link rel="alternate" hreflang="'.$lang.'" href="/'.$root_filename[0].'.html" />'."\n";
echo '<link rel="alternate" hreflang="'.$lang.'" href="/'.$root_filename[0].'.'.$lang.'.html" />'."\n"; else
} echo '<link rel="alternate" hreflang="'.$lang.'" href="/'.$root_filename[0].'.'.$lang.'.html" />'."\n";
} ?> }
} ?>
<?php /* CSS */ ?>
<link rel="stylesheet" type="text/css" href="/style/style.css" /> <link rel="stylesheet" type="text/css" href="/style/style.css" />
<?php if( isset($additional_css) ) { <?php if( isset($additional_css) ) {
foreach($additional_css as $css) { foreach($additional_css as $css) {
echo '<link rel="stylesheet" type="text/css" href="'.$css.'" />'; echo '<link rel="stylesheet" type="text/css" href="'.$css.'" />';
} }
} ?> } ?>
<!--[if lt IE 7]> <!--[if lt IE 7]>
<style type="text/css"> <style type="text/css">
@media screen{ body{behavior:url("/width.htc");} } @media screen{ body{behavior:url("/width.htc");} }
/* PNG support for IE */ /* PNG support for IE */
img { behavior: url("/png.htc");} img { behavior: url("/png.htc");}
.DXImageTransformed { display: inline-block; } .DXImageTransformed { display: inline-block; }
</style> </style>
<![endif]--> <![endif]-->
<?php /* Get the one in the Google CDN to get cached */ ?>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script> <?php /* jQuery */ ?>
<?php if( isset($additional_js) ) { <?php /* Get the one in the Google CDN to get cached */ ?>
foreach($additional_js as $js) { <script src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script>
echo '<script src="'.$js.'" type="text/javascript"></script>'; <?php if( isset($additional_js) ) {
} foreach($additional_js as $js) {
} ?> echo '<script src="'.$js.'" type="text/javascript"></script>';
}
<!-- analytics --> } ?>
<script type="text/javascript">
var _gaq = _gaq || []; <?php /* Analytics */ ?>
_gaq.push(['_setAccount', 'UA-38853043-1']); <script type="text/javascript">
_gaq.push(['_trackPageview']); var _gaq = _gaq || [];
(function() { _gaq.push(['_setAccount', 'UA-38853043-1']);
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; _gaq.push(['_trackPageview']);
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; (function() {
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
})(); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
</script> var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head> </head>
<?php <?php
if ( ($language != "he") && ($language != "ur") )
{
echo '<body>';
echo "<div id='bodyInner' class='$color'>";
}
else
{
echo '<body style="text-align: right; direction: rtl;">';
echo "<div id='bodyInner' class='$color' style='text-align: right;'>";
}
} }
/* Actual start of the body */ /* Actual start of the body */
function start_top( $body_color ) function start_top( $body_color, $language )
{ {
if ( ($language != "he") && ($language != "ur") )
{
echo '<body>';
echo "<div id='bodyInner' class='$color'>";
}
else
{
echo '<body style="text-align: right; direction: rtl;">';
echo "<div id='bodyInner' class='$color' style='text-align: right;'>";
}
switch( $body_color ){ switch( $body_color ){
case "red": $imgSrc = "logoRed.png"; $imgArSrc = "madeByArgonRed.png"; break; case "red": $imgSrc = "logoRed.png"; $imgArSrc = "madeByArgonRed.png"; break;
case "blue": $imgSrc = "logoBlue.png"; $imgArSrc = "madeByArgonBlue.png"; break; case "blue": $imgSrc = "logoBlue.png"; $imgArSrc = "madeByArgonBlue.png"; break;
...@@ -471,6 +475,6 @@ if(!isset($nobanner)) $nobanner = false; ...@@ -471,6 +475,6 @@ if(!isset($nobanner)) $nobanner = false;
// HTML header // HTML header
StartHtml( preg_replace( "/<[^>]*>/", "" , $title ), $body_color, $language, StartHtml( preg_replace( "/<[^>]*>/", "" , $title ), $body_color, $language,
$additional_css, $additional_js, $alternate_lang, $body_onload, $body_onunload ); $additional_css, $additional_js, $alternate_lang, $body_onload, $body_onunload );
start_top( $body_color ); start_top( $body_color, $language );
draw_menus( $nobanner, $alternate_lang ); draw_menus( $nobanner, $alternate_lang );
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment