diff --git a/plugins/myShaarli/myShaarli.php b/plugins/myShaarli/myShaarli.php index 889330bf..f51bab73 100644 --- a/plugins/myShaarli/myShaarli.php +++ b/plugins/myShaarli/myShaarli.php @@ -62,22 +62,18 @@ function hook_myShaarli_render_linklist($data, $conf) { } foreach ($data['links'] as &$value) { - //$thumb = computeThumbnail($conf, $value['url']); - if (empty($thumb)) { - if (!empty($key)) { - $hmac = '&hm=' . hash_hmac('sha1', $value['url'], $key) . '&url='; - } else { - $hmac = null; - } - - $value['thumbnail'] = $thumUrl . $hmac . urlencode($value['url']); + if (!empty($key)) { + $hmac = 'type=thumb&hmac=' . hash_hmac('sha1', $value['url'], $key) . '&url='; } else { - $value['thumbnail'] = $thumb['src']; + $hmac = null; } + $value['thumbnail'] = $thumUrl . $hmac . urlencode($value['url']); + + if (empty($value['favicon'])) { if (!empty($key)) { - $hmac = '&t=fav&hm=' . hash_hmac('sha1', $value['url'], $key) . '&url='; + $hmac = 'type=fav&hmac=' . hash_hmac('sha1', $value['url'], $key) . '&url='; } else { $hmac = null; } @@ -90,6 +86,28 @@ function hook_myShaarli_render_linklist($data, $conf) { return $data; } +function hook_myShaarli_render_picwall($data, $conf) { + + $thumUrl = $conf->get('plugins.ExternalThumbshot_URL'); + if (!empty($conf->get('plugins.ExternalThumbshot_KEY'))) { + $key = $conf->get('plugins.ExternalThumbshot_KEY'); + } + if (!isset($thumUrl)) { + return $data; + } + + foreach ($data['linksToDisplay'] as &$value) { + if (!empty($key)) { + $hmac = 'type=thumb&hmac=' . hash_hmac('sha1', $value['url'], $key) . '&url='; + } else { + $hmac = null; + } + + $value['thumbnail'] = $thumUrl . $hmac . urlencode($value['url']); + } + return $data; +} + /** * Add externalThumbshot icon to link_plugin when rendering linklist. * @@ -111,7 +129,7 @@ function hook_myShaarli_render_daily($data, $conf) { //$thumb = computeThumbnail($conf, $value['url']); if (empty($thumb)) { if (!empty($key)) { - $hmac = '&hm=' . hash_hmac('sha1', $value['url'], $key) . '&url='; + $hmac = 'type=thumb&hmac=' . hash_hmac('sha1', $value['url'], $key) . '&url='; } else { $hmac = null; } @@ -152,7 +170,6 @@ function hook_myShaarli_render_editlink($data) { } /** - Améliore la sortie print @author Tatane http://www.tatane.info/index.php/print_rn @author http://www.blog.cactuscrew.com/77-print_rn.html diff --git a/tpl/myShaarli/css/myShaarli.css b/tpl/myShaarli/css/myShaarli.css index d1267cd3..c7152a98 100644 --- a/tpl/myShaarli/css/myShaarli.css +++ b/tpl/myShaarli/css/myShaarli.css @@ -1235,6 +1235,9 @@ form[name="linkform"].page-form { display: inline-flex; overflow: hidden; text-align: center; + width: auto; + height: auto; + float: none; } .b-lazy { diff --git a/tpl/myShaarli/linklist.html b/tpl/myShaarli/linklist.html index 4188555b..fdb13bfc 100644 --- a/tpl/myShaarli/linklist.html +++ b/tpl/myShaarli/linklist.html @@ -140,8 +140,7 @@