Node Logger - Is a simple module that logs each update of the node made by any user.

Description
Its a very lightweight module that gives a simple overview of a node
containing information of user and update time made by user for a node
in a tabular format. This is very useful when the node revision feature
is not enabled but you still need to log just the updates of the nodes.

Project URL: http://drupal.org/sandbox/jhalak/1938584
Git URL: git clone http://git.drupal.org/sandbox/jhalak/1938584.git node_logger
Version: 7.x-1.x

Installation
Download and install the module normally as you install other contributed module.

Usage
After installation you have to give permission to "Access node log"
to your desired role. Now after log-in in user should see a "log" tab
when he visits in any node or additionally by browsing node/%nid/log.

Overriding
-- To override the date format you can do it by calling "hook_node_log_format_date_alter(&$timestamp)".
-- The themeable output is also can be override by redefining theme template.

Reviews of other projects

CommentFileSizeAuthor
node_logger.png23.21 KBjhalak

Comments

alexverb’s picture

Status: Needs review » Needs work

Hi Jhalak,

It would be a great help to people if you put some links in your application description to the actual project and supply the clone command so people can check out your code easily.

Yours is: git clone http://git.drupal.org/sandbox/jhalak/1938584.git node_logger

It's also helpful to check out the coding standards through pareview.sh. You can check your code style online: http://ventral.org/pareview/httpgitdrupalorgsandboxjhalak1938584git

Or install it on your server to use it as a drush command:
http://drupal.org/node/1419988

Also I wanted to ask if you know that Drupal has core support for revisions. This actually pretty much does what your module is doing. It allows for content types to keep revisions and revert back to another revision if needed. It's also very powerfull in combination with other modules as diff, workbench, workbench_moderation, etc...

But it's also possible you meant this module to be lightweight and provide minimal history. But most of the time clients will always ask for more. Then revisions would be the way to go.

arun ak’s picture

Hi jhalak,

Add more details about your project here:

1) Link Project page
2) Git Repo
3) Version

Its very helpful for review your module.

jhalak’s picture

Project URL: http://drupal.org/sandbox/jhalak/1938584
Git URL: git clone http://git.drupal.org/sandbox/jhalak/1938584.git node_logger
Version:7.x-1.x

I have also added the info in the issue and project description.

jhalak’s picture

Hi Alex,

Thanks for the review.

I know that revision support is built-in Drupal. But while working on my current project, I was bound to not maintaining the revision, and that's why the revision support is off. But I still need a feature to know when a node is changed by which user. That's the main reason for creating this project. But if you still think that its not that much worthy to be a contributed module, I will not mind the project to be maintained as sandbox project without publishing as full project.

Thanks

alexverb’s picture

Nah not at all, if it's sole purpose is to keep a simple log I'm shure plenty of other people will like your lightweight solution. Because enabling revisions would mean a lot more tables in your database that you aren't really using. So by all means it's "full project" worthy.

jhalak’s picture

Hi Alex,

I have fixed the code according to the coding standard. Please review and suggest me what should I do now.

Thanks

alexverb’s picture

The code now looks fine to me. I just have a small functional remark. On the "action" table header you only have two possible outcomes "created" and "updated". Since you are allready providing the created on information above the table it seems like obsolete information. All you will see is "updated" every time. My suggestion drop the action column and don't store the creation date since the node keeps this data.

One thing I've noticed in the naming conventions is the hook_menu.

/**
 * Implements hook_menu().
 */
function node_logger_menu() {
  $items['node/%/user_log'] = array(
    'title'            => 'Log',
    'page callback'    => 'node_logger_user_log',
    'page arguments'   => array(1),
    'access arguments' => array(PERM_ACCESS_NODE_USER_LOG),
    'weight'           => 5,
    'type'             => MENU_LOCAL_TASK,
    'file'             => 'node_logger.pages.inc',
  );
  return $items;
}

I would try to keep a general naming convention. I would change the part 'user_log' with 'node_log'. Because it's still a log on the node itself, like you did in node_logger.install.

Also the path should be as simple as possible. If you can't find any modules that are using 'node/%/log'. I would be the first to cut that cake :). Otherwise 'node/%/node_log' is just fine.

When you've done this I would get another person to take a look at it. Because I don't have much more to say. It's a pretty small module.

alexverb’s picture

Issue summary: View changes

Project URL, git URL and Version added

jhalak’s picture

Thanks Alex for your remarks.

The following things are done:
-- Naming convention is fixed.
-- Action column is removed.
-- URL is changed to 'node/%/log' as i found no module regarding this.

alexverb’s picture

Status: Needs work » Needs review

Any time you make your changes you should change the status to "needs review". That way other people will also take a look at your module.

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

Description Updated

Sam Hermans’s picture

Status: Needs review » Needs work

Manually checked and installed your module and looks very clean and usefull .. The only remarks i could possibly make are:

- 'Updated By', 'Last modified On' capitalisation ..
- You use mm/dd/yyyy as a date format, where the default seems to be yyyy-mm-dd .. make this an configurable option or change it to the default.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

jhalak’s picture

Status: Closed (won't fix) » Needs review
paul rowell’s picture

Status: Needs review » Needs work

Hey,

Found one thing in the automated review: http://ventral.org/pareview/httpgitdrupalorgsandboxjhalak1938584git

All looks good from the manual review. The only point that I would mention is that in node_logger_log_record() $type is never passed to it so it will always be 'updated'. The $type var doesn't appear to be used anywhere else either.

With this is mind I think you could drop the 'type' from node_logger_schema() and the above function (feel free to correct me if it is used elsewhere though :) )

Paul

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

First review of other project added