Comus demo

This is a demonstration of the yii2-comus comment-module for Yii2-sites.

The following users are registered on this site (there may be more as new users are registered).

Registered users

User name Full name Role
vincent Vincent the Visitor
amy Amy the Author
ed Ed the Editor
wendy Wendy the Weekend-editor
pam Pam the Publisher
mo Mo the Moderator moderator
sal Sal the Support Manager
alice Alice the Administrator admin, and therefore also a moderator

They all have the same password: '123456'. Feel free to log in as any of these users and explore her or his possibilities. If you log in as 'mo' or 'alice', you'll see a new menu item Comments. It leads to Comus' comment overview for moderators.

The rather silly Lucky Numbers in the site's top menu are invented to comment on.

Here are the Lucky Numbers, with Comus' CommentCount-widget:

Showing 1-18 of 18 items.
ed's LuckyNumber: 7
amy's LuckyNumber: 559
alice's LuckyNumber: 17923
pam's LuckyNumber: 20198
wendy's LuckyNumber: 54
ed's LuckyNumber: 26652
alice's LuckyNumber: 2
ed's LuckyNumber: 6
alice's LuckyNumber: 0
alice's LuckyNumber: 14
alice's LuckyNumber: 4523
alice's LuckyNumber: 149
amy's LuckyNumber: 546
alice's LuckyNumber: 691
alice's LuckyNumber: 31415
alice's LuckyNumber: 4
alice's LuckyNumber: 301
amy's LuckyNumber: 666

Look at some Lucky Numbers to get a feel for Comus in action.

<?= ListView::widget([
    'dataProvider' => $luckyNumbers,
    'itemView' => function ($model, $key, $index, $widget)  {
        $name = Html::a($model->createdBy->name, [ 'profile/view', 'id' => $model->created_by ]);
        $number = Html::a($model->number, [ 'lucky-number/view', 'id' => $key ]);
        $count = CommentCount::widget([
            'model' => $model
        ]);
        return "$name's LuckyNumber: <strong>{$number}</strong>&emsp;$count";
    }
]) ?>