Fix picwall
This commit is contained in:
parent
c111704f8c
commit
cdc426d560
1 changed files with 16 additions and 1 deletions
17
index.php
17
index.php
|
@ -800,9 +800,24 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager)
|
|||
{
|
||||
$link['thumbnail']=$thumb; // Thumbnail HTML code.
|
||||
}
|
||||
|
||||
$thumUrl = $conf->get('plugins.ExternalThumbshot_URL');
|
||||
if(!empty($conf->get('plugins.ExternalThumbshot_KEY'))){
|
||||
$key = $conf->get('plugins.ExternalThumbshot_KEY');
|
||||
}
|
||||
if(empty($link['thumbnail'])){
|
||||
$link['thumbnail'] = '<img class="b-lazy" src="#" data-src="'.$thumUrl.urlencode($link['url']).'" alt="Thumbnail" width="120" height="90">';
|
||||
$thumb = computeThumbnail($conf, $link['url']);
|
||||
if(empty($thumb)){
|
||||
if(!empty($key)){
|
||||
$hmac = '&hm='.hash_hmac('sha1', $link['url'], $key).'&url=';
|
||||
} else {
|
||||
$hmac = null;
|
||||
}
|
||||
$link['thumbnail'] = '<img class="b-lazy" src="#" data-src="'.$thumUrl.$hmac.urlencode($link['url']).'" alt="Thumbnail" width="120" height="90">';
|
||||
} else {
|
||||
$link['thumbnail'] = '<img class="b-lazy" src="#" data-src="'.$thumb['src'].'" alt="Thumbnail" width="120" height="90">';
|
||||
}
|
||||
|
||||
}
|
||||
$linksToDisplay[]=$link; // Add to array.
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue