diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php
index ebae18b4..c68f5ae1 100644
--- a/application/FeedBuilder.php
+++ b/application/FeedBuilder.php
@@ -153,8 +153,7 @@ protected function buildItem($link, $pageaddr)
$permalink = ''. t('Permalink') .'';
}
$link['description'] = format_description($link['description'], '', false, $pageaddr);
- $link['description'] .= PHP_EOL .'
— '. $permalink;
-
+ $link['permalink'] = PHP_EOL .'
— '. $permalink;
$pubDate = $link['created'];
$link['pub_iso_date'] = $this->getIsoDate($pubDate);
diff --git a/index.php b/index.php
index 9d5f25ea..2ce375d0 100644
--- a/index.php
+++ b/index.php
@@ -607,7 +607,21 @@ function showDaily($pageBuilder, $LINKSDB, $conf, $pluginManager)
$conf->get('redirector.url'),
$conf->get('redirector.encode_url')
);
- $linksToDisplay[$key]['thumbnail'] = thumbnail($conf, $link['url']);
+
+
+ $thumb=lazyThumbnail($conf, $link['url'],$link['url']);
+ if ($thumb!='') // Only output links which have a thumbnail.
+ {
+ $linksToDisplay[$key]['thumbnail']=$thumb; // Thumbnail HTML code.
+ }
+ $thumUrl = $conf->get('plugins.ExternalThumbshot_URL');
+ if(empty($linksToDisplay[$key]['thumbnail'])){
+ $linksToDisplay[$key]['thumbnail'] = '';
+ }
+
+
+
+ //$linksToDisplay[$key]['thumbnail'] = thumbnail($conf, $link['url']);
$linksToDisplay[$key]['timestamp'] = $link['created']->getTimestamp();
}
@@ -780,8 +794,12 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager)
if ($thumb!='') // Only output links which have a thumbnail.
{
$link['thumbnail']=$thumb; // Thumbnail HTML code.
- $linksToDisplay[]=$link; // Add to array.
}
+ $thumUrl = $conf->get('plugins.ExternalThumbshot_URL');
+ if(empty($link['thumbnail'])){
+ $link['thumbnail'] = '';
+ }
+ $linksToDisplay[]=$link; // Add to array.
}
$data = array(
diff --git a/plugins/myShaarli/myShaarli.php b/plugins/myShaarli/myShaarli.php
index 831576a0..23c8d837 100644
--- a/plugins/myShaarli/myShaarli.php
+++ b/plugins/myShaarli/myShaarli.php
@@ -44,9 +44,10 @@ function hook_myShaarli_render_linklist($data,$conf)
foreach ($data['links'] as &$value) {
$thumb = computeThumbnail($conf, $value['url']);
if(empty($thumb)){
- $value['thumbnail'] = '';
+ //$value['thumbnail'] = '';
+ $value['thumbnail'] = '';
} else {
- $value['thumbnail'] = '';
+ $value['thumbnail'] = '';
}
}
return $data;
diff --git a/plugins/origin/origin.php b/plugins/origin/origin.php
index e19bf63f..bedea54f 100644
--- a/plugins/origin/origin.php
+++ b/plugins/origin/origin.php
@@ -77,8 +77,38 @@ function hook_origin_render_linklist($data,$conf)
}
// Try to get just domain for @via
- function getJustDomain($url)
- {
+ function getJustDomain($url) {
$parts = parse_url($url);
- return trim($parts['host']);
+ if(!empty($parts['host'])){
+ return trim($parts['host']);
+ } else {
+ return false;
+ }
+ }
+
+
+ /**
+ * Execute render_feed hook.
+ * Called with ATOM and RSS feed.
+ *
+ * Special data keys:
+ * - _PAGE_: current page
+ * - _LOGGEDIN_: true/false
+ *
+ * @param array $data data passed to plugin
+ *
+ * @return array altered $data.
+ */
+ function hook_origin_render_feed($data)
+ {
+ $origin_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/origin/render.html');
+
+ foreach ($data['links'] as &$value) {
+ if(!empty($value['via'])){
+ $host = getJustDomain($value['via']);
+ $origin = sprintf($origin_html, $value['via'], $host);
+ $value['description'] = $value['description'].$origin;
+ }
+ }
+ return $data;
}
diff --git a/plugins/origin/render.html b/plugins/origin/render.html
index bce996ee..4a574146 100644
--- a/plugins/origin/render.html
+++ b/plugins/origin/render.html
@@ -1,3 +1,3 @@