Changeset 291

Show
Ignore:
Timestamp:
03/04/06 14:25:49
Author:
chervol
Message:

* added document_item.pt
* fixed RSS2 for Topics switch
* audio_item.pt update now using nativemethods to get size and mime_type
* RSS2.pt updated the audio file path expresion

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/RSS2.pt

    r290 r291  
    3737            <tal:block define="macros nocall: python:here.getItemMacros(res.portal_type);  
    3838                               item_path python: res.absolute_url(); 
    39                                item_path python: res.portal_type=='ATAudio' and item_path+'/file_download/'+res.getId() or item_path
    40                                res_creator res/Creator"> 
     39                               res_creator here.portal_membership.getMemberInfo(res.Creator())
     40                               creator python: res_creator['fullname']+' '+res_creator['email']"> 
    4141                  <item> 
    4242                      <title tal:content="res/title_or_id"></title> 
     
    4444                      <description tal:content="res/Description"> 
    4545                      </description> 
    46                       <author tal:content="python:here.portal_membership.getMemberInfo(res_creator)['fullname']"></author> 
     46                      <author tal:content="creator"></author> 
    4747                      <tal:repeat repeat="subj res/Subject"> 
    4848                          <category tal:content="subj"> 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/ataudio_item.pt

    r290 r291  
    55     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" > 
    66<metal:block define-macro="item"> 
    7    <tal:define define="file res/getFile; 
    8                        item_size file/get_size | python: file and len(file) or 0; 
    9                        content_type  python:here.getFileFieldContentType(res); 
    10                        "> 
     7   <tal:define define="item_size item/getFileSize | python: 0; 
     8                       content_type  res/getMimeType;"> 
    119           <enclosure  
    1210               tal:attributes="type content_type; 
     
    1412                               length item_size"/> 
    1513          <tal:block condition="python: syInfo['enable_itunes']"> 
    16                        <itunes:duration tal:content="res/getLengthString"></itunes:duration> 
     14               <itunes:duration tal:content="res/getLengthString"></itunes:duration> 
    1715          </tal:block> 
    1816  </tal:define> 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/atvideo_item.pt

    r290 r291  
    44     xmlns:metal="http://xml.zope.org/namespaces/metal" > 
    55<metal:block define-macro="item"> 
     6   <!-- todo: check for apropriate get size of file method (expression res/getFile can kill zope) --> 
    67   <tal:define define="file res/getFile; 
    78                       item_size file/get_size | python: file and len(file) or 0; 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/blogentry_item.pt

    r290 r291  
    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/branches/itunes-atvideo-support/skins/qrss2syndication/getMemberEmail.py

    r290 r291  
    88##title= 
    99## 
    10  
    1110memberlist = context.portal_membership.searchForMembers(REQUEST=None, name=MemberId) 
    12 res = '' 
    13 for member in memberlist: 
    14     if member.id == MemberId: 
    15         res = member.getProperty('email',None) 
     11res = None 
     12if memberlist: 
     13    for member in memberlist: 
     14        if member.id == MemberId: 
     15            res = member 
     16            break 
    1617return res 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/getSyndicatableContent.py

    r290 r291  
    1111if not obj: 
    1212   obj = context 
    13 if hasattr(context,'synContentValues')
     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/branches/itunes-atvideo-support/skins/qrss2syndication/mediacoopaudio_item.pt

    r290 r291  
    55     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" > 
    66<metal:block define-macro="item"> 
     7   <!-- todo: check for apropriate get size of file method (expression res/getFile can kill zope) --> 
    78   <tal:define define="file res/getFile; 
    89                       item_size file/get_size | python: file and len(file) or 0; 
  • qRSS2Syndication/branches/itunes-atvideo-support/skins/qrss2syndication/mediacoopvideo_item.pt

    r290 r291  
    44     xmlns:metal="http://xml.zope.org/namespaces/metal" > 
    55<metal:block define-macro="item"> 
     6   <!-- todo: check for apropriate get size of file method (expression res/getFile can kill zope) --> 
    67   <tal:define define="file res/getFile; 
    78                       item_size file/get_size | python: file and len(file) or 0;