products/CPSRSS

view README.txt @ 290:ae269cbbed26

hgbundler init new CHANGES file
author Georges Racinet on purity.racinet.fr <georges@racinet.fr>
date Wed, 23 Nov 2011 19:59:09 +0100
parents c71957da6e50
children
line source
1 $Id$
3 --------------------------------------------------
4 About CPSRSS
5 --------------------------------------------------
7 Want to display syndicated content on your CPS portal? This product adds a new
8 type of box to CPS 3.x. You then can lay out RSS feeds using the boxes
9 management form. Available feeds are centralized in the portal_rss tool.
11 Administrators can set globally how many entries are to show, and local managers
12 can change this setting for displaying less entries.
14 The feeds can be refreshed at each access or "lazily", after the given timeout.
15 This caching reduces overload and avoid increasing response time because of slow
16 syndicated sites.
18 The current version relies on Mark Pilgrim's Ultraliberal RSS parser. It has
19 been tested with version 2.5.3, which supports RSS feeds expressed in the
20 following formats: RSS 0.9x, RSS 1.0 (and RDF/XML-based format) and 2.0.
22 Note to CPS 2 users:
24 This product is intended for use with CPS 3.x only. You should still use
25 NuxRSS along with CPS 2.x.
27 --------------------------------------------------
28 HOW TO INSTALL
29 --------------------------------------------------
31 - Copy CPSRSS into your zope/Products directory
33 - It should contain a copy of Mark Pilgrim's Ultraliberal RSS Parser
34 (feedreader.py). If it does not, you can get a copy at [1]. You should use
35 version 2.5.3 or later. Copy feedparser.py to the CPSRSS directory or to your
36 standard zope python lib directory (e.g. lib/python relative to Zope's main
37 dir).
39 [1] http://diveintomark.org/projects/feed_parser/
41 - An Installer is now available for CPSRSS, but you still need to do one manual
42 operation: as CPSRSS is not a final product, it is necessary to edit either
43 getBoxTypes.py in CPSDefault/skins/cps_default or getCustomBoxTypes.py in
44 your own product and add the following declaration to the list of items
45 returned:
47 {'category': 'rssbox',
48 'title': 'portal_type_RssBox_title',
49 'desc': 'portal_type_RssBox_description',
50 'types': [{'provider': 'rss',
51 'id': 'default',
52 'desc': 'description_rss_rssbox_default'},
53 ]
54 },
56 If you forget to do that, you will probably get something like a
57 TypeError when attempting to add an RSS Box in your portal.
59 Note: it might be necessary to restart your Zope server after this step.
61 - The remainder of the installation process is straightforward, as it
62 consists in executing the product's installer (as you would for any other
63 product).
65 - From the ZMI, go to the CPS root, instantiate an External Method with the
66 following parameters:
67 ID = any Id you want, like cpsrssinst
68 Title = anything you want, like CPSRSS Installer
69 Module Name = CPSRSS.install
70 Function Name = install
72 - Execute the script by going to the Test tab. This should automatically create
73 a portal_rss tool, an RSS Box portal_type, a cps_rss portal_skin and it
74 should insert cps_rss in the list of layers for skin Basic.
76 - You can then add channels through the tool as follows.
78 - Select portal_rss and add a channel, then enter an ID and the feed's URL in
79 the 'Channel URL' field.
81 - You can test that the feed is retrieved correctly by going to the refresh tab
82 of the portal_rss tool, clicking refresh, and then selecting your channel
83 (properties). The title and description should now be filled by values
84 retrieved from the actual feed.
86 - Check new_window if you want news items links to open in blank
87 windows instead of the current one.
89 - check HTML feed if the feed's URL already provides HTML that you do not want
90 to be transformed (this will just retrieve the HTML fragment at the given URL
91 and put it in the RSS Box).
93 - It is also possible to limit the number of items displayed for a given feed,
94 by entering a non-zero integer value in field nbMaxItems. Value zero is the
95 default value and displays all items (no limit).
97 - Go to the box management interface on the CPS site ; add an RSS Box and
98 select a channel from the drop-down list (which contains all channels
99 configured in portal_rss). Save your changes. An RSS Box should now be
100 visible in your portal.
101 Its location depends on the slot you selected, as for any other box.
104 --------------------------------------------------
105 RSS Tool configuration
106 --------------------------------------------------
108 It is possible to configure some options in the properties tab of the
109 portal_rss tool. These options apply to all channels:
111 - lazy_refresh: check this box if the channel's content should not be
112 updated each time the page is reloaded, but only when a given amount
113 of time (specified by refresh_delay in seconds) has elapsed since the
114 last refresh.
116 - refresh_delay: see above item
118 If lazy_refresh is not checked, the channels will be refreshed each time
119 a page containing boxes displaying them is reloaded. Note that the underlying
120 RSS parser features its own mechanism to download the feed only if it changed
121 since the last time it checked for it.