1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
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")
)
);
?>
|