Changeset 608

Show
Ignore:
Timestamp:
10/25/06 06:47:28
Author:
mylan
Message:

Step back to 0.4.1 version (without iTines). Fixed blogentry_item template bug.

Files:

Legend:

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

    r607 r608  
    1 0.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  
    910.4.1 2005-08-25 
    10  
     2       
    113   * fixed RSS1 headers 
    124 
     
    2012 
    2113   * Added <content:encoded> support to RSS2 template.  
    22  
     14   
    2315   * blogentry_item.pt now supports <enclosure> for ATAudio. 
    2416 
    2517   * Added template RSS1, rssBody1 - RSS 0.92 feed with <content:encoded> tag. 
    26  
     18    
  • qRSS2Syndication/trunk/README.txt

    r607 r608  
    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 
    74 
    85 
     
    1916which is controled with portal_syndication tool 
    2017 
    21 EXTENDING 
    2218 
    23 If 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  
    25 AUTHORS 
    26  
    27 Volodymyr Cherepanyak <chervol@quintagroup.com> 
    28 Wolfgang Reutz <wolfgang.reutz@fhv.at> - iTunes support, mediacoop audio/video support.   
  • qRSS2Syndication/trunk/skins/qrss2syndication/RSS2.pt

    r607 r608  
    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" 
    76     tal:define="results python:here.getSyndicatableContent();" 
    87     tal:on-error="nothing"> 
    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']"> 
     8<tal:x define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml')" /> 
     9    <channel> 
     10 
    1511        <title tal:define="portal_title here/portal_properties/title; 
    1612            here_title here/title_or_id; 
     
    1915            tal:content="string:$portal_title - $here_title">Title of page</title> 
    2016        <link tal:content="here/absolute_url"></link> 
    21         <description tal:content="here/Description"></description> 
     17        <description tal:content="here/Description"> 
     18        </description> 
    2219        <language>en-us</language> 
    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> 
     20        <generator>Plone 2.0</generator> 
    4121 
    4222        <tal:block repeat="res results"> 
    4323            <tal:block define="macros nocall: python:here.getItemMacros(res.portal_type);  
    4424                               item_path python: res.absolute_url(); 
    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 ''"> 
     25                               item_path python: res.portal_type=='ATAudio' and item_path+'/file_download/'+res.getId() or item_path;"> 
    4726                  <item> 
    4827                      <title tal:content="res/title_or_id"></title> 
     
    5029                      <description tal:content="res/Description"> 
    5130                      </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> 
     31                      <author tal:content="res/Creator"></author> 
    5832                      <tal:repeat repeat="subj res/Subject"> 
    5933                          <category tal:content="subj"> 
     
    6337                      <metal:block use-macro="macros"/> 
    6438                  </item> 
     39 
    6540            </tal:block> 
     41                 
    6642        </tal:block> 
     43 
     44 
    6745    </channel> 
     46 
    6847</rss> 
    6948 
  • qRSS2Syndication/trunk/skins/qrss2syndication/ataudio_item.pt

    r607 r608  
    22<rss version="2.0"  
    33     xmlns:tal="http://xml.zope.org/namespaces/tal" 
    4      xmlns:metal="http://xml.zope.org/namespaces/metal" 
    5      xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" > 
     4     xmlns:metal="http://xml.zope.org/namespaces/metal" > 
    65<metal:block define-macro="item"> 
    7    <tal:define define="item_size res/getFileSize | python: 0; 
    8                        content_type  res/getMimeType;"> 
     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                       "> 
    910           <enclosure  
    1011               tal:attributes="type content_type; 
    1112                               url item_path; 
    1213                               length item_size"/> 
    13           <tal:block condition="itunesEnabled"> 
    14                <itunes:duration tal:content="res/getLengthString"></itunes:duration> 
    15           </tal:block> 
    1614  </tal:define> 
    1715</metal:block> 
  • qRSS2Syndication/trunk/skins/qrss2syndication/blogentry_item.pt

    r607 r608  
    77     <tal:repeat repeat="tag res/EntryTag"> 
    88        <category tal:content="tag"></category> 
    9      </tal:repeat>         
    10         <content:encoded tal:content="structure res/render_body">  </content:encoded> 
     9     </tal:repeat> 
     10      <content:encoded> 
     11        <tal:x replace="structure python:'&lt;![CDATA['+res.getBody()+']]&gt;'"/> 
     12      </content:encoded> 
    1113     <tal:x tal:on-error="string:" 
    1214           define="files python:res.objectValues('ATAudio'); 
  • qRSS2Syndication/trunk/skins/qrss2syndication/getSynProp.py

    r607 r608  
    1 ## Script (Python) "getSynProp
     1## Script (Python) "getAudioFiles
    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

    r607 r608  
    1111if not obj: 
    1212   obj = context 
    13 if hasattr(context,'synContentValues') or context.portal_type=='Topic'
     13if hasattr(context,'synContentValues')
    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  
    1816   count = count<len(res) and count or len(res) 
    1917   res = res[:count] 
  • qRSS2Syndication/trunk/skins/qrss2syndication/save_rss2_setup.cpy

    r607 r608  
    66##bind state=state 
    77##bind subpath=traverse_subpath 
    8 ##parameters= rss2_types=(),only_published=0,include_subfolders=0, articles_number=20, enable_itunes=0, itunes_image_url='', itunes_explicit=0, REQUEST=None 
     8##parameters= rss2_types=(),only_published=0,include_subfolders=0, articles_number=20,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,enable_itunes,itunes_image_url,itunes_explicit,REQUEST) 
     13  status,message=setupRSS2Types(context,rss2_types,only_published,include_subfolders,articles_number,REQUEST) 
    1414return state.set(status=status, portal_status_message=message) 
    1515     
  • qRSS2Syndication/trunk/skins/qrss2syndication/setup_rss2.cpt

    r607 r608  
    4949              </metal:block> 
    5050                 
    51                        </select> 
     51            </select> 
    5252          </div> 
    5353 
     
    7575          </div> 
    7676 
     77            
    7778          <div class="field" 
    7879               tal:define="error errors/articles_number|nothing;" 
     
    9192          </div> 
    9293 
    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> 
     94 
     95 
    12696          <div class="formControls"> 
    12797         
  • qRSS2Syndication/trunk/utils.py

    r607 r608  
    88                    include_subfolders = 0, 
    99                    articles_number = 20, 
    10                     enable_itunes = 0, 
    11                     itunes_image_url = '', 
    12                     itunes_explicit = 0, 
    1310                    REQUEST = None): 
    1411    """ Save all needed RSS2 properties into 'syndication_information' """       
     
    2623    syInfo.include_subfolders = include_subfolders 
    2724    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 
    3125    return status, message 
    3226 
     
    4034     syPropeties['include_subfolders'] = getattr(syInfo,'include_subfolders',0) 
    4135     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) 
    4536     return  syPropeties 
    4637 
  • qRSS2Syndication/trunk/version.txt

    r607 r608  
    1 0.4.5 
     10.4.1