Index: openacs-4/packages/attachments/www/doc/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/doc/index.adp,v
diff -u -r1.3.2.5 -r1.3.2.6
--- openacs-4/packages/attachments/www/doc/index.adp 13 Jul 2023 12:45:46 -0000 1.3.2.5
+++ openacs-4/packages/attachments/www/doc/index.adp 2 Sep 2024 09:40:28 -0000 1.3.2.6
@@ -2,6 +2,10 @@
Contents
@@ -91,30 +95,26 @@
attachments is not properly mounted. To do this, add the following
proc to your package's API and wrap all calls to the
attachments package with it:
- ad_proc -private attachments_enabled_p {} { ++ }ad_proc -private attachments_enabled_p {} { set package_id [site_node_apm_integration::child_package_exists_p \ -package_key attachments ] - } -
When you want to set up the link that the user can click on to attach something to an object, use the attachments::add_attachment_url proc, which will return the correct Url into the attachments package mounted under your package.
-- if {$attachments_enabled_p} { ++ }if {$attachments_enabled_p} { if {$attach_p} { set redirect_url [attachments::add_attachment_url \ -object_id $message_id \ -return_url $redirect_url \ -pretty_name "$subject"] } - } -
forums redirects the user to the redirect_url, if the user chose to add an attachment to their posting.