Hello,

Is there a module for Backdrop that displays user activity on the website? For example a page where I can see newly created or changed content, new comments, etc., sorted by time?

Or can something like this be done with Views?

(From the old Drupal world, see these examples:
  https://www.drupal.org/files/images/Activity%20%7C%20activity2.png
  https://groups.drupal.org/node/15207
  Tracker Core Module)

 

Comments

Olafski's picture

Yes, this can be done with Views. I've rebuilt your second example with Views, see the following screenshot. Further below, I'll paste an export of the view configuration.

Screenshot

View configuration example

You can import the view into your Backdrop site. To do so, visit the Single import page (admin/config/development/configuration/single/import), and paste the following configuration code into your Backdrop site.

{
    "_config_name": "views.view.test_activity",
    "name": "test_activity",
    "description": "",
    "tag": "",
    "disabled": false,
    "base_table": "node",
    "human_name": "Test: Activity",
    "core": "1.30.2",
    "display": {
        "default": {
            "display_title": "Default",
            "display_plugin": "default",
            "display_options": {
                "query": {
                    "type": "views_query",
                    "options": []
                },
                "access": {
                    "type": "perm",
                    "perm": "access content"
                },
                "cache": {
                    "type": "none"
                },
                "exposed_form": {
                    "type": "basic"
                },
                "pager": {
                    "type": "full"
                },
                "style_plugin": "table",
                "row_plugin": "fields",
                "fields": {
                    "created": {
                        "id": "created",
                        "table": "node",
                        "field": "created",
                        "relationship": "none",
                        "group_type": "group",
                        "ui_name": "",
                        "label": "Date",
                        "exclude": 0,
                        "alter": {
                            "alter_text": 0,
                            "text": "",
                            "make_link": 0,
                            "path": "",
                            "absolute": 0,
                            "external": 0,
                            "replace_spaces": 0,
                            "path_case": "none",
                            "trim_whitespace": 0,
                            "alt": "",
                            "rel": "",
                            "link_class": "",
                            "prefix": "",
                            "suffix": "",
                            "target": "",
                            "nl2br": 0,
                            "max_length": "",
                            "word_boundary": 1,
                            "ellipsis": 1,
                            "more_link": 0,
                            "more_link_text": "",
                            "more_link_path": "",
                            "strip_tags": 0,
                            "trim": 0,
                            "preserve_tags": "",
                            "html": 0
                        },
                        "element_type": "",
                        "element_class": "",
                        "element_label_type": "",
                        "element_label_class": "",
                        "element_label_colon": 1,
                        "element_wrapper_type": "",
                        "element_wrapper_class": "",
                        "element_default_classes": 1,
                        "empty": "",
                        "hide_empty": 0,
                        "empty_zero": 0,
                        "hide_alter_empty": 1,
                        "date_format": "short",
                        "custom_date_format": "",
                        "timezone": ""
                    },
                    "name": {
                        "id": "name",
                        "table": "users",
                        "field": "name",
                        "relationship": "uid",
                        "group_type": "group",
                        "ui_name": "",
                        "label": "Author",
                        "exclude": 1,
                        "alter": {
                            "alter_text": 0,
                            "text": "",
                            "make_link": 0,
                            "path": "",
                            "absolute": 0,
                            "external": 0,
                            "replace_spaces": 0,
                            "path_case": "none",
                            "trim_whitespace": 0,
                            "alt": "",
                            "rel": "",
                            "link_class": "",
                            "prefix": "",
                            "suffix": "",
                            "target": "",
                            "nl2br": 0,
                            "max_length": "",
                            "word_boundary": 1,
                            "ellipsis": 1,
                            "more_link": 0,
                            "more_link_text": "",
                            "more_link_path": "",
                            "strip_tags": 0,
                            "trim": 0,
                            "preserve_tags": "",
                            "html": 0
                        },
                        "element_type": "",
                        "element_class": "",
                        "element_label_type": "",
                        "element_label_class": "",
                        "element_label_colon": 1,
                        "element_wrapper_type": "",
                        "element_wrapper_class": "",
                        "element_default_classes": 1,
                        "empty": "",
                        "hide_empty": 0,
                        "empty_zero": 0,
                        "hide_alter_empty": 1,
                        "link_to_user": 0,
                        "overwrite_anonymous": 0,
                        "anonymous_text": "",
                        "format_username": 1
                    },
                    "type": {
                        "id": "type",
                        "table": "node",
                        "field": "type",
                        "relationship": "none",
                        "group_type": "group",
                        "ui_name": "",
                        "label": "Type",
                        "exclude": 1,
                        "alter": {
                            "alter_text": 0,
                            "text": "",
                            "make_link": 0,
                            "path": "",
                            "absolute": 0,
                            "external": 0,
                            "replace_spaces": 0,
                            "path_case": "none",
                            "trim_whitespace": 0,
                            "alt": "",
                            "rel": "",
                            "link_class": "",
                            "prefix": "",
                            "suffix": "",
                            "target": "",
                            "nl2br": 0,
                            "max_length": "",
                            "word_boundary": 1,
                            "ellipsis": 1,
                            "more_link": 0,
                            "more_link_text": "",
                            "more_link_path": "",
                            "strip_tags": 0,
                            "trim": 0,
                            "preserve_tags": "",
                            "html": 0
                        },
                        "element_type": "",
                        "element_class": "",
                        "element_label_type": "",
                        "element_label_class": "",
                        "element_label_colon": 1,
                        "element_wrapper_type": "",
                        "element_wrapper_class": "",
                        "element_default_classes": 1,
                        "empty": "",
                        "hide_empty": 0,
                        "empty_zero": 0,
                        "hide_alter_empty": 1,
                        "link_to_node": 0,
                        "machine_name": 0
                    },
                    "title": {
                        "id": "title",
                        "table": "node",
                        "field": "title",
                        "relationship": "none",
                        "group_type": "group",
                        "ui_name": "",
                        "label": "",
                        "exclude": 1,
                        "alter": {
                            "alter_text": 0,
                            "text": "",
                            "make_link": 0,
                            "path": "",
                            "absolute": 0,
                            "external": 0,
                            "replace_spaces": 0,
                            "path_case": "none",
                            "trim_whitespace": 0,
                            "alt": "",
                            "rel": "",
                            "link_class": "",
                            "prefix": "",
                            "suffix": "",
                            "target": "",
                            "nl2br": 0,
                            "max_length": "",
                            "word_boundary": 0,
                            "ellipsis": 0,
                            "more_link": 0,
                            "more_link_text": "",
                            "more_link_path": "",
                            "strip_tags": 0,
                            "trim": 0,
                            "preserve_tags": "",
                            "html": 0
                        },
                        "element_type": "",
                        "element_class": "",
                        "element_label_type": "",
                        "element_label_class": "",
                        "element_label_colon": false,
                        "element_wrapper_type": "",
                        "element_wrapper_class": "",
                        "element_default_classes": 1,
                        "empty": "",
                        "hide_empty": 0,
                        "empty_zero": 0,
                        "hide_alter_empty": 1,
                        "link_to_node": 1
                    },
                    "nothing": {
                        "id": "nothing",
                        "table": "views",
                        "field": "nothing",
                        "relationship": "none",
                        "group_type": "group",
                        "ui_name": "",
                        "label": "Message",
                        "exclude": 0,
                        "alter": {
                            "alter_text": true,
                            "text": "[name] created the [type] <strong>[title]</strong>",
                            "make_link": 0,
                            "path": "",
                            "absolute": 0,
                            "external": 0,
                            "replace_spaces": 0,
                            "path_case": "none",
                            "trim_whitespace": 0,
                            "alt": "",
                            "rel": "",
                            "link_class": "",
                            "prefix": "",
                            "suffix": "",
                            "target": "",
                            "nl2br": 0,
                            "max_length": "",
                            "word_boundary": 1,
                            "ellipsis": 1,
                            "more_link": 0,
                            "more_link_text": "",
                            "more_link_path": "",
                            "strip_tags": 0,
                            "trim": 0,
                            "preserve_tags": "",
                            "html": 0
                        },
                        "element_type": "",
                        "element_class": "",
                        "element_label_type": "",
                        "element_label_class": "",
                        "element_label_colon": 1,
                        "element_wrapper_type": "",
                        "element_wrapper_class": "",
                        "element_default_classes": 1,
                        "empty": "",
                        "hide_empty": 0,
                        "empty_zero": 0,
                        "hide_alter_empty": 0
                    }
                },
                "filters": {
                    "status": {
                        "value": 1,
                        "table": "node",
                        "field": "status",
                        "id": "status",
                        "expose": {
                            "operator": false
                        },
                        "group": 1
                    }
                },
                "sorts": {
                    "created": {
                        "id": "created",
                        "table": "node",
                        "field": "created",
                        "order": "DESC"
                    }
                },
                "style_options": {
                    "grouping": [],
                    "row_class": "",
                    "default_row_class": 1,
                    "row_class_special": 1,
                    "override": 1,
                    "sticky": 0,
                    "caption": "",
                    "summary": "",
                    "columns": {
                        "title": "title"
                    },
                    "info": {
                        "title": {
                            "sortable": 0,
                            "default_sort_order": "asc",
                            "align": "",
                            "separator": "",
                            "empty_column": 0
                        }
                    },
                    "default": "-1",
                    "empty_table": 0
                },
                "filter_groups": {
                    "operator": "AND",
                    "groups": {
                        "1": "AND"
                    }
                },
                "relationships": {
                    "uid": {
                        "id": "uid",
                        "table": "node",
                        "field": "uid",
                        "relationship": "none",
                        "group_type": "group",
                        "ui_name": "",
                        "label": "Author",
                        "required": 0
                    }
                }
            }
        }
    }
}

Thank you very much! Looks great!

A probably tricky add-on:
Is it possible to also display new comments within this view?
I mean not as a separate block or extra view, but directly in this view, sorted under the corresponding date?

For example:
06.05.2025 - 13:55     admin created the Page Test2
06.05.2025 - 13:54     admin added a comment to the Page Test1: My new Comment
06.05.2025 - 13:53     admin created the Page Test1
 

Olafski's picture

Yes, this may be tricky. It's however easy to get comment data in a Content view: After adding the Relationship "Comments of the node" you will be able to choose fields like "Comment: Post date" or "Comment: Author".

The tricky part is then to get the Comment information sorted between the Content related rows. At the moment, I have no time to dig deeper.