Fade READ post titles in forums

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
ryecon
Registered User
Posts: 10
Joined: Sat Mar 09, 2019 3:34 pm

Fade READ post titles in forums

Post by ryecon » Sun Mar 10, 2019 5:33 pm

So when a post has been read the icon beside it changes.

I am looking for a way to fade out (change the color) of the title text in the post as well when it has been read.

Is there a style that does this that I can look at to see how it would be done?

Or does someone know how to do so?

Thanks.

User avatar
Mannix_
Registered User
Posts: 474
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

Re: Fade READ post titles in forums

Post by Mannix_ » Sun Mar 10, 2019 6:23 pm

You want something like this ?
Screenshot_2019-03-10 (5) Test topic 89 - Page 10 - Testing Board.png
If so open viewtopic_body.html find

Code: Select all

<a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a>
and after

Code: Select all

<a
add this

Code: Select all

class="<!-- IF postrow.S_UNREAD_POST -->unread-topic<!-- ELSE -->read-topic<!-- ENDIF -->"
so it looks like this

Code: Select all

<a class="<!-- IF postrow.S_UNREAD_POST -->unread-topic<!-- ELSE -->read-topic<!-- ENDIF -->" href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a>
and then open common.css and at the end of the file add

Code: Select all

.read-topic {
    opacity: 0.5;
}
you can play with the value to your liking :)

Do not forget to make a backup of the files and when you are done editing purge the cache.
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

ryecon
Registered User
Posts: 10
Joined: Sat Mar 09, 2019 3:34 pm

Re: Fade READ post titles in forums

Post by ryecon » Sun Mar 10, 2019 6:36 pm

Yes, exactly what I wanted.

Thanks you for your quick reply!

User avatar
3Di
Former Team Member
Posts: 13664
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Fade READ post titles in forums

Post by 3Di » Mon Mar 11, 2019 4:06 am

Mannix_ wrote:
Sun Mar 10, 2019 6:23 pm
... add this

Code: Select all

class="<!-- IF postrow.S_UNREAD_POST -->unread-topic<!-- ELSE -->read-topic<!-- ENDIF -->"
class="{% if not postrow.S_UNREAD_POST %}read-topic{% endif %}" since the other CSS rule is not defined. :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 889
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: Fade READ post titles in forums

Post by Hanakin » Mon Mar 11, 2019 6:56 pm

would suggest adding it to a custom.css file since you are creating a new class
Donations welcome via Paypal Image

Post Reply

Return to “[3.2.x] Styles Support & Discussion”