The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional colour for notifications
#1
Hi,
I'm just reviewing a site that I sent live last week, and I wondered if there was a tweak that could be made to the Notifications code that would keep the bubble grey if the count was 0, but turn it to a different colour if the count was >=1?
This is the line in includes/navigation.php (I think):
Code:
<li><a href="#" onclick="displayNotifications('new')" id="notificationsTrigger" data-toggle="modal" data-target="#notificationsModal"  ><i class="fa fa-fw fa-bell"></i> <span id="notifCount" class="badge" style="margin-top: -5px; background-color: #FF0004;"><?= (int)$notifications->getUnreadCount(); ?></span></a></li>
I added a background-color tag, but I'm not sure how to make it conditional and I'm not brave enough to do too much fiddling with a live site just yet...I'm afraid I'll break it!
  Reply


Messages In This Thread
Conditional colour for notifications - by Moomintroll - 12-13-2018, 10:42 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)