Changeset 292

Show
Ignore:
Timestamp:
03/04/06 14:52:30
Author:
chervol
Message:

* itunes related code refactored
* getMemberEmail.py renamed to getObjectCreator.py

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qRSS2Syndication/branches/itunes-atvideo-support/README.txt

    r291 r292  
    22   * 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 
    46 
    57 
  • qRSS2Syndication/branches/itunes-atvideo-support/TODO.txt

    r291 r292  
     1get rid of getFileFieldContentType method 
     2listSyndicatableContent should use ExtendedPathindex in query on Plone 2.1+ 
     3 
     4 
    15itunes related: 
    26--------------- 
     7 
    38add length of video file from a atvideo object to atvideo_item.pt like in ataudio_item.pt 
    49add categories to the channel for itunes feed 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/RSS2.pt

    r291 r292  
    66     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" 
    77     tal:define="results python:here.getSyndicatableContent();" 
    8      tal:on-error="nothing"> 
    9       
     8     tal:on-error="nothing">      
    109<tal:x define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml');" /> 
    11     <channel tal:define="creator here/Creator; syInfo python:here.getSynProp()"> 
    12  
     10    <channel tal:define="author python:here.getObjectCreator(here.Creator()); 
     11                         author_email python:author.getProperty('email',''); 
     12                         author_fullname python:author.getProperty('fullname',''); 
     13                         syInfo python:here.getSynProp(); 
     14                         itunesEnabled python: syInfo['enable_itunes']"> 
    1315        <title tal:define="portal_title here/portal_properties/title; 
    1416            here_title here/title_or_id; 
     
    1719            tal:content="string:$portal_title - $here_title">Title of page</title> 
    1820        <link tal:content="here/absolute_url"></link> 
    19         <description tal:content="here/Description"> 
    20         </description> 
     21        <description tal:content="here/Description"></description> 
    2122        <language>en-us</language> 
    2223        <generator>Plone CMS</generator> 
    23         <author tal:content="python:here.portal_membership.getMemberInfo(creator)['fullname']"></author> 
     24        <author tal:condition="author_fullname"  
     25                tal:content="author_fullname"></author> 
    2426         
    25         <tal:block condition="python: syInfo['enable_itunes']"> 
    26                         <ttl>240</ttl> 
    27                         <itunes:author tal:content="python:here.portal_membership.getMemberInfo(creator)['fullname']"></itunes:author> 
    28                         <itunes:explicit tal:content="python:test(syInfo['itunes_explicit'],'yes','no')"></itunes:explicit> 
    29                         <itunes:owner> 
    30                                 <itunes:name tal:content="python:here.portal_membership.getMemberInfo(creator)['fullname']"></itunes:name> 
    31                                 <itunes:email tal:content="python:here.getMemberEmail(creator)"></itunes:email> 
    32                         </itunes:owner> 
    33                         <itunes:image href="" tal:attributes="href python:syInfo['itunes_image_url']" tal:condition="python:syInfo['itunes_image_url']" /> 
     27        <tal:block condition="itunesEnabled"> 
     28        <ttl>240</ttl> 
     29        <itunes:author tal:content="author_fullname"></itunes:author> 
     30        <itunes:explicit tal:content="python:test(syInfo['itunes_explicit'],'yes','no')"></itunes:explicit> 
     31        <itunes:owner> 
     32           <itunes:name tal:content="author_fullname"></itunes:name> 
     33           <itunes: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']"  /> 
    3438        </tal:block> 
    3539 
     
    3741            <tal:block define="macros nocall: python:here.getItemMacros(res.portal_type);  
    3842                               item_path python: res.absolute_url(); 
    39                                res_creator here.portal_membership.getMemberInfo(res.Creator()); 
    40                                creator python: res_creator['fullname']+' '+res_creator['email']"> 
     43                               item_creator here.portal_membership.getMemberInfo(res.Creator()); 
     44                               item_creator python: '%s %s' % (item_creator.getProperty('fullname',''),item_creatorgetProperty('email',''))"> 
    4145                  <item> 
    4246                      <title tal:content="res/title_or_id"></title> 
     
    4448                      <description tal:content="res/Description"> 
    4549                      </description> 
    46                       <author tal:content="creator"></author> 
     50                      <author tal;condition="item_creator" 
     51                              tal:content="item_creator"></author> 
    4752                      <tal:repeat repeat="subj res/Subject"> 
    4853                          <category tal:content="subj"> 
     
    5257                      <metal:block use-macro="macros"/> 
    5358                  </item> 
    54  
    5559            </tal:block> 
    56                  
    5760        </tal:block> 
    58  
    59  
    6061    </channel> 
    61  
    6262</rss> 
    6363 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/ataudio_item.pt

    r291 r292  
    1111                               url item_path; 
    1212                               length item_size"/> 
    13           <tal:block condition="python: syInfo['enable_itunes']"> 
     13          <tal:block condition="itunesEnabled"> 
    1414               <itunes:duration tal:content="res/getLengthString"></itunes:duration> 
    1515          </tal:block> 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/mediacoopaudio_item.pt

    r291 r292  
    1414                               url item_path; 
    1515                               length item_size"/> 
    16           <tal:block condition="python: syInfo['enable_itunes']"> 
     16          <tal:block condition="itunesEnabled"> 
    1717                        <itunes:duration tal:content="res/getLengthString"></itunes:duration> 
    1818          </tal:block>