Page 3 of 3

Re: Änderung der RSS Feeds ab CMSms 1.5

Posted: Thu Apr 02, 2009 6:23 am
by map_1961
Danke - wir werden es versuchen und berichten

map_1961

Re: Änderung der RSS Feeds ab CMSms 1.5

Posted: Sat May 16, 2009 9:25 am
by Andiministrator
Nico hat mich noch auf eine Schwachstelle meines RSS Feed Templates hingewiesen. Vielleicht auch für andere interessant, deshalb hier meine aktuelle Version des RSS Feed Templates für den CG FeedMaker und das Modul News:

Code: Select all

{* modified rss feed template *}
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" 
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">

<channel>

    <title>{$feed.title|escape}</title>
	<link>{root_url}{$smarty.server.REQUEST_URI}</link>
    <atom:link href="{root_url}{$smarty.server.REQUEST_URI}" rel="self" type="application/rss+xml" />
    {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}
    <language>de</language>
    <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
    {if isset($admin_email)}<dc:creator>{$admin_email} ({$admin_user->firstname} {$admin_user->lastname})</dc:creator>{/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='pubs'}

    {foreach from=$items item='entry'}
   <item>
      <title>{$entry->title|escape}</title>
      <link>{$entry->moreurl}</link>
      {if isset($admin_email)}<dc:creator>{$admin_email} ({$admin_user->firstname} {$admin_user->lastname})</dc:creator>{/if}
      <pubDate>{$entry->postdate|cms_date_format_en:"%a, %d %b %Y %H:%M:%S"} +0200</pubDate>
      <guid isPermaLink="true">{$entry->moreurl}</guid>
      <description><![CDATA[<p>{if $entry->summary}{$entry->summary|trim|strip_tags}{else}{$entry->content|strip_tags|summarize:100}{/if}</p>]]></description>
      <wfw:commentRss>{root_url}{$smarty.server.REQUEST_URI}</wfw:commentRss>      
    </item>
    {/foreach}

</channel>

</rss>