Skip to content

Commit

Permalink
Removed "Important Stuff" notice for logged-in users when submitting …
Browse files Browse the repository at this point in the history
…a comment (improvement #959)
  • Loading branch information
mystralkk committed Aug 24, 2019
1 parent 28bdba2 commit 3aee55f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions public_html/layout/denim/comment/commentform.thtml
Expand Up @@ -6,6 +6,7 @@
<form action="{form_url}" method="post" id="commentform" class="compact uk-form">

<div class="user_basic">
{!if is_anon}
<dl class="importantstuff clearfix">
<dt>{lang_importantstuff}</dt>
<dd>
Expand All @@ -18,6 +19,7 @@
</ul>
</dd>
</dl>
{!endif}

<dl class="form_block">
<dt class="dt-commentform-username">{lang_username}</dt>
Expand Down
2 changes: 2 additions & 0 deletions public_html/layout/denim/comment/commentform_advanced.thtml
Expand Up @@ -6,6 +6,7 @@
<div id="commenteditform">
<form action="{form_url}" method="post" onsubmit='set_postcontent();' id="commentform_advanced" class="compact uk-form">
<div class="user_basic">
{!if is_anon}
<dl class="importantstuff clearfix">
<dt>{lang_importantstuff}</dt>
<dd>
Expand All @@ -18,6 +19,7 @@
</ul>
</dd>
</dl>
{!endif}

<dl class="form_block">
<dt class="dt-commentform-username">{lang_username}</dt>
Expand Down
2 changes: 2 additions & 0 deletions public_html/layout/denim_three/comment/commentform.thtml
Expand Up @@ -6,6 +6,7 @@
<form action="{form_url}" method="post" id="commentform" class="compact">

<div class="user_basic">
{!if is_anon}
<dl class="importantstuff clearfix">
<dt>{lang_importantstuff}</dt>
<dd class="controls_text">
Expand All @@ -18,6 +19,7 @@
</ul>
</dd>
</dl>
{!endif}

<dl class="form_block">
<dt class="dt-commentform-username">{lang_username}</dt>
Expand Down
Expand Up @@ -6,6 +6,7 @@
<div id="commenteditform">
<form action="{form_url}" method="post" onsubmit='set_postcontent();' id="commentform_advanced" class="compact">
<div class="user_basic">
{!if is_anon}
<dl class="importantstuff clearfix">
<dt>{lang_importantstuff}</dt>
<dd class="controls_text">
Expand All @@ -18,6 +19,7 @@
</ul>
</dd>
</dl>
{!endif}

<dl class="form_block">
<dt class="dt-commentform-username">{lang_username}</dt>
Expand Down
2 changes: 2 additions & 0 deletions public_html/layout/modern_curve/comment/commentform.thtml
Expand Up @@ -35,6 +35,7 @@
</dd>
</dl>

{!if is_anon}
<dl class="importantstuff">
<dt>{lang_importantstuff}</dt>
<dd>
Expand All @@ -47,6 +48,7 @@
</ul>
</dd>
</dl>
{!endif}

{captcha}

Expand Down
Expand Up @@ -42,6 +42,7 @@
</dd>
</dl>

{!if is_anon}
<dl class="importantstuff">
<dt>{lang_importantstuff}</dt>
<dd>
Expand All @@ -54,6 +55,7 @@
</ul>
</dd>
</dl>
{!endif}

{captcha}

Expand Down
4 changes: 3 additions & 1 deletion system/lib-comment.php
Expand Up @@ -855,8 +855,9 @@ function CMT_commentForm($title, $comment, $sid, $pid = 0, $type, $mode, $postMo
if (empty($_USER['uid'])) {
$uid = 1;
} else {
$uid = $_USER['uid'];
$uid = (int) $_USER['uid'];
}
$isAnon = ($uid <= 1);

if (empty($format)) {
if (isset($_REQUEST['format'])) {
Expand Down Expand Up @@ -1248,6 +1249,7 @@ function CMT_commentForm($title, $comment, $sid, $pid = 0, $type, $mode, $postMo
$allowed_html .= COM_allowedHTML($permission, false, 1, $pm);
}
$allowed_html .= COM_allowedAutotags();
$comment_template->set_var('is_anon', $isAnon);
$comment_template->set_var('allowed_html', $allowed_html);
$comment_template->set_var('lang_importantstuff', $LANG03[18]);
$comment_template->set_var('lang_instr_line1', $LANG03[19]);
Expand Down

0 comments on commit 3aee55f

Please sign in to comment.