OSDN Git Service

* The experimental society PHP Version: 5.2.6/MySQL Server Version (client): (5...
authorshizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 7 Jul 2008 15:42:54 +0000 (15:42 +0000)
committershizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 7 Jul 2008 15:42:54 +0000 (15:42 +0000)
* The normal movement is confirmed.
* The SQL correction/behavior when installing, is changed a little.
* event_PostDeleteCommnent addition * It's corrected when being off login time and secret mode-lessly, so as not to take out a check box.
* NP_OpenId is indispensable in the present.
* NP_znSpecialTemplateParts is indispensable.
* It's expected to add the setting which will establish a password at the time of contribution without NP_OpenId and make it hidden from now on.
* It's RC edition, so please cooperate in the one with the environment.

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

trunk/NP_EzComment2/NP_EzComment2.php
trunk/NP_EzComment2/ezcomment2/language/english.php
trunk/NP_EzComment2/ezcomment2/language/japanese-euc.php
trunk/NP_EzComment2/ezcomment2/language/japanese-utf8.php
trunk/NP_EzComment2/ezcomment2/np_openid/form_english.html
trunk/NP_EzComment2/ezcomment2/np_openid/form_japanese-euc.html
trunk/NP_EzComment2/ezcomment2/np_openid/form_japanese-utf8.html
trunk/NP_EzComment2/ezcomment2/np_openid/loggedin_japanese-euc.html
trunk/NP_EzComment2/ezcomment2/skinbackup.xml

index 20306a3..8b47f26 100644 (file)
@@ -12,7 +12,7 @@
  * @author    shizuki
  * @copyright 2008 shizuki
  * @license   http://www.gnu.org/licenses/gpl.txt  GNU GENERAL PUBLIC LICENSE Version 2, June 1991
- * @version   $Date: 2008-07-07 10:24:00 $ $Revision: 1.7 $
+ * @version   $Date: 2008-07-07 15:42:54 $ $Revision: 1.8 $
  * @link      http://japan.nucleuscms.org/wiki/plugins:showblogs
  * @since     File available since Release 1.0
  */
  * version history
  *
  * $Log: not supported by cvs2svn $
+ * Revision 1.7  2008/07/07 10:24:00  shizuki
+ * * Still, the human sacrifice test version.
+ * * A template was separated for for index pages and item page.
+ * * Subdivision of the showComment() function.
+ * * It's changed so as not to fly to an indication part for indication in case of and OpenID of anything but the first item of an index page.
+ * * A profile change part besides the first item of an index page is being adjusted.
+ *
  **/
 
 class NP_EzComment2 extends NucleusPlugin
@@ -91,7 +98,7 @@ class NP_EzComment2 extends NucleusPlugin
        function getPluginDep()
        {
                return array(
-                       'NP_OpenIdt',
+                       'NP_OpenId',
                        'NP_znSpecialTemplateParts',
                );
        }
@@ -106,7 +113,7 @@ class NP_EzComment2 extends NucleusPlugin
         */
        function getVersion()
        {
-               return '$Date: 2008-07-07 10:24:00 $ $Revision: 1.7 $';
+               return '$Date: 2008-07-07 15:42:54 $ $Revision: 1.8 $';
        }
 
        // }}}
@@ -155,6 +162,7 @@ class NP_EzComment2 extends NucleusPlugin
                return array(
                        'FormExtra',
                        'PostAddComment',
+                       'PostDeleteComment',
                );
        }
 
@@ -207,19 +215,19 @@ class NP_EzComment2 extends NucleusPlugin
                                $message = implode("<br />\n", $aErrors);
                                doError($message);
                        }
