New Topic Color, sorry if this is a repost

This forum is now closed. Please ask all styles-related questions in the phpBB 3.0 Styles Support & Discussion Forum.
Locked
Whish
Registered User
Posts: 3
Joined: Mon Oct 02, 2006 1:56 am
Contact:

New Topic Color, sorry if this is a repost

Post by Whish » Sat Dec 16, 2006 6:32 am

I can't get the search to work in the forum here, so I've sifted through trying to find my solution, but I can't actually **search** so I've not found it.

That said, if this is a repost, I apologize, please link the thread where it has been solved.

I am implementing a new theme, and I would like to not only have different images for the "new threads" (Ie: when I log in, forums with posts or replies i've not read are a different color. Then, once in the forum, the new post or post with a new reply is a different color) But I'd like to have the text title for them a different color as well. I'm currently using a blix based theme, and I've rooted around a lot, but I can't find this function. Any help would be apreciated.

http://vision-guild.us/forum

TheColbyJack
Registered User
Posts: 136
Joined: Tue May 09, 2006 1:15 am

Post by TheColbyJack » Mon Dec 18, 2006 6:06 am

You'll need to apply some javascript to your phpBB for this to work.

Here's a little trick I found awhile ago. I'd cite whoever wrote the code, but I have no clue.

Copy this into a file and name it "scripts.js" then upload it to your template root directory

Code: Select all

function CheckNew(folder)
{
	if(folder.indexOf('_new') > 0)
	{
		document.write('<span class="newtopictitle>');
	}
	else
	{
		document.write('<span class="topictitle">');
	}
}

Now, go into your root template directory (/forum/templates/Blix/) and find viewforum_body.tpl and find the following code:

Code: Select all

<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}
Replace it with:

Code: Select all

	  <td class="row1" width="100%">
          <script language="JavaScript">CheckNew('{topicrow.TOPIC_FOLDER_IMG}');</script>
          <noscript><span class="topictitle"></noscript>{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}
Open up overall_header.tpl and add this code right after the title (</title>):

Code: Select all

<script language="javascript" type="text/javascript" src="templates/Blix/scripts.js"></script>
Once you're done, go into your CSS and create a new class titled "newtopictitle". This will be how the topic title should show up when there is a new post, so define it however you'd like.

Hopefully that will work. If not, there are plenty of solution. By the way, what realm does your guild play on?

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Post by lefty74 » Sat Dec 23, 2006 5:16 pm

I used the principle from the extreme styles template on my forum. Works similar to the JS I guess.
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

Locked

Return to “[2.0.x] Styles Development & Discussion”