In the comment approval queue (admin/comment/list/approaval) a table of comments approval pending is displayed. From the "operations" column there is a link to edit the comment. From the "subject" column there is a link that would allow you to view the comment. Since the comment is not published, if you click on the subject, you can't see unpublished comments. ie. this link (from the approval queue) is kind of useless.

To approve a comment it seems logical that one needs to view it first (edit may be confusing, depending on the format used) and then approve or delete the comment.

Is it a bad idea to display unpublished comments to users with 'adminiter comments' permission? Such comments could be displayed with a "red mark" and maybe a link could allow admins to approve the comment from there.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux’s picture

When a comment is created, a new watchdog entry is logged, that also has a link to "view" the comment. Well, this link is also useless, when the comment is in unpublished state.

I believe it would be a good thing to show unpublished comments to users with 'administer comments' permission, as described above. Anyone else?

markus_petrux’s picture

So... is it a bad approach to display unpublished comments to users with 'adminiter comments' permission?

What do you do in order to validate comments?

markus_petrux’s picture

Title: Unpublished comments can only be edited by comment admins, cannot be seen » Allow comment administrators to view unpublished comments
Status: Active » Needs review
FileSize
3.83 KB

Please, let me know what do you think about this approach, so if it worth I can complete the patches for drupal.css, phptemplate and default themes to incorporate a new class to highlight unpublished comments.

Hopefully, the patch here explains by itself.

killes@www.drop.org’s picture

Does one need the extra count query?

markus_petrux’s picture

The count query was there, it's used to enhance the performance of of the pager internal pager tasks.

The patch changes the query to add the comment status field, so it can be used to eventually add a new class (or anything else a them may see fit, similar thing is done with the 'new' thingy) to render unpublished comments for those who have 'administer comments' privilege.

Is the approach right?

killes@www.drop.org’s picture

I hadn't seen the query at the bottom.

I think the approach is right, but some discussion on the usablity of the approach should be had. I think this is more a patch for 4.8.

markus_petrux’s picture

Thanks for taking the time to look at it.

usability:
This is just for comment admins. Currently it is not possible to view unpublished comments, so the comment approval functionality is kind of hard. You have to use the edit function.

markus_petrux’s picture

Here's the complete patch. It's the same stuff for the comment module, plus adds the comment-unpublished class to drupal.css and adapts the default themes and phptemplate engine.

Please, consider adding this to 4.7. I think it helps comment approval a lot. Also, a contrib module could use comment links to provide additional functions for unpublished comments (f.e. a one click publish/unpublish).

markus_petrux’s picture

Yup, the patch.

Steven’s picture

FileSize
11.78 KB

If we're going to color unpublished comments, we should also color unpublished nodes.

However, due to peculiarities of previewing, these styles also apply to previews. This would IMO be too weird. The easiest fix is to introduce a new feature: coloring previews (different from the unpublished style). All that is needed is two styles in the CSS which can easily be overridden.

This increases the usability of posting quite a bit. Many people have complained about previews being too similar to the full post, so people forget to hit "submit" after doing a preview.

markus_petrux’s picture

2 birds in 1 shot ...sweet! :-)

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

good idea .. i tested and all works properly. code is proper too ... i can't see any difference in colors with my laptop monitor though. perhaps the css for this feature could be a bit more pronounced? we can tweak that later if needed. RTBC.

bradlis7’s picture

+1 for showing unpublished comments, as well as coloring both previews, unpublished comments, and unpublished posts (in 4.7 if possible). There probably isn't any argument against it, but I thought I'd add my $.02.

Steven’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)