Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの
Revision | be12abaf66f96316f1173cd83d8db1bfd831001c (tree) |
---|---|
Time | 2006-11-29 14:53:45 |
Author | shizuki <shizuki@1ca2...> |
Commiter | shizuki |
fix short open tag
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@501 1ca29b6e-896d-4ea0-84a5-967f57386b96
@@ -1,109 +1,65 @@ | ||
1 | -<? | |
1 | +<?php | |
2 | 2 | |
3 | 3 | class NP_CommentEdit extends NucleusPlugin |
4 | 4 | { |
5 | 5 | |
6 | 6 | function getName() |
7 | - { | |
7 | + { // name of plugin | |
8 | 8 | return 'Comment Editable'; |
9 | 9 | } |
10 | - | |
10 | + | |
11 | 11 | function getAuthor() |
12 | - { | |
12 | + { // author of plugin | |
13 | 13 | return 'nakahara21'; |
14 | 14 | } |
15 | - | |
15 | + | |
16 | 16 | function getURL() |
17 | - { | |
18 | - return 'http://nakahara21.com'; | |
17 | + { // an URL to the plugin website | |
18 | + return 'http://japan.nucleuscms.org/wiki/plugins:commentedit'; | |
19 | 19 | } |
20 | - | |
20 | + | |
21 | 21 | function getVersion() |
22 | - { | |
22 | + { // version of the plugin | |
23 | 23 | return '0.3'; |
24 | 24 | } |
25 | - | |
25 | + | |
26 | + // a description to be shown on the installed plugins listing | |
26 | 27 | function getDescription() |
27 | - { | |
28 | + { | |
28 | 29 | return 'Comment Editable'; |
29 | 30 | } |
30 | 31 | |
31 | 32 | function supportsFeature($what) |
32 | 33 | { |
33 | - switch ($what) { | |
34 | + switch($what){ | |
34 | 35 | case 'SqlTablePrefix': |
35 | 36 | return 1; |
36 | 37 | default: |
37 | 38 | return 0; |
38 | 39 | } |
39 | 40 | } |
40 | -//__________________________________________ | |
41 | -/* | |
42 | - function install() { | |
43 | - } | |
44 | - | |
45 | - function uninstall() { | |
46 | - } | |
47 | - | |
48 | - function getTableList() { | |
49 | - return array(sql_table(plug_QQQQQ),sql_table(plug_QQQQQ_cache)); | |
50 | - } | |
51 | - | |
52 | -//__________________________________________ | |
53 | - | |
54 | - function getEventList() { | |
55 | - return array('PostAddItem','PreUpdateItem','AddItemFormExtras','EditItemFormExtras'); | |
56 | - } | |
57 | - | |
58 | - function event_PostAddItem($data) { | |
59 | - } | |
60 | - | |
61 | - function event_PreUpdateItem($data) { | |
62 | - } | |
63 | - | |
64 | - function event_AddItemFormExtras($data) { | |
65 | - } | |
66 | - | |
67 | - function event_EditItemFormExtras($data) { | |
68 | - } | |
69 | - | |
70 | -//__________________________________________ | |
71 | - | |
72 | - function init() { | |
73 | - | |
74 | - } | |
75 | -*/ | |
76 | -//__________________________________________ | |
77 | 41 | |
78 | 42 | function doTemplateCommentsVar(&$item, &$comment, $type, $param1 = 'QQQQQ') { |
79 | 43 | global $CONF, $member; |
80 | -/* | |
81 | - global $manager, $blog; | |
82 | - global $catid, $itemid; | |
83 | -*/ | |
84 | 44 | |
85 | 45 | if ($member->isLoggedIn()) { |
86 | - if ($member->canAlterComment($comment['commentid'])) { | |
87 | - echo '<small class="commedit">'; | |
88 | - echo '<a href="'; | |
89 | - echo $CONF['AdminURL'] . 'index.php?action=commentedit&commentid=' . intval($comment['commentid']); | |
90 | - echo '" target="_blank">[edit]</a>'; | |
91 | - echo ' <a href="'; | |
92 | - echo $CONF['AdminURL'] . 'index.php?action=commentdelete&commentid=' . intval($comment['commentid']); | |
93 | - echo '" target="_blank">[del]</a>'; | |
94 | - echo '</small>'; | |
46 | + $commentid = intval($comment['commentid']); | |
47 | + if ($member->canAlterComment($commentid)) { | |
48 | + $editLink = $CONF['AdminURL'] | |
49 | + . 'index.php?action=commentedit&commentid=' | |
50 | + . $commentid; | |
51 | + $delLink = $CONF['AdminURL'] | |
52 | + . 'index.php?action=commentdelete&commentid=' | |
53 | + . $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" | |
59 | + . "</small>\n"; | |
60 | + echo $printData; | |
95 | 61 | } |
96 | 62 | } |
97 | - | |
98 | - } | |
99 | - //__________________________________________ | |
100 | - | |
101 | -/* | |
102 | - function doAction($type) { | |
103 | - echo 'QQQQQ'; | |
104 | 63 | } |
105 | -*/ | |
106 | - //__________________________________________ | |
107 | 64 | |
108 | 65 | } |
109 | -?> | |
\ No newline at end of file |
@@ -1,4 +1,4 @@ | ||
1 | -<? | |
1 | +<?php | |
2 | 2 | |
3 | 3 | class NP_DateLink extends NucleusPlugin |
4 | 4 | { |