Forum OpenACS Q&A: Re: calendar and newbie comments

Posted by Lachlan Myers on
I have been moderately successful in adding general-comments to  a photo-album instance - without any sophistication, though. All images get the link.

I just looked at the code in a couple of the packages that use general-comments (news, photo-album-lite (not ported to PG yet))

This adds a "Add a Comment" line to each photo in photo-album.
I stole code from photo-album-lite and added

    <if @the_comments@ not eq "">

to package/photo-album/www/photo.adp just before "@photo_nav_html@"

and added

    # try to set comments
    set the_comments [general_comments_get_comments $photo_id]
    set general_comments_link [general_comments_create_link $photo_id [ns_conn url]?[ns_conn query]]

to package/photo-album/www/photo.tcl

This works OK for the admin, but I now have to work out how to give permission to other users to add comments!

Posted by Bart Teeuwisse on

grant 'Registered users' general_comments_create on the photo-album instance. Or if you like to enable other packages too, grant this permission on the 'Main Site'.

You might want to first check if 'Registered users' already have general_comments_create premission on the 'Main Site'. As far as I know, the general comments package automatically installs this permission when loaded.