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.20 -r1.21 --- openacs-4/packages/lars-blogger/lars-blogger.info 1 Oct 2003 13:00:00 -0000 1.20 +++ openacs-4/packages/lars-blogger/lars-blogger.info 1 Oct 2003 19:12:05 -0000 1.21 @@ -27,13 +27,16 @@ + + + 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.2 -r1.3 --- openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 28 Aug 2003 09:41:55 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 1 Oct 2003 19:12:05 -0000 1.3 @@ -41,4 +41,31 @@ + + + + select g.comment_id, + r.title, + r.mime_type, + o.creation_user, + acs_object.name(o.creation_user) as author, + to_char(o.creation_date, 'MM-DD-YYYY') as pretty_date, + to_char(o.creation_date, 'Month DD, YYYY HH12:MI PM') as pretty_date2 + case when tb.comment_id not null 't' else 'f' end as trackback_p, + tb.tb_url as trackback_url, + nvl(tb.name,tb.tb_url) as trackback_name + from general_comments g left join trackback_pings tb on gc.comment_id=tb.comment_id, + cr_revisions r, + cr_items ci, + acs_objects o + where g.object_id = :object_id + and r.revision_id = i.live_revision + and i.item_id=g.comment_id + and o.object_id = g.comment_id + order by o.creation_date + + + + + 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.3 -r1.4 --- openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 29 Sep 2003 08:05:42 -0000 1.3 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 1 Oct 2003 19:12:05 -0000 1.4 @@ -42,4 +42,31 @@ + + + + select g.comment_id, + r.content, + r.title, + r.mime_type, + o.creation_user, + acs_object__name(o.creation_user) as author, + to_char(o.creation_date, 'MM-DD-YYYY') as pretty_date, + to_char(o.creation_date, 'Month DD, YYYY HH12:MI PM') as pretty_date2, + case when tb.comment_id is not null then 't' else 'f' end as trackback_p, + tb.tb_url as trackback_url, + coalesce(tb.name, tb.tb_url) as trackback_name + from general_comments g left join trackback_pings tb on g.comment_id=tb.comment_id, + cr_revisions r, + cr_items ci, + acs_objects o + where g.object_id = :entry_id + and r.revision_id = ci.live_revision + and ci.item_id=g.comment_id + and o.object_id = g.comment_id + order by o.creation_date + + + + 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.6 -r1.7 --- openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 29 Sep 2003 08:05:42 -0000 1.6 +++ openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 1 Oct 2003 19:12:05 -0000 1.7 @@ -66,6 +66,9 @@ # Ping weblogs.com lars_blog_weblogs_com_update_ping + + # trackback + lars_blogger::entry::trackback -entry_id $entry_id } @@ -131,3 +134,40 @@ -notif_subject $blog(title) \ -notif_text $new_content } + +ad_proc lars_blogger::entry::trackback { -entry_id } { + sends trackback ping (if enabled) +} { + + if {[parameter::get -parameter EnableAutoDiscoveryAndPing -default "1"]} { + + lars_blogger::entry::get -entry_id $entry_id -array entry + set url [ad_url][pinds_blog_entry__url $entry_id] + set excerpt [string range $entry(content) 0 [parameter::get -parameter TrackbackMaxExcerpt -default 200]] + set blog_name [lars_blog_name -package_id $entry(package_id)] + + ns_log notice "Trackback sending: url=$url title=$entry(title) excerpt=$excerpt content=$entry(content) blog_name=$blog_name" + trackback::auto_ping -url $url \ + -title $entry(title) \ + -excerpt $excerpt \ + -content $entry(content) \ + -blog_name $blog_name + + } + +} + +ad_proc -public lars_blogger::entry::get_comments { + -entry_id + {-multirow "comments"} +} { + @ param entry_id + @ param multirow + upvars a multirow in the caller to display comments +} { + + set content_select [db_map content_select] ;# ", r.content" + upvar $multirow $multirow + db_multirow $multirow get_comments "" + +} \ No newline at end of file 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.12 -r1.13 --- openacs-4/packages/lars-blogger/www/entry-chunk.adp 1 Oct 2003 03:34:31 -0000 1.12 +++ openacs-4/packages/lars-blogger/www/entry-chunk.adp 1 Oct 2003 19:12:05 -0000 1.13 @@ -63,11 +63,11 @@ - -

-

Comments

-
- @comments_html;noquote@ -
+ + +

@comments.title@

+

@comments.content@

+

by @comments.author@Trackback from @comments.trackback_name@ on @comments.pretty_date@

+
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.8 -r1.9 --- openacs-4/packages/lars-blogger/www/entry-chunk.tcl 29 Sep 2003 08:05:42 -0000 1.8 +++ openacs-4/packages/lars-blogger/www/entry-chunk.tcl 1 Oct 2003 19:12:05 -0000 1.9 @@ -59,7 +59,6 @@ set display_categories [lars_blog_categories_p -package_id [ad_conn package_id]] if { [string equal $show_comments_p "t"] } { - set comments_html [general_comments_get_comments -print_content_p 1 $entry_id] + lars_blogger::entry::get_comments -entry_id $entry_id } - ad_return_template