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

Code comments

parent 5c088a97
...@@ -83,12 +83,15 @@ function StartHtml( $title, $color, $language, ...@@ -83,12 +83,15 @@ 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 /* Alternate */ ?>
<?php if( isset($alternate_lang) ) { <?php if( isset($alternate_lang) ) {
$root_filename = explode('.', $_SERVER['SCRIPT_FILENAME'] ); $root_filename = explode('.', $_SERVER['SCRIPT_FILENAME'] );
echo "<!-- ".$root_filename[0]." -->"; echo "<!-- ".$root_filename[0]." -->";
...@@ -100,6 +103,7 @@ function StartHtml( $title, $color, $language, ...@@ -100,6 +103,7 @@ function StartHtml( $title, $color, $language,
} }
} ?> } ?>
<?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) ) {
...@@ -117,6 +121,8 @@ function StartHtml( $title, $color, $language, ...@@ -117,6 +121,8 @@ function StartHtml( $title, $color, $language,
</style> </style>
<![endif]--> <![endif]-->
<?php /* jQuery */ ?>
<?php /* Get the one in the Google CDN to get cached */ ?> <?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> <script src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script>
<?php if( isset($additional_js) ) { <?php if( isset($additional_js) ) {
...@@ -125,7 +131,7 @@ function StartHtml( $title, $color, $language, ...@@ -125,7 +131,7 @@ function StartHtml( $title, $color, $language,
} }
} ?> } ?>
<!-- analytics --> <?php /* Analytics */ ?>
<script type="text/javascript"> <script type="text/javascript">
var _gaq = _gaq || []; var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-38853043-1']); _gaq.push(['_setAccount', 'UA-38853043-1']);
...@@ -136,10 +142,13 @@ function StartHtml( $title, $color, $language, ...@@ -136,10 +142,13 @@ function StartHtml( $title, $color, $language,
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})(); })();
</script> </script>
</head> </head>
<?php <?php
}
/* Actual start of the body */
function start_top( $body_color, $language )
{
if ( ($language != "he") && ($language != "ur") ) if ( ($language != "he") && ($language != "ur") )
{ {
echo '<body>'; echo '<body>';
...@@ -150,11 +159,6 @@ function StartHtml( $title, $color, $language, ...@@ -150,11 +159,6 @@ function StartHtml( $title, $color, $language,
echo '<body style="text-align: right; direction: rtl;">'; echo '<body style="text-align: right; direction: rtl;">';
echo "<div id='bodyInner' class='$color' style='text-align: right;'>"; echo "<div id='bodyInner' class='$color' style='text-align: right;'>";
} }
}
/* Actual start of the body */
function start_top( $body_color )
{
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