[geeklog-cvs] geeklog: Comment signature and edit notes should be in <div> not...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Apr 13 06:47:47 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/30016d8c4d9c
changeset: 6938:30016d8c4d9c
user: Dirk Haun <dirk at haun-online.de>
date: Mon Apr 13 11:36:37 2009 +0200
description:
Comment signature and edit notes should be in <div> not <span>
diffstat:
2 files changed, 20 insertions(+), 14 deletions(-)
public_html/layout/professional/style.css | 5 +++++
system/lib-comment.php | 29 +++++++++++++++--------------
diffs (79 lines):
diff -r 9974c9c57e3c -r 30016d8c4d9c public_html/layout/professional/style.css
--- a/public_html/layout/professional/style.css Mon Apr 13 11:34:54 2009 +0200
+++ b/public_html/layout/professional/style.css Mon Apr 13 11:36:37 2009 +0200
@@ -411,6 +411,11 @@
}
.comment-edit {
font-style: italic;
+ padding-top:1ex;
+}
+.comment-sig {
+ color:#666666;
+ padding-top:1ex;
}
/******************************************************************************/
.edit-perm-down {
diff -r 9974c9c57e3c -r 30016d8c4d9c system/lib-comment.php
--- a/system/lib-comment.php Mon Apr 13 11:34:54 2009 +0200
+++ b/system/lib-comment.php Mon Apr 13 11:36:37 2009 +0200
@@ -299,10 +299,10 @@
"uid={$B['uid']}");
}
// add edit info to text
- $A['comment'] .= LB . '<span class="comment-edit">' . $LANG03[30]
- . ' ' . strftime($_CONF['date'], $B['time']) . ' '
+ $A['comment'] .= '<div class="comment-edit">' . $LANG03[30] . ' '
+ . strftime($_CONF['date'], $B['time']) . ' '
. $LANG03[31] . ' ' . $editname
- . '</span><!-- /COMMENTEDIT -->';
+ . '</div><!-- /COMMENTEDIT -->';
}
// determines indentation for current comment
@@ -503,10 +503,11 @@
}
//and finally: format the actual text of the comment, but check only the text, not sig or edit
- $text = str_replace('<!-- COMMENTSIG --><span class="comment-sig">', '', $A['comment']);
- $text = str_replace('</span><!-- /COMMENTSIG -->', '', $text);
- $text = str_replace('<span class="comment-edit">', '', $text);
- $text = str_replace('</span><!-- /COMMENTEDIT -->', '', $text);
+ $text = str_replace('<!-- COMMENTSIG --><div class="comment-sig">', '',
+ $A['comment']);
+ $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'] );
}
@@ -1602,9 +1603,9 @@
}
if ($edit) {
- $comment .= LB . '<span class="comment-edit">' . $LANG03[30] . ' '
- . strftime( $_CONF['date'], time() ) . ' ' .$LANG03[31] .' '
- . $_USER['username'] . '</span><!-- /COMMENTEDIT -->';
+ $comment .= '<div class="comment-edit">' . $LANG03[30] . ' '
+ . strftime($_CONF['date'], time()) . ' ' .$LANG03[31] .' '
+ . $_USER['username'] . '</div><!-- /COMMENTEDIT -->';
$text = $comment;
}
@@ -1622,13 +1623,13 @@
if ($uid > 1) {
$sig = DB_getItem ($_TABLES['users'], 'sig', "uid = '$uid'");
if (!empty ($sig)) {
- $comment .= '<!-- COMMENTSIG --><span class="comment-sig">';
+ $comment .= '<!-- COMMENTSIG --><div class="comment-sig">';
if ( $postmode == 'html') {
- $comment .= '<p>---<br' . XHTML . '>' . nl2br ($sig);
+ $comment .= '---<br' . XHTML . '>' . nl2br($sig);
} else {
- $comment .= LB . LB . '---' . LB . $sig;
+ $comment .= '---' . LB . $sig;
}
- $comment .= '</span><!-- /COMMENTSIG -->';
+ $comment .= '</div><!-- /COMMENTSIG -->';
}
}
More information about the geeklog-cvs
mailing list