4

I've a site with users that can create and edit contents, vote, flag, comment, etc. I would like to have a page with a history of every action, something like:

  • on day X user has create the content "Title".
  • on day X user2 has commented "Title 1".
  • and so on.

Is there something like this? I've found Activity, but for D7 there is only a "dev" version, released con july 2012.

Another way could be to create, with Rules or a custom module, custom entries in Watchdog and than create a view with Views Watchdog.

Any ideas?

1

There is Heartbeat pretty cool module with nice API. Also you can integrate with many other modules as well.

Heartbeat displays user activity on a website. This module is an API to log activity. The logged data contains message structures, attributes and variables. Once the activity messages exist in the database, they will be parsed and build into activity streams.

Other modules that work great with heartbeat activity

  1. Facebook-style Statuses
  2. Flag
  3. friend
  4. Friendlist
  5. User relationships
  6. Display suite
1

The Message module aims to provide specifically this functionality. It requires some configuration, as it is, like many good modules, created to work as a platform to build on, rather than as a direct solution.

0

IMO the Message module would be a perfect fit to answer this question. Using this module, you can create your own custom "Events logging" (to register things that happened in a site).

Specific to this question here, I'd create one or more so called "Message types" that contain data about:

  • the usernames (of the latest editors of content).
  • the relevant date(s).
  • any data about the actual entity (node, user, etc) or event you want to track, such as the node's id, its title, author, relevant field values, etc.

You could even track how those data looked like before and after they got updated.

About Message types: think of them as equivalent to Content types, whereas you create messages (instead of nodes) of a specific Message type (instead of Content type).

Rules integration

A really interesting facility of the Message module is its perfect integration with the Rules module. Have a look at the answer to "How to implement a follow author (or user) function?" for way more details on that.

In your case, you'd simply create some (rather basic) custom rules which use:

  • a Rules Event like "Before saving a new node", of "After updating an existing node" (or variations of these events). Or other events about any other entities you want to track.
  • a Rules Action to "Create a message" (of a selected Message type).

That's really it ... and things like "... delete a piece of content, or change another user's roles, block them, etc ..." are all minor variations of this (and a piece of cake to create an appropriate/similar rule).

Example included in Commerce Kickstart

A great sample of this can be found in Commerce Kickstart, which uses the Commerce Message module, to create such "Events logging". In that case in the format of an Order History, as shown in this screenprint (from this module's project page).

Replicate/replace the Activity module

Should you want to do so, it seems perfectly possible to build a view (report) that contains the data similar to what you can do with the Activity module as shown in this screenprint (from this module's project page).

More info about the Message module

The Message module is an amazing module, it is fully entity based, which implies that it perfectly (out of the box) integrates with modules such as Views and Rules.

Though there is not a lot of documentation about it (which is what makes it a hidden D7 gem ...). A possible way to get started with it, and to get an idea of the kind of things it can be used for, is to have a look at the answers to:

Tutorials:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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