Closed shlandturtle closed 6 years ago
already does something like this
@if(auth()->user()->updated_at->getTimestamp() < $a->created_at->getTimestamp())
<div class="panel panel-danger">
<div class="panel-heading">
<h4 class="text-center">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion"
href="#collapse4" style="color:#fff">{{ trans('blocks.new-news') }}</a>
</h4>
</div>
@else
<div class="panel panel-success">
<div class="panel-heading">
<h4 class="text-center">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion"
href="#collapse4" style="color:#fff">{{ trans('blocks.check-news') }}</a>
</h4>
</div>
@endif
The issue is:
@if(auth()->user()->updated_at->getTimestamp() < $a->created_at->getTimestamp())
would probably be more effective as
@if(auth()->user()->last_login->getTimestamp() < $a->created_at->getTimestamp())
So have I understood correctly that the banners color is changed as determined in css when user has been active before article creation time? Therefore it would mean that the theme has not worked correctly, and it seems that the dark theme indeed does not have input for panel-danger / panel-success. New themes for 1.8.6, but it does seem that in it too the dark-base css has the same color for panel-danger and panel-success. Or am I missing something here?
Obviously the coloring does solve what I was looking for. As long as it works.
Issue Type
End User Info
-- UNIT3D Version: 1.8.5
Increase probability of users to read the news.
When new news are posted, users have no way of knowing unless they expand the banner on the front page. We believe not many bother to do this on regular basis. Therefore some sort of way to show if new news are posted would be great. This should work on per-user basis, otherwise this would be very irritating.
Two ideas how this could work:
Also worth thinking is that when the article is marked as read by the user, there probably is no value in keeping the banner/box on the front page for that user. News articles can still be read from the link at the bottom of the pages if the user wants to do that.
Side effects
Server would need to store the info whether specific users have seen the latest news or not. As an another method this probably could be implemented with cookies?