Forum OpenACS Q&A: Forums in 5.0 and general-comments on Photos in photo-album

Greetings,

I recall from old versions of bboard and forums that sometimes users could add attachments/images to posts.  Is that functionality somewhere in Forums?

Also, in a related idea, is there support somewhere for adding general-comments on photos in the 5.0 photo album?

You can add comments to photos like this:

try adding this to your photo-album/photo.tcl:

set comment_link [general_comments_create_link $photo_id "[ad_conn package_url]photo?photo_id=$photo_id"]
set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 \
$photo_id "[ad_conn package_url]photo?photo_id=$photo_id"]

then add this to your photo.adp:

@comment_link@

Hope this helps. I think you can add comments to any content item. Im not that sure about it though. But I made it work for photo album

and yes there is support for adding attachments/images to posts in Forums. It was activated on the test servers a few days ago. Could not find where to activate it though (anyone else know how?).

I am going to be working on a site where I want users posting images in a discussion to be able to concurrently submit the image to an image repository (based on the photo-album package) on the same site.

Thank you Carl and Jeff.

I'm also curious about rating photos, or general rating system--I know I've seen oacs-based sites with photo ratings, but can't recall anywhere in the current HEAD tree where that might work.

Hi there,

This post was a good find - I just added the lines of code above to photo.tcl and photo.adp and a proper link comes up - problem is the <'s and >'s are &gt and &lt's. Also the ampersands in the url are replaced with &amp's. I tried further processing comment_link with ad_text_to_html but that just wrapped it in paragraph tags. Is there an existing proc to fix this or do I have a paramater set wrong somewhere? Or do I need to write some regsub's?

In the adp page, @variable_name;noquote@

So @general_comments_link;noquote@

Etc...

Thanks Jade! Worked like a charm...