Показать сообщение отдельно
Старый 12.02.2008, 03:19   #2
felix
Новенький
 
Регистрация: 02.01.2007
Сообщений: 12
По умолчанию

В шаблон сстраницы:
Код:
  
config >
  config {
    # Установка русского языка
    metaCharset = windows-1251
    renderCharset = windows-1251
    no_cache = 0
    locale_all = ru_RU.CP1251
    language = ru  
    disableAllHeaderCode = 1
    additionalHeaders = Content-type:application/xml
    #additionalHeaders = Content-type:text/xml
    xhtml_cleaning = 0
    admPanel = 0
}

xmlnewsPlugin >
xmlnewsPlugin < plugin.tt_news

xmlnewsPlugin {
    categoryMode = 1
    categorySelection = 147
    pid_list = 5,135
    recursive = 3
    singlePid = 11
    defaultCode = XML

general_stdWrap {
    parseFunc >
}
  displayXML {
   rss2_tmplFile = fileadmin/templates/rss_2.tmpl
   
    xmlFormat = rss2
    # possibile values: rss091 / rss2 / rdf / atom03

    xmlTitle = Заголовок фида
    xmlLink = http://website.ru/
    xmlDesc = Описание фида
    xmlLang = ru
    xmlIcon = fileadmin/tt_news_article.gif
    xmlLimit = 20

    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 = 300 | ... | 1
    subheader_stdWrap.ifEmpty.field = bodytext

  
 content_stdWrap.HTMLparser =0
    content_stdWrap.stripHtml = 1


    xmlLastBuildDate = 1
  }
}

xmlnews >

page >
page = PAGE
page.typeNum = 0
#page.config.no_cache = 0
page.10 >
page.10 < xmlnewsPlugin

page.includeLibs.user_textWrap = fileadmin/templates/user_textWrap1.php
page.stdWrap.preUserFunc = user_textWrap

В шаблон tt_news тот который прописан в typo_script как rss2_tmplFile = fileadmin/templates/rss_2.tmpl
Код:
###TEMPLATE_RSS2###<?xml version="1.0" encoding="windows-1251"?>
<rss version="2.0">
<channel>
                <!-- ###HEADER### begin -->
                <title>###SITE_TITLE###</title>
                <link>###SITE_LINK###</link>
              <description>###SITE_DESCRIPTION###</description>
                <image>
                        <url>###IMG###</url>
                        <title>###SITE_TITLE###</title>
                        <link>###SITE_LINK###</link>
                       </image>
                <!-- ###HEADER### end -->
           <!-- ###CONTENT### begin -->
                <!-- ###NEWS### begin -->
                <pubDate>###NEWS_DATE###</pubDate>
                <item>
                        <title>###NEWS_TITLE###</title>
                     <link>###NEWS_LINK###</link>
                        <description>###NEWS_SUBHEADER###</description>
                        <pubDate>###NEWS_DATE###</pubDate>
            <category></category>
                        <full-text>###NEWS_CONTENT###</full-text>
             </item>
                <!-- ###NEWS### end -->
                <!-- ###CONTENT### end -->
</channel>
</rss>
###TEMPLATE_RSS2###
felix вне форума   Ответить с цитированием