XF 2.1 "Mark forums read" and "mark read" effect not visible.

Reid2

Member
OK - I must have done something stupid; but I can't find it. I know I changed the link colors (I reversed them) and I made the page setup links both bold. Now when my members click on the "Mark forums read" or the "mark read" for an individual forum, they claim it is not working. I ran my own test and decided that it is working based on what happens when I click on a thread link. Before I do the "Mark read", clicking on a link takes me to the last unread post in the thread. A second click on the same thread takes me to the last post in the thread. A third click on the same thread link takes me to the first post in the thread. After some research here, I found that the standard behavior is for the link to go to the last unread post first and then to the first post if all posts have been read.

My question is this: Is there supposed to be any visible change to the thread link after I click on the "mark read" button? Something my members will see; (not something which happens differently if you click on a thread link). My members are saying before I made my changes, they saw differences; but I can't find any documentation or description of a change in the color or type of the link when the "mark read" is executed. Are the link colors or link fonts supposed to change? If so, does anyone know where the code is which controls the change.

Many thanks to all who might read this and especially to anyone who has an answer or suggestion. :)
 
OK - we changed the links on our site to be bold by default. What do we have to do the get the links to not be bold as in your very nice example and thank you for your kind reply. :) Not clear. Oh dear. All our links appear bold. Before and after the "mark read". How do we get the "read" threads to not be bold as in your example? Not sure if this is any help, but our link color is set to palatteColor5
 
Last edited:
Our only change in Extra.less is:
a:visited {
color: @xf-paletteColor3;
}

I think our link was previously set to bold. I set it to normal font and re-issued the "mark read"; but nothing changes. It should make all the threads bold according to this logic. I tried it on a forum which was not previously set to read with the same results. Hmm...
 
I disabled all add-ons. No luck. I guess this is a problem I will just have to live with. Thanks for trying to help. I suspect there is code somewhere which converts the font from bold to normal when a thread has been read; but I can't find it. That might tell me what I have inadvertently changed which must be changed back to make this work.
 
It is controlled with this code:

1562092201924.webp

You will need to look through the custom changes you have made to determine where the issue lies.
The browser inspector (F12) may help.
 
OK - found out why nothing seemed to work and how it got fixed. :)
First, I forgot that I had clicked on "Mark forums read" and in our test server, there were no new posts. Stupid of me. And with the our links set to bold fonts, the normal code does not seem to be very effective.
Second, just in case anyone else has a similar problem, I went to google and entered the following search:
"is-Unread" "XenForo" "StructItem-title" "font-weight"
which I got from Brogan's clever post above. This resulted in only 10 hits (amazing right?) and the first three were all posts in various threads here in XenForo which did not appear with my original searches, but which did all have sample code to fix the problem.

XF2.0 Read vs Unread Thread Titled
https://xenforo.com/community/threads/read-vs-unread-thread-titled.144981/ XF2.0
XF2.0 How to change settings for unread thread links?
https://xenforo.com/community/threads/how-to-change-settings-for-unread-thread-links.147724/
XF2.0 Bullets before new topics and posts
https://xenforo.com/community/threads/bullets-before-new-topics-and-posts.140566/

Since our thread links are all in bold fonts, we decided to allow unread posts to have a small pointing hand to the left of the thread. The hand disappears when you click on "Mark forum read" or "Mark read".
Here is the code we used in case anyone would like one more sample.

Find in structured_list.less:
.is-unread &

replace with:
& a:visited {color: @xf-paletteColor3;}

.is-unread &::before {content: "☛";}

$0

Thank you so much for all the help.
 
Last edited:
Find in structured_list.less:
.is-unread &

replace with:
& a:visited {color: @xf-paletteColor3;}

.is-unread &::before {content: "☛";}

$0

Thank you so much for all the help.

Hi, thank you, I'm one step closer!

But I can't seem to be able to use font awesome instead of the icon you used (which works but not sure why).

Code:
.structItem-title
{
    font-size: @xf-fontSizeLarge;
    font-weight: @xf-fontWeightNormal;
    margin: 0;
    padding: 0;

    .label
    {
        font-weight: @xf-fontWeightNormal;
    }

    .is-unread &
    & a:visited    {color: @xf-paletteColor3;
    }
    
    .is-unread &::before {
        font-family: "Font Awesome 5 Free";
        font-weight: 300;
        content: "\f111";
    }
}

What am I doing wrong?
 
I don't know. I was never able to make the font work. Perhaps soneone else will be kind enough to help you. Sorry.

Thanks, I actually was able to achieve the result using this code:

Code:
.structItem-title
{
    font-size: @xf-fontSizeLarge;
    font-weight: @xf-fontWeightNormal;
    margin: 0;
    padding: 0;

    .label
    {
        font-weight: @xf-fontWeightNormal;
    }

.is-unread &
    {
        font-weight: @xf-fontWeightHeavy;
    }
    
    .is-unread &::before {
        font-family: "Font Awesome 5 Pro";
        font-weight: 900;
        font-size: 10px;
        color: #3ca313;
        content: "\f111";
    }
}

Hope this helps!
 
I don't know why I can't EDIT my post, but I wanted to add two things:
1- the template to edit is structured_list.less
2- you can move the font awesome icon you choose, from BEFORE the thread title, to AFTER it but editing ".is-unread &::before" to
".is-unread &::after."

Cheers!
 
Top Bottom