-                       $this->createBlogOption('secret',     _NP_EZCOMMENT2_OP_SECRETMODE,  'yesno', 'no');
-                       $this->createBlogOption('secComment', _NP_EZCOMMENT2_OP_SUBSTIUTION, 'text',  _NP_EZCOMMENT2_OP_SUBSTIUTION_VAL);
-                       $this->createBlogOption('secLabel',   _NP_EZCOMMENT2_OP_CHECKLABEL,  'text',  _NP_EZCOMMENT2_OP_CHECKLABEL_VAL);
-                       $this->createOption('tabledel',       _NP_EZCOMMENT2_OP_DROPTABLE,   'yesno', 'no');
-                       $sql = 'CREATE TABLE IF NOT EXISTS %s ('
-                                . '`comid`  int(11)  NOT NULL, '
-                                . '`secflg` tinyint(1)   NULL, '
-                                . '`module` varchar(15)  NULL, '
-                                . '`userID` varchar(255) NULL, '
-                                . 'PRIMARY KEY(`comid`) );';
-                       sql_query(sprintf($sql, sql_table('plug_ezcomment2')));
-                       $this->updateTable();
                }
+               $this->createBlogOption('secret',     _NP_EZCOMMENT2_OP_SECRETMODE,  'yesno', 'yes');
+               $this->createBlogOption('secComment', _NP_EZCOMMENT2_OP_SUBSTIUTION, 'text',  _NP_EZCOMMENT2_OP_SUBSTIUTION_VAL);
+               $this->createBlogOption('secLabel',   _NP_EZCOMMENT2_OP_CHECKLABEL,  'text',  _NP_EZCOMMENT2_OP_CHECKLABEL_VAL);
+               $this->createOption('tabledel',       _NP_EZCOMMENT2_OP_DROPTABLE,   'yesno', 'yes');
+               $sql = 'CREATE TABLE IF NOT EXISTS %s ('
+                        . '`comid`  int(11)  NOT NULL, '
+                        . '`secflg` tinyint(1)   NULL, '
+                        . '`module` varchar(15)  NULL, '
+                        . '`userID` varchar(255) NULL, '
+                        . 'PRIMARY KEY(`comid`) );';
+               sql_query(sprintf($sql, sql_table('plug_ezcomment2')));
+               $this->updateTable();
        }
 
        // }}}
@@ -271,20 +279,22 @@ class NP_EzComment2 extends NucleusPlugin
                global $member;
                switch (true) {
                        case $member->isLoggedin():
-                               $userID = $member->getID();
-                               $module = 'Nucleus';
+                               $userID = '"' . $member->getID() . '"';
+                               $module = '"Nucleus"';
                                break;
                        case ($this->authOpenID && $this->authOpenID->isLoggedin()):
-                               $userID = $this->authOpenID->loggedinUser['identity'];
-                               $module = 'OpenID';
+                               $userID = '"' . $this->authOpenID->loggedinUser['identity'] . '"';
+                               $module = '"OpenID"';
                                break;
                        default:
+                               $userID = 'NULL';
+                               $module = 'NULL';
                                break;
                }
                if (postVar('EzComment2_Secret')) {
                        $secCheck = 1;
                } else {
-                       $secCheck = null;
+                       $secCheck = 'NULL';
                }
                $sql = 'INSERT INTO ' . sql_table('plug_ezcomment2')
                         . ' (`comid`, `secflg`, `module`, `userID`) VALUES (%d, %d, %s, %s)';
@@ -292,6 +302,23 @@ class NP_EzComment2 extends NucleusPlugin
        }
 
        // }}}
