Skip to content

Commit

Permalink
#3680 - Tweak messages when comments are disabled or locked on news i…
Browse files Browse the repository at this point in the history
…tems
  • Loading branch information
Moc committed Oct 2, 2019
1 parent d3978f3 commit 0922eac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion e107_handlers/comment_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,14 @@ function compose_comment($table, $action, $id, $width, $subject, $rate = FALSE,
}
else
{
$comment = "<br /><div style='text-align:center'><b>".COMLAN_328."</b></div>";
if(BOOTSTRAP)
{
$comment = e107::getMessage()->addInfo(COMLAN_328)->render();
}
else
{
$comment = "<br /><div style='text-align:center'><b>".COMLAN_328."</b></div>";
}
}

$containerTarget = "comments-container-".$frm->name2id($table);
Expand Down
4 changes: 2 additions & 2 deletions e107_plugins/news/news.php
Original file line number Diff line number Diff line change
Expand Up @@ -1301,11 +1301,11 @@ private function renderComments($news)
{
if(BOOTSTRAP)
{
return e107::getMessage()->addInfo(COMLAN_328)->render();
return e107::getMessage()->addInfo(LAN_NEWS_13)->render();
}
else
{
return "<br /><div style='text-align:center'><b>".COMLAN_328."</b></div>";
return "<br /><div style='text-align:center'><b>".LAN_NEWS_13."</b></div>";
}
}
}
Expand Down

2 comments on commit 0922eac

@Alex-e107nl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, so when i disable the comments now i get on every page a blue warning? Is that how it's supposed to work? I rather see nothing.. help?

Alex

@Moc
Copy link
Member Author

@Moc Moc commented on 0922eac Oct 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alex-e107nl Best to ask these questions in the issue associated with the commit, rather than in the commit itself :)

Anyway, yes, if you have comments enabled 'globally' and disabled for a specific news item, you'll see the message. If you don't want any comments on your website anyway (news, pages) you can turn that setting off, then the blue info message will disappear.

This may need further tweaking in the form of a new preference

Please sign in to comment.