Closed (fixed)
Project:
modr8
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Jan 2007 at 02:55 UTC
Updated:
30 Jan 2007 at 18:32 UTC
Jump to comment: Most recent file
With multiple moderators on a site, it seems a key feature to know who approved/disapproved/commented on what and when.
Starting work on the new schema and code, modeling somewhat after {watchdog}
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | tab_log_list_del_cleanup.diff | 3.35 KB | pwolanin |
| #22 | delete_cleanup_1.diff | 627 bytes | pwolanin |
| #21 | tab_log_list_1.diff | 2.4 KB | pwolanin |
| #15 | log_modr8_12.diff | 17.87 KB | pwolanin |
| #14 | log_modr8_11.diff | 17.61 KB | pwolanin |
Comments
Comment #1
pwolanin commentedsome more progress - inserts data, but no display yet.
Comment #2
pwolanin commenteddisplay of log overview and single events.
TODO: overview per node, link on the moderation form to node's overview.
Comment #3
pwolanin commentedadded overview per node, but no links to it yet.
Comment #4
pwolanin commentedvery close to being done!
Comment #5
pwolanin commentedadded hook_cron to delete old entries
Comment #6
pwolanin commentedin response to comments from moshe:
In response to this, I relocated the moderation log per post to a tab on the node page, and set the default clearing time to 'Never'.
In terms of: $message = filter_filter('process', 2, -1, $message);.
I'm using this to just add automatic line breaks to the e-mail message. check_markup() requires the use of an existing site filter number- which will vary by site and may never include one that just applies the line break filter. I'd be happy to know of any cleaner way to call this.
In terms of: truncate_utf8 vs. drupal_substr
I got this usage from the watchdog module, and it looks like it should be faster than drupal_substr in this case.
Comment #7
moshe weitzman commentedfor that filter_filter() thing, i guess we should send the emails using the same logic that user.module uses for the welcome email, forgot password email, and so on. i haven't seen direct calls to filter system like that.
Comment #8
pwolanin commented@moshe- the call to filter_filter is after the e-mail is sent. Since the e-mail is plain text (not HTML) the idea is just to add
<br />tags automatically, so that the e-mail message displays nicely in the moderation log.Comment #9
moshe weitzman commentedoh. that makes sense.
but this is preparing some text for input into the DB, right? How about stuffing it into the log as plain text, and run check_markup() anytime we display it. thats more consistent with our 'on output' filtering strategy.
Comment #10
pwolanin commentedWell, since the filtering and content will never change, it made more sense to me to put in the necessary HTML before stuffing it into the DB.
However, it might be worth santizing that message even more (e.g. check_plain() before the break filter).
Only last question- should the "moderation log" tab be hidden if there are no moderation events for a particular node?
Comment #11
moshe weitzman commentedyes, hidden in that case just like revisions tab on a node.
Comment #12
pwolanin commentedA final patch (perhaps). Access to the tab depends on the existence of log events for that node. Also added a link to the moderation log from the top of the moderation queue page. Things also work well enough for deleted nodes.
Comment #13
pwolanin commentedadding to README
Comment #14
pwolanin commenteddoing some more thorough testing with an access contriol module enabled (OG).
Attached patch fixes one bug. However, the behavior with deleted nodes isn't quite what I'd want- it seems that for non-admins, deleted nodes don't show up in the moderation log, maybe since there is no entry in the node_access table.
Comment #15
pwolanin commentedcommitted the attached patch - will sort out node access another day.
Comment #16
moshe weitzman commentedit is true that deleted nodes have no entry in node_access. i'm curious - why is that relevant? i think it is ok to simply discard all logs for a deleted node.
i'm going to update this module on groups.drupal.org now
Comment #17
moshe weitzman commentednow that i see it on gdo, i have a couple suggestions. shorten the tab title to just Moderation. tab space is getting tight.
the username who performed the moderation is not shown in the log. is crucial info, IMO.
thanks for this fine patch.
Comment #18
moshe weitzman commentedwhat i meant to say is that the moderator name is not shown in the table view of the log. is shown in detail of course.
Comment #19
pwolanin commented#1- I think it's useful to keep a log of deleted items in order to identify which moderator deleted them and why. However, I could certainly add an option to delete them via hook_nodeapi.
#2- I'll work on the tab
#3- I was torn whether to list the author, moderator, or both in the log view. Is listing both better than listing just the moderator?
Comment #20
moshe weitzman commented#1 - makes sense
#3 - i vote for moderator only
Comment #21
pwolanin commentedWell, since you're the only one voting, take a look at the attached patch to address #2 and 33.
Comment #22
pwolanin commented(make that #3 not 33)
Another patch attached, which cleans up on node deletion- log entries are deleted if the node is not currently in moderation. This is a pretty minimal cleanup that leaves in the log entries for nodes deleted as part of the moderation process.
Comment #23
moshe weitzman commentedboth patches look good to me. i just read them.
Comment #24
pwolanin commentedOk, I'm going to commit the attached combined patch to HEAD and 5.x, and make a 5.x-2.1 release.
note, that I also cut the unused 'submit' code in hook_nodeapi.
Comment #25
pwolanin commented