+       // {{{ event_PostDeleteComment($data)
+
+       /**
+        * After a comment has been deleted from the database.
+        *
+        * @param  array
+        *                      commentid integer
+        * @return void.
+        */
+       function event_PostDeleteComment($data)
+       {
+               $sql = 'DELETE FROM ' . sql_table('plug_ezcomment2')
+                        . ' WHERE `comid` = %d LIMIT 1';
+               sql_query(sprintf($sql, $data['commentid']));
+       }
+
+       // }}}
        // {{{ event_FormExtra(&$data)
 
        /**
@@ -303,11 +330,12 @@ class NP_EzComment2 extends NucleusPlugin
         */
        function event_FormExtra(&$data)
        {
-               global $blogid;
+               global $member, $blogid;
                $this->numcalled++;
-               if ($blogid && $this->getBlogOption($blogid, 'secret') == 'yes') {
-                       echo '<br /><input type="checkbox" value="1" name="EzComment2_Secret" id="EzComment2_Secret_' . $this->numcalled . '" />';
-                       echo '<label for="EzComment2_Secret_' . $this->numcalled . '">'.$this->getBlogOption($bid, 'secLabel').'</label><br />';
+               if ($blogid && $this->getBlogOption($blogid, 'secret') == 'yes' &&
+                       ($member->isLoggedin() || ($this->authOpenID && $this->authOpenID->isLoggedin()))) {
+                               echo '<br /><input type="checkbox" value="1" name="EzComment2_Secret" id="EzComment2_Secret_' . $this->numcalled . '" />';
+                               echo '<label for="EzComment2_Secret_' . $this->numcalled . '">'.$this->getBlogOption($bid, 'secLabel').'</label><br />';
                }
        }
 
@@ -441,11 +469,13 @@ class NP_EzComment2 extends NucleusPlugin
         */
        function updateTable()
        {
-               $sql = 'SELECT cnumber FROM ' . sql_table('comment') . ' ORDER BY cnumber';
+               $sql = 'SELECT c.cnumber as cid FROM ' . sql_table('comment') . ' as c '
+                        . 'LEFT JOIN ' . sql_table('plug_ezcomment2') . ' as s '
+                        . 'ON c.cnumber=s.comid WHERE s.comid IS NULL';
                $res = sql_query($sql);
-               $sql = 'REPLACE INTO ' . sql_table('plug_ezcomment2') . '(`comid`) VALUES (%d)';
+               $sql = 'INSERT INTO ' . sql_table('plug_ezcomment2') . '(`comid`) VALUES (%d)';
                while ($cid = mysql_fetch_assoc($res)) {
-                       sql_query(sprintf($sql, $cid['cnumber']));
+                       sql_query(sprintf($sql, $cid['cid']));
                }
        }
 
@@ -511,7 +541,7 @@ class NP_EzComment2 extends NucleusPlugin
         * @param  string
         * @return string
         */
-       function checkDestinationurl($destinationurl)
+       function checkDestinationurl($destinationurl, $iid, $cid = 0, $scid = 0)
        {
                if (stristr($destinationurl, 'action.php') || empty($destinationurl)) {
                        if (stristr($destinationurl, 'action.php')) {
@@ -519,13 +549,14 @@ class NP_EzComment2 extends NucleusPlugin
                                                        . ' Moved to be a global setting instead.';
                                ACTIONLOG::add(WARNING, $logMessage);
                        }
-                       if ($catid) {
-                               $linkparams['catid'] = intval($catid);
+                       if ($cid) {
+                               $linkparams['catid'] = intval($cid);
                        }
-                       if ($manager->pluginInstalled('NP_MultipleCategories') && $subcatid) {
-                               $linkparams['subcatid'] = intval($subcatid);
+                       global $manager;
+                       if ($manager->pluginInstalled('NP_MultipleCategories') && $scid) {
+                               $linkparams['subcatid'] = intval($scid);
                        }
-                       $destinationurl = createItemLink($commentItem->itemid, $linkparams);
+                       $destinationurl = createItemLink(intval($iid), $linkparams);
                } else {
                        $destinationurl = preg_replace('|[^a-z0-9-~+_.?#=&;,/:@%]|i', '', $destinationurl);
                }
@@ -583,7 +614,7 @@ class NP_EzComment2 extends NucleusPlugin
                if (!$member->isLoggedIn() && !$b->commentsEnabled()) {
                        return;
                }
-               $destinationurl = $this->checkDestinationurl($destinationurl);
+               $destinationurl = $this->checkDestinationurl($destinationurl, $commentItem->itemid, $catid, $subcatid);
                list($user, $userid, $email, $body) = $this->getCommentatorInfo();
 
                $checked = cookieVar($CONF['CookiePrefix'] .'comment_user') ? 'checked="checked" ' : '';
@@ -761,7 +792,7 @@ class NP_EzComment2 extends NucleusPlugin
         * @param  string
         * @return array
         */
-       function changeCommentSet($comment, $blogURL, $substitution)
+       function changeCommentSet(&$comment, $blogURL, $substitution)
        {
                $comment['body']     = $substitution;
                $comment['userid']   = $blogURL;
@@ -804,7 +835,7 @@ class NP_EzComment2 extends NucleusPlugin
                           . 's.userID  as identity '
                           . ' FROM ' . sql_table('comment') . ' as c '
                           . ' LEFT OUTER JOIN ' . sql_table('plug_ezcomment2') . ' as s '
-                          . ' ON c.cnumber = s.comid '
+                          . ' ON c.cnumber = s.comid '
                           . ' WHERE c.citem = ' . intval($iid)
                           . ' ORDER BY c.ctime '
                           . $order;
index c0b12b1..b168d2e 100644 (file)
@@ -10,9 +10,9 @@ define('_NP_EZCOMMENT2_FORM_LOGGEDIN_IDX',    'Comment form for loggedin(for ide
 define('_NP_EZCOMMENT2_FORM_NOTLOGGEDIN_IDX', 'Comment form for not loggedin(for idex page)');
 define('_NP_EZCOMMENT2_FORM_LOGGEDIN_ITM',    'Comment form for loggedin(for item page)');
 define('_NP_EZCOMMENT2_FORM_NOTLOGGEDIN_ITM', 'Comment form for not loggedin(for item page)');
-define('COMMENTS_BODY_IDX',                   'Comments body(for idex page)');
-define('COMMENTS_HEADER_IDX',                 'Comments header(for idex page)');
-define('COMMENTS_FOOTER_IDX',                 'Comments footer(for idex page)');
+define('_NP_EZCOMMENT2_COMMENTS_BODY_IDX',    'Comments body(for idex page)');
+define('_NP_EZCOMMENT2_COMMENTS_HEADER_IDX',  'Comments header(for idex page)');
+define('_NP_EZCOMMENT2_COMMENTS_FOOTER_IDX',  'Comments footer(for idex page)');
 
 define('_NP_EZCOMMENT2_OP_SECRETMODE',      'Is the secret mode made effective ?');
 define('_NP_EZCOMMENT2_OP_SUBSTIUTION',     'Substitution seacret comment.');
index 9ddab67..4667ce2 100644 (file)
@@ -9,9 +9,9 @@ define('_NP_EZCOMMENT2_FORM_LOGGEDIN_IDX',    '
 define('_NP_EZCOMMENT2_FORM_NOTLOGGEDIN_IDX', '¥í¥°¥¤¥ó¤·¤Æ¤¤¤Ê¤¤¥á¥ó¥Ð¡¼¡¢¤Þ¤¿¤Ï¥²¥¹¥È¤Ëɽ¼¨¤µ¤ì¤ë¥Õ¥©¡¼¥à(¡Ø¥á¥¤¥ó¤ÎÌܼ¡¥Ú¡¼¥¸¡ÙÍÑ)');
 define('_NP_EZCOMMENT2_FORM_LOGGEDIN_ITM',    '¥á¥ó¥Ð¡¼¤¬¥í¥°¥¤¥ó¤·¤Æ¤¤¤ë¤È¤­¤Ëɽ¼¨¤µ¤ì¤ë¥Õ¥©¡¼¥à(¡Ø¸ÄÊÌ¥¢¥¤¥Æ¥à¥Ú¡¼¥¸¡ÙÍÑ)');
 define('_NP_EZCOMMENT2_FORM_NOTLOGGEDIN_ITM', '¥í¥°¥¤¥ó¤·¤Æ¤¤¤Ê¤¤¥á¥ó¥Ð¡¼¡¢¤Þ¤¿¤Ï¥²¥¹¥È¤Ëɽ¼¨¤µ¤ì¤ë¥Õ¥©¡¼¥à(¡Ø¸ÄÊÌ¥¢¥¤¥Æ¥à¥Ú¡¼¥¸¡ÙÍÑ)');
-define('COMMENTS_BODY_IDX',                   '¥³¥á¥ó¥È¤ÎËÜÂÎ(¡Ø¥á¥¤¥ó¤ÎÌܼ¡¥Ú¡¼¥¸¡ÙÍÑ)');
-define('COMMENTS_HEADER_IDX',                 '¥³¥á¥ó¥È¤Î¥Ø¥Ã¥À¡¼(¡Ø¥á¥¤¥ó¤ÎÌܼ¡¥Ú¡¼¥¸¡ÙÍÑ)');
-define('COMMENTS_FOOTER_IDX',                 '¥³¥á¥ó¥È¤Î¥Õ¥Ã¥¿¡¼(¡Ø¥á¥¤¥ó¤ÎÌܼ¡¥Ú¡¼¥¸¡ÙÍÑ)');
+define('_NP_EZCOMMENT2_COMMENTS_BODY_IDX',    '¥³¥á¥ó¥È¤ÎËÜÂÎ(¡Ø¥á¥¤¥ó¤ÎÌܼ¡¥Ú¡¼¥¸¡ÙÍÑ)');
+define('_NP_EZCOMMENT2_COMMENTS_HEADER_IDX',  '¥³¥á¥ó¥È¤Î¥Ø¥Ã¥À¡¼(¡Ø¥á¥¤¥ó¤ÎÌܼ¡¥Ú¡¼¥¸¡ÙÍÑ)');
+define('_NP_EZCOMMENT2_COMMENTS_FOOTER_IDX',  '¥³¥á¥ó¥È¤Î¥Õ¥Ã¥¿¡¼(¡Ø¥á¥¤¥ó¤ÎÌܼ¡¥Ú¡¼¥¸¡ÙÍÑ)');
 
 define('_NP_EZCOMMENT2_OP_SECRETMODE',       '\8e¢¥Ê¥¤¥·¥ç¥³¥á¥ó¥È\8e£¤òÍ­¸ú¤Ë¤·¤Þ¤¹¤«¡©');
 define('_NP_EZCOMMENT2_OP_SUBSTIUTION',      '\8e¢¥Ê¥¤¥·¥ç¥³¥á¥ó¥È\8e£¤ÎÂåÂØ¥³¥á¥ó¥È');
index 451df94..92e76b2 100644 (file)
@@ -9,9 +9,9 @@ define('_NP_EZCOMMENT2_FORM_LOGGEDIN_IDX',    'メンバーがログインして
 define('_NP_EZCOMMENT2_FORM_NOTLOGGEDIN_IDX', 'ログインしていないメンバー、またはゲストに表示されるフォーム(『メインの目次ページ』用)');
 define('_NP_EZCOMMENT2_FORM_LOGGEDIN_ITM',    'メンバーがログインしているときに表示されるフォーム(『個別アイテムページ』用)');
 define('_NP_EZCOMMENT2_FORM_NOTLOGGEDIN_ITM', 'ログインしていないメンバー、またはゲストに表示されるフォーム(『個別アイテムページ』用)');
-define('COMMENTS_BODY_IDX',                   'コメントの本体(『メインの目次ページ』用)');
-define('COMMENTS_HEADER_IDX',                 'コメントのヘッダー(『メインの目次ページ』用)');
-define('COMMENTS_FOOTER_IDX',                 'コメントのフッター(『メインの目次ページ』用)');
+define('_NP_EZCOMMENT2_COMMENTS_BODY_IDX',    'コメントの本体(『メインの目次ページ』用)');
+define('_NP_EZCOMMENT2_COMMENTS_HEADER_IDX',  'コメントのヘッダー(『メインの目次ページ』用)');
+define('_NP_EZCOMMENT2_COMMENTS_FOOTER_IDX',  'コメントのフッター(『メインの目次ページ』用)');
 
 define('_NP_EZCOMMENT2_OP_SECRETMODE',       '「ナイショコメント」を有効にしますか?');
 define('_NP_EZCOMMENT2_OP_SUBSTIUTION',      '「ナイショコメント」の代替コメント');
index e900491..e2cb88a 100644 (file)
@@ -1,19 +1,19 @@
 <!-- Dialog -->
 <div class="yui-skin-sam">
-<div id="profile">
-       <div class="hd">Please enter your profile</div>
-       <div class="bd">
-               <form method="POST" action="{{updateUrl}}?action=plugin">
-                       <label for="nick">Nickname:</label><input type="textbox" name="nick" value="{{nick}}" />
-                       <div class="clear"></div>
-                       <label for="email">E-mail:</label><input type="textbox" name="email" value="{{email}}"/>
-                       <div class="clear"></div>
-                       <input type="hidden" name="name" value="OpenId">
-                       <input type="hidden" name="type" value="updateProfile">
-               </form>
+       <div id="profile">
+               <div class="hd">Please enter your profile</div>
+               <div class="bd">
+                       <form method="POST" action="{{updateUrl}}?action=plugin">
+                               <label for="nick">Nickname:</label><input type="text" name="nick" value="{{nick}}" />
+                               <div class="clear"></div>
+                               <label for="email">E-mail:</label><input type="text" name="email" value="{{email}}"/>
+                               <div class="clear"></div>
+                               <input type="hidden" name="name" value="OpenId">
+                               <input type="hidden" name="type" value="updateProfile">
+                       </form>
+               </div>
        </div>
 </div>
-</div>
 
 <!-- response -->
 <div id="resp"></div>
index 2b9bf0d..b904bfb 100644 (file)
@@ -1,12 +1,12 @@
 <!-- Dialog -->
 <div class="yui-skin-sam">
 <div id="profile">
-       <div class="hd">¥×¥í¥Õ¥£¡¼¥ë¹¹¿·</div>
+       <div class="hd">プロフィール更新</div>
        <div class="bd">
                <form method="POST" action="{{updateUrl}}?action=plugin">
-                       <label for="nick">¤ªÌ¾Á°:</label><input type="textbox" name="nick" value="{{nick}}" />
+                       <label for="nick">お名前:</label><input type="text" name="nick" value="{{nick}}" />
                        <div class="clear"></div>
-                       <label for="email">E-mail:</label><input type="textbox" name="email" value="{{email}}"/>
+                       <label for="email">E-mail:</label><input type="text" name="email" value="{{email}}"/>
                        <div class="clear"></div>
                        <input type="hidden" name="name" value="OpenId">
                        <input type="hidden" name="type" value="updateProfile">
index 4f1a849..b904bfb 100644 (file)
@@ -4,9 +4,9 @@
        <div class="hd">プロフィール更新</div>
        <div class="bd">
                <form method="POST" action="{{updateUrl}}?action=plugin">
-                       <label for="nick">お名前:</label><input type="textbox" name="nick" value="{{nick}}" />
+                       <label for="nick">お名前:</label><input type="text" name="nick" value="{{nick}}" />
                        <div class="clear"></div>
-                       <label for="email">E-mail:</label><input type="textbox" name="email" value="{{email}}"/>
+                       <label for="email">E-mail:</label><input type="text" name="email" value="{{email}}"/>
                        <div class="clear"></div>
                        <input type="hidden" name="name" value="OpenId">
                        <input type="hidden" name="type" value="updateProfile">
index 22d7ae4..c6f49c3 100644 (file)
@@ -1,3 +1,3 @@
-<p>OpenID¤Ç¥í¥°¥¤¥óÃæ¤Ç¤¹¡£(<a href="{{url|}}" rel="nofollow">¥í¥°¥¢¥¦¥È</a>)<br />
-OpenID identity: <img src="{{PluginURL}}openid/openid.png" /><strong>{{identity|}}</strong> <button id="show">¥×¥í¥Õ¥£¡¼¥ë¹¹¿·</button><br />
-¤â¤·¡¢Ì¾Á°¤äemail¤ÎÍ󤬶õÍó¤Î¾ì¹ç¤Ë¤Ï¥×¥í¥Õ¥£¡¼¥ë¹¹¿·¤«¤éÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£</p>
\ No newline at end of file
+<p>OpenIDでログイン中です。(<a href="{{url|}}" rel="nofollow">ログアウト</a>)<br />
+OpenID identity: <img src="{{PluginURL}}openid/openid.png" /><strong>{{identity|}}</strong> <button id="show">プロフィール更新</button><br />
+もし、名前やemailの欄が空欄の場合にはプロフィール更新から変更してください。</p>
\ No newline at end of file
index 39d7f93..0458f92 100644 (file)
@@ -7,15 +7,15 @@
 
        <template name="EzCommentTemplate">
                <description>Default EzComment Template</description>
-               <part name="FORM_LOGGEDIN_IDX"><![CDATA[<a class="nucleus_cf" id="nucleus_cf<itemid()%>"></a>
-<form method="post" action="#nucleus_cf<%itemid()%>">
+               <part name="FORM_LOGGEDIN_IDX"><![CDATA[<a class="nucleus_cf" id="nucleus_cf<%itemid%>"></a>
+<form method="post" action="#nucleus_cf<%itemid%>">
        <div class="commentform">
                <input type="hidden" name="action" value="addcomment" />
-               <input type="hidden" name="url" value="<formdata(destinationurl)%>" />
-               <input type="hidden" name="itemid" value="<itemid()%>" />
+               <input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
+               <input type="hidden" name="itemid" value="<%itemid%>" />
                <%errordiv()%>
-               <label for="nucleus_cf_body<itemid()%>"><%text(_COMMENTFORM_COMMENT)%></label>
-               <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body<itemid()%>"><%formdata(body)%></textarea>
+               <label for="nucleus_cf_body<%itemid%>"><%text(_COMMENTFORM_COMMENT)%></label>
+               <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body<%itemid%>"><%formdata(body)%></textarea>
                <%text(_COMMENTFORM_YOUARE)%> <%formdata(membername)%>
                <small>(<a href="<%self()%>?action=logout" title="<%text(_LOGOUT)%>"><%text(_LOGOUT)%></a>)</small>
                <input type="submit" alt="<%text(_COMMENTFORM_SUBMIT)%>" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />
 </form>
 ]]></part>
 
-               <part name="FORM_NOTLOGGEDIN_IDX"><![CDATA[<a class="nucleus_cf" id="nucleus_cf<itemid()%>"></a>
-<form method="post" action="#nucleus_cf<%itemid()%>">
+               <part name="FORM_NOTLOGGEDIN_IDX"><![CDATA[<a class="nucleus_cf" id="nucleus_cf<%itemid%>"></a>
+<form method="post" action="#nucleus_cf<%itemid%>">
        <div class="commentform">
                <input type="hidden" name="action" value="addcomment" />
                <input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
-               <input type="hidden" name="itemid" value="<%itemid()%>" />              <%errordiv()%>
-               <label for="nucleus_cf_body<%itemid()%>"><%text(_COMMENTFORM_COMMENT)%></label>
-               <textarea name="body" class="formfield nucleus_cf_body" cols="40" rows="10" id="nucleus_cf_body<%itemid()%>"><%formdata(body)%></textarea>
-               <label for="nucleus_cf_name<%itemid()%>"><%text(_COMMENTFORM_NAME)%></label>
-               <input name="user" size="40" maxlength="40" value="<%formdata(user)%>" class="formfield nucleus_cf_name" id="nucleus_cf_name<%itemid()%>" />
-               <label for="nucleus_cf_mail<%itemid()%>"><%text(_COMMENTFORM_MAIL)%></label>
-               <input name="userid" size="40" maxlength="60" value="<%formdata(userid)%>" class="formfield nucleus_cf_mail" id="nucleus_cf_mail<%itemid()%>" />
-               <label for="nucleus_cf_email<%itemid()%>"><%text(_COMMENTFORM_EMAIL)%></label>
-               <input name="email" size="40" maxlength="100" value="<%formdata(email)%>" class="formfield nucleus_cf_email" id="nucleus_cf_email<%itemid()%>" />
+               <input type="hidden" name="itemid" value="<%itemid%>" />                <%errordiv()%>
+               <label for="nucleus_cf_body<%itemid%>"><%text(_COMMENTFORM_COMMENT)%></label>
+               <textarea name="body" class="formfield nucleus_cf_body" cols="40" rows="10" id="nucleus_cf_body<%itemid%>"><%formdata(body)%></textarea>
+               <label for="nucleus_cf_name<%itemid%>"><%text(_COMMENTFORM_NAME)%></label>
+               <input name="user" size="40" maxlength="40" value="<%formdata(user)%>" class="formfield nucleus_cf_name" id="nucleus_cf_name<%itemid%>" />
+               <label for="nucleus_cf_mail<%itemid%>"><%text(_COMMENTFORM_MAIL)%></label>
+               <input name="userid" size="40" maxlength="60" value="<%formdata(userid)%>" class="formfield nucleus_cf_mail" id="nucleus_cf_mail<%itemid%>" />
+               <label for="nucleus_cf_email<%itemid%>"><%text(_COMMENTFORM_EMAIL)%></label>
+               <input name="email" size="40" maxlength="100" value="<%formdata(email)%>" class="formfield nucleus_cf_email" id="nucleus_cf_email<%itemid%>" />
                <%callback(FormExtra,commentform-notloggedin)%>
-               <input type="checkbox" value="1" name="remember" id="nucleus_cf_remember<%itemid()%>" <%formdata(rememberchecked)%> />
-               <label for="nucleus_cf_remember<%itemid()%>"><%text(_COMMENTFORM_REMEMBER)%></label>
+               <input type="checkbox" value="1" name="remember" id="nucleus_cf_remember<%itemid%>" <%formdata(rememberchecked)%> />
+               <label for="nucleus_cf_remember<%itemid%>"><%text(_COMMENTFORM_REMEMBER)%></label>
                <input type="submit" alt="<%text(_COMMENTFORM_SUBMIT)%>" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />
        </div>
 </form>
@@ -50,8 +50,8 @@
 <form method="post" action="#nucleus_cf">
        <div class="commentform">
                <input type="hidden" name="action" value="addcomment" />
-               <input type="hidden" name="url" value="<formdata(destinationurl)%>" />
-               <input type="hidden" name="itemid" value="<itemid()%>" />
+               <input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
+               <input type="hidden" name="itemid" value="<%itemid%>" />
                <%errordiv()%>
                <label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>
                <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"><%formdata(body)%></textarea>
@@ -68,7 +68,7 @@
        <div class="commentform">
                <input type="hidden" name="action" value="addcomment" />
                <input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
-               <input type="hidden" name="itemid" value="<%itemid()%>" />              <%errordiv()%>
+               <input type="hidden" name="itemid" value="<%itemid%>" />                <%errordiv()%>
                <label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>
                <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"><%formdata(body)%></textarea>
                <label for="nucleus_cf_name"><%text(_COMMENTFORM_NAME)%></label>
 </form>
 ]]></part>
 
+               <part name="COMMENTS_HEADER_IDX"><![CDATA[<div class="commentlist">
+--- <%viewparpost%> [ <a href="<%itemlink%>#comment">Show while sentence</a> ] ---
+<ul>]]></part>
+
                <part name="COMMENTS_BODY_IDX"><![CDATA[<li><a href="<%itemlink%>#c<%commentid%>"><%user(realname)%> : <%excerpt%></a></li>
 ]]></part>
 
                <part name="COMMENTS_FOOTER_IDX"><![CDATA[</ul>
 </div>]]></part>
 
-               <part name="COMMENTS_HEADER_IDX"><![CDATA[<div class="commentlist">
---- <%viewparpost%> [ <a href="<%itemlink%>#comment">Show while sentence</a> ] ---
-<ul>]]></part>
-
                <part name="COMMENTS_BODY"><![CDATA[<div class="itemcomment id<%memberid%>">
        <h3>
                <a href="<%userlinkraw%>" title="<%ip%> | Click to visit <%user%>'s website or send an email">