Index: openacs-4/packages/lars-blogger/lars-blogger.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/lars-blogger.info,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/lars-blogger/lars-blogger.info 27 Jan 2003 16:17:43 -0000 1.13
+++ openacs-4/packages/lars-blogger/lars-blogger.info 30 Jan 2003 16:54:44 -0000 1.14
@@ -7,21 +7,22 @@
f
f
-
+
oracle
postgresql
Lars Pind
Write your own web log
- 2002-09-16
+ 2003-01-30
Collaboraid
Manages multiple web logs for your site. Just mount multiple instances, and you can do all the blogging you want.
-
+
+
@@ -35,6 +36,7 @@
+
@@ -47,6 +49,7 @@
+
@@ -69,6 +72,8 @@
+
+
@@ -78,6 +83,8 @@
+
+
Index: openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql 19 Aug 2002 21:52:59 -0000 1.1
+++ openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql 30 Jan 2003 16:55:03 -0000 1.2
@@ -7,10 +7,11 @@
--
declare
+ impl_id integer;
foo integer;
begin
- foo := acs_sc_impl.new(
+ impl_id := acs_sc_impl.new(
impl_contract_name => 'RssGenerationSubscriber',
impl_name => 'pinds_blog_entries',
impl_owner_name => 'lars-blogger'
@@ -32,6 +33,11 @@
impl_pl => 'TCL'
);
+ acs_sc_binding.new (
+ contract_name => 'RssGenerationSubscriber',
+ impl_name => 'pinds_blog_entries'
+ );
+
end;
/
show errors
Index: openacs-4/packages/lars-blogger/sql/oracle/upgrade/upgrade-0.8.3-0.8.4.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/upgrade/upgrade-0.8.3-0.8.4.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lars-blogger/sql/oracle/upgrade/upgrade-0.8.3-0.8.4.sql 30 Jan 2003 16:55:27 -0000 1.1
@@ -0,0 +1,28 @@
+--
+-- Upgrade script
+--
+-- Binds the service contract if it isn't already bound
+--
+-- @author Lars Pind (lars@pinds.com)
+-- @creation-date 2003-01-30
+--
+
+declare
+ exists_p integer;
+begin
+
+ exists_p := acs_sc_binding.exists_p(
+ contract_name => 'RssGenerationSubscriber',
+ impl_name => 'pinds_blog_entries'
+ );
+
+ if exists_p = 0 then
+ acs_sc_binding.new (
+ contract_name => 'RssGenerationSubscriber',
+ impl_name => 'pinds_blog_entries'
+ );
+ end if;
+
+end;
+/
+show errors
Index: openacs-4/packages/lars-blogger/sql/postgresql/notifications-init.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/notifications-init.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/lars-blogger/sql/postgresql/notifications-init.sql 14 Sep 2002 21:43:34 -0000 1.1
+++ openacs-4/packages/lars-blogger/sql/postgresql/notifications-init.sql 30 Jan 2003 16:55:50 -0000 1.2
@@ -68,4 +68,4 @@
' language 'plpgsql';
select inline_0();
-drop function inline_0();
\ No newline at end of file
+drop function inline_0();
Index: openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql 19 Aug 2002 21:52:59 -0000 1.1
+++ openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql 30 Jan 2003 16:55:50 -0000 1.2
@@ -6,24 +6,45 @@
-- @cvs-id $Id$
--
-select acs_sc_impl__new(
- 'RssGenerationSubscriber', -- impl_contract_name
- 'pinds_blog_entries', -- impl_name
- 'lars-blogger' -- impl_owner_name
-);
+create function inline_0() returns integer as '
+declare
+ impl_id integer;
+ v_foo integer;
+begin
+ -- the notification type impl
+ impl_id := acs_sc_impl__new(
+ ''RssGenerationSubscriber'', -- impl_contract_name
+ ''pinds_blog_entries'', -- impl_name
+ ''lars-blogger'' -- impl_owner_name
+ );
-select acs_sc_impl_alias__new(
- 'RssGenerationSubscriber', -- impl_contract_name
- 'pinds_blog_entries', -- impl_name
- 'datasource', -- impl_operation_name
- 'lars_blog__rss_datasource', -- impl_alias
- 'TCL' -- impl_pl
-);
+ v_foo := acs_sc_impl_alias__new(
+ ''RssGenerationSubscriber'', -- impl_contract_name
+ ''pinds_blog_entries'', -- impl_name
+ ''datasource'', -- impl_operation_name
+ ''lars_blog__rss_datasource'', -- impl_alias
+ ''TCL'' -- impl_pl
+ );
-select acs_sc_impl_alias__new(
- 'RssGenerationSubscriber', -- impl_contract_name
- 'pinds_blog_entries', -- impl_name
- 'lastUpdated', -- impl_operation_name
- 'lars_blog__rss_lastUpdated', -- impl_alias
- 'TCL' -- impl_pl
-);
+ v_foo := acs_sc_impl_alias__new(
+ ''RssGenerationSubscriber'', -- impl_contract_name
+ ''pinds_blog_entries'', -- impl_name
+ ''lastUpdated'', -- impl_operation_name
+ ''lars_blog__rss_lastUpdated'', -- impl_alias
+ ''TCL'' -- impl_pl
+ );
+
+ PERFORM acs_sc_binding__new (
+ ''RssGenerationSubscriber'',
+ ''pinds_blog_entries''
+ );
+
+ return (0);
+end;
+' language 'plpgsql';
+
+select inline_0();
+drop function inline_0();
+
+
+
Index: openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.8.3-0.8.4.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.8.3-0.8.4.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.8.3-0.8.4.sql 30 Jan 2003 16:56:05 -0000 1.1
@@ -0,0 +1,15 @@
+--
+-- Upgrade script
+--
+-- Binds the service contract if it isn't already bound
+--
+-- @author Lars Pind (lars@pinds.com)
+-- @creation-date 2003-01-30
+--
+
+select acs_sc_binding__new ('RssGenerationSubscriber', 'pinds_blog_entries')
+from acs_sc_impls i
+where i.impl_name = 'pinds_blog_entries'
+and i.impl_contract_name = 'RssGenerationSubscriber'
+and not exists (select 1 from acs_sc_bindings b where b.impl_id = i.impl_id);
+
Index: openacs-4/packages/lars-blogger/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/index.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/lars-blogger/www/index.tcl 4 Jan 2003 09:36:48 -0000 1.6
+++ openacs-4/packages/lars-blogger/www/index.tcl 30 Jan 2003 16:56:22 -0000 1.7
@@ -17,7 +17,7 @@
set page_title [lars_blog_name]
if { ![empty_string_p [ad_parameter "rss_file_url"]] } {
- set rss_file_url "[ad_url][ad_conn package_url][ad_parameter "rss_file_url"]"
+ set rss_file_url "[ad_url][lars_blog_public_package_url][ad_parameter "rss_file_url"]"
}
set admin_p [ad_permission_p [ad_conn package_id] admin]
Index: openacs-4/packages/lars-blogger/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/index.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/lars-blogger/www/admin/index.adp 4 Jan 2003 09:37:47 -0000 1.5
+++ openacs-4/packages/lars-blogger/www/admin/index.adp 30 Jan 2003 16:56:39 -0000 1.6
@@ -25,4 +25,18 @@
Set parameters
+
+
+
+
+ Setup an RSS feed
+
+
+
+
+
+ Manage your RSS feed
+
+
+
\ No newline at end of file
Index: openacs-4/packages/lars-blogger/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/index.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lars-blogger/www/admin/index.tcl 4 Jan 2003 09:37:47 -0000 1.2
+++ openacs-4/packages/lars-blogger/www/admin/index.tcl 30 Jan 2003 16:56:39 -0000 1.3
@@ -15,5 +15,11 @@
set arrow_url "[lars_blog_public_package_url -package_id $package_id]graphics/arrow-box.gif"
+set rss_feed_p [db_string rss_feed_p {}]
+
+set rss_setup_url "rss-setup"
+
+set rss_manage_url "[apm_package_url_from_key "rss-support"]my-subscrs"
+
ad_return_template
Index: openacs-4/packages/lars-blogger/www/admin/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/index.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/lars-blogger/www/admin/index.xql 19 Aug 2002 21:52:59 -0000 1.1
+++ openacs-4/packages/lars-blogger/www/admin/index.xql 30 Jan 2003 16:56:39 -0000 1.2
@@ -9,4 +9,16 @@
+
+
+ select count(*)
+ from rss_gen_subscrs s,
+ acs_sc_impls i
+ where s.summary_context_id = :package_id
+ and s.impl_id = i.impl_id
+ and i.impl_name = 'pinds_blog_entries'
+ and i.impl_owner_name = 'lars-blogger'
+
+
+
Index: openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl 30 Jan 2003 16:56:39 -0000 1.1
@@ -0,0 +1,24 @@
+ad_page_contract {
+ Setup an RSS feed for this blogger.
+}
+
+set creation_user [ad_conn user_id]
+set creation_ip [ns_conn peeraddr]
+
+# by default, we timout in 30 minutes
+set timeout [expr 30*60]
+
+set package_id [ad_conn package_id]
+
+set channel_title [lars_blog_name]
+set channel_link [lars_blog_public_package_url]
+
+db_transaction {
+
+ set subscr_id [db_string create_subscr {}]
+
+ db_dml update_subscr {}
+
+}
+
+ad_returnredirect .
\ No newline at end of file
Index: openacs-4/packages/lars-blogger/www/admin/rss-setup.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/rss-setup.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/lars-blogger/www/admin/rss-setup.xql 30 Jan 2003 16:56:39 -0000 1.1
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ select rss_gen_subscr__new (
+ null, -- subscr_id
+ acs_sc_impl__get_id('RssGenerationSubscriber','pinds_blog_entries'),
+ -- impl_id
+ :package_id, -- summary_context_id
+ :timeout, -- timeout
+ null, -- lastbuild
+ 'rss_gen_subscr', -- object_type
+ now(), -- creation_date
+ :creation_user, -- creation_user
+ :creation_ip, -- creation_ip
+ :package_id -- context_id
+ )
+
+
+
+
+
+ update rss_gen_subscrs
+ set channel_title = :channel_title,
+ channel_link = :channel_link
+ where subscr_id = :subscr_id
+
+
+
+