vForums Support > Programming & Coding :: Code Requests & Support :: > New Thread Title Colour Code Please

New Thread Title Colour Code Please - Posted By CåñåÐå™ (canada) on 30th Jul 08 at 3:36am
Would it be possible for when you make an new thread that you can make an code for that thread title so it can be in an different color. On the thread page and on the main page last post ?

Re: New Thread Title Colour Code Please - Posted By Michael (wrighty) on 30th Jul 08 at 7:59am
It's not really possible to know whether it's 'new' or not when on the main page.

Or do you mean instead of the on/off icon?

Re: New Thread Title Colour Code Please - Posted By CåñåÐå™ (canada) on 30th Jul 08 at 12:23pm
 
It's not really possible to know whether it's 'new' or not when on the main page.
Oh ok , don't worry about it on the main page then. Just on the thread page is fine if its possible, thanks Wrighty.

Re: New Thread Title Colour Code Please - Posted By Michael (wrighty) on 30th Jul 08 at 4:23pm
Yey for Cheating! ^_^

<script>
var a = '{topic_subject}';
if('{new}' != ''){
    a = a.replace(/<a/, '<a style="color:#FF0000"');
}
document.write(a);
</script>


Edit the part in red to the colour that you want.

This code replaces {topic_subject} in the 'Topic Listing Template'. So it will then change the colour of the threads. It's quicker and easier than writing a code! ^ _^

Any problems, post back! {Smile}

Re: New Thread Title Colour Code Please - Posted By CåñåÐå™ (canada) on 30th Jul 08 at 6:25pm
Where am i putting this ??

Re: New Thread Title Colour Code Please - Posted By Michael (wrighty) on 30th Jul 08 at 6:27pm
Quote:
This code replaces {topic_subject} in the 'Topic Listing Template'.


In the 'Manage Templates' section {Smile}

Re: New Thread Title Colour Code Please - Posted By CåñåÐå™ (canada) on 30th Jul 08 at 9:10pm
http://testforum.virtualforums.co.uk/

I went to Manage Templates and i click on 'Topic Listing Template' and i place the code where {topic_subject} was and nothing changed {Confused}

Re: New Thread Title Colour Code Please - Posted By CåñåÐå™ (canada) on 1st Aug 08 at 6:36pm
 
Yey for Cheating! ^_^

<script>
var a = '{topic_subject}';
if('{new}' != ''){
    a = a.replace(/<a/, '<a style="color:#FF0000"');
}
document.write(a);
</script>


Edit the part in red to the colour that you want.

This code replaces {topic_subject} in the 'Topic Listing Template'. So it will then change the colour of the threads. It's quicker and easier than writing a code! ^ _^

Any problems, post back! {Smile}
This isn't working Wrighty {Confused} .

Re: New Thread Title Colour Code Please - Posted By Ross (admin) on 1st Aug 08 at 7:21pm
What browser are you using?

When viewing this page as "admin" the "Hi Test Thread" title appears in red.

Re: New Thread Title Colour Code Please - Posted By CåñåÐå™ (canada) on 1st Aug 08 at 9:13pm
Its working , and i'm useing FF3.1 .

But i just got why it didn't work for me, its because i made the thread lol .

Thank you Ross and Wrighty for making the code {Grin} .