summaryrefslogtreecommitdiffstats
path: root/site/torrents.template.php
diff options
context:
space:
mode:
Diffstat (limited to 'site/torrents.template.php')
-rw-r--r--site/torrents.template.php178
1 files changed, 178 insertions, 0 deletions
diff --git a/site/torrents.template.php b/site/torrents.template.php
new file mode 100644
index 0000000..c80861c
--- /dev/null
+++ b/site/torrents.template.php
@@ -0,0 +1,178 @@
+<?php
+/*
+ Template file: list of torrent links to the release archives
+ Copyright (C) 2015 Francis Rowe <info@gluglug.org.uk>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+?>
+<?php
+
+/* Functions */
+
+ function torrent_list($arrayTorrentLink, $forIndexStart, $forIndexBelow) {
+
+ if ((count($arrayTorrentLink)>=($forIndexStart+1)) && (count($arrayTorrentLink)>=$forIndexBelow)) {
+ for ($release=$forIndexStart; $release<$forIndexBelow; $release++) {
+?>
+ <h2><?php echo $arrayTorrentLink[$release][0][0]; ?></h2>
+ <p>
+ Released on <?php echo $arrayTorrentLink[$release][0][1]; ?>.
+ </p>
+ <ul>
+<?php
+ for ($archive=1; $archive<count($arrayTorrentLink[$release]); $archive++) {
+?>
+ <li><a href="<?php echo $arrayTorrentLink[$release][$archive][1]; ?>"><?php echo $arrayTorrentLink[$release][$archive][0]; ?></a></li>
+<?php
+ }
+?>
+ </ul>
+<?php
+ }
+ } else {
+?>
+ <p>No torrents found.</p>
+<?php
+ }
+
+ return;
+ }
+
+/* Data */
+
+ /* Copy this to torrents.php, and adapt for your needs */
+
+ /*
+ * Torrent links (for release archives)
+ * Latest releases listed first, earlier releases listed last. MAKE SURE TO PUT THEM IN THIS ORDER.
+ * Format of the array entries should be, for instance:
+ * $lbTorrentLink = array (
+ * array (
+ * array("version number (eg Libreboot rYYYYMMDD)", "release date (YYYY-MM-DD)"),
+ * array("archive name plus version", "torrent_magnet_link_goes_here"),
+ * ),
+ * array (
+ * array("Libreboot rYYYYMMDD", "YYYY-MM-DD"),
+ * array("Libreboot rYYYYMMDD Source code", "torrent_magnet_link_goes_here"),
+ * array("Libreboot rYYYYMMDD Utilities", "torrent_magnet_link_goes_here"),
+ * array("Libreboot rYYYYMMDD Documentation", "torrent_magnet_link_goes_here"),
+ * array("Libreboot rYYYYMMDD ROM images (ThinkPad X60)", "torrent_magnet_link_goes_here"),
+ * array("Libreboot rYYYYMMDD ROM images (ThinkPad T60)", "torrent_magnet_link_goes_here"),
+ * array("Libreboot rYYYYMMDD ROM images (ThinkPad X200)", "torrent_magnet_link_goes_here"),
+ * array("Libreboot rYYYYMMDD ROM images (ThinkPad R400)", "torrent_magnet_link_goes_here"),
+ * array("Libreboot rYYYYMMDD ROM images (MacBook2,1)", "torrent_magnet_link_goes_here")
+ * ),
+ * array (
+ * array("Libreboot r20150208", "2015-02-08"),
+ * array("Libreboot r20150208 Source code", "torrent_magnet_link_goes_here"),
+ * array("Libreboot r20150208 Binaries", "torrent_magnet_link_goes_here")
+ * ),
+ * array (
+ * array("Libreboot r20150126", "2015-01-26"),
+ * array("Libreboot r20150126 Source code", "torrent_magnet_link_goes_here"),
+ * array("Libreboot r20150126 Binaries", "torrent_magnet_link_goes_here")
+ * )
+ * );
+ * You should not specify $lbProjectName here, because these entries related
+ * specifically to this version of the project.
+ */
+ $lbTorrentLink = array (
+ array (
+ array("Libreboot r20150208", "2015-02-08"),
+ array("Libreboot r20150208 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20150208 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array (
+ array("Libreboot r20150126", "2015-01-26"),
+ array("Libreboot r20150126 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20150126 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array (
+ array("Libreboot r20150124", "2015-01-24"),
+ array("Libreboot r20150124 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20150124 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array (
+ array("Libreboot r20141015", "2014-10-15"),
+ array("Libreboot r20151015 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20151015 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 6, beta 7 */
+ array("Libreboot r20140911", "2014-09-11"),
+ array("Libreboot r20140911 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140911 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 6, beta 6 */
+ array("Libreboot r20140903", "2014-09-03"),
+ array("Libreboot r20140903 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140903 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 6, beta 5 */
+ array("Libreboot r20140811", "2014-08-11"),
+ array("Libreboot r20140811 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140811 Binaries", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140811 Metadata", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 6, beta 4 */
+ array("Libreboot r20140729", "2014-07-29"),
+ array("Libreboot r20140729 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140729 Binaries", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140729 Metadata", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 6, beta 3 */
+ array("Libreboot r20140720", "2014-07-20"),
+ array("Libreboot r20140720 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140720 Binaries", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140720 Metadata", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 6, beta 2 */
+ array("Libreboot r20140716", "2014-07-16"),
+ array("Libreboot r20140716 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140716 Binaries", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140716 Metadata", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 6, beta 1 */
+ array("Libreboot r20140711", "2014-07-11"),
+ array("Libreboot r20140711 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140711 Binaries", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140711 Metadata", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 5 */
+ array("Libreboot r20140622", "2014-06-22"),
+ array("Libreboot r20140622 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140622 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 4 */
+ array("Libreboot r20140221", "2014-02-21"),
+ array("Libreboot r20140221 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20140221 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 3 */
+ array("Libreboot r20131214", "2013-12-14"),
+ array("Libreboot r20131214 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20131214 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 2 */
+ array("Libreboot r20131213", "2013-12-13"),
+ array("Libreboot r20131213 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20131213 Binaries", "torrent_magnet_link_goes_here")
+ ),
+ array ( /* old name: Release 1 */
+ array("Libreboot r20131212", "2013-12-12"),
+ array("Libreboot r20131212 Source code", "torrent_magnet_link_goes_here"),
+ array("Libreboot r20131212 Binaries", "torrent_magnet_link_goes_here")
+ )
+ );
+?>