Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Is there any module that can show whoever edits a node, just like how happens on Stack Exchange sites, where the user who edited a post is shown together the author of that post?

share|improve this question
    
I am thinking that you can use the core tracker module and views to do this. But I am still trying to figure out exactly where to get it to identify the last user to update the node. It might require a CCK module extension or the advanced tracker module or an extended views module. –  pthurmond Jul 29 '11 at 5:00
add comment

2 Answers

up vote 2 down vote accepted

This article should be able to help you: Adding 'Last edited by name some time ago' information

I'm not sure how you want it to look exactly, but with a preprocess function and a simple template edit, you can add an editors information. You can style this however you like and add/remove information, but to show the editor's name and the edit date/time do the following:

Add to template.php (or add the code to the preprocess_node function if already exists):

function neuco_preprocess_node(&$variables) {
  $node = $variables['node'];
  $editor = user_load($variables['revision_uid']);
  $variables['edited'] = 'Edited by ' . theme('username', $editor) . ' on ' . format_date($node->changed, 'medium');
}

In your tpl file (node.tpl.php, node-YOURTYPE.tpl.php, etc):

<?php print $edited; ?>

Functions used: template_preprocess_node(), user_load(), format_date(), theme_username()

share|improve this answer
    
works like a charm,thanks –  LinuxFloat Jul 29 '11 at 15:19
add comment

You might be looking for http://drupal.org/project/diff or any revision module

share|improve this answer
    
What the OP is looking for is a module that shows who is the last user who edited a node when showing the node itself. –  kiamlaluno Jul 29 '11 at 9:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.