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.8.2.3 -r1.8.2.4 --- openacs-4/packages/lars-blogger/lars-blogger.info 9 Dec 2002 14:32:59 -0000 1.8.2.3 +++ openacs-4/packages/lars-blogger/lars-blogger.info 13 Mar 2003 14:28:47 -0000 1.8.2.4 @@ -7,20 +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. + + @@ -33,6 +35,8 @@ + + @@ -44,8 +48,11 @@ + + + + - @@ -65,17 +72,21 @@ + + - - + + + + @@ -85,9 +96,10 @@ + + - @@ -100,6 +112,8 @@ + + Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql 14 Sep 2002 21:43:33 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql 13 Mar 2003 14:29:03 -0000 1.2.2.1 @@ -34,6 +34,10 @@ references apm_packages(package_id), title varchar(500), content clob, + content_format varchar(50) + default 'text/html' + constraint pinds_blog_entr_cnt_format_nn + not null, entry_date date, posted_date date, draft_p char(1) default 'f' Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql 13 Mar 2003 14:29:03 -0000 1.1.2.1 @@ -15,6 +15,7 @@ package_id in pinds_blog_entries.package_id%TYPE, title in pinds_blog_entries.title%TYPE default null, content in varchar default null, + content_format in varchar default 'text/html', entry_date in pinds_blog_entries.entry_date%TYPE default null, draft_p in pinds_blog_entries.draft_p%TYPE default 'f', creation_user in acs_objects.creation_user%TYPE default null, @@ -41,6 +42,7 @@ package_id in pinds_blog_entries.package_id%TYPE, title in pinds_blog_entries.title%TYPE default null, content in varchar default null, + content_format in varchar default 'text/html', entry_date in pinds_blog_entries.entry_date%TYPE default null, draft_p in pinds_blog_entries.draft_p%TYPE default 'f', creation_user in acs_objects.creation_user%TYPE default null, @@ -64,6 +66,7 @@ package_id, title, content, + content_format, entry_date, posted_date, draft_p, @@ -73,6 +76,7 @@ pinds_blog_entry.new.package_id, pinds_blog_entry.new.title, pinds_blog_entry.new.content, + pinds_blog_entry.new.content_format, pinds_blog_entry.new.entry_date, sysdate, pinds_blog_entry.new.draft_p, Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql,v diff -u -r1.2.2.3 -r1.2.2.4 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 2 Mar 2003 22:45:31 -0000 1.2.2.3 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 13 Mar 2003 14:29:31 -0000 1.2.2.4 @@ -30,6 +30,10 @@ references apm_packages(package_id), title varchar(500), content varchar(32000), + content_format varchar(50) + default 'text/html' + constraint pinds_blog_entr_cnt_format_nn + not null, entry_date timestamptz, posted_date timestamptz, draft_p char(1) default 'f' @@ -42,7 +46,7 @@ create index pinds_blog_entry_pck_entr_idx on pinds_blog_entries (package_id, entry_date); -create function pinds_blog_entry__title (integer) +create or replace function pinds_blog_entry__title (integer) returns varchar as ' declare p_entry_id alias for $1; @@ -56,25 +60,27 @@ ' language 'plpgsql'; -create function pinds_blog_entry__new ( +create or replace function pinds_blog_entry__new ( integer, -- entry_id integer, -- package_id varchar, -- title varchar, -- content + varchar, -- content_format timestamptz, -- entry_date char, -- draft_p integer, -- creation_user varchar -- creation_ip ) returns integer as ' declare - p_entry_id alias for $1; + p_entry_id alias for $1; p_package_id alias for $2; - p_title alias for $3; - p_content alias for $4; - p_entry_date alias for $5; - p_draft_p alias for $6; - p_creation_user alias for $7; - p_creation_ip alias for $8; + p_title alias for $3; + p_content alias for $4; + p_content_format alias for $5; + p_entry_date alias for $6; + p_draft_p alias for $7; + p_creation_user alias for $8; + p_creation_ip alias for $9; v_entry_id integer; begin v_entry_id := acs_object__new ( @@ -91,6 +97,7 @@ package_id, title, content, + content_format, entry_date, posted_date, draft_p, @@ -100,6 +107,7 @@ p_package_id, p_title, p_content, + p_content_format, p_entry_date, current_timestamp, p_draft_p, @@ -111,7 +119,7 @@ ' language 'plpgsql'; -create function pinds_blog_entry__delete (integer) +create or replace function pinds_blog_entry__delete (integer) returns integer as ' declare p_entry_id alias for $1; 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.1.2.1 --- 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 13 Mar 2003 14:29:31 -0000 1.1.2.1 @@ -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/tcl/entry-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 2 Feb 2003 00:01:21 -0000 1.1.2.1 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 13 Mar 2003 14:30:03 -0000 1.1.2.2 @@ -8,6 +8,7 @@ select b.entry_id, b.title, b.content, + b.content_format, b.draft_p, to_char(b.entry_date, 'YYYY-MM-DD') as entry_date, to_char(b.entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, Index: openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 3 Feb 2003 08:48:37 -0000 1.1.2.1 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 13 Mar 2003 14:30:03 -0000 1.1.2.2 @@ -8,6 +8,7 @@ select b.entry_id, b.title, b.content, + b.content_format, b.draft_p, to_char(b.entry_date, 'YYYY-MM-DD') as entry_date, to_char(b.entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, Index: openacs-4/packages/lars-blogger/tcl/entry-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/entry-procs.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 14 Sep 2002 21:43:36 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 13 Mar 2003 14:30:03 -0000 1.1.2.1 @@ -3,44 +3,42 @@ } -namespace eval lars_blogger::entry { +namespace eval lars_blogger::entry {} - ad_proc -public get { - -entry_id:required - -array:required - } { - # Select the info into the upvar'ed Tcl Array - upvar $array row +ad_proc -public lars_blogger::entry::get { + -entry_id:required + -array:required +} { + # Select the info into the upvar'ed Tcl Array + upvar $array row - db_1row select_entry { *SQL* } -column_array row - } + db_1row select_entry {} -column_array row +} - ad_proc -public do_notifications { - {-entry_id:required} - } { - # Select all the important information - get -entry_id $entry_id -array blog +ad_proc -public do_notifications { + {-entry_id:required} +} { + # Select all the important information + get -entry_id $entry_id -array blog - set blog_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]" - set entry_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]one-entry?[export_vars { entry_id }]" - set blog_name [lars_blog_name -package_id $blog(package_id)] + set blog_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]" + set entry_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]one-entry?[export_vars { entry_id }]" + set blog_name [lars_blog_name -package_id $blog(package_id)] - set new_content "" - append new_content "$blog(poster_first_names) $blog(poster_last_name) posted to $blog_name at $blog(posted_time_pretty) on $blog(entry_date_pretty):\n\n" - append new_content "$blog(title)\n\n" - append new_content "[ad_convert_to_text -- [ns_adp_parse -string $blog(content)]]\n\n" - append new_content "This entry: $entry_url\n\n" - append new_content "$blog_name: $blog_url\n" + set new_content "" + append new_content "$blog(poster_first_names) $blog(poster_last_name) posted to $blog_name at $blog(posted_time_pretty) on $blog(entry_date_pretty):\n\n" + append new_content "$blog(title)\n\n" + append new_content "[ad_convert_to_text -- [ns_adp_parse -string $blog(content)]]\n\n" + append new_content "This entry: $entry_url\n\n" + append new_content "$blog_name: $blog_url\n" - # Do the notification for the forum - notification::new \ - -type_id [notification::type::get_type_id \ - -short_name lars_blogger_notif] \ - -object_id $blog(package_id) \ - -response_id $blog(entry_id) \ - -notif_subject $blog(title) \ - -notif_text $new_content - } - -} \ No newline at end of file + # Do the notification for the forum + notification::new \ + -type_id [notification::type::get_type_id \ + -short_name lars_blogger_notif] \ + -object_id $blog(package_id) \ + -response_id $blog(entry_id) \ + -notif_subject $blog(title) \ + -notif_text $new_content +} Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql 14 Sep 2002 16:40:33 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql 13 Mar 2003 14:30:03 -0000 1.2.2.1 @@ -11,6 +11,7 @@ package_id => :package_id, title => :title, content => :content, + content_format => :content_format, entry_date => to_date(:entry_date, 'YYYY-MM-DD'), draft_p => :draft_p, creation_user => :creation_user, Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql 14 Sep 2002 16:40:33 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql 13 Mar 2003 14:30:03 -0000 1.2.2.1 @@ -10,6 +10,7 @@ :package_id, :title, :content, + :content_format, to_date(:entry_date, 'YYYY-MM-DD'), :draft_p, :creation_user, Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 16 Sep 2002 09:25:49 -0000 1.7 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 13 Mar 2003 14:30:03 -0000 1.7.2.1 @@ -10,6 +10,7 @@ {-package_id:required} {-title:required} {-content:required} + {-content_format:required} {-entry_date:required} {-draft_p:required} } { Index: openacs-4/packages/lars-blogger/www/blog-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-oracle.xql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/lars-blogger/www/blog-oracle.xql 12 Sep 2002 15:09:26 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/blog-oracle.xql 13 Mar 2003 14:30:31 -0000 1.2.2.1 @@ -20,26 +20,18 @@ select entry_id, to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, to_char(entry_date, 'YYYY/MM/DD/') as entry_archive_url, - entry_date, + to_char(entry_date, 'YYYY-MM-DD') as entry_date, title, content, + content_format, draft_p, - 'f' as new_date_p, p.first_names as poster_first_names, p.last_name as poster_last_name, to_char(posted_date , 'HH24:MI') as posted_time_pretty, (select count(gc.comment_id) from general_comments gc, cr_revisions cr where gc.object_id = entry_id - and content_item.get_live_revision(gc.comment_id) = cr.revision_id) as num_comments, - 0 as row_number, - '' as edit_url, - '' as delete_url, - '' as publish_url, - '' as revoke_url, - '' as comments_view_url, - '' as comment_add_url, - '' as google_url + and content_item.get_live_revision(gc.comment_id) = cr.revision_id) as num_comments from pinds_blog_entries e, acs_objects o, persons p Index: openacs-4/packages/lars-blogger/www/blog-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-postgresql.xql,v diff -u -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/lars-blogger/www/blog-postgresql.xql 21 Oct 2002 12:33:59 -0000 1.3.2.1 +++ openacs-4/packages/lars-blogger/www/blog-postgresql.xql 13 Mar 2003 14:30:31 -0000 1.3.2.2 @@ -23,6 +23,7 @@ to_char(entry_date, 'YYYY-MM-DD') as entry_date, title, content, + content_format, draft_p, p.first_names as poster_first_names, p.last_name as poster_last_name, Index: openacs-4/packages/lars-blogger/www/blog.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog.adp,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/lars-blogger/www/blog.adp 21 Oct 2002 12:33:59 -0000 1.9.2.1 +++ openacs-4/packages/lars-blogger/www/blog.adp 13 Mar 2003 14:30:31 -0000 1.9.2.2 @@ -2,7 +2,7 @@
- @blog.entry_date_pretty@ + @blog.entry_date_pretty@ @@ -39,4 +39,4 @@ Add an entry to @blog_name@ Add entry -

\ No newline at end of file +

Index: openacs-4/packages/lars-blogger/www/blog.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/lars-blogger/www/blog.tcl 16 Sep 2002 09:25:51 -0000 1.8 +++ openacs-4/packages/lars-blogger/www/blog.tcl 13 Mar 2003 14:30:31 -0000 1.8.2.1 @@ -52,6 +52,6 @@ set entry_add_url "${package_url}admin/entry-edit" -set header_background_color [lars_blog_header_background_color] +set header_background_color [lars_blog_header_background_color -package_id $package_id] ad_return_template Fisheye: Tag 1.1.2.2 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/calendar.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lars-blogger/www/entry-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/entry-chunk.adp,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/lars-blogger/www/entry-chunk.adp 21 Oct 2002 12:33:59 -0000 1.2.2.1 +++ openacs-4/packages/lars-blogger/www/entry-chunk.adp 13 Mar 2003 14:30:31 -0000 1.2.2.2 @@ -28,16 +28,20 @@
- # - - G - - - - - @blog.num_comments@ commentcomments - +

+ # - + G + + + + - @blog.num_comments@ commentcomments + - - Add comment + + - Add comment + +

Index: openacs-4/packages/lars-blogger/www/entry-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/entry-chunk.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/lars-blogger/www/entry-chunk.tcl 14 Sep 2002 22:27:25 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/entry-chunk.tcl 13 Mar 2003 14:30:31 -0000 1.3.2.1 @@ -21,11 +21,17 @@ set package_url [lars_blog_public_package_url -package_id $package_id] +set general_comments_package_url [general_comments_package_url] + set show_poster_p [ad_parameter "ShowPosterP" "" "1"] set blog(title) [ad_quotehtml $blog(title)] -set blog(content) [ns_adp_parse -string $blog(content)] +# LARS: +# Not sure we should do the ns_adp_parse thing here, but heck, why not +# It should be safe, given the security checks +set blog(content) [ns_adp_parse -string [ad_html_text_convert -from $blog(content_format) -to "text/html" $blog(content)]] + set entry_id $blog(entry_id) set blog(edit_url) "${package_url}admin/entry-edit?[export_vars { entry_id return_url }]" @@ -36,7 +42,11 @@ set blog(entry_archive_url) "${package_url}one-entry?[export_vars { entry_id }]" set blog(google_url) "http://www.google.com/search?[export_vars { {q $blog(title) } }]" -set blog(comment_add_url) "[general_comments_package_url]comment-add?[export_vars { { object_id $entry_id } { object_name $blog(title) } { return_url "${package_url}flush-cache?[export_vars { return_url }]"} }]" + +if { ![empty_string_p $general_comments_package_url] } { + set blog(comment_add_url) "${general_comments_package_url}comment-add?[export_vars { { object_id $entry_id } { object_name $blog(title) } { return_url "${package_url}flush-cache?[export_vars { return_url }]"} }]" +} + set blog(comments_view_url) "${package_url}one-entry?[export_vars { entry_id }]" if { [string equal $show_comments_p "t"] } { Index: openacs-4/packages/lars-blogger/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/index.adp,v diff -u -r1.9.2.2 -r1.9.2.3 --- openacs-4/packages/lars-blogger/www/index.adp 21 Feb 2003 11:01:20 -0000 1.9.2.2 +++ openacs-4/packages/lars-blogger/www/index.adp 13 Mar 2003 14:30:31 -0000 1.9.2.3 @@ -39,7 +39,7 @@ Add entry
Draft entries
-
Admin + Administer @@ -49,21 +49,23 @@ - - - Notifications - - - - - @notification_chunk@ - - - - -
- - + + + + Notifications + + + + + @notification_chunk@ + + + + +
+ + +
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.4.2.4 -r1.4.2.5 --- openacs-4/packages/lars-blogger/www/index.tcl 8 Mar 2003 14:40:49 -0000 1.4.2.4 +++ openacs-4/packages/lars-blogger/www/index.tcl 13 Mar 2003 14:30:31 -0000 1.4.2.5 @@ -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 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/entry-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/Attic/entry-edit.xql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/lars-blogger/www/admin/entry-edit.xql 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/www/admin/entry-edit.xql 13 Mar 2003 14:31:02 -0000 1.1.2.1 @@ -2,9 +2,25 @@ + + + select count(*) + from pinds_blog_entries + where entry_id = :entry_id + + + + + + select draft_p + from pinds_blog_entries + where entry_id = :entry_id + + + - select title, content, draft_p, to_char(entry_date, 'YYYY-MM-DD') as entry_date + select title, content, content_format, draft_p, to_char(entry_date, 'YYYY-MM-DD') as entry_date from pinds_blog_entries where entry_id = :entry_id 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.3.2.1 -r1.3.2.2 --- openacs-4/packages/lars-blogger/www/admin/index.adp 15 Nov 2002 21:06:14 -0000 1.3.2.1 +++ openacs-4/packages/lars-blogger/www/admin/index.adp 13 Mar 2003 14:31:02 -0000 1.3.2.2 @@ -1,9 +1,42 @@ @title@ -
+

+ These are your administrative options +

+
+

+ Add new blog entry + Add new blog entry +

+ +

+ View draft entries + View draft entries +

+ +

+ Show E-Mail subscribers + Show E-Mail subscribers +

+ +

+ Set parameters + Set parameters +

+ + +

+ Setup an RSS feed + Setup an RSS feed +

+
+ +

+ Manage your RSS feed + Manage your RSS feed +

+
+ +
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.1 -r1.1.2.1 --- openacs-4/packages/lars-blogger/www/admin/index.tcl 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/www/admin/index.tcl 13 Mar 2003 14:31:02 -0000 1.1.2.1 @@ -11,5 +11,13 @@ set title [db_string package_name { *SQL* }] -ad_return_template +set parameters_url "/admin/site-map/parameter-set?[export_vars { package_id }]" +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" + 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.1.2.1 --- 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 13 Mar 2003 14:31:02 -0000 1.1.2.1 @@ -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/subscribers.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/subscribers.adp,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/lars-blogger/www/admin/subscribers.adp 15 Nov 2002 21:06:14 -0000 1.1.2.1 +++ openacs-4/packages/lars-blogger/www/admin/subscribers.adp 13 Mar 2003 14:31:02 -0000 1.1.2.2 @@ -2,15 +2,16 @@ E-mail subscribers subscribers - -No subscribers. - \ No newline at end of file + No subscribers. + Index: openacs-4/packages/lars-blogger/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/doc/index.html,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/lars-blogger/www/doc/index.html 30 Sep 2002 14:55:54 -0000 1.1.2.1 +++ openacs-4/packages/lars-blogger/www/doc/index.html 13 Mar 2003 14:31:24 -0000 1.1.2.2 @@ -48,135 +48,180 @@

- Or from a Tcl page: + ... for the non-cached version, and ...

+
<%=[lars_blog_get_as_string -url "/blog"]%>
+ +

+ ... for the cached version. There shouldn't be any problems using + the cached version, as the cache should be flushed whenever anything + changes. +

+ +

+ From a Tcl page: +

+
 set blog_html [template::adp_parse "[acs_package_root_dir "lars-blogger"]/www/blog" [list url "/blog"]]
 

- If you supply a URL, then the blog that matches that URL is served - (assuming that a lars-blogger package is mounted at that - URL). Alternatively, you can supply a package_id - parameter directly. If nothing is supplied, [ad_conn - package_id] is used. + ... for the non-cached version, and ...

+
[lars_blog_get_as_string -url "/blog"]
+

- Alternatively, there's a cached version of the same, which is useful - if you're including a blog on the front page of a highly trafficked - site. + ... for the cached version.

-
[lars_blog_get_as_string -url "/blog"]
-

- This takes either a package_id or a url argument, just like the - others. To include this in an ADP, you can also say: + All of these are shown with an argument 'url' here, but they all + take a package_id argument instead, if you prefer that and know what + the package_id is. If nothing's supplied, the current package is + used, which is generally not what you want.

-
<%=[lars_blog_get_as_string -url "/blog"]%>
-

Technical Info

-The package fully supports multiple instances, i.e., you can mount -several instances in your site map, and they'll stay properly isolated -from each other. -

+ The package fully supports multiple instances, i.e., you can mount + several instances in your site map, and they'll stay properly isolated + from each other. +

-Only supports PostgreSQL (please do port to Oracle if you want to). -

+ Contents in your blog entries are assumed to be full-blooded + ADP-ified HTML, so don't give people access to post a blog unless + you trust them. I guess it should be made configurable whether to + allow this or not, but since I'm developing this for my own site + primarily, I haven't done so. This also means that if you've added + custom ADP tags, those are also available to you in your blog. +

-Contents in your blog entries are assumed to be full-blood ADP-ified -HTML, so don't give people access to post a blog unless you trust -them. I guess it should be made configurable whether to allow this or -not, but since I'm developing this for my own site primarily, I -haven't done so. This also means that if you've added custom ADP tags, -those are also available to you in your blog. -

weblogs.com update ping

-There are a couple parameters governing this feature. You can turn it -on or off on a per-package basis. And you can specify which URL you -want to export to weblogs.com, in case it's not the one the package -instance is mounted at. This can be useful if you're including the -blog on other pages, for example your site's front page. Thanks to -Jerry Asher for the code to do this. +

+ There are a couple parameters governing this feature. You can turn it + on or off on a per-package basis. And you can specify which URL you + want to export to weblogs.com, in case it's not the one the package + instance is mounted at. This can be useful if you're including the + blog on other pages, for example your site's front page. Thanks to + Jerry Asher for the code to do this. +

RSS Feed

-The RSS feed is version 1.0 only, and requires the rss-support package -if you want to use it. I found that getting rss-support to register -the Report Generation Subscripion (whatever that means) was -hard. There seemed to be a bug, but the rss-support package was so -hard for me to figure out that I'm not sure. In the end, I hacked on -some page scripts and added a channel_title through SQL. Phew! Let me -know if you try to get this running, so we can either fix the bug(s) -or write some clear docs on how to. +

+ The RSS feed is version 1.0 only, and uses the rss-support + package. You should be able to simply visit the admin page of your + new blogger instance and click the "Setup RSS" link, and you'll have + an RSS feed. +

+ Then you'll need to set the parameters and say that your + rss_file_url is at + /where-your-blogger-instnace-sists/rss/rss.xml. If you leave this + blank, we won't advertise your RSS feed URL anywhere. +

-You can supply your own channel image through the parameters. And you -can specify which URL we should advertise the RSS fil under. Leave -blank if you haven't set up an RSS feed for this package. +

+ You can also supply your own channel image through the + parameters. +

-

Road Map

    - -
  • Categorize and full-text-search-index blog entries so the archives are more useful. - -
  • Dave Bauer is implementing this as an ETP application, interesting -to see where that goes. - -
  • Calendar widget - -
  • Easier to set up RSS support (probably requires mucking with the rss-support package) - -
  • Nicer interface - -
  • Make it safe to use in a not-so-protected environment, e.g., -disable <% ... %> ADP notation. - -
  • More thorough documentation and some setup/config pages. - +
  • + Categorize and full-text-search-index blog entries so the archives + are more useful. +
  • +
  • + Use content repository. +
  • +
  • + Community-maintained blog ... everybody with 'write' can post entries. +
  • +
  • + Moderation-feature: Entries posted by non-admins must go through a + workflow-administered approval process. +
  • +
  • + Ability to modify templates for each instance individually through + the UI. +
  • +
  • + Nicer interface (MovableType) +
  • +
  • + Make it safe to use in a not-so-protected environment, e.g., + disable <% ... %> ADP notation. +
  • +
  • + More thorough documentation and some setup/config pages. +

Version History

    - -
  • 0.7d Finished port to Oracle. Upgraded PG drop script. Renamed RSS proc which requires running the SQL upgrade script (for PG). Bug-fix to bypass 'draft' and publish directly. -vinodk (August 15, 2002) - -
  • 0.6.4d Added poster information, optional per -parameter. Added "url" shortcut variable to the blog template. Updated -documentation. (July 23, 2002) - -
  • 0.6.3d Added drop scripts, and made the create script call rss-register. Fixed minor bugs. (July 22, 2002) - -
  • 0.6.1d Fixed RSS last update bug. (Jun 2, 2002) - -
  • 0.6d Added RSS feed. Woohoo! (June 1, 2002) - -
  • 0.5d Added weblogs.com update ping. (June 1, 2002) - -
  • 0.4d Added Google link, new style. (May 31, 2002) - -
  • 0.3.3d Added Peter Marklund's arrow-box.gif patch. (May 13, 2002) - -
  • 0.3.2d Missing files from the distribution. - -
  • 0.3d Improved admin interface, added documentation. (March 24, 2002) - -
  • 0.2d Allow and show comments on blog. (March 23, 2002) - -
  • 0.1d Initial version. (February 18, 2002) - +
  • + 0.8.4 Oops, getting behind on the version history. In the last + few releases, I've rearranged a bunch of templates to make it + more consistent and easier to customize; I've fixed the code that + sets up the RSS stuff, so you can now simply go to the admin page + and say "setup RSS"; I've integrated the new richtext widget which + I added to the templating system. (February 6, 2003) +
  • +
  • + 0.7d Finished port to Oracle. Upgraded PG drop + script. Renamed RSS proc which requires running the SQL upgrade + script (for PG). Bug-fix to bypass 'draft' and publish + directly. -vinodk (August 15, 2002) +
  • +
  • + 0.6.4d Added poster information, optional per + parameter. Added "url" shortcut variable to the blog + template. Updated documentation. (July 23, 2002) +
  • +
  • + 0.6.3d Added drop scripts, and made the create script call + rss-register. Fixed minor bugs. (July 22, 2002) +
  • +
  • + 0.6.1d Fixed RSS last update bug. (Jun 2, 2002) +
  • +
  • + 0.6d Added RSS feed. Woohoo! (June 1, 2002) +
  • +
  • + 0.5d Added weblogs.com update ping. (June 1, 2002) +
  • +
  • + 0.4d Added Google link, new style. (May 31, 2002) +
  • +
  • + 0.3.3d Added Peter Marklund's arrow-box.gif patch. (May 13, + 2002) +
  • +
  • + 0.3.2d Missing files from the distribution. +
  • +
  • + 0.3d Improved admin interface, added documentation. (March + 24, 2002) +
  • +
  • + 0.2d Allow and show comments on blog. (March 23, 2002) +
  • +
  • + 0.1d Initial version. (February 18, 2002) +

License

Index: openacs-4/packages/rss-support/rss-support.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/rss-support.info,v diff -u -r1.6.2.3 -r1.6.2.4 --- openacs-4/packages/rss-support/rss-support.info 9 Dec 2002 14:34:13 -0000 1.6.2.3 +++ openacs-4/packages/rss-support/rss-support.info 13 Mar 2003 14:24:37 -0000 1.6.2.4 @@ -6,16 +6,19 @@ RSS Support f t + rss-support - + + oracle postgresql - Andrew Grumet - Jerry Asher Dave Bauer + Jerry Asher + Andrew Grumet Basic support for RSS generation (and parsing). RDF Site Summary (RSS) is a lightweight multipurpose extensible metadata description and syndication format. This package can be used to publish ACS objects in a manner useful to other websites and webservices. + 2003-01-30 For each item (news event, ticket, bboard message, ...) that you want to publish, you create a property list that describes that item (url to item, title of item, description of item, etc.). You pass a list of those items (and some other parameters) to rss_gen, and it will generate your XML for you. @@ -26,50 +29,52 @@ - + - - - - - - + + + + + + - + + + + + + + + + + - - - - - - - - - + + Index: openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql,v diff -u -r1.7.4.2 -r1.7.4.3 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 2 Mar 2003 22:51:46 -0000 1.7.4.2 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 13 Mar 2003 14:25:05 -0000 1.7.4.3 @@ -164,8 +164,18 @@ Used for display purposes. '; -create function rss_gen_subscr__new (integer,integer,varchar,integer,timestamptz,varchar,timestamptz,integer,varchar,integer) -returns integer as ' +create function rss_gen_subscr__new ( + integer, -- subscr_id + integer, -- impl_id + varchar, -- summary_context_id + integer, -- timeout + timestamptz, -- lastbuild + varchar, -- object_type + timestamptz, -- creation_date + integer, -- creation_user + varchar, -- creation_ip + integer -- context_id +) returns integer as ' declare p_subscr_id alias for $1; p_impl_id alias for $2; Index: openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl,v diff -u -r1.10.2.2 -r1.10.2.3 --- openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 18 Oct 2002 20:25:23 -0000 1.10.2.2 +++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 13 Mar 2003 14:25:37 -0000 1.10.2.3 @@ -61,6 +61,12 @@ set datasource [acs_sc_call RssGenerationSubscriber datasource \ $summary_context_id $impl_name] + + if { [empty_string_p $datasource] } { + ns_log Error "Empty datasource returned from $impl_name for context $summary_context_id in rss_gen_report. Probably because the implementation hasn't been bound." + return + } + set args "" foreach {name val} $datasource { regsub -all {[\]\[\{\}""\\$]} $val {\\&} val Index: openacs-4/packages/rss-support/www/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/rss-support/www/delete.tcl 5 Sep 2002 13:23:33 -0000 1.3 +++ openacs-4/packages/rss-support/www/delete.tcl 13 Mar 2003 14:26:09 -0000 1.3.2.1 @@ -8,7 +8,8 @@ ad_require_permission $subscr_id admin db_1row subscr_info { - select channel_title, + select summary_context_id, + channel_title, channel_link from rss_gen_subscrs where subscr_id = :subscr_id