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.2.2 -r1.3.2.3 --- openacs-4/packages/lars-blogger/www/entry-chunk.tcl 13 Mar 2003 17:05:51 -0000 1.3.2.2 +++ openacs-4/packages/lars-blogger/www/entry-chunk.tcl 13 Jun 2003 09:15:01 -0000 1.3.2.3 @@ -13,29 +13,39 @@ set package_id [ad_conn package_id] } -set admin_p [ad_permission_p $package_id admin] - if { ![exists_and_not_null return_url] } { set return_url "[ad_conn url]?[ad_conn query]" } set package_url [lars_blog_public_package_url -package_id $package_id] +set user_id [ad_conn user_id] + set general_comments_package_url [general_comments_package_url] -set show_poster_p [parameter::get -package_id $package_id -parameter "ShowPosterP" -default "1"] +set show_poster_p [ad_parameter "ShowPosterP" "" "1"] -lars_blogger::entry::htmlify -array blog +set blog(title) [ad_quotehtml $blog(title)] +# 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 }]" -set blog(delete_url) "${package_url}admin/entry-delete?[export_vars { entry_id return_url }]" +set blog(edit_url) "${package_url}entry-edit?[export_vars { entry_id return_url }]" +set blog(delete_url) "${package_url}entry-delete?[export_vars { entry_id return_url }]" -set blog(publish_url) "${package_url}admin/entry-publish?[export_vars { entry_id return_url }]" -set blog(revoke_url) "${package_url}admin/entry-revoke?[export_vars { entry_id return_url }]" +set blog(publish_url) "${package_url}entry-publish?[export_vars { entry_id return_url }]" +set blog(revoke_url) "${package_url}entry-revoke?[export_vars { entry_id return_url }]" -set blog(entry_archive_url) "${package_url}one-entry?[export_vars { entry_id }]" +if { [empty_string_p $screen_name] } { + set blog(entry_archive_url) "${package_url}one-entry?[export_vars { entry_id }]" +} else { + set blog(entry_archive_url) "${package_url}user/$screen_name/one-entry?[export_vars { entry_id }]" +} + set blog(google_url) "http://www.google.com/search?[export_vars { {q $blog(title) } }]" if { ![empty_string_p $general_comments_package_url] } {