Colored link when new post

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
jesusm
Registered User
Posts: 20
Joined: Tue Feb 19, 2008 3:57 pm

Re: Colored link when new post

Post by jesusm » Mon Mar 02, 2009 3:25 pm

Have you an estimated date for viewing colored topics in search results?

Thanks

User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7631
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Colored link when new post

Post by JimA » Tue Mar 03, 2009 2:48 pm

I just grabbed something together. Please test if it works for you, on my testboard, it does. I'll include it in the next release, which will be soon. :)

Open: search.php
Find:

Code: Select all

$search_forum	= request_var('fid', array(0));
Add, after:

Code: Select all

$new_posts_link = 'style="color: #' . $config['new_post_colour']. ';"';
Find:

Code: Select all

'SEARCH_IN_RESULTS'	=> ($search_id) ? false : true,
Add, after:

Code: Select all

'NEW_POSTS_LINK'	=> $new_posts_link,
Open: styles/prosilver/template/search_results.html
Find:

Code: Select all

<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
Replace with:

Code: Select all

<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle" <!-- IF searchresults.S_UNREAD_TOPIC -->{NEW_POSTS_LINK}<!-- ENDIF --> >{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
Image Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.

jesusm
Registered User
Posts: 20
Joined: Tue Feb 19, 2008 3:57 pm

Re: Colored link when new post

Post by jesusm » Tue Mar 03, 2009 3:40 pm

Works great!

Thanks a lot!

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Colored link when new post

Post by DJ Skitzo » Thu Mar 05, 2009 11:16 am

I'l wait for the new release, so that updating is more straight forward :D

Thanks

User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7631
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Colored link when new post

Post by JimA » Thu Mar 05, 2009 3:59 pm

I already submitted the new release to the MOD database. The only change I made was updating to ModX 1.2.2 and letting it work in the search results. So, when updating from 1.0.1 to 1.0.2, you'd be OK by just using the edits I posted above.

The 1.0.2 package itself can be found here.
Image Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Colored link when new post

Post by DJ Skitzo » Thu Mar 05, 2009 8:45 pm

Ohh OK thanks :D

User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: Colored link when new post

Post by whoisit » Mon Mar 09, 2009 6:31 pm

Just installed it, works a treat. Thanks

scobb77
Registered User
Posts: 21
Joined: Thu Mar 12, 2009 1:48 pm

Re: Colored link when new post

Post by scobb77 » Thu Mar 12, 2009 4:23 pm

I am trying to use this with the Coffee Time style (based on prosilver) in my forum, http://www.texasnewf.com/forum/. This style already has red lettering for the forum titles and post titles. So I have two questions.
#1, do I just change the DB value from d82929 to 008000, if I would rather have the new posts show as green (since they are naturaly already red in this style)?
#2, Instead of changing the files in prosilver, do I instead change those same files but in the coffe time style folders instead of the prosilver folders?

Thanks for the help

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Colored link when new post

Post by DJ Skitzo » Thu Mar 12, 2009 6:16 pm

scobb77 wrote:I am trying to use this with the Coffee Time style (based on prosilver) in my forum, http://www.texasnewf.com/forum/. This style already has red lettering for the forum titles and post titles. So I have two questions.
#1, do I just change the DB value from d82929 to 008000, if I would rather have the new posts show as green (since they are naturaly already red in this style)?
#2, Instead of changing the files in prosilver, do I instead change those same files but in the coffe time style folders instead of the prosilver folders?

Thanks for the help
The answer to both of your questions is yes. The database value for the colours can actually be later changed from the administration control panel at a later date aswell so you could play about to see which colour best suites your website.

scobb77
Registered User
Posts: 21
Joined: Thu Mar 12, 2009 1:48 pm

Re: Colored link when new post

Post by scobb77 » Thu Mar 12, 2009 7:18 pm

Hmm, I must have done something wrong then. First off, let me say that this install of phpbb 3.0.4 was installed through fantastico, which could be part of my problem. I have to have the language set to British English and not US English, to have the style work properly. If that makes a difference.

I made the changes, cleared the cache but no changes are appearing. I also do not see anywhere in the ACP to change the color. Where in the ACP is that located?

Thanks

User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7631
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Colored link when new post

Post by JimA » Thu Mar 12, 2009 8:38 pm

You should be able to see it in Board settings, under the General tab. :)
Image Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.

scobb77
Registered User
Posts: 21
Joined: Thu Mar 12, 2009 1:48 pm

Re: Colored link when new post

Post by scobb77 » Thu Mar 12, 2009 8:51 pm

Found it and when I changed the color thru the ACP, it worked like a champ!

Thanks a bunch!

User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: Colored link when new post

Post by whoisit » Fri Mar 13, 2009 10:25 pm

Hi
I have a problem with this nothing major, but at my site http://www.poem-n-verse.co.uk
I have a list of forums when a new topic is posted the forum name turns Red, so far so good, but one of the forums, Poetry, Poems and Verse, doesn't turn Red yet the forums inside it do.

Any ideas?
Graham

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Colored link when new post

Post by DJ Skitzo » Fri Mar 13, 2009 11:14 pm

whoisit wrote:Hi
I have a problem with this nothing major, but at my site http://www.poem-n-verse.co.uk
I have a list of forums when a new topic is posted the forum name turns Red, so far so good, but one of the forums, Poetry, Poems and Verse, doesn't turn Red yet the forums inside it do.

Any ideas?
Graham
Apply these changes took from page 2 of this topic:
JimA wrote:Okay, try this. :)

Open: includes/functions_display.php
Find:

Code: Select all

$new_posts_link = ($forum_unread) ? 'style="color: #' . $config['new_post_colour']. ';"' : '';  
Replace with:

Code: Select all

$new_posts_link = 'style="color: #' . $config['new_post_colour']. ';"';  

User avatar
whoisit
Registered User
Posts: 283
Joined: Sat Feb 02, 2008 10:12 am

Re: Colored link when new post

Post by whoisit » Sat Mar 14, 2009 8:32 am

Thanks DJ,

That appears to have done the trick. :)

Graham

Locked

Return to “[3.0.x] MOD Database Releases”