Skip to content
Commits on Source (4)
......@@ -9,8 +9,8 @@ $androidversion = '3.0.1';
$winrtversion = '3.0.0';
$dlBase = "//get.videolan.org/vlc";
$dlUrl = "$dlBase/$win32version/win32/vlc-$win32version-win32.exe";
$windowsLocation = "$dlBase/$win32version/win32/vlc-$win32version-win32.exe";
$windows64Location = "$dlBase/$win32version/win64/vlc-$win32version-win64.exe";
$osxLocation = "$dlBase/$macosxversion/macosx/vlc-$macosxversion.dmg";
function replaceDLinfos( $downloadButton = "#downloadButton" )
......@@ -39,7 +39,17 @@ function replaceDLinfos( $downloadButton = "#downloadButton" )
var OS="windows"; //Default
if (navigator.appVersion.indexOf("Win")!=-1) {
OS="windows";
if (navigator.userAgent.indexOf('Win64')>-1 ||
navigator.platform=='Win64' ||
navigator.userAgent.indexOf('x86_64')>-1 ||
navigator.userAgent.indexOf('x86_64')>-1 ||
navigator.userAgent.indexOf('amd64')>-1 ||
navigator.userAgent.indexOf('AMD64')>-1 ||
navigator.userAgent.indexOf('WOW64')>-1
)
OS="windows64";
else
OS="windows";
}
if (navigator.appVersion.indexOf("Mac")!=-1) {
if (navigator.platform.indexOf("MacPPC")!= -1 || navigator.platform.indexOf("PowerPC") != -1 ) OS="osxPPC";
......@@ -83,10 +93,10 @@ function replaceDLinfos( $downloadButton = "#downloadButton" )
function downloadButton()
{
global $dlUrl;
global $windowsLocation;
global $win32version;
?>
<a id='downloadButton' href='<?php echo $dlUrl; ?>'>
<a id='downloadButton' href='<?php echo $windowsLocation; ?>'>
<img style='position: absolute; top: -10px; left: -10px;' src='//images.videolan.org/images/downloadVLC.png' alt='Download VLC icon' />
<span class='downloadText'><?php echo _("Download VLC"); ?></span>
<span id='downloadDetails' style='font-size: 12px; color: white;'>
......@@ -100,6 +110,7 @@ function downloadButton()
function getOS($os = null, $offset = 0, $count = null, $encode = null) {
global $windowsLocation;
global $windows64Location;
global $osxLocation;
global $win32version;
global $version;
......@@ -113,10 +124,16 @@ function getOS($os = null, $offset = 0, $count = null, $encode = null) {
$OSs = array(
"windows" => array(
"name" => "Windows",
"size" => '28&nbsp;MB',
"size" => '38&nbsp;MB',
"latestVersion" => $win32version,
"location" => $windowsLocation
),
"windows64" => array(
"name" => "Windows 64bit",
"size" => '40&nbsp;MB',
"latestVersion" => $win32version,
"location" => $windows64Location
),
"windowsphone" => array(
"name" => "Windows Phone",
"latestVersion" => $winrtversion,
......@@ -223,11 +240,10 @@ function getOS($os = null, $offset = 0, $count = null, $encode = null) {
function downloadButton2($dropdownItems = null, $targetOS = null, $displayMainOSicons = true, $alternativeTitle = null)
{
global $dlUrl;
global $win32version;
global $windowsLocation;
global $win32version;
global $osxLocation;
$dropdownItems = is_null($dropdownItems) ? getOS(null, 0, 6) : $dropdownItems;
$dropdownItems = is_null($dropdownItems) ? getOS(null, 0, 7) : $dropdownItems;
$defaultOS = is_null($targetOS) || $targetOS == 'All' ? "windows" : $targetOS;
$defaultDetail = getOS($defaultOS);
?>
......
......@@ -19,7 +19,7 @@
<a class='extraInfoLink' href='/vlc/features.html'>Features</a>
<a class='extraInfoLink' href='/vlc/screenshots.html'>Screenshots</a>
<a class='extraInfoLink' href='/vlc/skins.php'>Extensions</a>
<a id='downloadButton' href='<?php echo $dlUrl; ?>'>
<a id='downloadButton' href='<?php echo $windowsLocation; ?>'>
<img style='position: absolute; top: -10px; left: -10px;' src='/images/downloadVLC.png' alt='Download VLC icon' />
<span class='downloadText'>Download VLC</span>
<span id='downloadDetails' style='font-size: 12px; color: white;'>
......
......@@ -19,7 +19,7 @@
<a class='extraInfoLink' href='/vlc/features.html'>Features</a>
<a class='extraInfoLink' href='/vlc/screenshots.html'>Screenshots</a>
<a class='extraInfoLink' href='/vlc/skins.php'>Extensions</a>
<a id='downloadButton' href='<?php echo $dlUrl; ?>'>
<a id='downloadButton' href='<?php echo $windowsLocation; ?>'>
<img style='position: absolute; top: -10px; left: -10px;' src='/images/downloadVLC.png' alt='Download VLC icon' />
<span class='downloadText'>Download VLC</span>
<span id='downloadDetails' style='font-size: 12px; color: white;'>
......
......@@ -19,7 +19,7 @@
<a class='extraInfoLink' href='/vlc/features.html'>Features</a>
<a class='extraInfoLink' href='/vlc/screenshots.html'>Screenshots</a>
<a class='extraInfoLink' href='/vlc/skins.php'>Extensions</a>
<a id='downloadButton' href='<?php echo $dlUrl; ?>'>
<a id='downloadButton' href='<?php echo $windowsLocation; ?>'>
<img style='position: absolute; top: -10px; left: -10px;' src='/images/downloadVLC.png' alt='Download VLC icon' />
<span class='downloadText'>Download VLC</span>
<span id='downloadDetails' style='font-size: 12px; color: white;'>
......