aboutsummaryrefslogtreecommitdiff
path: root/data/templates/default/bookmarks-thumbnail.inc.tpl.php
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/default/bookmarks-thumbnail.inc.tpl.php')
-rw-r--r--data/templates/default/bookmarks-thumbnail.inc.tpl.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/data/templates/default/bookmarks-thumbnail.inc.tpl.php b/data/templates/default/bookmarks-thumbnail.inc.tpl.php
new file mode 100644
index 0000000..b8770dc
--- /dev/null
+++ b/data/templates/default/bookmarks-thumbnail.inc.tpl.php
@@ -0,0 +1,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>';
+}
+?> \ No newline at end of file