- printf('<li><a href="/%s">%s <small class="date">%s</small></a></li>',
- $article->link, $article->safetitle, $article->date);
+ $html = $article->safetitle;
+ $dateparts = $article->dateparts;
+ if ($class) {
+ $dateparts[1] = NULL; # omit year
+ }
+ $html .= sprintf(' <small class="date">%s</small>', showdate($dateparts));
+ if ($class == 'gallery' and $article->img) {
+ $html = "<div>$html</div>";
+ $html = sprintf('<img src="%s" />', $article->thumb(200)) . $html;
+ }
+ $html = sprintf('<a href="/%s">%s</a>', $article->link, $html);
+ print "<li><article>$html</article></li>\n";