[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

@ -37,7 +37,7 @@ $apitwitter = FALSE;
$logo=RESOURCES_FOLDER .'icon-logo.svg';
// Marquez ici votre propre message qui apparaîtra en bas de page.
// exemple :
// exemple :
//$HTML_footer="<br/><a href='http://datalove.me/'>Love data</a><br/>Data is essential<br/>Data must flow<br/>Data must be used<br/>Data is neither good nor bad<br/>There is no illegal data<br/>Data is free<br/>Data can not be owned<br/>No man, machine or system shall interrupt the flow of data<br/>Locking data is a crime against datanity";
$HTML_footer='D\'après les premières versions de <a href="http://sebsauvage.net">SebSauvage</a> et <a href="http://bohwaz.net/">Bohwaz</a>.';
@ -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;
}