From 8a7b0660b9d763381b562e0e462939e1c99da55c Mon Sep 17 00:00:00 2001 From: filip Date: Tue, 28 Jun 2016 18:18:53 +0200 Subject: housekeeping: consolidate mga1 parts a bit --- en/downloads/1/dl_twitter.php | 28 +++++++ en/downloads/1/downloads.ini | 174 ++++++++++++++++++++++++++++++++++++++++++ en/downloads/1/index.php | 2 +- en/downloads/1/lib.php | 108 ++++++++++++++++++++++++++ 4 files changed, 311 insertions(+), 1 deletion(-) create mode 100644 en/downloads/1/dl_twitter.php create mode 100644 en/downloads/1/downloads.ini create mode 100644 en/downloads/1/lib.php (limited to 'en/downloads/1') diff --git a/en/downloads/1/dl_twitter.php b/en/downloads/1/dl_twitter.php new file mode 100644 index 000000000..f590245e2 --- /dev/null +++ b/en/downloads/1/dl_twitter.php @@ -0,0 +1,28 @@ + 'I just downloaded Mageia 1, a new Linux distribution! Try it out!', + 'fr' => 'Je viens de télécharger Mageia 1, nouvelle distribution Linux. À vous d\'essayer !', + 'de' => 'Habe gerade Mageia 1, eine neue Linuxdistribution heruntergeladen, Versuche es selbst!', + 'pt' => 'Acabei de transferir a Mageia 1, uma nova distribuição Linux! Experimente-a!' + ); + if (!array_key_exists($locale, $langs)) + $locale = 'en'; + + $s = <<Tweet + +S; + return $s; +} diff --git a/en/downloads/1/downloads.ini b/en/downloads/1/downloads.ini new file mode 100644 index 000000000..b072c8a11 --- /dev/null +++ b/en/downloads/1/downloads.ini @@ -0,0 +1,174 @@ +; Mageia downloads definition file + +[_global] +name = Mageia 1 +prefix = mageia-1 +type = iso +errata = "https://wiki.mageia.org/en/Mageia1_errata" +notes = "http://mageia.org/1/ +blog = "http://blog.mageia.org/en/ + +[_popularity] +;extracted/normalized from www download logs; need time to make this automatic + post -rda +dvd-i586 = 5 +dvd-x86_64 = 3 +cd-dualarch = 1 +live-kde-europe1-cd-i586 = 4 +live-gnome-europe1-cd-i586 = 3 +live-kde-europe2-cd-i586 = 3 +live-gnome-europe2-cd-i586 = 2 +live-kde-asia-cd-i586 = 1 +live-kde-africa-cd-i586 = 1 +live-gnome-asia-cd-i586 = 1 +live-gnome-africa-cd-i586 = 1 +netboot-i586 = 1 +netboot-x86_64 = 1 + +[dvd-i586] +flavour = DVD +name = 32-bit DVD +size = 4 GB +lang = All supported +md5 = 535c53fabfaea25ad6ad49edbbf6ce0a +sha1 = 1146008d408d5929ed07580070e453f6b4e64277 +path = iso/1/mageia-dvd-1-i586.iso +torrent = iso/1/torrents/mageia-dvd-1-i586.torrent + +[dvd-x86_64] +flavour = DVD +name = 64-bit DVD +size = 4 GB +lang = All supported +md5 = 7e65859068810b5c2da7593e4254293a +sha1 = e9679d433afbea721e33f830691c4044055f13ae +path = iso/1/mageia-dvd-1-x86_64.iso +torrent = iso/1/torrents/mageia-dvd-1-x86_64.torrent + +; Dual arch +[cd-dualarch] +flavour = CD +name = Dual Arch CD +size = 700 MB +lang = Limited +md5 = bedf0e4aed931d238c61b08ea5d6bb9d +sha1 = 416d8272a2423fe7a0816786f0189e2320e74958 +path = iso/1/mageia-dual-1.iso +torrent = iso/1/torrents/mageia-dual-1.torrent + +; KDE LiveCDs (32-bit) +[live-kde-europe1-cd-i586] +flavour = LiveCD 32-bit +name = KDE +size = 700 MB +lang = Europa set 1 +langs = de|en|es|fr|it|pl|pt|ru +md5 = 4977f5a974dec5b937a891e29cce5fdb +sha1 = ca68b6c642e91ad21026f872d097439d32457d30 +path = iso/1/mageia-livecd-1-KDE4-europe1-americas-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-KDE4-europe1-americas-cdrom-i586.torrent + +[live-kde-europe2-cd-i586] +flavour = LiveCD 32-bit +name = KDE +size = 700 MB +lang = Europa set 2 +langs = +md5 = 90768c05344ab250ae84f985e1b849c1 +sha1 = 715fca8f8411fa6d36b16c192a6566dd29ef4915 +path = iso/1/mageia-livecd-1-KDE4-europe2-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-KDE4-europe2-cdrom-i586.torrent + +[live-kde-asia-cd-i586] +flavour = LiveCD 32-bit +name = KDE +size = 700 MB +lang = Asia set +langs = +md5 = 1b904aa607a464c7c712209acd109710 +sha1 = a53fa906c143e591082442d076c2b3b202fe8a47 +path = iso/1/mageia-livecd-1-KDE4-asia-noindia-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-KDE4-asia-noindia-cdrom-i586.torrent + +[live-kde-africa-cd-i586] +flavour = LiveCD 32-bit +name = KDE +size = 700 MB +lang = Africa/India set +langs = +md5 = f7fc7ea64b38b04874ad7d3d6d904461 +sha1 = 072eeef7eedc0ca7ad070ed2f45403e7b2a601e6 +path = iso/1/mageia-livecd-1-KDE4-africa-india-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-KDE4-africa-india-cdrom-i586.torrent + +; GNOME LiveCDs (32-bit) +[live-gnome-europe1-cd-i586] +flavour = LiveCD 32-bit +name = GNOME +size = 700 MB +lang = Europa set 1 +langs = de|en|es|fr|it|pl|pt|ru +md5 = be86c06cc4ad27b0ae36f673ddbfc489 +sha1 = fd648c7a21d54c2a52f9ed66cf1093f82acd828c +path = iso/1/mageia-livecd-1-GNOME-europe1-americas-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-GNOME-europe1-americas-cdrom-i586.torrent + +[live-gnome-europe2-cd-i586] +flavour = LiveCD 32-bit +name = GNOME +size = 700 MB +lang = Europa set 2 +langs = +md5 = a8550c9932d7a7430fa4f574895f881e +sha1 = fc191d30cf822ef5dfffcfbb0d228e442db00530 +path = iso/1/mageia-livecd-1-GNOME-europe2-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-GNOME-europe2-cdrom-i586.torrent + +[live-gnome-asia-cd-i586] +flavour = LiveCD 32-bit +name = GNOME +size = 700 MB +lang = Asia set +langs = +md5 = b415d0d8b7f0384c16ebc18dcaccbbb0 +sha1 = 1cd93b7c34149bf326b22b61afa47bf7144a9921 +path = iso/1/mageia-livecd-1-GNOME-asia-noindia-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-GNOME-asia-noindia-cdrom-i586.torrent + +[live-gnome-africa-cd-i586] +flavour = LiveCD 32-bit +name = GNOME +size = 700 MB +lang = Africa/India set +langs = +md5 = 621f4e965c04e49b8602b4ec670e8466 +sha1 = 753afcd28978ff89dc0a8840f8f33b65bf8dad30 +path = iso/1/mageia-livecd-1-GNOME-africa-india-cdrom-i586.iso +torrent = iso/1/torrents/mageia-livecd-1-GNOME-africa-india-cdrom-i586.torrent + +; boot.iso +[netboot-i586] +flavour = boot.iso CD +name = boot.iso 32-bit CD +size = 40 MB +lang = All supported +md5 = a82ae1a364b5f3bf3d2b783c881c726d +path = distrib/1/i586/install/images/boot.iso + +[netboot-x86_64] +flavour = boot.iso CD +name = boot.iso 64-bit CD +size = 40 MB +lang = All supported +md5 = 7de996b937b5e5d650514e7b3d6f2f15 +path = distrib/1/x86_64/install/images/boot.iso + +; mgaonline RPM +[mgaonline] +type = rpm +hidden = true +name = mgaonline +size = 196 KB +page_title = mgaonline +post_link = /migrate/ +post_title = Go back to the migration page +path = distrib/1/i586/media/core/release/mgaonline-2.77.29-1.mga1.noarch.rpm diff --git a/en/downloads/1/index.php b/en/downloads/1/index.php index e186e3da7..72f34fbb5 100644 --- a/en/downloads/1/index.php +++ b/en/downloads/1/index.php @@ -9,7 +9,7 @@ $_t = i18n::get_strings($_t, $locale, $i18n_fallback_rules); $_t['page_h1'] = sprintf($_t['page_h1'], 'Mageia 1'); $_t['page_title'] = sprintf($_t['page_title'], 'Mageia 1'); -require '../lib.php'; +require './lib.php'; ?> diff --git a/en/downloads/1/lib.php b/en/downloads/1/lib.php new file mode 100644 index 000000000..39a2ff8f9 --- /dev/null +++ b/en/downloads/1/lib.php @@ -0,0 +1,108 @@ + +%s +%s +%s +%s +%s +%s + +T; + +$s = ''; +$glob = array_shift($prods); +$popularity = array_shift($prods); +$i = 0; + +$prods2 = array(); +foreach ($prods as $k => $p) { + if (isset($p['hidden'])) { + continue; + } + $prods2[$p['flavour']][$k] = $p; +} + +$s1 = null; +$s2 = null; +$s3 = null; +foreach ($prods2 as $flavour => $prods3) { + + $flavour = sprintf('%s', count($prods3), $flavour); + foreach ($prods3 as $k => $p) { + $iso = sprintf('%s-%s', $glob['prefix'], $k); + + $dl_link = sprintf('/%s/downloads/get/?q=%s', $locale, $iso); + $bt_link = isset($p['torrent']) ? + sprintf('/%s/downloads/get/?q=%s&torrent=1', $locale, $iso) : + null; + + $pop = array_key_exists($k, $popularity) ? $popularity[$k] : 0; + + $s = sprintf($tmpl, + '', + $p['name'], $_t[$p['lang']], $p['size'], + $pop, $pop, + $dl_link, $_t['download'], + $bt_link, + !is_null($bt_link) ? $_t['download'] : '' + ); + $flavour = null; + $i++; + + if ($p['flavour'] == 'LiveCD 32-bit') + $s2 .= $s; + elseif ($p['flavour'] == 'DVD' + || $p['flavour'] == 'CD') + $s1 .= $s; + else + $s3 .= $s; + } +} + +$table_tmpl = <<%s +%s + + + + + + + + + + + + %s +
{$_t['flavour']}{$_t['language']}{$_t['size']}{$_t['popularity']}{$_t['link']}BitTorrent
+T; + +$dl_table + = sprintf($table_tmpl, $_t['for_test_live'], null, $s2) + . "

{$_t['def-Europa set 1']}

+

{$_t['def-Europa set 2']}

+

{$_t['def-Asia set']}

+

{$_t['def-Africa/India set']}


" + + . '
' + . sprintf($table_tmpl, + $_t['for_full_install'], + '

' . $_t['warn-free'] . '

', $s1) + . "

{$_t['all_languages']}

+

{$_t['limited_languages']}


" + . '
' + . sprintf($table_tmpl, $_t['for_network'], '', $s3); + +$dl_table .= << +
+

{$_t['not_sure_what_iso']}

+T; + + -- cgit v1.2.1