[ "ValueFunction" => function ($Item) { return StdLib::getPrettyTimestamp($Item->datePosted()); } ], "Subject" => [ "MaxLength" => 80, ], "Body" => [ "AllowHTML" => true, "MaxLength" => 320, ], "PosterName" => [ "Heading" => "Posted by", "ValueFunction" => function ($Item) { return $Item->posterName()." (".$Item->posterEmail().")"; } ], "Resource" => [ "Heading" => "About", "ValueFunction" => function ($Item) { if (!RecordFactory::recordExistsInAnySchema($Item->parentId())) { return "(unavailable)"; } $Record = new Record($Item->parentId()); return "getViewPageUrl()."\" target=\"_blank\">" .$Record->getMapped("Title").""; } ], ]; $ListUI = new ItemListUI($Fields); $ListUI->noItemsMessage("There are no new user comments."); $ListUI->baseLink($BaseLink); $ListUI->addActionButton("Edit/Delete", $EditLink, "pencil.png"); $SpammerLinkFunc = function ($Item) { return "index.php?P=CleanSpam&PI=".$Item->posterId() ."&RI=".$Item->parentId(); }; $ListUI->addActionButton("Spammer", $SpammerLinkFunc, "cross.png"); $ListUI->heading("Track User Comments"); if (!isset($H_ItemsPerPage)) { throw new Exception("Required variable \$H_ItemsPerPage is not initialized"); } $ListUI->itemsPerPage($H_ItemsPerPage); $ListUI->fieldsSortableByDefault(false); if (!isset($H_Messages)) { throw new Exception("Required variable \$H_Messages is not initialized"); } if (!isset($H_MessageCount)) { throw new Exception("Required variable \$H_MessageCount is not initialized"); } if (!isset($H_StartingIndex)) { throw new Exception("Required variable \$H_StartingIndex is not initialized"); } $ListUI->display($H_Messages, $H_MessageCount, $H_StartingIndex); ?>

Flagging a user as a spammer with the `Spammer` button will delete all their comments, remove their posting privilege, and disable their account.