Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v
diff -u -r1.18 -r1.18.4.1
--- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 22 Dec 2003 21:53:20 -0000 1.18
+++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 17 Mar 2004 16:51:35 -0000 1.18.4.1
@@ -235,7 +235,7 @@
# optional, specified in the ad_page_contract call error
ad_proc -public ad_page_contract {
- -type
+ {-form {}}
-properties
docstring
args
@@ -512,12 +512,11 @@
@param query the query arguments that this page accepts. The query
argument takes form of a list of argument specs. See above.
- @param type the document type that this page will deliver. Use
- properties if the type is anonymous.
-
- @param properties what properties the resulting document will contain, in case
- you don't specify a predefined type.
+ @param properties what properties the resulting document will contain.
+ @param form Optionally supply the parameters directly here instead of fetching them from the page's form (ns_getform).
+ This should be a reference to an ns_set.
+
@author Lars Pind (lars@pinds.com)
@author Yonatan Feldman (yon@arsdigita.com)
@author Bryan Quinn (bquinn@arsdigita.com)
@@ -551,10 +550,6 @@
ad_arg_parser $valid_args $args
}
- if {[info exists type] && [info exists properties]} {
- return -code error "You can't have both a -type and a -properties argument with ad_page_contract"
- }
-
####################
#
# Check supplied query form and set up variables in caller's environment
@@ -704,7 +699,7 @@
ad_parse_documentation_string $docstring doc_elements
# copy all the standard elements over
- foreach element { query type properties } {
+ foreach element { query properties } {
if { [info exists $element] } {
set doc_elements($element) [set $element]
}
@@ -825,7 +820,9 @@
#
####################
- set form [ns_getform]
+ if { [empty_string_p $form] } {
+ set form [ns_getform]
+ }
if { [empty_string_p $form] } {
set form_size 0
Index: openacs-4/packages/lars-blogger/lib/last-n-comments.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/lib/last-n-comments.tcl,v
diff -u -r1.1 -r1.1.4.1
--- openacs-4/packages/lars-blogger/lib/last-n-comments.tcl 13 Dec 2003 20:06:14 -0000 1.1
+++ openacs-4/packages/lars-blogger/lib/last-n-comments.tcl 17 Mar 2004 16:49:57 -0000 1.1.4.1
@@ -1,11 +1,17 @@
-set package_id [ad_conn package_id]
+ad_page_element_contract {
+ Dipslay the mini-calendar for a blog
+} {
+ {package_id:optional {[ad_conn package_id]}}
+ number_of_comments:optional
+}
if { ![exists_and_not_null number_of_comments] || $number_of_comments == 0 } {
set number_of_comments [parameter::get \
-default 10 \
+ -package_id $package_id \
-parameter NumberOfCommentsInIncludelet]
}
-db_multirow -extend {entry_url} comments select_n_comments "" {
- set entry_url "[ad_url][lars_blog_public_package_url]/one-entry?[export_vars entry_id]"
-}
\ No newline at end of file
+db_multirow -extend { entry_url } comments select_n_comments {} {
+ set entry_url [export_vars -base "[ad_url][lars_blog_public_package_url -package_id $package_id]/one-entry" { entry_id }]
+}
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.21 -r1.21.4.1
--- openacs-4/packages/lars-blogger/www/blog.tcl 27 Feb 2004 18:30:59 -0000 1.21
+++ openacs-4/packages/lars-blogger/www/blog.tcl 17 Mar 2004 16:50:07 -0000 1.21.4.1
@@ -1,15 +1,22 @@
-# Expects:
-# package_id:optional
-# url:optional
-# type:optional (current, archive)
-# archive_interval:optional
-# archive_date:optional
-# screen_name:optional
-# max_num_entries: optional
-# min_num_entries: optional
-# num_days: optional
-# max_content_length:integer,optional
+ad_page_element_contract {
+ Display a blog
+ @params type Display type. Valid values are current, archive.
+} {
+ package_id:optional
+ url:optional
+ type:optional
+ archive_interval:optional
+ archive_date:optional
+ screen_name:optional
+ max_num_entries:optional
+ min_num_entries:optional
+ num_days:optional
+ max_content_length:integer,optional
+ comments_page
+}
+
+
# If the caller specified a URL, then we gather the package_id from that URL
if { [info exists url] } {
array set blog_site_node [site_node $url]
Index: openacs-4/packages/lars-blogger/www/calendar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/calendar.tcl,v
diff -u -r1.5 -r1.5.6.1
--- openacs-4/packages/lars-blogger/www/calendar.tcl 29 Sep 2003 08:05:42 -0000 1.5
+++ openacs-4/packages/lars-blogger/www/calendar.tcl 17 Mar 2004 16:50:07 -0000 1.5.6.1
@@ -1,10 +1,9 @@
-#
-# Expects:
-# date:onevalue,optional
-#
-
-if { ![info exist date] } {
- set date [dt_sysdate]
+ad_page_element_contract {
+ Display the mini-calendar for a blog
+} {
+ {package_id:optional {[ad_conn package_id]}}
+ {date:optional {[dt_sysdate]}}
+ {screen_name {}}
}
dt_get_info $date
@@ -14,11 +13,9 @@
set calendar_details [ns_set create calendar_details]
-set package_url [lars_blog_public_package_url]
+set package_url [lars_blog_public_package_url -package_id $package_id]
set month_number [clock format [clock scan $date] -format %m]
-set package_id [ad_conn package_id]
-
if {[empty_string_p $screen_name]} {
db_foreach all_entry_dates { * SQL * } {
ns_set put $calendar_details $entry_date_julian "1"
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.22 -r1.22.4.1
--- openacs-4/packages/lars-blogger/www/entry-chunk.adp 27 Feb 2004 19:48:24 -0000 1.22
+++ openacs-4/packages/lars-blogger/www/entry-chunk.adp 17 Mar 2004 16:50:07 -0000 1.22.4.1
@@ -42,9 +42,7 @@
in
@blog.category_name@
- |
- Permalink