Update soshot config
This commit is contained in:
parent
2c1f0981d9
commit
be6a3e28ca
4 changed files with 42 additions and 20 deletions
|
@ -62,22 +62,18 @@ function hook_myShaarli_render_linklist($data, $conf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($data['links'] as &$value) {
|
foreach ($data['links'] as &$value) {
|
||||||
//$thumb = computeThumbnail($conf, $value['url']);
|
if (!empty($key)) {
|
||||||
if (empty($thumb)) {
|
$hmac = 'type=thumb&hmac=' . hash_hmac('sha1', $value['url'], $key) . '&url=';
|
||||||
if (!empty($key)) {
|
|
||||||
$hmac = '&hm=' . hash_hmac('sha1', $value['url'], $key) . '&url=';
|
|
||||||
} else {
|
|
||||||
$hmac = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$value['thumbnail'] = $thumUrl . $hmac . urlencode($value['url']);
|
|
||||||
} else {
|
} else {
|
||||||
$value['thumbnail'] = $thumb['src'];
|
$hmac = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$value['thumbnail'] = $thumUrl . $hmac . urlencode($value['url']);
|
||||||
|
|
||||||
|
|
||||||
if (empty($value['favicon'])) {
|
if (empty($value['favicon'])) {
|
||||||
if (!empty($key)) {
|
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 {
|
} else {
|
||||||
$hmac = null;
|
$hmac = null;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +86,28 @@ function hook_myShaarli_render_linklist($data, $conf) {
|
||||||
return $data;
|
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.
|
* 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']);
|
//$thumb = computeThumbnail($conf, $value['url']);
|
||||||
if (empty($thumb)) {
|
if (empty($thumb)) {
|
||||||
if (!empty($key)) {
|
if (!empty($key)) {
|
||||||
$hmac = '&hm=' . hash_hmac('sha1', $value['url'], $key) . '&url=';
|
$hmac = 'type=thumb&hmac=' . hash_hmac('sha1', $value['url'], $key) . '&url=';
|
||||||
} else {
|
} else {
|
||||||
$hmac = null;
|
$hmac = null;
|
||||||
}
|
}
|
||||||
|
@ -152,7 +170,6 @@ function hook_myShaarli_render_editlink($data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Améliore la sortie print
|
Améliore la sortie print
|
||||||
@author Tatane http://www.tatane.info/index.php/print_rn
|
@author Tatane http://www.tatane.info/index.php/print_rn
|
||||||
@author http://www.blog.cactuscrew.com/77-print_rn.html
|
@author http://www.blog.cactuscrew.com/77-print_rn.html
|
||||||
|
|
|
@ -1235,6 +1235,9 @@ form[name="linkform"].page-form {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
float: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.b-lazy {
|
.b-lazy {
|
||||||
|
|
|
@ -140,8 +140,7 @@
|
||||||
<div
|
<div
|
||||||
class="linklist-item-thumbnail {if="$value.thumbnail === null"}hidden{/if}"
|
class="linklist-item-thumbnail {if="$value.thumbnail === null"}hidden{/if}"
|
||||||
style="width:{$thumbnails_width}px;height:{$thumbnails_height}px;"
|
style="width:{$thumbnails_width}px;height:{$thumbnails_height}px;"
|
||||||
{if="$value.thumbnail === null"}data-async-thumbnail="1"{/if}
|
{if="$value.thumbnail === null"}data-async-thumbnail="1"{/if}>
|
||||||
>
|
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
{ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
|
{ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
|
||||||
<a href="{$value.real_url}" aria-hidden="true" tabindex="-1">
|
<a href="{$value.real_url}" aria-hidden="true" tabindex="-1">
|
||||||
|
@ -174,8 +173,12 @@ <h2>
|
||||||
{else}
|
{else}
|
||||||
<i class="fa fa-sticky-note" aria-hidden="true"></i>
|
<i class="fa fa-sticky-note" aria-hidden="true"></i>
|
||||||
{/if}
|
{/if}
|
||||||
|
<img alt="favicon"
|
||||||
<span class="linklist-link">{$value.title_html}</span>
|
src="{$value.favicon}"
|
||||||
|
loading="lazy"
|
||||||
|
height="16" width="16" loading>
|
||||||
|
<span class="linklist-link">
|
||||||
|
{$value.title_html}</span>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,9 +29,9 @@ <h2 class="window-title">{'Picture Wall'|t} - {$countPics} {'pics'|t}</h2>
|
||||||
|
|
||||||
<div id="picwall-container" class="picwall-container" role="list">
|
<div id="picwall-container" class="picwall-container" role="list">
|
||||||
{loop="$linksToDisplay"}
|
{loop="$linksToDisplay"}
|
||||||
<div class="picwall-pictureframe" role="listitem">
|
<div class="picwall-pictureframe" role="listitem" style="width:{$thumbnails_width}px; height:{$thumbnails_height}px ;">
|
||||||
{ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
|
{ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
|
||||||
<img data-src="{$root_path}/{$value.thumbnail}#" class="b-lazy"
|
<img data-src="{$value.thumbnail}#" class="b-lazy"
|
||||||
src=""
|
src=""
|
||||||
alt="" width="{$thumbnails_width}" height="{$thumbnails_height}" />
|
alt="" width="{$thumbnails_width}" height="{$thumbnails_height}" />
|
||||||
<a href="{$value.real_url}"><span class="info">{$value.title}</span></a>
|
<a href="{$value.real_url}"><span class="info">{$value.title}</span></a>
|
||||||
|
@ -56,4 +56,3 @@ <h2 class="window-title">{'Picture Wall'|t} - {$countPics} {'pics'|t}</h2>
|
||||||
<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
|
<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue