The 5.x version of comment_notify is better integrated, but still requires a patch in comment.module to trigger on published comments

This is a one-line change where the block

       // Explain the approval queue if necessary, and then
      // redirect the user to the node he's commenting on.
      if ($status == COMMENT_NOT_PUBLISHED) {
        drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.'));
      }	      

is just enhanced by this else

       // Explain the approval queue if necessary, and then
      // redirect the user to the node he's commenting on.
      if ($status == COMMENT_NOT_PUBLISHED) {
        drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.'));
      }	      
      else 
      {
         comment_invoke_comment($edit, 'publish');
      }

which then triggers comment_notify

as patching comment.module for all different version is a big pain for many users,
this should be implemented in comment.module ASAP to help even drupal users use my comment_notify module
as well as alllow other plugins to trigger some work when comments are published

Thanks
christoph

CommentFileSizeAuthor
#2 comment_publish_status.patch748 bytesgreggles
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Version: 5.1 » 6.x-dev
Status: Active » Needs review

Being an api change I doubt this will make it in, but at least here is the change in patch form.

If this is removed from the 6.x-dev queue, I would request at least that the updater state whether this makes sense for 7.x OR if another solution is possible.

greggles’s picture

FileSize
748 bytes

with patch this time...

greggles’s picture

I should probably think about this more, but I'm not sure any more if this really is an API change.

According to http://api.drupal.org/api/5/function/hook_comment there already is a "publish" op. This is just a matter of calling it in a new place and redefining it as "comment is published either by admin or directly by the user".

right?

funana’s picture

+1

Christoph C. Cemper’s picture

as we already have this hook defined this is not a NEW hook.
it's a fix to comment.module that the already defined hook is called as required to notify other modules

+1

Christoph C. Cemper’s picture

Category: feature » bug
Lloyd Standish’s picture

My vote in favor:
+1

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

yup, is a small bug fix. thx.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Fine, committed! Please update the hook_comment docs to actually tell what is happening. (I checked that mass operations properly invoke this publish op).

Setting to needs work to await the documentation update.

Christoph C. Cemper’s picture

wow - great - which drupal core version will we get this?

jmlane’s picture

I am interested in updating the documentation to comment_save() as part of comment.module, however I am not sure how to submit changes.

Junyor’s picture

@Christoph: It's in Drupal 6.

Gábor Hojtsy’s picture

jmlane: http://drupal.org/patch (although I did reopen the issue to get people submit changes to the hook_comment()) docs which are not hosted as part of Drupal core, but in the contributions CVS repository.

dpearcefl’s picture

Do we still need to leave this issue open?

greggles’s picture

@dpearceMN it is open for docs which can be updated by anyone.

dpearcefl’s picture

Sorry, but I don't quite understand what you are saying. This issue hasn't been touched in 3.5 years. Is any work being done on this? if no one wants to update the documentation, then perhaps this issue is not important?

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.