Commit e61483e7 authored by Frank Bergmann's avatar Frank Bergmann

- Update to OpenACS 5.9.1

parent b26bdb60
<?xml version="1.0" encoding="ISO-8859-1"?>
<message_catalog package_key="rss-support" locale="de_DE" charset="ISO-8859-1">
<msg key="Create_feed">Neuer RSS Feed</msg>
<msg key="Remove_feed">Lschen RSS Feed</msg>
<msg key="Rss_feed_active">Aktiver RSS Feed</msg>
<msg key="Rss_feed_inactive">Inaktiver RSS Feed</msg>
<msg key="Create_feed">RSS feed anlegen</msg>
<msg key="Remove_feed">RSS feed entfernen</msg>
<msg key="Rss_feed_active">RSS feed aktiv</msg>
<msg key="Rss_feed_inactive">RSS feed inaktiv</msg>
<msg key="Syndication_Feed">Syndication Feed</msg>
</message_catalog>
<?xml version="1.0" encoding="ISO-8859-1"?>
<message_catalog package_key="rss-support" locale="it_IT" charset="ISO-8859-1">
<msg key="Create_feed">Crea feed RSS</msg>
<msg key="Remove_feed">Rimuovi feed RSS</msg>
<msg key="Rss_feed_active">Feed RSS attivo</msg>
<msg key="Rss_feed_inactive">Feed RSS inattivo</msg>
<msg key="Syndication_Feed">Feed di Diffusione</msg>
</message_catalog>
......@@ -5,5 +5,4 @@
<msg key="Remove_feed">Verwijder RSS-toevoer</msg>
<msg key="Rss_feed_active">RSS-toevoer aktief</msg>
<msg key="Rss_feed_inactive">RSS-toevoer inaktief</msg>
<msg key="Syndication_Feed">Syndicatie feed</msg>
</message_catalog>
<?xml version="1.0" encoding="utf-8"?>
<message_catalog package_key="rss-support" locale="ru_RU" charset="utf-8">
<msg key="Create_feed">Создать RSS-канал</msg>
<msg key="Remove_feed">Удалить RSS-канал</msg>
<msg key="Rss_feed_active">RSS-канал активен</msg>
<msg key="Rss_feed_inactive">RSS-канал неактивен</msg>
<msg key="Syndication_Feed">Объединенный канал</msg>
<msg key="Create_feed">Создать новостную ленту</msg>
<msg key="Remove_feed">Удалить новостную ленту</msg>
<msg key="Rss_feed_active">Активная новостная лента</msg>
<msg key="Rss_feed_inactive">Неактивная новостная лента</msg>
<msg key="Syndication_Feed">Объединённая лента</msg>
</message_catalog>
......@@ -13,7 +13,7 @@
<owner url="mailto:jerry@theashergroup.com">Jerry Asher</owner>
<owner url="mailto:dave@thedesignexperience.org">Dave Bauer</owner>
<summary>Service contracts and support for generating RSS feeds</summary>
<release-date>2016-11-15</release-date>
<release-date>2017-08-06</release-date>
<vendor>OpenACS</vendor>
<description format="text/html"> Basic support for RSS
generation and parsing. RDF Site Summary (RSS) is a lightweight
......@@ -35,8 +35,8 @@ contracts and the RSS can be recreated from a scheduled procedure.
<maturity>2</maturity>
<provides url="rss-support" version="0.4"/>
<requires url="acs-kernel" version="5.8.1"/>
<requires url="acs-kernel" version="5.9.1"/>
<requires url="acs-tcl" version="5.9.1"/>
<callbacks>
</callbacks>
......
ad_schedule_proc 1800 rss_gen_service
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This diff is collapsed.
......@@ -117,8 +117,7 @@ ad_proc -private rss_gen_report_dir {
subscription with subscr_id or impl_name + summary_context_id
provided. If the assert flag is set, create the directory.
} {
if {!([info exists summary_context_id] && \
[info exists impl_name])} {
if {!([info exists summary_context_id] && [info exists impl_name]) } {
if {![info exists subscr_id]} {
error "rss_gen_report_dir needs either subscr_id or impl_id+summary_context_id"
} else {
......@@ -147,8 +146,7 @@ ad_proc -public rss_gen_report_file {
it doesn't exist
@return a Unix file path.
} {
if {!([info exists summary_context_id] && \
[info exists impl_name])} {
if {!([info exists summary_context_id] && [info exists impl_name])} {
if {![info exists subscr_id]} {
error "rss_gen_report_file needs either subscr_id or impl_id+summary_context_id"
} else {
......@@ -171,3 +169,9 @@ ad_proc -public rss_gen_report_file {
return $report_file
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -99,7 +99,7 @@ ad_proc -public rss_support::del_subscription {
-owner $owner]
set report_dir [rss_gen_report_dir -subscr_id $subscr_id]
# remove generated RSS reports for this subscription
file delete -force $report_dir
file delete -force -- $report_dir
package_exec_plsql \
-var_list [list [list subscr_id $subscr_id]] \
rss_gen_subscr del
......@@ -147,3 +147,9 @@ ad_proc -public rss_support::get_subscr_id {
set impl_id [db_string get_impl_id ""]
return [db_string get_subscr_id ""]
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -60,3 +60,9 @@ ad_proc -private rss_first_url_for_package_id_helper {
return $url
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
set context [list Subscriptions]
set enc_url [ad_urlencode [ad_conn url]?[ad_conn query]]
\ No newline at end of file
set enc_url [ad_urlencode [ad_conn url]?[ad_conn query]]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -2,16 +2,22 @@ ad_page_contract {
Delete the subscription, and maybe the report.
} {
subscr_id:notnull,naturalnum
return_url:notnull
return_url:localurl,notnull
delete_file_p:boolean,optional
}
permission::require_permission -object_id $subscr_id -privilege admin
if {[info exists delete_file_p]} {
file delete [rss_gen_report_file -subscr_id $subscr_id]
file delete -- [rss_gen_report_file -subscr_id $subscr_id]
}
db_exec_plsql delete_subscr {}
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -12,6 +12,6 @@ Channel: <if @channel_link@ eq "">@channel_title@</if><else>
</if>
<p>
<input type="submit" value="Really delete?">
<input type="button" onclick="history.back()" value="No, I want to go back">
<input type="button" id="cancel" value="No, I want to go back">
</form>
......@@ -2,7 +2,7 @@ ad_page_contract {
Confirm deletion of a subscription.
} {
subscr_id:notnull,naturalnum
return_url:notnull
return_url:localurl,notnull
}
permission::require_permission -object_id $subscr_id -privilege admin
......@@ -15,9 +15,17 @@ if {$channel_title eq ""} {
set context [list Delete]
if [file exists [rss_gen_report_file -subscr_id $subscr_id]] {
if {[file exists [rss_gen_report_file -subscr_id $subscr_id]]} {
set offer_file 1
set report_url [rss_gen_report_file -subscr_id $subscr_id]
} else {
set offer_file 0
}
template::add_event_listener -id "cancel" -script {history.back();}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
<property name="context">{/doc/rss-support {RSS Support}} {RSS Support: Bboard Sample Implementation}</property>
<property name="doc(title)">RSS Support: Bboard Sample Implementation</property>
<master>
<h2>Bboard Sample Implementation</h2>
by <a href="mailto:aegrumet\@alum.mit.edu">Andrew Grumet</a>
Back to <a href="index">RSS Support</a>
<p>The steps:</p>
<ol>
<li>Install the rss-support package, and mount a single instance at
a convenient location (e.g. <code>/rss</code>). Note that
rss-support is a service package and a singleton.</li><li>Create one or more implentations Of the RssGenerationSubscriber
interface. This <a href="bboard-rss-sc-create-sql.txt">example</a>
registers an implementation for bboard forums.</li><li>Define the implementation procs. This <a href="bboard-rss-sc-procs-tcl.txt">example</a> implements the contracted
procs.</li><li>Create a subscription for each forum to be summarized. This can
be accomplished by querying for the implentation&#39;s
<code>impl_id</code> as follows
<blockquote><pre>
select acs_sc_impl__get_id('RssGenerationSubscriber','bboard_forum');
</pre></blockquote>
and navigating to
/rss/subscr-ae?impl_id=$impl_id&amp;summary_context_id=$forum_id
(note that subscr-ae doesn&#39;t accept <code>impl_name</code> as a
URL parameter for security reasons).</li><li>The scheduled proc <code>rss_gen_service</code> will create a
binding for the implementation and generate summaries for each
subscription if the conditions for summary generation are met (i.e.
if the subscription timeout interval has elapsed since the last
build and if the time returned by lastUpdated is greater than the
time of the last report built).</li><li>Summaries can be found at
<code>/${RssGenOutputDirectory}/${ImplementationName}/${summary_context_id}/rss.xml</code>
</li>
</ol>
<hr>
<address><a href="mailto:aegrumet\@alum.mit.edu">aegrumet\@alum.mit.edu</a></address>
<property name="context">{/doc/rss-support {RSS Support}} {RSS Support Design Notes}</property>
<property name="doc(title)">RSS Support Design Notes</property>
<master>
<h2>RSS Support Design Notes</h2>
by <a href="mailto:aegrumet\@alum.mit.edu">Andrew Grumet</a>
,
<a href="mailto:jerry\@theashergroup.com">Jerry Asher</a>
and
<a href="mailto:dave\@thedesignexperience.org">Dave Bauer</a>
<p>From the <a href="http://groups.yahoo.com/group/rss-dev/files/specification.html">specification</a>,</p>
<blockquote><em>RDF Site Summary (RSS) is a lightweight
multipurpose extensible metadata description and syndication
format. RSS is an XML application, conforms to the W3C&#39;s RDF
Specification and is extensible via XML-namespace and/or RDF based
modularization.</em></blockquote>
This service package provides low-level support for generating and
parsing RSS feeds.
<h3>1. Feed generation</h3>
Feed generation is the process of summarizing local content as RSS
xml. To generate a feed we need to know
<ul>
<li>the site context whose content is to be summarized,</li><li>how to retrieve the various required and optional metadata
fields</li><li>whether any changes have been made since the last summary was
built</li><li>how often to rebuild the summary (if changes are present)</li>
</ul>
The last item is included with an eye toward performance. In the
event that a particular summary is expensive to produce, we may opt
to rebuild at most every N minutes (or hours, or days).
<p><strong>Usage scenarios</strong></p>
<ul>
<li>Publisher wishes to syndicate the Bar Forum in the Foo Bboard
package instance.</li><li>Luckily, the bboard package implements the summary service
contract for individual forums.</li><li>Programmer registers the context identifier for the Bar Forum
with the summary service, indicating that the summary should be
built no more than once per hour.</li><li>Summary is available at
/some/url/specific/to/bar/forum/summary.xml</li>
</ul>
<p><strong>Service contract</strong></p>
<p>The feed generation service contract is called
<code>RssGenerationSubscriber</code> and consists of two
operations.</p>
<ol>
<li>
<code>Datasource(summary_context_id)</code> returns a data
structure that contains all required metadata fields plus
configuration information such as the RSS version to be used (0.91
or 1.00 are supported at present). This data structure contains
everything needed to run <code>rss_gen</code>.</li><li>
<code>LastUpdated(summary_context_id)</code> returns a
timestamp that is used to determine if the live summary is out of
date. The timestamp is given as the number of seconds since
midnight on January 1, 1970, i.e. Unix time.</li>
</ol>
<p><strong>Under the hood</strong></p>
<p>
<em>RSS files.</em>All summaries are static files. They are
served from a static directory under the webroot specific by the
RssGenOutputDirectory, which defaults to <code>rss</code>. The full
path to an RSS file is given by</p>
<blockquote><pre>
/${RssGenOutputDirectory}/${ImplementationName}/${summary_context_id}/rss.xml
</pre></blockquote>
Note: we assume that <code>${ImplementationName}</code>
and
<code>${summary_context_id}</code>
contain OS- and URL-friendly
characters.
<p>
<em>Subscription.</em> A programmer registers a context with the
summary service through API functions (we can make it possible
through web UI as well if that makes sense).</p>
<p>
<em>Summary context.</em> A summary context is a
content-containing domain which implements the summary service
contract. A summary context is not identical to a package instance.
For example, a single bboard package instance might contain 3
summary contexts, one for each of the forums in the instance. The
summary context must, however, be an acs_object for permissioning
purposes (create a shell acs_object if necessary). Only one
subscription is allowed per summary context.</p>
<p>
<em>Service.</em> A scheduled proc runs through all subscribed
contexts, checking to see if the live summary is stale and also if
the minimum "quiet time" has elapsed. If the conditions
for rebuild are met for a context, the scheduled proc pulls out the
context&#39;s summary data via <code>Datasource</code> and uses the
information to build a new summary page. This generic and simple
scheme can be used to dispatch different versions of the summary
builder as well as to support extensibility via modules.
<font color="red">Warning:</font> This design expects the output of
<code>Datasource</code> to be reasonably small, as we will have to
parse this list-of-lists to generate a summary.</p>
<hr>
<address>
<a href="mailto:aegrumet\@alum.mit.edu">aegrumet\@alum.mit.edu</a>, <a href="mailto:jerry\@theashergroup.com">jerry\@theashergroup.com</a>,
<a href="mailto:dave\@thedesignexperience.org">dave\@thedesignexperience.org</a>
</address>
<property name="context">{/doc/rss-support {RSS Support}} {RSS Support}</property>
<property name="doc(title)">RSS Support</property>
<master>
<h1>RSS Support</h1>
by <a href="mailto:aegrumet\@alum.mit.edu">Andrew Grumet</a>
,
<a href="mailto:jerry\@theashergroup.com">Jerry Asher</a>
and
<a href="mailto:dave\@thedesignexperience.org">Dave Bauer</a>
<ul>
<li><a href="design">Design Notes</a></li><li><a href="bboard">Bboard Sample Implementation</a></li><li>To-do&#39;s
<ol>
<li>Exception handling</li><li>Testing</li><li>Port to Oracle</li>
</ol>
</li>
</ul>
<h2>Release Notes</h2>
<p>Please file bugs in the <a href="http://openacs.org/bugtracker/openacs/">Bug Tracker</a>.</p>
<hr>
<address>
<a href="mailto:aegrumet\@alum.mit.edu">aegrumet\@alum.mit.edu</a>, <a href="mailto:jerry\@theashergroup.com">jerry\@theashergroup.com</a>,
<a href="mailto:dave\@thedesignexperience.org">dave\@thedesignexperience.org</a>
</address>
......@@ -3,7 +3,7 @@
<title>RSS Support</title>
</head>
<body bgcolor=white>
<h2>RSS Support</h2>
<h1>RSS Support</h1>
by <a href="mailto:aegrumet@alum.mit.edu">Andrew Grumet</a>,
<a href="mailto:jerry@theashergroup.com">Jerry Asher</a> and
<a href="mailto:dave@thedesignexperience.org">Dave Bauer</a>
......@@ -23,7 +23,9 @@ by <a href="mailto:aegrumet@alum.mit.edu">Andrew Grumet</a>,
<p>
<h2>Release Notes</h2>
<p>Please file bugs in the <a href="http://openacs.org/bugtracker/openacs/">Bug Tracker</a>.</p>
<hr>
<address>
......
......@@ -3,3 +3,9 @@ set context [list Subscriptions]
set enc_url [ad_urlencode [ad_conn url]?[ad_conn query]]
set user_id [ad_conn user_id]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -4,7 +4,7 @@ ad_page_contract {
subscr_id:notnull,naturalnum
impl_id:optional,naturalnum
summary_context_id:optional,naturalnum
return_url:optional
return_url:localurl,optional
timeout:notnull,naturalnum
timeout_units:notnull
{meta:optional 1}
......@@ -34,7 +34,13 @@ if {[db_0or1row subscr_exists_p {
}
set review_url subscr-ae?[export_vars -url {subscr_id impl_id summary_context_id return_url meta}]
set review_url [export_vars -base subscr-ae {subscr_id impl_id summary_context_id return_url meta}]
set context [list [list $review_url "Edit subscription"] "Done"]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -10,7 +10,7 @@
<tr bgcolor="efefef" align="left" valign="top"><th>Impl Name:</th>
<td><code>@impl_name@</code></td></tr>
<tr bgcolor="efefef" align="left" valign="top"><th>Timeout:</th>
<td><input type=text name="timeout" value="@timeout@"><br>
<td><input type="text" name="timeout" value="@timeout@"><br>
<input type="radio" name="timeout_units" value="s" checked>secs
<input type="radio" name="timeout_units" value="m">mins
<input type="radio" name="timeout_units" value="h">hours
......
......@@ -18,7 +18,7 @@ ad_page_contract {
subscr_id:optional,naturalnum
impl_id:optional,naturalnum
summary_context_id:optional,naturalnum
return_url:optional
return_url:localurl,optional
{meta:optional 1}
} -validate {
subscr_or_context {
......@@ -80,3 +80,9 @@ set formvars [export_vars -form {subscr_id \
set context [list Add/Edit]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -2,7 +2,7 @@ ad_page_contract {
Run a report for the given subscription.
} {
subscr_id:notnull,naturalnum
return_url:notnull
return_url:localurl,notnull
}
permission::require_permission -object_id $subscr_id -privilege admin
......@@ -10,3 +10,9 @@ permission::require_permission -object_id $subscr_id -privilege admin
rss_gen_report $subscr_id
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -16,3 +16,9 @@ db_multirow -extend { lastbuild_pretty } subscrs get_subscrs {} {
set channel_title "Subscription #$subscr_id"
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment