summaryrefslogtreecommitdiff
path: root/data/templates/default/bookmarks-thumbnail.inc.tpl.php
blob: b8770dcf0cfdcf5ea7fac8b744703c1d91af373f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
 * Bookmark thumbnail image
 * Shows the website thumbnail for the bookmark.
 *
 * Expects a $row variable with bookmark data.
 */

$thumbnailer = SemanticScuttle_Service_Factory::get('Thumbnails')->getThumbnailer();
$imgUrl      = $thumbnailer->getThumbnailUrl($address, 120, 90);
if ($imgUrl !== false) {
    echo '<a href="' . htmlspecialchars($address) . '">'
        . '<img class="thumbnail" width="120" height="90" src="'
        . htmlspecialchars($imgUrl).
        '" />'
        . '</a>';
}
?>