Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Hj Ahmad Rasyid Hj Ismail on July 26, 2010, 05:21:35 AM

Title: New Topic in Different Color
Post by: Hj Ahmad Rasyid Hj Ismail on July 26, 2010, 05:21:35 AM
New Topic in Different Color - Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2637)

Taken over by: BurkeKnight (http://www.simplemachines.org/community/index.php?action=profile;u=150637) - BurkeKnight Enterprises (http://www.burkeknight.com/) from: Joker™ (http://www.simplemachines.org/community/index.php?action=profile;u=226111)

For Support: The mod's Support topic at SMF, or at BurkeKnight Enterprises (http://www.burkeknight.com/).

This modification will show new posts in different colors in boards,rather than just showing new icon next to them.

Change Log

Version 1.3
- Mod updated for SMF 2.0.2 and SMF 1.1.16
- New license added
- Fixed new topic button bug


Version 1.2
- Mod updated for SMF 2.0 final and SMF 1.1.14
- License added to the mod


Version 1.1
- Mod updated for SMF 1.1.13 and SMF 2.0 RC5

Github Link (https://github.com/BurkeKnight/SMF-Mods-Original-Author-Joker/tree/master/New%20Topic%20In%20Separate%20Color)


License
* This SMF Modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
*http://www.mozilla.org/MPL/ (http://www.mozilla.org/MPL/)
Title: Re: New Topic in Different Color
Post by: Afro on July 26, 2010, 03:06:12 PM
Nice little mod. Congrats
Title: Re: New Topic in Different Color
Post by: Joker™ on July 26, 2010, 03:21:22 PM
Thanks alot ;D
Title: Re: New Topic in Different Color
Post by: flutter on October 20, 2010, 05:05:06 PM
I'd have liked to have been able to pick the colour for the new topics.  We intend to have a sepia coloured theme and blue would stand out horribly.  Any plans on letting us change the colour through css or anything?  Or is there a way to change it ourselves in the code?  The last one being a good one.  You must have written the colour somewhere in the code, so can you tell us where and we can change it ourselves.
Title: Re: New Topic in Different Color
Post by: Joker™ on October 21, 2010, 01:24:49 AM
Quote from: flutter on October 20, 2010, 05:05:06 PM
I'd have liked to have been able to pick the colour for the new topics.  We intend to have a sepia coloured theme and blue would stand out horribly.  Any plans on letting us change the colour through css or anything?  Or is there a way to change it ourselves in the code?  The last one being a good one.  You must have written the colour somewhere in the code, so can you tell us where and we can change it ourselves.
Forgot to tell your version. Go to mod page and parse the version you have downloaded.
Title: Re: New Topic in Different Color
Post by: flutter on October 21, 2010, 04:52:12 AM
it's 2.0 r3.  So I can change the css in the files then.  I'll go have a look at it
Title: Re: New Topic in Different Color
Post by: Joker™ on October 21, 2010, 04:58:36 AM
http://custom.simplemachines.org/mods/index.php?action=parse;mod=2637;attach=151754;smf_version=2.0_RC3

see the color codes used in index.css and change color hex code as per you liking.
Title: Re: New Topic in Different Color
Post by: flutter on October 21, 2010, 05:56:26 AM
Thank you so much, this will be lovely for our forum
Title: Re: New Topic in Different Color
Post by: roryjsk on January 10, 2011, 01:16:56 AM
Two questions.

How can I retain my sticky graphic on the right side of the topic?  Since they return after you've read the topic, it seems strange.

Second, is there a way to have either a different color for unread sticky topics?
Title: Re: New Topic in Different Color
Post by: Joker™ on January 10, 2011, 06:08:58 AM
Quote from: roryjsk on January 10, 2011, 01:16:56 AM
Two questions.

How can I retain my sticky graphic on the right side of the topic?  Since they return after you've read the topic, it seems strange.

Second, is there a way to have either a different color for unread sticky topics?
How can I help you, if you don't tell me your
1. SMF version
2. Theme.

These are most basic things which you must write in any graphic related post.
Title: Re: New Topic in Different Color
Post by: Masterd on January 10, 2011, 06:32:46 AM
Nice mod! :D
Title: Re: New Topic in Different Color
Post by: roryjsk on January 10, 2011, 07:10:44 AM
My apologies.  I had been working on my site all day, wrote the post, and abruptly conked out.   :P

SMF version 2.0 RC4

Theme is BlueMaze.
Title: Re: New Topic in Different Color
Post by: Joker™ on January 10, 2011, 07:51:34 AM
Quote from: Masterd on January 10, 2011, 06:32:46 AM
Nice mod! :D
Thank you :).


Quote from: roryjsk on January 10, 2011, 07:10:44 AM
My apologies.  I had been working on my site all day, wrote the post, and abruptly conked out.   :P

SMF version 2.0 RC4

Theme is BlueMaze.
One last thing, can you show me by some screen shots that what exact changes you would like to have ;).
Title: Re: New Topic in Different Color
Post by: roryjsk on January 10, 2011, 11:33:32 AM
Could there be a separate "unread" color unique for sticky topics, to keep them standing out?
Title: Re: New Topic in Different Color
Post by: Joker™ on January 11, 2011, 11:10:02 PM
Quote from: roryjsk on January 10, 2011, 11:33:32 AM
Could there be a separate "unread" color unique for sticky topics, to keep them standing out?
I've not tested the code yet, but you can try this. Make changes in the following file

