Hi there,

Maybe I get Activity's philosophy wrong, but I think it wasn't your best move to make
activity comments turned on permanently.

It should be an option: 'turn on comments', instead of overriding the theme function
to turn them off.

More: I think it was mistake to put comments permanently turned on to stable (!!!)
version, because of 'first love' with new Activity user (I mean Drupal developer, not
a site's visitor). Activity block without these ugly forms was light and sexy, now it is
definitely different, probably even discouraging (hope I'm wrong) people from using it?

Howgh ;)

Szy.

CommentFileSizeAuthor
#7 activity.module.391770.patch2.69 KBjaydub

Comments

merilainen’s picture

Isn't that small comment form supposed to be collapsible by default? Or what is that "comment" text there? At least for me they are open always, which makes it look kinda "broken".

UPDATE:
Now I realized that it's working right only in path /activity. Anywhere else I always get all the activity comment forms uncollapsed.

sirkitree’s picture

Sorry, this was an oversight on my part. It was a hasty decision to get comments into the module and I didn't properly test in my haste to get a release out last night.

You are right, this should be an option to turn on and off in the /admin/settings/activity. The only problem to deal with there is that we are doing some bad theming practice with logic and even a drupal_get_form() inside the theme... not so good. So there is some re-writing that needs done to make this better.

We now know the problem, so what is the solution?

jaydub’s picture

I think we can take the core comment approach and just make a permission for adding comments. That gives you relatively fine-grained permissions and you can 'disable' by just not giving anyone permission. While we're at it we could provide read only perm vs read/write thoughts?

sirkitree’s picture

I agree either a perm or a setting in the settings form, perm sounds better.

I was referring more to the problem of how we can structure the code to not do a drupal_render() within the theme function and still have comment output.

jaydub’s picture

As for the comment form appearing on pages other than /activity that would the case for some pages such as those that would show if user relationships activity is enabled as the contrib sub modules did not get updated to take into account comments just yet in our haste to release

sirkitree’s picture

Actually comments should work across the board no matter what the activity as they key off of the aid.

The problem with the comment form showing up in the block is that i did not make any css geared towards hiding the form within the block.

jaydub’s picture

Status: Active » Needs review
StatusFileSize
new2.69 KB

quick patch to add in permissions for view and create activity comments. Have to packup to go to the closing session of DrupalCon :)

sirkitree’s picture

Status: Needs review » Reviewed & tested by the community

Looks great! Works well.

jaydub’s picture

Status: Reviewed & tested by the community » Fixed

Ok the patch has been committed to CVS.

There are 2 new permissions:

'view activity comments'
'create activity comments'

Enable view and create for roles that you want to have read/write
Enable view only for roles that you want to have read-only
Don't enable any for roles that you don't want to have comments functionality exposed to

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.