[TYPO3-german] tt_news und rss feeds

Widmann, Manfred mpunktw at gmx.net
Tue Jan 20 17:07:49 CET 2009


Bei mir funkts so:
Constants:
# tt_news constants for rss-feed
plugin.tt_news {
  displayXML {
    # rss091_tmplFile = EXT:tt_news/res/rss_0_91.tmpl
    # rdf_tmplFile = EXT:tt_news/res/rdf.tmpl
    # atom03_tmplFile = EXT:tt_news/res/atom_0_3.tmpl
    # atom1_tmplFile = EXT:tt_news/res/atom_1_0.tmpl
    rss2_tmplFile = fileadmin/config/tt_news/rss_2.tmpl

    # possibile values: rss091 / rss2 / rdf / atom03 / atom1
    xmlFormat = rss2

    xmlTitle = radclubwels.at
    xmlLink = http://www.radclubwels.at/
    xmlDesc = Neues vom RC ARBÖ Wels Resch & Frisch - Gourmetfein
    xmlLang = de
    #xmlIcon = fileadmin/tt_news_article.gif
    title_stdWrap.htmlSpecialChars = 1
    title_stdWrap.htmlSpecialChars.preserveEntities = 1
    #subheader_stdWrap.stripHtml = 1
    #subheader_stdWrap.htmlSpecialChars = 1
    #subheader_stdWrap.htmlSpecialChars.preserveEntities = 1
    #subheader_stdWrap.crop = 100 | ... | 1
    #subheader_stdWrap.ifEmpty.field = bodytext
    xmlLastBuildDate = 1
  }
}

Setup:
########### XML news feed Page
xmlnews = PAGE
xmlnews {
  typeNum = 100
  10 >
  10 < plugin.tt_news
  10.archive = -1
  10.pid_list >
  10.pid_list = {$plugin.tt_news.pid_list}
  10.singlePid = {$plugin.tt_news.singlePid}
  10.defaultCode = XML
  config {
    disableAllHeaderCode = 1
    additionalHeaders = Content-type:text/xml
    no_cache = 1
    xhtml_cleaning = 0
  }
}

Template:
<!-- ###TEMPLATE_RSS2### begin -->###XML_DECLARATION###
<rss version="2.0">
 <channel>
  <!-- ###HEADER### begin -->
  <title>###SITE_TITLE###</title>
  <link>###SITE_LINK###</link>
  <description>###SITE_DESCRIPTION###</description>
  ###SITE_LANG###
  <generator>TYPO3 - get.content.right</generator>
  ###NEWS_LASTBUILD###
  <!-- ###HEADER### end -->
  <!-- ###CONTENT### begin -->
  <!-- ###NEWS### begin -->
  <item>
   <title>###NEWS_TITLE###</title>
   <link>###NEWS_LINK###</link>
   <pubDate>###NEWS_DATE###</pubDate>
  </item>
  <!-- ###NEWS### end -->
  <!-- ###CONTENT### end -->
 </channel>
</rss><!-- ###TEMPLATE_RSS2### end -->


Hilft dir das weiter? Hab mich damals auch ein wenig gespielt!
lg
Manfred




"Sebastian P." <bigsebek at gmail.com> schrieb im Newsbeitrag 
news:mailman.28169.1232466372.2904.typo3-german at lists.netfielders.de...
Hallo meine letzte Hoffnung,



ich kämpfe schon den ganzen Tag mit tt_news und den rss feeds. Ich kriege
die einfach nicht zum Laufen. Ich habe schon alle möglichen Quellen
nachgespielt. Sogar anhand eines video2brain, aber nix.



Meine TS config sieht so aus:

page.headerData.100 = TEXT

page.headerData.100.value =<link rel="alternate" type="application/rss+xml"
title="RSS-Feed" href="http://localhost/index.php?id=16&type=100">



xmlnews = PAGE

xmlnews {

  typeNum = 100



  10 >

  10 < plugin.tt_news

  10.pid_list >

  10.pid_list = {$plugin.tt_news.pid_list}

  10.singlePid = {$plugin.tt_news.singlePid}

  10.defaultCode = XML



  config {

    disableAllHeaderCode = 1

    additionalHeaders = Content-type:text/xml

    no_cache = 1

    xhtml_cleaning = 0

  }

}



rdffeed = PAGE

rdffeed < xmlnews

rdffeed {

  10.displayXML.xmlFormat = rdf

  10.displayXML.xmlIcon = fileadmin/templates/img/rdf.gif

  typeNum = 101

}



atom03feed = PAGE

atom03feed < xmlnews

atom03feed {

  10.displayXML.xmlFormat = atom03

  typeNum = 102

}



atom1feed = PAGE

atom1feed < xmlnews

atom1feed {

  10.displayXML.xmlFormat = atom1

  typeNum = 103

}



Und die TS Constant so:

plugin.tt_news  {

   displayXML {

       rss2_tmplFile = EXT:tt_news/res/rss_2.tmpl

       xmlFormat = rss2



       xmlTitle = Meine Seite

       xmplLink = localhost

       xmlDesc = Irgendwas

       xmlLang = de

       xmlIcon = fileadmin/images/rdf.gif



       title_stdWrap.htmlSpecialChars = 1

       title_stdWrap.htmlSpecialChars.preserveEntities = 1

       subheader_stdWrap.stripHtml = 1

       subheader_stdWrap.htmlSpecialChars = 1

       subheader_stdWrap.htmlSpecialChars.preserveEntities = 1

       subheader_stdWrap.crop = 100| ... | 1

       subheader_stdWrap.ifEmpty.field = bodytext

       xmlLastBuildDate = 1

  }

}



Die Seite mit der ID 16 zeigt alle Nachrichten.

Im Internet Explorer wird der Titel richtig angzeigt jedoch die Nachrichten
nicht. Der FF zeigt mir ständig example.com obwohl ich schon auch im
Constant Editor diese Einstellung verändert habe. Auch hier werden keine
Nachrichten angezeigt.



Kann mir vielleicht jemand helfen? Gibt es vielleicht ein echt zuverlässiges
Tutorial dazu. Alle die ich bis jetzt ausprobiert habe, gehen nicht.



Gruss

Sebastian




More information about the TYPO3-german mailing list