diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/config.default.php | 34 | ||||
-rw-r--r-- | data/templates/default/bookmarks-thumbnail.inc.tpl.php | 18 | ||||
-rw-r--r-- | data/templates/default/bottom.inc.php | 5 |
3 files changed, 22 insertions, 35 deletions
diff --git a/data/config.default.php b/data/config.default.php index 2f32df7..5e560a7 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -542,35 +542,27 @@ $defaults['privacy'] = 0; */ /** - * Enable bookmark website thumbnails. + * Which thumbnail service type to use. * - * According to artviper.net license, buy a license if you - * gain profit with your pages. + * Currently supported: + * - null (no screenshots) + * - 'phancap', see http://cweiske.de/phancap.htm * - * @var boolean - * @link http://www.websitethumbnail.de/ + * @var string */ -$enableWebsiteThumbnails = false; +$thumbnailsType = null; /** - * User ID from websitethumbnail.de - * - * You need to register on - * http://www.artviper.net/registerapi.php - * in order to use thumbnails on your domain + * Configuration for thumbnail service. * - * @var string - * @link http://www.artviper.net/registerapi.php - */ -$thumbnailsUserId = null; - -/** - * API key. - * Sent to you by artviper.net after registration. + * Phancap requires an array with the following keys: + * - url: URL to phancap's get.php file + * - token: user name (if access protected) + * - secret: password for the user (if access protected) * - * @var string + * @var array */ -$thumbnailsKey = null; +$thumbnailsConfig = array(); diff --git a/data/templates/default/bookmarks-thumbnail.inc.tpl.php b/data/templates/default/bookmarks-thumbnail.inc.tpl.php index 77cc67f..b8770dc 100644 --- a/data/templates/default/bookmarks-thumbnail.inc.tpl.php +++ b/data/templates/default/bookmarks-thumbnail.inc.tpl.php @@ -5,14 +5,14 @@ * * Expects a $row variable with bookmark data. */ -if (!$GLOBALS['enableWebsiteThumbnails']) { - return; -} - -$thumbnailHash = md5( - $address . $GLOBALS['thumbnailsUserId'] . $GLOBALS['thumbnailsKey'] -); -//echo '<a href="'. $address .'"'. $rel .' ><img class="thumbnail" src="http://www.artviper.net/screenshots/screener.php?url='.$address.'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />'; -echo '<img class="thumbnail" onclick="window.location.href=\''.htmlspecialchars($address).'\'" src="http://www.artviper.net/screenshots/screener.php?url='.htmlspecialchars($address).'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />'; +$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 diff --git a/data/templates/default/bottom.inc.php b/data/templates/default/bottom.inc.php index e48f593..9e4014c 100644 --- a/data/templates/default/bottom.inc.php +++ b/data/templates/default/bottom.inc.php @@ -6,11 +6,6 @@ echo '<a href="'.createURL('about').'">'.T_('About').'</a>'; echo ' - '; echo T_("Propulsed by "); echo " <a href=\"https://sourceforge.net/projects/semanticscuttle/\">SemanticScuttle</a>"; - -if($GLOBALS['enableWebsiteThumbnails']) { - // Licence to the thumbnails provider (OBLIGATORY IF YOU USE ARTVIPER SERVICE) - echo ' (Thumbnails by <a href="http://www.artviper.net">webdesign</a>)'; -} ?> </div> |