Revision [16831]
This is an old revision of UserCommentsAction made by RskQrs on 2007-05-31 10:53:25.
UserComments Action
This action is meant as a module for the UserAdmin tool.
To use it as a standalone action simply add: {{usercomments user="UserName"}} in the page body.
To use it as a standalone action simply add: {{usercomments user="UserName"}} in the page body.
This action displays a list of pages commented by the current user or by any other registered user specified either via a user action parameter of via a user GET variable . If no user is specified and the current user is logged in it displays a list of comments by the current user.
Save the code below as actions/usercomments.php.
The action
Current version: 0.4Changes:
- Added documentation header;
- Initialized variables;
- User is checked in the following order: GET parameter, action parameter, current user;
To do:
- (Optionally) create a config option allowing admins to decide whether users can display a list of comments posted by other users;
actions/usercomments.php
%%(php)
<?php
$author =; #initializing variable
switch(true) {
case (isset($_GET['user'])