Check-in [6df868d8f9]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Launchpad-releases for frontpage sidebar. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
6df868d8f9024e4c841110a14e5224e8 |
User & Date: | mario 2015-01-18 22:43:07 |
Context
2015-01-18
| ||
22:49 | Remove doubled `em` tag. check-in: 3622816360 user: mario tags: trunk | |
22:43 | Launchpad-releases for frontpage sidebar. check-in: 6df868d8f9 user: mario tags: trunk | |
22:31 | Introduce `launchpad-releases` page. Updated polling with less delay. (So far only 30% of projects information received, less than 12% of release infos.) check-in: d16f5b9864 user: mario tags: trunk | |
Changes
Added cron.daily/news_launchpad.php.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | <?php /** * title: launchpad releases news feed * description: query last 20 entries from cache in launchpad.db * version: 0.1 * category: template * api: cli * type: cron * x-cron: 10 10 * * * * * Short summary * → ./template/feed.launchpad.htm * */ chdir(dirname(__DIR__)); include("./config.php"); db(new PDO("sqlite:launchpad.db")); // query $q = db(" SELECT r.name, r.title, r.version, SUBSTR(r.release_notes, 1, 200) AS release_notes, r.web_link, p.title AS proj_title, SUBSTR(p.summary, 1, 200) AS summary FROM releases AS r LEFT JOIN projects AS p ON p.name = r.name ORDER BY date_created DESC LIMIT 20 "); // collect $out = ""; foreach ($q as $row) { $row = array_map("input::html", $row); $out .= <<<HTML <a href="$row[web_link]" title="$row[summary]">$row[proj_title] <em class=version title="$row[release_notes]"><em class=verison>$row[version]</em></a> HTML; } // write file_put_contents("./template/feed.launchpad.htm", $out); |
Changes to template/index_sidebar.php.
︙ | ︙ | |||
61 62 63 64 65 66 67 68 69 70 | <?php readfile("template/feed.cliapps.htm"); ?> </section> <section class="article-links"> <a href="/github-releases"><h5>GitHub releases →</h5></a> <?php readfile("template/feed.github.htm"); ?> </section> </aside> | > > > > > | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | <?php readfile("template/feed.cliapps.htm"); ?> </section> <section class="article-links"> <a href="/github-releases"><h5>GitHub releases →</h5></a> <?php readfile("template/feed.github.htm"); ?> </section> <section class="article-links"> <a href="/launchpad-releases"><h5>LaunchPad news →</h5></a> <?php readfile("template/feed.launchpad.htm"); ?> </section> </aside> |