⌈⌋ branch:  freshcode


Check-in [3778635df7]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1:3778635df7b42bfd68e83fabb1da321815a7ec4c
Date: 2015-02-25 19:10:52
User: mario
Comment:Omit `deleted` entrys from spotlight.
Tags And Properties
  • branch=trunk inherited from [82405bb421]
  • sym-trunk inherited from [82405bb421]
Context
2015-03-04
19:41
[8fa4e98a21] Allow only 1-letter proj_name suffixes. (user: mario, tags: trunk)
2015-02-25
19:10
[3778635df7] Omit `deleted` entrys from spotlight. (user: mario, tags: trunk)
2015-01-20
16:03
[39ab60dd4c] Filter addition for spammy GitHub releases. (user: mario, tags: trunk)
Changes

Changes to cron.daily/spotlight.php.

1
2
3
4
5
6
7
8
9
10
11
12
13
..
22
23
24
25
26
27
28

29
30
31
32
33
34
35
<?php
/**
 * api: cli
 * title: Create random picks for project spotlight
 * description: Randomly picks out a few projects for the footer
 * version: 0.1
 * category: template
 * type: cron
 * x-cron: 20 *\/6 * * *
 *
 * Picks three projects for display in footer as projects of the day.
 * (Actually renewed three times a day.)
 *
................................................................................
 * pick random three.
 *
 */
$r = db("
     SELECT name, title, SUBSTR(description, 0, 150) AS description,
     MAX(t_changed) AS t FROM release
     GROUP BY name

     ORDER BY random() 
     LIMIT 3;
"); 

// combine into HTML blob
$html = ""; 
foreach ($r as $entry) {





|







 







>







1
2
3
4
5
6
7
8
9
10
11
12
13
..
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
 * api: cli
 * title: Create random picks for project spotlight
 * description: Randomly picks out a few projects for the footer
 * version: 0.2
 * category: template
 * type: cron
 * x-cron: 20 *\/6 * * *
 *
 * Picks three projects for display in footer as projects of the day.
 * (Actually renewed three times a day.)
 *
................................................................................
 * pick random three.
 *
 */
$r = db("
     SELECT name, title, SUBSTR(description, 0, 150) AS description,
     MAX(t_changed) AS t FROM release
     GROUP BY name
     HAVING NOT deleted
     ORDER BY random() 
     LIMIT 3;
"); 

// combine into HTML blob
$html = ""; 
foreach ($r as $entry) {