[geeklog-hg] geeklog: Added a feature to show a link to the comment edit form...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Jun 22 00:12:53 EDT 2013


changeset 9111:952f21880172
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/952f21880172
user: dengen
date: Sat Jun 22 13:10:11 2013 +0900
description:
Added a feature to show a link to the comment edit form when you have "Comment on Same Page?" enabled (feature request #0001608)

diffstat:

 public_html/layout/denim/comment/commentbar.thtml            |  3 +++
 public_html/layout/modern_curve/comment/commentbar.thtml     |  5 +++++
 public_html/layout/professional/comment/commentbar.thtml     |  3 +++
 public_html/layout/professional_css/comment/commentbar.thtml |  5 +++++
 system/lib-comment.php                                       |  2 ++
 5 files changed, 18 insertions(+), 0 deletions(-)

diffs (70 lines):

diff -r 3ddc8f6f9196 -r 952f21880172 public_html/layout/denim/comment/commentbar.thtml
--- a/public_html/layout/denim/comment/commentbar.thtml	Fri Jun 21 15:32:22 2013 -0400
+++ b/public_html/layout/denim/comment/commentbar.thtml	Sat Jun 22 13:10:11 2013 +0900
@@ -18,6 +18,9 @@
       <input type="hidden" name="{nprefix}type" value="{comment_type}"{xhtml}>
       <input type="hidden" name="title" value="{comment_title}"{xhtml}>
       {hidden_field_reply}
+      <div style="padding:0.3em;{show_link_to_commenteditform}">
+          <a class="button" href="#commenteditform">{lang_reply}</a>
+      </div>
     </div>
   </form>
 
diff -r 3ddc8f6f9196 -r 952f21880172 public_html/layout/modern_curve/comment/commentbar.thtml
--- a/public_html/layout/modern_curve/comment/commentbar.thtml	Fri Jun 21 15:32:22 2013 -0400
+++ b/public_html/layout/modern_curve/comment/commentbar.thtml	Sat Jun 22 13:10:11 2013 +0900
@@ -34,6 +34,11 @@
         <input type="{reply_hidden_or_submit}" name="reply" value="{lang_reply}" class="submit"{xhtml}>
       </li>
     </ul>
+    <div style="{show_link_to_commenteditform}">
+        [
+        <a class="button" href="#commenteditform">{lang_reply}</a>
+        ]
+    </div>
   </div>
 </form>
 
diff -r 3ddc8f6f9196 -r 952f21880172 public_html/layout/professional/comment/commentbar.thtml
--- a/public_html/layout/professional/comment/commentbar.thtml	Fri Jun 21 15:32:22 2013 -0400
+++ b/public_html/layout/professional/comment/commentbar.thtml	Sat Jun 22 13:10:11 2013 +0900
@@ -12,6 +12,9 @@
             <input type="hidden" name="{nprefix}type" value="{comment_type}"{xhtml}>
             <input type="hidden" name="title" value="{comment_title}"{xhtml}>
             <input type="{reply_hidden_or_submit}" name="reply" value="{lang_reply}"{xhtml}>
+            <div style="padding:3px;{show_link_to_commenteditform}">
+                <a class="button" href="#commenteditform">{lang_reply}</a>
+            </div>
         </div>
     </form>
     <form action="{parent_url}" method="post" class="floatright" style="display:inline;">
diff -r 3ddc8f6f9196 -r 952f21880172 public_html/layout/professional_css/comment/commentbar.thtml
--- a/public_html/layout/professional_css/comment/commentbar.thtml	Fri Jun 21 15:32:22 2013 -0400
+++ b/public_html/layout/professional_css/comment/commentbar.thtml	Sat Jun 22 13:10:11 2013 +0900
@@ -35,6 +35,11 @@
         <input type="{reply_hidden_or_submit}" name="reply" value="{lang_reply}" class="submit"{xhtml}>
       </li>
     </ul>
+    <div style="{show_link_to_commenteditform}">
+        [
+        <a class="button" href="#commenteditform">{lang_reply}</a>
+        ]
+    </div>
   </div>
 </form>
 
diff -r 3ddc8f6f9196 -r 952f21880172 system/lib-comment.php
--- a/system/lib-comment.php	Fri Jun 21 15:32:22 2013 -0400
+++ b/system/lib-comment.php	Sat Jun 22 13:10:11 2013 +0900
@@ -90,8 +90,10 @@
 
     if ( $ccode == 0 && !COMMENT_ON_SAME_PAGE) {
         $commentbar->set_var( 'reply_hidden_or_submit', 'submit' );
+        $commentbar->set_var( 'show_link_to_commenteditform', 'display:none;' );
     } else {
         $commentbar->set_var( 'reply_hidden_or_submit', 'hidden' );
+        $commentbar->set_var( 'show_link_to_commenteditform', '' );
     }
     $commentbar->set_var( 'num_comments', COM_numberFormat( $nrows ));
     $commentbar->set_var( 'comment_type', $type );



More information about the geeklog-cvs mailing list