Redh

Registered
Hello! I couldn't wait any longer, and pulled the trigger on upgrading to 2.1 on my live site yesterday. Everything went well, and it's looking pretty sharp!

I'm having a problem with the 'NEW' indicator. Before I was using some code in my extra.less to add the indicator to both the nodes page and the discussions page. However this stopped working, and after looking through the options I see there is now a "New node title indicator" option on the Node/forum list style property.

The issue I'm having is that I only want this displayed to logged in users, but not to guests - I see no point as it doesn't function for guests and remember what they have or haven't read, so it just ALWAYS displays NEW. I tried adapting my old code to hide it to logged in users, but I can't get the conditional to work in the extra.less anymore.

Here is what it currently looks like to a new / logged out user:

9205


And here is what I would like it to look like:

9206


This is the code I was using previously in extra.less:

Code:
/* DISCUSSION LIST UNREAD MARKERS */
<xf:if is="$xf.visitor.user_id">
.is-unread .structItem-title:after {
  font-size: 10px; color: #fff; content: "NEW"; background: #e03030;
  border-radius: 2px; margin-left: 5px; padding: 0px 4px 1px;
  position: relative; top: -1px;
}
</xf:if>
<xf:if is="!$xf.visitor.user_id">
.node-newIndicator { display: none; }
</xf:if>
I would also like it to show up on the Discussions list as well as the Node list.

Any help would be appreciated!
 

Russ

Pixel Exit Staff
Should be fine... but try removing the conditionals. We have classes to help:


logged-in and logged-out

Code:
.logged-in .is-unread .structItem-title:after {
  font-size: 10px; color: #fff; content: "NEW"; background: #e03030;
  border-radius: 2px; margin-left: 5px; padding: 0px 4px 1px;
  position: relative; top: -1px;
}
.logged-out .node-newIndicator { display: none; }
Does that work?
 

Redh

Registered
Ooh, that's nice to know!

That works perfectly - I just had to add these two lines for the icon and the bold font on the nodes page:

Code:
.logged-out .node--unread .node-title { font-weight: 400; }
.logged-out .node--unread .node-icon i:before { color: #ababab; opacity: 0.8; }
Thanks as usual!
 
Last edited:

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.