Changeset 311

Show
Ignore:
Timestamp:
03/08/06 08:41:55
Author:
chervol
Message:

merge version 0.4.5 to trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qRSS2Syndication/trunk/HISTORY.txt

    r310 r311  
     10.4.5 2005-03-06 
     2 
     3   * added full body of article <content:encoded> support for Documents and SimpleBlog. 
     4 
     5   * added Smart Folders/Topic syndication suport in Plone 2.1.2. The standart CMFTopic in Plone 2.0.5 does not implement getSyndicatableValues. 
     6 
     7   * added basic iTunes support 
     8 
    190.4.1 2005-08-25 
    2        
     10 
    311   * fixed RSS1 headers 
    412 
     
    1220 
    1321   * Added <content:encoded> support to RSS2 template.  
    14    
     22 
    1523   * blogentry_item.pt now supports <enclosure> for ATAudio. 
    1624 
    1725   * Added template RSS1, rssBody1 - RSS 0.92 feed with <content:encoded> tag. 
    18     
     26 
  • qRSS2Syndication/trunk/README.txt

    r310 r311  
    11qRSS2Syndication simple product that adds RSS2 functionality to Plone.  
    2    * includes support of audio and video feeds.  
     2   * includes support of audio and video feeds. 
    33   * the syndication of ATAudio objects, mp3, wmv, ppt, jpg files using RSS 2.0 with enclosures. 
     4   * full body of article <content:encoded> support for Documents and SimpleBlog. 
     5   * Smart Folders/Topic syndication suported in Plone 2.1.2. The standart CMFTopic in Plone 2.0.5 does not implement getSyndicatableValues. 
     6   * basic iTunes support 
    47 
    58 
     
    1619which is controled with portal_syndication tool 
    1720 
     21EXTENDING 
    1822 
     23If you need to introduce your custom content type into RSS2 refer to the document_item.pt template in the skin (or any other *_item.pt). 
     24 
     25AUTHORS 
     26 
     27Volodymyr Cherepanyak <chervol@quintagroup.com> 
     28Wolfgang Reutz <wolfgang.reutz@fhv.at> - iTunes support, mediacoop audio/video support.   
  • qRSS2Syndication/trunk/skins/qrss2syndication/RSS2.pt

    r310 r311  
    44     xmlns:metal="http://xml.zope.org/namespaces/metal"   
    55     xmlns:content="http://purl.org/rss/1.0/modules/content/" 
     6     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" 
    67     tal:define="results python:here.getSyndicatableContent();" 
    78     tal:on-error="nothing"> 
    8 <tal:x define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml')" /> 
    9     <channel> 
    10  
     9<tal:x define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml');" /> 
     10    <channel tal:define="author python:here.getObjectCreator(here.Creator()); 
     11                         author_email python:author and author.getProperty('email','') or ''; 
     12                         author_fullname python:author and author.getProperty('fullname','') or ''; 
     13                         syInfo python:here.getSynProp(); 
     14                         itunesEnabled python: syInfo['enable_itunes']"> 
    1115        <title tal:define="portal_title here/portal_properties/title; 
    1216            here_title here/title_or_id; 
     
    1519            tal:content="string:$portal_title - $here_title">Title of page</title> 
    1620        <link tal:content="here/absolute_url"></link> 
    17         <description tal:content="here/Description"> 
    18         </description> 
     21        <description tal:content="here/Description"></description> 
    1922        <language>en-us</language> 
    20         <generator>Plone 2.0</generator> 
     23        <generator>Plone CMS</generator> 
     24        <author tal:condition="author_fullname"  
     25                tal:content="author_fullname"></author> 
     26 
     27        <tal:block condition="itunesEnabled"> 
     28        <ttl>240</ttl> 
     29        <itunes:author tal:condition="author_fullname" tal:content="author_fullname"></itunes:author> 
     30        <itunes:explicit tal:content="python:test(syInfo['itunes_explicit'],'yes','no')"></itunes:explicit> 
     31        <itunes:owner tal:condition="author"> 
     32           <itunes:name tal:condition="author_fullname" tal:content="author_fullname"></itunes:name> 
     33           <itunes:email tal:condition="author_email" tal:content="author_email"></itunes:email> 
     34        </itunes:owner> 
     35        <itunes:image href=""  
     36                      tal:condition="python:syInfo['itunes_image_url']" 
     37                      tal:attributes="href python:syInfo['itunes_image_url']"  /> 
     38        <itunes:subtitle tal:condition="here/longDescription" tal:content="here/Description"></itunes:subtitle> 
     39        <itunes:summary tal:condition="here/longDescription|nothing" tal:content="here/longDescription"></itunes:summary> 
     40        </tal:block> 
    2141 
    2242        <tal:block repeat="res results"> 
    2343            <tal:block define="macros nocall: python:here.getItemMacros(res.portal_type);  
    2444                               item_path python: res.absolute_url(); 
    25                                item_path python: res.portal_type=='ATAudio' and item_path+'/file_download/'+res.getId() or item_path;"> 
     45                               item_creator python:here.getObjectCreator(res.Creator()); 
     46                               item_creator python:item_creator and '%s (%s)' % (item_creator.getProperty('fullname',''),item_creator.getProperty('email','')) or ''"> 
    2647                  <item> 
    2748                      <title tal:content="res/title_or_id"></title> 
     
    2950                      <description tal:content="res/Description"> 
    3051                      </description> 
     52                      <tal:block condition="itunesEnabled"> 
     53                        <itunes:subtitle tal:condition="res/longDescription|nothing" tal:content="res/Description"></itunes:subtitle> 
     54                        <itunes:summary tal:condition="res/longDescription|nothing" tal:content="res/longDescription"></itunes:summary> 
     55                      </tal:block> 
     56                      <author tal:condition="item_creator" 
     57                              tal:content="item_creator"></author> 
    3158                      <tal:repeat repeat="subj res/Subject"> 
    3259                          <category tal:content="subj"> 
     
    3663                      <metal:block use-macro="macros"/> 
    3764                  </item> 
    38  
    3965            </tal:block> 
    40                  
    4166        </tal:block> 
    42  
    43  
    4467    </channel> 
    45  
    4668</rss> 
    4769 
  • qRSS2Syndication/trunk/skins/qrss2syndication/ataudio_item.pt

    r310 r311  
    22<rss version="2.0"  
    33     xmlns:tal="http://xml.zope.org/namespaces/tal" 
    4      xmlns:metal="http://xml.zope.org/namespaces/metal" > 
     4     xmlns:metal="http://xml.zope.org/namespaces/metal" 
     5     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" > 
    56<metal:block define-macro="item"> 
    6    <tal:define define="file res/getFile; 
    7                        item_size file/get_size | python: file and len(file) or 0; 
    8                        content_type  python:here.getFileFieldContentType(res); 
    9                        "> 
     7   <tal:define define="item_size res/getFileSize | python: 0; 
     8                       content_type  res/getMimeType;"> 
    109           <enclosure  
    1110               tal:attributes="type content_type; 
    1211                               url item_path; 
    1312                               length item_size"/> 
     13          <tal:block condition="itunesEnabled"> 
     14               <itunes:duration tal:content="res/getLengthString"></itunes:duration> 
     15          </tal:block> 
    1416  </tal:define> 
    1517</metal:block> 
  • qRSS2Syndication/trunk/skins/qrss2syndication/blogentry_item.pt

    r310 r311  
    88        <category tal:content="tag"></category> 
    99     </tal:repeat>         
    10       <content:encoded tal:content="structure res/render_body">  </content:encoded> 
     10        <content:encoded tal:content="structure res/render_body">  </content:encoded> 
    1111     <tal:x tal:on-error="string:" 
    1212           define="files python:res.objectValues('ATAudio'); 
  • qRSS2Syndication/trunk/skins/qrss2syndication/getSynProp.py

    r310 r311  
    1 ## Script (Python) "getAudioFiles
     1## Script (Python) "getSynProp
    22##bind container=container 
    33##bind context=context 
     
    55##bind script=script 
    66##bind subpath=traverse_subpath 
    7 ##parameters= object=None 
     7##parameters=object=None 
    88##title= 
    99## 
  • qRSS2Syndication/trunk/skins/qrss2syndication/getSyndicatableContent.py

    r310 r311  
    1111if not obj: 
    1212   obj = context 
    13 if hasattr(obj,'synContentValues') or obj.portal_type=='Topic': 
     13if hasattr(context,'synContentValues') or context.portal_type=='Topic': 
    1414   count = context.portal_syndication.getMaxItems(obj)  
    1515   res = context.portal_syndication.getSyndicatableContent(obj) 
     16   # has to check and cut number of items to be displayed  
     17   # to prevent feed bloat  
    1618   count = count<len(res) and count or len(res) 
    1719   res = res[:count] 
  • qRSS2Syndication/trunk/skins/qrss2syndication/save_rss2_setup.cpy

    r310 r311  
    66##bind state=state 
    77##bind subpath=traverse_subpath 
    8 ##parameters= rss2_types=(),only_published=0,include_subfolders=0, articles_number=20,REQUEST=None 
     8##parameters= rss2_types=(),only_published=0,include_subfolders=0, articles_number=20, enable_itunes=0, itunes_image_url='', itunes_explicit=0, REQUEST=None 
    99##title= 
    1010## 
    1111if REQUEST: 
    1212  from Products.qRSS2Syndication.utils import setupRSS2Types 
    13   status,message=setupRSS2Types(context,rss2_types,only_published,include_subfolders,articles_number,REQUEST) 
     13  status,message=setupRSS2Types(context,rss2_types,only_published,include_subfolders,articles_number,enable_itunes,itunes_image_url,itunes_explicit,REQUEST) 
    1414return state.set(status=status, portal_status_message=message) 
    1515     
  • qRSS2Syndication/trunk/skins/qrss2syndication/setup_rss2.cpt

    r310 r311  
    4949              </metal:block> 
    5050                 
    51             </select> 
     51                       </select> 
    5252          </div> 
    5353 
     
    7575          </div> 
    7676 
    77             
    7877          <div class="field" 
    7978               tal:define="error errors/articles_number|nothing;" 
     
    9291          </div> 
    9392 
    94  
    95  
     93                  <fieldset> 
     94                         <legend i18n:translate="legend_itunes">iTunes</legend> 
     95                  <div class="field"> 
     96                    <input type="checkbox"  
     97                           name="enable_itunes"  
     98                           value="0" 
     99                           tal:define="checked python:sy_info['enable_itunes'] and 'checked'" 
     100                           tal:attributes="checked checked"/> 
     101                    <label for="enable_itunes" i18n:translate="label_enable_itunes">Enable support for iTunes Music Store (good for Podcasts/Vodcasts)</label> 
     102                  </div> 
     103         
     104                  <div class="field"> 
     105                    <input type="checkbox"  
     106                           name="itunes_explicit"  
     107                           value="0" 
     108                           tal:define="checked python:sy_info['itunes_explicit'] and 'checked'" 
     109                           tal:attributes="checked checked"/> 
     110                    <label for="itunes_explicit" i18n:translate="label_itunes_explicit">This channel contains explicit content, strong language, sexuality, ...</label> 
     111                  </div> 
     112         
     113                  <div class="field"> 
     114                    <label for="itunes_image_url" i18n:translate="label_itunes_image_url">Artwork for this Channel</label> 
     115                    <div class="formHelp" i18n:translate="help_itunes_image_url"> 
     116                      Please enter a url to a image for the artwork of this channel. Should be in JPEG or PNG format and 300x300 pixels. 
     117                    </div> 
     118                    <input type="text"  
     119                           name="itunes_image_url"  
     120                           value="" 
     121                                          size="60" 
     122                           tal:define="itunes_image_url python:request.get('itunes_image_url',None) or sy_info['itunes_image_url'] or ''" 
     123                           tal:attributes="value itunes_image_url"/> 
     124                  </div> 
     125                  </fieldset> 
    96126          <div class="formControls"> 
    97127         
  • qRSS2Syndication/trunk/utils.py

    r310 r311  
    88                    include_subfolders = 0, 
    99                    articles_number = 20, 
     10                    enable_itunes = 0, 
     11                    itunes_image_url = '', 
     12                    itunes_explicit = 0, 
    1013                    REQUEST = None): 
    1114    """ Save all needed RSS2 properties into 'syndication_information' """       
     
    2326    syInfo.include_subfolders = include_subfolders 
    2427    syInfo.max_items = articles_number 
     28    syInfo.enable_itunes = enable_itunes 
     29    syInfo.itunes_image_url = itunes_image_url 
     30    syInfo.itunes_explicit = itunes_explicit 
    2531    return status, message 
    2632 
     
    3440     syPropeties['include_subfolders'] = getattr(syInfo,'include_subfolders',0) 
    3541     syPropeties['articles_number'] =int(getattr(syInfo,'max_items',20)) 
     42     syPropeties['enable_itunes'] = getattr(syInfo,'enable_itunes',0) 
     43     syPropeties['itunes_image_url'] = getattr(syInfo,'itunes_image_url','') 
     44     syPropeties['itunes_explicit'] = getattr(syInfo,'itunes_explicit',0) 
    3645     return  syPropeties 
    3746 
  • qRSS2Syndication/trunk/version.txt

    r310 r311  
    1 0.4.1 
     10.4.5