From a4c54da3ccc6375019ba3477e890a5e3930a7034 Mon Sep 17 00:00:00 2001 From: Manuel Hiebel Date: Fri, 30 Nov 2018 11:49:56 +0100 Subject: Import alternative downloads page WIP, current default one is buggy so publishing my work --- downloads/alternative/index.php | 5 ++ en/6/download_index.php | 1 + en/downloads/alt.php | 102 --------------------------------- en/downloads/alternative/index.php | 113 +++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 102 deletions(-) create mode 100644 downloads/alternative/index.php delete mode 100644 en/downloads/alt.php create mode 100755 en/downloads/alternative/index.php diff --git a/downloads/alternative/index.php b/downloads/alternative/index.php new file mode 100644 index 000000000..190e09701 --- /dev/null +++ b/downloads/alternative/index.php @@ -0,0 +1,5 @@ +Get ISO on USB flash drive', array(_r('https://wiki.mageia.org/en/Installation_Media#Dump_Mageia_ISO_on_a_USB_flash_drive')),'li') ?> Here\'s a wiki page for you.', array(_r('https://wiki.mageia.org/en/Newcomers_start_here')), 'li')?> $name $version"), 'li')?> + Alternative downloads', array("alternative/"), 'li')?> '; diff --git a/en/downloads/alt.php b/en/downloads/alt.php deleted file mode 100644 index b90c87b84..000000000 --- a/en/downloads/alt.php +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - <?php echo sprintf(_g('Download').' '. ' Mageia')?> - - - - - - - -

- - -
- -
-

- CD or DVD discs.', array(_r('https://wiki.mageia.org/en/Writing_CD_and_DVD_images')), ' '); ?> -
- USB drive.', array('href="' . _r('https://wiki.mageia.org/en/Installation_Media#Dump_Mageia_ISO_on_a_USB_flash_drive') . '"')); - echo '

'; - _g('To dump a Mageia installation ISO on a USB stick, you may try one of several tools:', array(''),'p'); - echo '
  • '; - _g('For Linux, IsoDumper, available inside repo. Or any tools based on %sdd%s.', array('', ''), ' '); - _g('Unetbootin is not supported.', null, 'span class="warn"'); ?> -
  • - wiki for your options.', array(_r('https://wiki.mageia.org/en/Dump_Mageia_ISO_on_a_USB_flash_drive_-_Alternative_tools')), 'li'); ?> -
-

- -

-

- UEFI, a procedure is available in the wiki.', array(_r('http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface'),_r('https://wiki.mageia.org/en/Installing_on_systems_with_UEFI_firmware' /*this will be changed to tooltip, so no more url*/))) ;?> -

-
- -%s',$url, $name); - $table .= sprintf('%s',$url , $torrent ? 'torrent': ''); - $table .= sprintf('%s',$magnet , $magnet ? 'magnet': ''); - $table .= sprintf('%s'. PHP_EOL, $size); - return $table; -}; - -foreach ($ini as $section => $values) { -$version = $values['name'][7]; -$name = $values['name']; -$torrent = $values['torrent']; -$magnet = $values['magnet']; -$size = $values['size']; - -if ($version == $stableVersion){ - $tables .= doTheTable($section, $name, $torrent, $magnet, $size); -}elseif ($version == $cauldron){ - $tablec .= doTheTable($section, $name, $torrent, $magnet, $size); -}else{ - $tablea .= doTheTable($section, $name, $torrent, $magnet, $size); -} -}; - -function allDiv($version, $table, $show){ - - $div = sprintf('
', $version); - $div .= sprintf('
'. PHP_EOL,$version, $version, $version); - $div .= sprintf('
' . PHP_EOL, $version, $show, $version); - $div .= ''; - $div .= sprintf('' . PHP_EOL); - $div .= sprintf('%s
isotorrentmagnetsize
' . PHP_EOL, $table); - echo $div . '
'. PHP_EOL; -} - - -echo '
'; - -allDiv('Stable', $tables, 'show'); -allDiv('Unstable', $tablec); -allDiv('Archives', $tablea); - -?> -
-
- - - diff --git a/en/downloads/alternative/index.php b/en/downloads/alternative/index.php new file mode 100755 index 000000000..6c3127126 --- /dev/null +++ b/en/downloads/alternative/index.php @@ -0,0 +1,113 @@ + + + + + + <?php echo sprintf(_g('Download').' '. ' Mageia')?> + + + + + + + +

+ + +
+ +
+

+ CD or DVD discs.', array(_r('https://wiki.mageia.org/en/Writing_CD_and_DVD_images')), ' '); ?> +
+ USB drive.', array('href="' . _r('https://wiki.mageia.org/en/Installation_Media#Dump_Mageia_ISO_on_a_USB_flash_drive') . '"')); + echo '

'; + _g('To dump a Mageia installation ISO on a USB stick, you may try one of several tools:', array(''),'p'); + echo '
  • '; + _g('For Linux, IsoDumper, available inside repo. Or any tools based on %sdd%s.', array('', ''), ' '); + _g('Unetbootin is not supported.', null, 'span class="warn"'); ?> +
  • + wiki for your options.', array(_r('https://wiki.mageia.org/en/Dump_Mageia_ISO_on_a_USB_flash_drive_-_Alternative_tools')), 'li'); ?> +
+

+ +

+

+ UEFI, a procedure is available in the wiki.', array(_r('http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface'),_r('https://wiki.mageia.org/en/Installing_on_systems_with_UEFI_firmware' /*this will be changed to tooltip, so no more url*/))) ;?> +

+
+ + $values) { +$release = explode("-", $section); +$release = $release[1]; +$name = $values['name']; +$torrent = $values['torrent']; +$magnet = $values['magnet']; +$size = $values['size']; + + if ($release == $current){ + $tableCurrent .= TableContent($section, $name, $torrent, $magnet, $size); + }elseif ($release == $cauldron){ + $tableCauldron .= TableContent($section, $name, $torrent, $magnet, $size); + }else{ + $tableArchives .= TableContent($section, $name, $torrent, $magnet, $size); + } +}; + +function TableContent($url, $name, $torrent, $magnet, $size){ + $table = sprintf('%s',$url, $name); + $table .= $torrent ? sprintf('torrent', $url) : ''; + $table .= $magnet ? sprintf('magnet', $magnet) : ''; + $table .= sprintf('%s'. PHP_EOL, $size); + return $table; +}; + +function allDiv($release, $Trelease, $table){ + $div = sprintf("
\n\t

%s

" . PHP_EOL, $release,$Trelease); + $div .= ''; + $div .= sprintf('' . PHP_EOL); + echo $div .= sprintf('%s
isotorrentmagnetsize
' . PHP_EOL, $table); +} ?> + + +
+
+ +
+ +
+ +
+ +
+
+ + + -- cgit v1.2.1