Make backup of file before editing it
Themes\<your theme>\MessageIndex.template.php (If your folder doesn't have this file, open Default theme folder)

Find:
if ($topic['new'])
$color_class = 'new';


Replace it with:
if ($topic['new'] && $topic['is_sticky'])
$color_class = 'stickybg';
elseif ($topic['new'])
$color_class = 'new';
Title: Re: New Topic in Different Color
Post by: Siirist on June 29, 2011, 12:52:48 AM
Hi ya Joker,

Upgraded ver 2.0 RC5 to ver 2.0 Final and am adding Mods.  Like this one, ,  ;D, but it's not working for me using ver 2.0 final, Default Theme.  :-\
See attached Screen Shot.  ???
Hmmm.

Thanks in advance.  ;)

Take Care,
Cloud  8)
Title: Re: New Topic in Different Color
Post by: Joker™ on June 29, 2011, 02:26:36 AM
Quote from: A_Survivor on June 29, 2011, 12:52:48 AM
Hi ya Joker,

Upgraded ver 2.0 RC5 to ver 2.0 Final and am adding Mods.  Like this one, ,  ;D, but it's not working for me using ver 2.0 final, Default Theme.  :-\
See attached Screen Shot.  ???
Hmmm.

Thanks in advance.  ;)

Take Care,
Cloud  8)

I think this mod changes the color of post links inside of the boards.
Title: Re: New Topic in Different Color
Post by: lorth on June 29, 2011, 03:57:10 AM
i tried this mod on my 1.1.14 test forum with the default theme, and if the mod is enabled the "new postings" icon (and link) next to the topics headline doesn't get displayed.

any clue how to get that back?
Title: Re: New Topic in Different Color
Post by: Joker™ on June 29, 2011, 06:52:54 AM
In themes\default\MessageIndex.template.php (Make backup of file before editing it)

Code (Find:) Select
echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</b>' : '';



Code (Add after:) Select
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';
Title: Re: New Topic in Different Color
Post by: lorth on June 29, 2011, 08:15:54 AM
works perfectly, thanks! :)
Title: Re: New Topic in Different Color
Post by: Siirist on June 29, 2011, 10:18:15 AM
Quote from: Joker™ on June 29, 2011, 02:26:36 AM
Quote from: A_Survivor on June 29, 2011, 12:52:48 AM
Hi ya Joker,

