Add ReplyNew TopicNew Poll

 New Message Link Color, Done already?
#
I've scoured for the last two days, and I must not be digging deep enough, but I'm looking for a pretty simple feature/code. All I'd like is for the link color to change (to, say, red) when members get new messages. I don't need anything fancier than that. Am I derping hard? Did I miss this already? Alternatively, I'd like to extend this for alerts as well.

This post has been edited by Soupi: Jan 20 2018, 08:21 AM
#
This can currently be done by adding the value for how many messages you have as a class/id to the link in a format like

<a href="Link here" class/id="pm-#OfMessages">Link Text</a>

Then style #pm0 or .pm0 to be the color you normally want it to be when there is no messages. Style the link by its containing div for any other time. So, if your code was:
<div class="userlinks">
<a href="url" class="pm-<!-- |new_msg| -->">Inbox (<!-- |new_msg| -->)</a>
</div>

And you wanted the link red when new messages are present, your css would appear:
.userlinks a {
color: red;
/*** How it looks with a new message present ****/
}
.pm0 {
color: black;
/*** How it looks with no new message present ****/
}

Hope that explained it.

signature
"Trust me, I'm a doctor."
user posted image
PM
#
Here is my site.

This code seems like I'd have to move where my messages are to some other location, is that true? Because I don't necessarily want them anywhere else, and alongside the "My Controls" area. Forgive me if I'm misunderstanding.

This post has been edited by Soupi: Jan 20 2018, 05:48 PM
#
So your userlinks are the default, as seen here?

user posted image

you wouldn't need to MOVE them, at all, just replace them. They could look exactly the same as the default, you'd simply be replacing them with custom links so as to add the classes needed. A great tutorial for custom user menus is right here

Although, I DO think a "new-messages" class or id added to the inbox link would be great.

(PS, love your skin.)

signature
"Trust me, I'm a doctor."
user posted image
PM
#
Oh, awesome. I'll take a look into implementing it then, I appreciate your help! http://files.b1.jcink.com/html/emoticons/smile.gif

(P.S. Thanks so much! Our coder did an absolutely breathtaking job!)
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Feature Requests | Next Newest »

Options Add ReplyNew TopicNew Poll