Änderung der RSS Feeds ab CMSms 1.5 Topic is solved

Deutschsprachiger Support für CMS Made Simple
User avatar
map_1961
Power Poster
Power Poster
Posts: 406
Joined: Fri Apr 20, 2007 7:26 pm
Location: Ruhrstadt

Re: Änderung der RSS Feeds ab CMSms 1.5

Post by map_1961 »

Danke - wir werden es versuchen und berichten

map_1961
map_1961
Andiministrator

Re: Änderung der RSS Feeds ab CMSms 1.5

Post 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>
Last edited by Andiministrator on Sun May 17, 2009 9:01 am, edited 1 time in total.
Post Reply

Return to “German - Deutsch”