Hi,
i'm testing publication on social networks like Facebook, Twitter ... with the help of CGFeedMaker and News module.
For texts it works well with services like IFTTT, Dlvr.it... But no luck with images (enclosure tag - i checked my feed and it's valid rss 2.0).
I made a custom field to add this image (i don't want to add the image in the article content).
Does anybody have a tip to achieve this?
(I know that some services don't handle enclosure tags...)
Thx !
Publication on social networks with rss
Re: Publication on social networks with rss
Is in Dutch, but might help...
http://forum.cmsmadesimple.org/viewtopi ... 52&t=60917
http://forum.cmsmadesimple.org/viewtopi ... 52&t=60917
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Publication on social networks with rss
Thanks for the link, but it doesn't help me.
I can display an image inside a CDATA tag, but it is not displayed in Facebook. With Dlvr.it, i changed the image detection to "Auto-detect in item content", nothing changes...
Does anybody tried the "enclosure" tag, or <media:thumbnail> ?
Heres's my CGFeedMaker template:
I can display an image inside a CDATA tag, but it is not displayed in Facebook. With Dlvr.it, i changed the image detection to "Auto-detect in item content", nothing changes...
Does anybody tried the "enclosure" tag, or <media:thumbnail> ?
Heres's my CGFeedMaker template:
Code: Select all
<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{$feed_url}" rel="self" type="application/rss+xml" />
<title>{$feed.title}</title>
{if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
{if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
{if isset($feed.copyright) && !empty($feed.copyright)}<copyright>{$feed.copyright}</copyright>{/if}
{if isset($generator)}<generator>{$generator}</generator>{/if}
{if isset($feed.managing_editor) && !empty($feed.managing_editor)}<managingEditor>{$feed.managing_editor}</managingEditor>{/if}
{if isset($admin_email)}<webMaster>{$admin_email} ({$admin_user->firstname} {$admin_user->lastname})</webMaster>{/if}
{if isset($feed.image) && !empty($feed.image)}
<image>
{if isset($feed.description) && !empty($feed.description)}<description>{$feed.description}</description>{/if}
{if isset($feed.link) && !empty($feed.link)}<link>{$feed.link}</link>{/if}
<title>{$feed.title}</title>
<url>{$file_location}/{$feed.image}</url>
</image>
{/if}
{news assign='junk' category='Blog*' detailtemplate='detblog' detailpage='blog'}
{foreach from=$items item='entry'}
{assign var='imgpath' value="`$entry->file_location`/`$entry->fieldsbyname.image->value`"}
<item>
<title>{$entry->title|cms_html_entity_decode}</title>
{capture assign='description'}{if $entry->summary}{eval var=$entry->summary}{else}{eval var=$entry->content}{/if}{/capture}
<link>{$entry->moreurl}</link>
<description>
<![CDATA[
{CGSmartImage src=$imgpath width='200'}
{$description|trim|strip_tags|truncate:100}
]]>
</description>
<pubDate>{$entry->postdate|rfc_date}</pubDate>
<guid>{$entry->moreurl}</guid>
</item>
{/foreach}
</channel>
</rss>