Upgraded ver 2.0 RC5 to ver 2.0 Final and am adding Mods.  Like this one, ,  ;D, but it's not working for me using ver 2.0 final, Default Theme.  :-\
See attached Screen Shot.  ???
Hmmm.

Thanks in advance.  ;)

Take Care,
Cloud  8)

I think this mod changes the color of post links inside of the boards.

Yup, that was it.
Thanks,
Cloud  8)
Title: Re: New Topic in Different Color
Post by: reboam on February 02, 2012, 11:55:54 AM
Hi.

I've installed your Mod on my SMF 2.02.
It seems my "Jump to last post button" have disappeared. How can I make it come back?

Thanks!


Title: Re: New Topic in Different Color
Post by: Joker™ on February 02, 2012, 12:08:20 PM
That happened on the default theme or custom theme?
Title: Re: New Topic in Different Color
Post by: reboam on February 02, 2012, 01:07:54 PM
Quote from: Joker™ on February 02, 2012, 12:08:20 PM
That happened on the default theme or custom theme?

Custom theme.

Take a look if you want: http://www.offtopicalia.com/foro/index.php?board=1.0

As you see, on the right side of each post, it seems to appear the button. Ok. But before installing your mod that blue button appeared close to each post title.
Title: Re: New Topic in Different Color
Post by: Joker™ on February 02, 2012, 01:15:12 PM
Bug with the mod ;).

Give me a few mins to update it.

Edit - Mod updated.
Title: Re: New Topic in Different Color
Post by: reboam on February 02, 2012, 03:39:52 PM
Working perfectly now.  ;D


Thanks!
Title: Re: New Topic in Different Color
Post by: OCJ on February 05, 2012, 01:25:17 AM
Nice but for guests everything appears  'new' in the colour. It destroys the look on any other themes if all the forum posts look this way.

As you said, you can edit the css file colour but it would be better being able to set a time limit for what is 'new', particularly for guest view. Ideally an admin section to input number of days considered new and a colour (any format will do ...hex).

Title: Re: New Topic in Different Color
Post by: Joker™ on February 05, 2012, 08:06:09 AM
Quote from: igirisjin on February 05, 2012, 01:25:17 AMNice but for guests everything appears  'new' in the colour.
I'll see it, and most probably fro guests there should be no new color. Must be some coding error made from my side :P.

How about a field in admin panel where you can put the hex code of new color.
Title: Re: New Topic in Different Color
Post by: OCJ on February 05, 2012, 11:43:29 PM
QuoteHow about a field in admin panel where you can put the hex code of new color.

Would be easy for everyone.
Title: Re: New Topic in Different Color
Post by: Hj Ahmad Rasyid Hj Ismail on October 08, 2014, 05:35:58 AM
Hiya all.

I am entrusted with this mod now but I haven't have time to look into it deeply yet. I also believe that my brother Joker is a better coder than I am. I will try to do my best in handling this mod.

This mod idea is almost similar to my mod - HLBM: Highlight Buddy Message (http://custom.simplemachines.org/mods/index.php?mod=3933). These two mods won't be merged by similar idea may be used to enchance each other.

Thank you for supporting this mod and do feel free to ask for support.
Title: Re: New Topic in Different Color
Post by: CİHAD_EHLİ on March 27, 2015, 03:45:15 PM
What does this mod is there any setting
Title: Re: New Topic in Different Color
Post by: Harvester on April 19, 2017, 06:50:23 PM
This mod has been working fine for me but I now want to change the color of the new topics and I cannot find where to do that in the admin area. Where would that be?
Title: Re: New Topic in Different Color
Post by: br360 on April 20, 2017, 01:20:32 AM
That would be in your theme's index.css.

Look for


/* New topics get a different background */
.new
{
background: #a0b9c9;
}
.new2
{
background: #baccd8;
}


Then just change the background colors to whatever you want
Title: Re: New Topic in Different Color
Post by: Harvester on April 20, 2017, 10:04:39 AM
Thank you! :)