Unread forum titles (colorà

For support and discussion related to templates and themes in phpBB 3.3.
User avatar
Mannix_
Registered User
Posts: 2028
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: Unread forum titles (colorà

Post by Mannix_ »

Are you sure you are editing the correct style?? Neither prosilver or prosilver_fr has the changes mentioned by Steve ??? Also on your board your users are able to use Flatboots and prosilver_fr. So if a style already has forumlist_body.html changing it in prosilver won't have effect on style that already have that file. Also anytime you edit html file you need to purge cache in ACP
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
bennybernaer
Registered User
Posts: 705
Joined: Tue Mar 22, 2011 9:53 pm

Re: Unread forum titles (colorà

Post by bennybernaer »

I only made the changes to my test forum. Only prosilver also emptied the cashe there. But nothing... Am I editing the right line?

open: prosilver/template/ajax.js

search:

Code: Select all

	$('li.row').find('dl[class*="forum_unread"]').each(function() {
place above:

Code: Select all

/* grid pro */
	$('a, i.icon').each(function() {
		if ($('a i.icon').hasClass('unread-forum')) {
			$('a i.icon').removeClass('unread-forum');
		}
	});
open: prosilver/template/forumlist_body.html
search:

Code: Select all

<a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a>
repleace with:

Code: Select all

						<a href="{forumrow.U_VIEWFORUM}" class="forumtitle <!-- IF forumrow.S_UNREAD_FORUM -->unread-forum<!-- ENDIF -->;">{forumrow.FORUM_NAME}</a>
	
/* custom css
---------------------------------------- */

Code: Select all

a.forumtitle.unread-forum {
	color: #AA0000;
}
User avatar
Sniper_E
Registered User
Posts: 1198
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey

Re: Unread forum titles (colorà

Post by Sniper_E »

Checking this I made the changes to the lines in forumlist_body.html in prosilver and in my custom style

Code: Select all

						<a href="{forumrow.U_VIEWFORUM}" class="forumtitle<!-- IF forumrow.S_UNREAD_FORUM --> unread<!-- ENDIF -->">{forumrow.FORUM_NAME}</a>
And added the custom css to the bottom of the colours.css

Code: Select all

a.forumtitle.unread, a.subforum.unread { color: #AA0000; }
Works perfect without editing the ajax.js

@benny, I placed the css at the bottom so it would load last. Or you can use !important to bring it out on top

Code: Select all

a.forumtitle.unread, a.subforum.unread { color: #AA0000 !important; }
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
bennybernaer
Registered User
Posts: 705
Joined: Tue Mar 22, 2011 9:53 pm

Re: Unread forum titles (colorà

Post by bennybernaer »

Thanks Sniper_E for your edits. It works but unfortunately not without ajax.js

After a lot of trying I got everything working with the change below in ajax.js

search:

Code: Select all

	// Mark subforums read
place above:

Code: Select all

   $('a.forumtitle[class*="unread"]').removeClass('unread');
Yeah! :)


Edit: (extra css)

Code: Select all

a.forumtitle.unread::after { 
	content: "New";
	display: inline-block;
	font-size: 0.8em;
	margin-left: 0.5em;
	vertical-align: text-top;
	background-color: #d31141;
	color: white;
	padding: 1px 4px;
	float: right;
	border-radius: 3px;
	-webkit-animation: unreading 2s infinite;
	-moz-animation: unreading 2s infinite;
	animation: unreading 2s infinite;
}
@-webkit-keyframes unreading {
	50% {
		opacity: 0.25;
	}
}
@keyframes unreading {
	50% {
		opacity: 0.25;
	}
}

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