<?php
- $article = new ArchiveArticle($Args);
+if (empty($article)) {
+ $article = new ArchiveArticle($Page->place[0]);
+}
+ $article->index; # apply handler metadata
printf('<a href="%s">%s</a>', $article->link, $article->name);
if ($article->image) {
printf("\n\t".'<img class="right" src="/%s" />', $article->thumb('100x100'));
}
if ($article->teaser) {
- printf("\n\t<blockquote>%s</blockquote>",
- preg_replace('/\n(.*)/s', ' <small>\1</small>', $article->teaser)
- );
+ printf("\n\t<blockquote>%s</blockquote>", preg_replace(
+ ['/\n(.*)/s', '/<img[^>]*>/'],
+ [' <small>\1</small>', ''],
+ $article->teaser
+ ));
}