[geeklog-cvs] geeklog: Hide the "Logout" link when editing a comment or commen...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Feb 7 11:04:08 EST 2010
changeset 7715:b441cb020c8c
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/b441cb020c8c
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 07 16:26:23 2010 +0100
description:
Hide the "Logout" link when editing a comment or comment submission (bug #0000893)
diffstat:
public_html/docs/english/theme.html | 6 ++++++
public_html/docs/history | 2 ++
public_html/layout/professional/comment/commentform.thtml | 2 +-
public_html/layout/professional/comment/commentform_advanced.thtml | 2 +-
system/lib-comment.php | 6 ++++++
5 files changed, 16 insertions(+), 2 deletions(-)
diffs (68 lines):
diff -r fc2d0f963891 -r b441cb020c8c public_html/docs/english/theme.html
--- a/public_html/docs/english/theme.html Sun Feb 07 16:05:26 2010 +0100
+++ b/public_html/docs/english/theme.html Sun Feb 07 16:26:23 2010 +0100
@@ -204,6 +204,12 @@
<h2><a name="changes">Theme changes in Geeklog 1.6.2</a></h2>
<ul>
+<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
+ hide the <code>span</code> when a comment is edited (but not when it's
+ submitted). Changed files: <tt>comment/commentform.thtml</tt> and
+ <tt>comment/commentform_advanced.thtml</tt>.</li>
<li>In the profile template, <tt>users/profile.thtml</tt>, the link to "Find
all postings by <i>User</i>" was shortened, as it contained a lot of
unnecessary parameters for the search.</li>
diff -r fc2d0f963891 -r b441cb020c8c public_html/docs/history
--- a/public_html/docs/history Sun Feb 07 16:05:26 2010 +0100
+++ b/public_html/docs/history Sun Feb 07 16:26:23 2010 +0100
@@ -3,6 +3,8 @@
Apr ??, 2010 (1.6.2)
------------
+- 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
(for bug #0000799) [Dirk]
- Changed the label for the $_CONF['disable_autolinks'] config option to read
diff -r fc2d0f963891 -r b441cb020c8c public_html/layout/professional/comment/commentform.thtml
--- a/public_html/layout/professional/comment/commentform.thtml Sun Feb 07 16:05:26 2010 +0100
+++ b/public_html/layout/professional/comment/commentform.thtml Sun Feb 07 16:26:23 2010 +0100
@@ -9,7 +9,7 @@
<input type="hidden" name="pid" value="{pid}"{xhtml}>
<input type="hidden" name="type" value="{type}"{xhtml}>
<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}>
- <input type="hidden" name="uid" value="{uid}"{xhtml}>{username} [ <a href="{action_url}" rel="nofollow">{lang_logoutorcreateaccount}</a> ]
+ <input type="hidden" name="uid" value="{uid}"{xhtml}>{username} <span{hidewhenediting}>[ <a href="{action_url}" rel="nofollow">{lang_logoutorcreateaccount}</a> ]</span>
</td>
</tr>
<tr>
diff -r fc2d0f963891 -r b441cb020c8c public_html/layout/professional/comment/commentform_advanced.thtml
--- a/public_html/layout/professional/comment/commentform_advanced.thtml Sun Feb 07 16:05:26 2010 +0100
+++ b/public_html/layout/professional/comment/commentform_advanced.thtml Sun Feb 07 16:26:23 2010 +0100
@@ -16,7 +16,7 @@
<input type="hidden" name="type" value="{type}"{xhtml}>
<input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}>
<input type="hidden" name="comment" value=""{xhtml}>
- <input type="hidden" name="uid" value="{uid}"{xhtml}>{username} [ <a href="{action_url}" rel="nofollow">{lang_logoutorcreateaccount}</a> ]
+ <input type="hidden" name="uid" value="{uid}"{xhtml}>{username} <span{hidewhenediting}>[ <a href="{action_url}" rel="nofollow">{lang_logoutorcreateaccount}</a> ]</span>
</td>
</tr>
<tr>
diff -r fc2d0f963891 -r b441cb020c8c system/lib-comment.php
--- a/system/lib-comment.php Sun Feb 07 16:05:26 2010 +0100
+++ b/system/lib-comment.php Sun Feb 07 16:26:23 2010 +0100
@@ -890,6 +890,12 @@
$comment_template->set_var('sid', $sid);
$comment_template->set_var('pid', $pid);
$comment_template->set_var('type', $type);
+ if ($mode == 'edit' || $mode == 'editsubmission' || $mode == $LANG03[28] || $mode == $LANG03[34]) {
+ $comment_template->set_var('hidewhenediting',
+ ' style="display:none;"');
+ } else {
+ $comment_template->set_var('hidewhenediting', '');
+ }
$formurl = $_CONF['site_url'] . '/comment.php';
if ($mode == 'edit' || $mode == $LANG03[28]) { //edit modes
More information about the geeklog-cvs
mailing list