• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-plugins: Commit

Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの


Commit MetaInfo

Revisionbe12abaf66f96316f1173cd83d8db1bfd831001c (tree)
Time2006-11-29 14:53:45
Authorshizuki <shizuki@1ca2...>
Commitershizuki

Log Message

fix short open tag

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@501 1ca29b6e-896d-4ea0-84a5-967f57386b96

Change Summary

Incremental Difference

--- a/trunk/NP_CommentEdit/NP_CommentEdit.php
+++ b/trunk/NP_CommentEdit/NP_CommentEdit.php
@@ -1,109 +1,65 @@
1-<?
1+<?php
22
33 class NP_CommentEdit extends NucleusPlugin
44 {
55
66 function getName()
7- {
7+ { // name of plugin
88 return 'Comment Editable';
99 }
10-
10+
1111 function getAuthor()
12- {
12+ { // author of plugin
1313 return 'nakahara21';
1414 }
15-
15+
1616 function getURL()
17- {
18- return 'http://nakahara21.com';
17+ { // an URL to the plugin website
18+ return 'http://japan.nucleuscms.org/wiki/plugins:commentedit';
1919 }
20-
20+
2121 function getVersion()
22- {
22+ { // version of the plugin
2323 return '0.3';
2424 }
25-
25+
26+ // a description to be shown on the installed plugins listing
2627 function getDescription()
27- {
28+ {
2829 return 'Comment Editable';
2930 }
3031
3132 function supportsFeature($what)
3233 {
33- switch ($what) {
34+ switch($what){
3435 case 'SqlTablePrefix':
3536 return 1;
3637 default:
3738 return 0;
3839 }
3940 }
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-//__________________________________________
7741
7842 function doTemplateCommentsVar(&$item, &$comment, $type, $param1 = 'QQQQQ') {
7943 global $CONF, $member;
80-/*
81- global $manager, $blog;
82- global $catid, $itemid;
83-*/
8444
8545 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&amp;commentid='
50+ . $commentid;
51+ $delLink = $CONF['AdminURL']
52+ . 'index.php?action=commentdelete&amp;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;
9561 }
9662 }
97-
98- }
99- //__________________________________________
100-
101-/*
102- function doAction($type) {
103- echo 'QQQQQ';
10463 }
105-*/
106- //__________________________________________
10764
10865 }
109-?>
\ No newline at end of file
--- a/trunk/NP_DateLink/NP_DateLink.php
+++ b/trunk/NP_DateLink/NP_DateLink.php
@@ -1,4 +1,4 @@
1-<?
1+<?php
22
33 class NP_DateLink extends NucleusPlugin
44 {
Show on old repository browser