[add] option for use thumbshot

This commit is contained in:
Knah Tsaeb 2013-04-08 15:25:21 +02:00
parent 101922a5c3
commit 253a7690ef
3 changed files with 17 additions and 3 deletions

View file

@ -50,4 +50,8 @@ $autoblog_farm = array(
'https://www.ecirtam.net/autoblogs/?export',
'https://autoblog.suumitsu.eu/?export', */
);
// personnal option
$myOptions['enableThumbShot'] = false;
$myOptions['externalThumbSdhot'] = 'http://exemple.com/?url=';
?>

View file

@ -872,8 +872,15 @@ if( !empty($_POST['opml_file']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY
foreach ($autoblogs as $key => $autoblog) {
$opml_link='<a href="'.$key.'/?opml">opml</a>';
$autoblogs_display .= '<div class="vignette">
<div class="title"><a title="'.escape($autoblog->site_title).'" href="'.$key.'/"><img width="15" height="15" alt="" src="./?check='.$key.'"> '.escape($autoblog->site_title).'</a></div>
<div class="source">config <sup><a href="'.$key.'/vvb.ini">ini</a> '.$opml_link.'</sup> | '.escape($autoblog->site_type).' source: <a href="'.escape($autoblog->site_url).'">'.escape($autoblog->site_url).'</a></div>
<div class="title"><a title="'.escape($autoblog->site_title).'" href="'.$key.'/"><img width="15" height="15" alt="" src="./?check='.$key.'"> '.escape($autoblog->site_title).'</a></div>';
if($myOptions['enableThumbShot'] === true){
if(file_exists(ROOT_DIR . '/' . $unit . '/thumbshot.png')){
$autoblogs_display .= '<div class="thumbshot"><img src="'.ROOT_DIR . '/' . $unit . '/thumbshot.png" title="Thumbshot de '.escape($autoblog->site_title).'"/></div>';
} elseif(!empty($myOptions['externalThumbSdhot'])) {
$autoblogs_display .= '<div class="thumbshot"><img src="'.$myOptions['externalThumbSdhot'].rawurlencode(escape($autoblog->site_url)).'" title="Thumbshot de '.escape($autoblog->site_title).'"/></div>';
}
}
$autoblogs_display .= '<div class="source">config <sup><a href="'.$key.'/vvb.ini">ini</a> '.$opml_link.'</sup> | '.escape($autoblog->site_type).' source: <a href="'.escape($autoblog->site_url).'">'.escape($autoblog->site_url).'</a></div>
</div>';
}
}

View file

@ -37,8 +37,11 @@ h1 {
.thumbshot img {
width: 200px;
height: 160px;
float: left;
}
.source {
text-align: left;
clear:both;
padding : 0.3em;
}