[geeklog-cvs] geeklog: Improved comment readability by adding a paragraph tag ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Feb 7 12:01:03 EST 2010


changeset 7716:54d3ed4808b2
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/54d3ed4808b2
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 07 17:26:27 2010 +0100
description:
Improved comment readability by adding a paragraph tag around "Plain Old Text" comments and some padding in threaded mode (bug #0000833)

diffstat:

 public_html/docs/english/theme.html                  |  3 +++
 public_html/docs/history                             |  2 ++
 public_html/layout/professional/comment/thread.thtml |  4 ++--
 system/lib-comment.php                               |  4 ++--
 4 files changed, 9 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r b441cb020c8c -r 54d3ed4808b2 public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html	Sun Feb 07 16:26:23 2010 +0100
+++ b/public_html/docs/english/theme.html	Sun Feb 07 17:26:27 2010 +0100
@@ -204,6 +204,9 @@
 <h2><a name="changes">Theme changes in Geeklog 1.6.2</a></h2>
 
 <ul>
+<li>Added some padding to the <code><li></code> element in
+    <tt>comment/thread.thtml</tt> so that follow-up comments in threaded mode
+    are a bit more apart and easier to read.</li>
 <li>When editing a comment or comment submission, the "Logout" link is now
     hidden. This is done by adding a <code>span</code> around the link and a
     new template variable, <tt>{hidewhenediting}</tt>, that will contain CSS to
diff -r b441cb020c8c -r 54d3ed4808b2 public_html/docs/history
--- a/public_html/docs/history	Sun Feb 07 16:26:23 2010 +0100
+++ b/public_html/docs/history	Sun Feb 07 17:26:27 2010 +0100
@@ -3,6 +3,8 @@
 Apr ??, 2010 (1.6.2)
 ------------
 
+- Improved comment readability by adding a paragraph tag around "Plain Old Text"
+  comments and some padding in threaded mode (bug #0000833) [Dirk]
 - Hide the "Logout" link when editing a comment or comment submission
   (bug #0000893) [Dirk]
 - CR and LF are now removed from the submitted password when a user logs in
diff -r b441cb020c8c -r 54d3ed4808b2 public_html/layout/professional/comment/thread.thtml
--- a/public_html/layout/professional/comment/thread.thtml	Sun Feb 07 16:26:23 2010 +0100
+++ b/public_html/layout/professional/comment/thread.thtml	Sun Feb 07 17:26:27 2010 +0100
@@ -1,5 +1,5 @@
-<div style="padding-left: {indent}px">
-  <ul style="margin: 0; padding: 0"><li>
+<div style="padding-left:{indent}px">
+  <ul style="margin:0; padding:0"><li style="padding-top:1px; padding-bottom:2px;">
     <a href="{site_url}/comment.php?mode=display&format=threaded&order={order}&pid={pid}">{title}</a>
     - {lang_authoredby} {start_author_anchortag}{author}{end_author_anchortag} {lang_on} {date}
   </li></ul>
diff -r b441cb020c8c -r 54d3ed4808b2 system/lib-comment.php
--- a/system/lib-comment.php	Sun Feb 07 16:26:23 2010 +0100
+++ b/system/lib-comment.php	Sun Feb 07 17:26:27 2010 +0100
@@ -501,8 +501,8 @@
         $text = str_replace('</div><!-- /COMMENTSIG -->', '', $text);
         $text = str_replace('<div class="comment-edit">', '', $text);
         $text = str_replace('</div><!-- /COMMENTEDIT -->', '', $text);
-        if( preg_match( '/<.*>/', $text ) == 0 ) {
-            $A['comment'] = nl2br( $A['comment'] );
+        if (preg_match('/<.*>/', $text) == 0) {
+            $A['comment'] = '<p>' . nl2br($A['comment']) . '</p>';
         }
 
         // highlight search terms if specified



More information about the geeklog-cvs mailing list