3 class NP_CommentEdit extends NucleusPlugin
8 return 'Comment Editable';
17 { // an URL to the plugin website
18 return 'http://japan.nucleuscms.org/wiki/plugins:commentedit';
22 { // version of the plugin
26 // a description to be shown on the installed plugins listing
27 function getDescription()
29 return 'Comment Editable';
32 function supportsFeature($what)
35 case 'SqlTablePrefix':
42 function doTemplateCommentsVar(&$item, &$comment, $type, $param1 = 'QQQQQ') {
43 global $CONF, $member;
45 if ($member->isLoggedIn()) {
46 $commentid = intval($comment['commentid']);
47 if ($member->canAlterComment($commentid)) {
48 $editLink = $CONF['AdminURL']
49 . 'index.php?action=commentedit&commentid='
51 $delLink = $CONF['AdminURL']
52 . 'index.php?action=commentdelete&commentid='
54 $printData = "<small>\n"
55 . '[ <a href="' . $editLink . '" target="_blank"> '
56 . _LISTS_EDIT . "</a> ]\n"
57 . '[ <a href="' . $delLink . '" target="_blank"> '
58 . _LISTS_DELETE . "</a> ]\n"