Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Nathaniel on August 03, 2008, 07:57:43 PM

Title: Highlight Message Backgrounds
Post by: Nathaniel on August 03, 2008, 07:57:43 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1310)
Highlight Message Backgrounds version 1.12 by Nathaniel
Overview:

This mod allows you to add coloured highlighting to the background of every Post/PM made by certain membergroups. Remember that the colors must be valid 6 digit hexadecimal html color codes (http://en.wikipedia.org/wiki/Web_colors).

Settings are found in the Admin panel:
For SMF 1.1.x: "Posts and Topics" section -> "Highlight Message Backgrounds" tab.
For SMF 2: "Forums" drop down menu -> 'Posts and Topics' -> 'Highlight Message Backgrounds' Tab.

To turn highlighting on/off for a certain board you can do it in the admin section, when you modify/create a board. The setting is called "Highlight Post Backgrounds?". By default, all boards will have this setting checked.

The special 'Moderator' color will only be used to Highlight the Message Backgrounds for any Regular Members in the particular boards that they moderate.

Donate:
If this mod has helped you, then feel free to support the developer by Donating (http://lhvwb.verbtest.com).

Version Changes:

v1.12
Upgraded for SMF 1.1.8 and SMF 2 RC1.
Removed support for SMF 2 Beta 3.1 and 4.
Added Turkish translation thanks to Alpay (http://www.simplemachines.org/community/index.php?action=profile;u=39002).

v1.11
Upgraded for SMF 1.1.6 and SMF 2 Beta 4.

v1.1
Fixed bugs with Board Moderator Post Highlighting.
Added the ability to turn highlighting on/off for each board.

v1.0
Original Mod release.
Title: Re: Highlight Message Backgrounds
Post by: jossanaijr on August 03, 2008, 08:56:40 PM
WOW!
Title: Re: Highlight Message Backgrounds
Post by: Kimmie on August 03, 2008, 09:22:58 PM
screenshots?
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 03, 2008, 10:55:57 PM
Quote from: Kimmie on August 03, 2008, 09:22:58 PM
screenshots?

Screenshots are up! :D
Title: Re: Highlight Message Backgrounds
Post by: aldo on August 04, 2008, 01:08:32 AM
Awesome idea :) I have seen it on other forums
Title: Re: Highlight Message Backgrounds
Post by: dannbass on August 04, 2008, 01:25:42 AM
Very cool! You know what will be nice for a future version, enable it per board, in a support forum can be useful.

Thanks a lot for the work!
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 04, 2008, 01:30:43 AM
Quote from: ♫ ♪♩♬♭♮ ♯ on August 04, 2008, 01:25:42 AM
Very cool! You know what will be nice for a future version, enable it per board, in a support forum can be useful.

Okay, I'll make a note of that for something to add to a future version, it seems like a good idea.

Thank you for the suggestion,
LHVWB
Title: Re: Highlight Message Backgrounds
Post by: Kimmie on August 04, 2008, 04:08:54 AM
can you make a setting to where only the topic starters posts are highlighted? That would be extremely helpful when watching for replies from that person.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 04, 2008, 06:40:12 AM
Quote from: Kimmie on August 04, 2008, 04:08:54 AM
can you make a setting to where only the topic starters posts are highlighted? That would be extremely helpful when watching for replies from that person.

Nope, this mod is only really designed for one purpose, to highlight *all* of the topics made by members of certain membergroups. It highlights the colors for everyone as well, I am unlikely to make it specific for particular members or show different things to different membergroups, because that woul get fairly complicated, although I might have a think about it.

The main feature which I can think to add to this mod is the one suggested by ♫ ♪♩♬♭♮ ♯, having different colors for different boards, or only having it on for certain boards (more likely).
Title: Re: Highlight Message Backgrounds
Post by: Kimmie on August 04, 2008, 11:53:22 AM
Since its based on membergroup, the only reason I would use it would be to have my staff's posts stand out. I really cant think of a reason that you would want "everyones" posts to be different colors as that would get kind of annoying on ones eyes- specially depending on what your theme colors are. I like to keep my theme crisp and clean looking :).

Thanks anyways tho. I am sure it will come in handy for some folks. :)
Title: Re: Highlight Message Backgrounds
Post by: qtime on August 04, 2008, 12:14:34 PM
nice mod, but is not working on my smf 1.1.5 with 2 themes, my default theme is also not displaying other colors.
do others have the same?
Title: Re: Highlight Message Backgrounds
Post by: ccbtimewiz on August 04, 2008, 03:42:34 PM
Quote from: qtime on August 04, 2008, 12:14:34 PM
nice mod, but is not working on my smf 1.1.5 with 2 themes, my default theme is also not displaying other colors.
do others have the same?

Did you define them in Posts and Topics > "Highlight Message Backgrounds"?
Title: Re: Highlight Message Backgrounds
Post by: qtime on August 04, 2008, 03:45:38 PM
Quote from: ccbtimewiz on August 04, 2008, 03:42:34 PM
Quote from: qtime on August 04, 2008, 12:14:34 PM
nice mod, but is not working on my smf 1.1.5 with 2 themes, my default theme is also not displaying other colors.
do others have the same?

Did you define them in Posts and Topics > "Highlight Message Backgrounds"?
yes, but maybe I have to test it on my test board first, because my life board is heavy moderated.

Yes both options are clicked on, PM and posts.
Title: Re: Highlight Message Backgrounds
Post by: Assistance on August 04, 2008, 05:10:16 PM
suggestion:

image background with some small CSS ( like no repeat, align right )
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 04, 2008, 05:21:16 PM
@Kimmie,
I made this mod for a mod request, it is indeed meant to be used for making the posts of staff members or certain membergroups stand out. That could be especially useful in support forums, although I can see why you might not want it in all of your forums, I am going to add turning it on/off for certain boards, when I get some time. ;)  Please note, that you don't have to give a color to guests and normal membergroups, in fact I probably wouldn't, I just add those membergroups, in case anyone wanted to.

@qtime,
Have you check either the "Highlight Post Backgrounds?" or the "Highlight PM Backgrounds?" settings?
Where there any errors when you installed it?
Are you currently getting any related errors from your error log?
Forum Error Log (http://docs.simplemachines.org/index.php?topic=150)

@Assistance,
No so sure about that, but I'll have a think about it.  ;)
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 04, 2008, 06:10:58 PM
The mod works for all groups on my board except Moderators.

Any ideas why it has no effect on the color of their posts?
Title: Re: Highlight Message Backgrounds
Post by: ccbtimewiz on August 04, 2008, 06:17:18 PM
Quote from: xrunner on August 04, 2008, 06:10:58 PM
The mod works for all groups on my board except Moderators.

Any ideas why it has no effect on the color of their posts?

Because the moderators group is not a "real" group. Their posts *should* appear colored on the boards they moderate in.
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 04, 2008, 06:22:28 PM
Quote from: ccbtimewiz on August 04, 2008, 06:17:18 PM

Because the moderators group is not a "real" group. Their posts *should* appear colored on the boards they moderate in.


Why does this mod have a box to enter the color rgb code for Moderators, along with the other groups then? That makes no sense in light of what you are claiming.
Title: Re: Highlight Message Backgrounds
Post by: ccbtimewiz on August 04, 2008, 06:30:18 PM
Quote from: xrunner on August 04, 2008, 06:22:28 PM
Quote from: ccbtimewiz on August 04, 2008, 06:17:18 PM

Because the moderators group is not a "real" group. Their posts *should* appear colored on the boards they moderate in.


Why does this mod have a box to enter the color rgb code for Moderators, along with the other groups then? That makes no sense in light of what you are claiming.

So their posts are colored in the boards they moderate in.
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 04, 2008, 06:31:44 PM
Quote from: ccbtimewiz on August 04, 2008, 06:30:18 PM
So their posts are colored in the boards they moderate in.

Exactly, and that is precisely what is not working with this mod - like I said already. The Mod clearly has a box for "Moderators", except no matter what you enter into it, you cannot effect a color change on their posts, like all the other groups the Mod supports. If you can't color the Moderator's posts, then why does this Mod explicitly have a box for "Moderators".

Can you explain what is wrong?
Title: Re: Highlight Message Backgrounds
Post by: ccbtimewiz on August 04, 2008, 06:33:45 PM
Quote from: xrunner on August 04, 2008, 06:31:44 PM
Quote from: ccbtimewiz on August 04, 2008, 06:30:18 PM
So their posts are colored in the boards they moderate in.

Exactly, and that is precisely what is not working with this mod - like I said already. Can you explain what is wrong?

I have no clue. Seems like you found a bug.  :P
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 04, 2008, 07:17:54 PM
Perhaps, yes. I think since it's v 1.0 it may be a small bug, but I can use it even so. I'd like to see what the mod author says, or if I'm doing something wrong???
Title: Re: Highlight Message Backgrounds
Post by: ccbtimewiz on August 04, 2008, 07:19:31 PM
Quote from: xrunner on August 04, 2008, 07:17:54 PM
Perhaps, yes. I think since it's v 1.0 it may be a small bug, but I can use it even so. I'd like to see what the mod author says, or if I'm doing something wrong???

We just gotta wait on L.  :P
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 04, 2008, 08:41:12 PM
Ah, all you people with your large ammounts of time to find bugs with my mods. :P

I will have a look at this issue and then fix it as soon as possible, I must say that I hadn't though much about board moderators. I will try to add the highlighting only for certain boards at the same time, should happen over the next day or two.
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 04, 2008, 08:43:15 PM
Quote from: LHVWB on August 04, 2008, 08:41:12 PM
Ah, all you people with your large ammounts of time to find bugs with my mods. :P

:-) thanks much!
Title: Re: Highlight Message Backgrounds
Post by: kizley on August 08, 2008, 10:02:47 AM
SMF 1.5 ,default

i have installed this,set the colour etc but cant find any option to proceed.

I mean when i tried to highlight the background of my post,i find no option anywhere.


pls help
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 08, 2008, 08:51:08 PM
Quote from: kizley on August 08, 2008, 10:02:47 AM
SMF 1.5 ,default

i have installed this,set the colour etc but cant find any option to proceed.

I mean when i tried to highlight the background of my post,i find no option anywhere.
pls help

There is no option to 'manually highlight' your posts, it highlights all posts from certain membergroups. Please make sure that you can enabled the "Highlight Post Backgrounds?" setting.
Title: Re: Highlight Message Backgrounds
Post by: kizley on August 09, 2008, 06:43:49 AM
okay,thanks i get it now.

thanks.

Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 12, 2008, 07:28:16 AM
I have now updated this mod with a bug-fix and also a request from some users, below are the changes:

Version Changes (1.1):
Fixed bugs with Board Moderator Post Highlighting.
Added the ability to turn highlighting on/off for each board.
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 12, 2008, 01:25:04 PM
Quote from: LHVWB on August 12, 2008, 07:28:16 AM
Fixed bugs with Board Moderator Post Highlighting.

Sorry to report that it still does not highlight the moderators posts on my board using the default SMF theme. yes I have uploaded the new version, and yes the checkmark is checked on the boards. It only highlights the global mods and Admin posts.
Title: Re: Highlight Message Backgrounds
Post by: ccbtimewiz on August 12, 2008, 01:26:10 PM
Quote from: xrunner on August 12, 2008, 01:25:04 PM
Quote from: LHVWB on August 12, 2008, 07:28:16 AM
Fixed bugs with Board Moderator Post Highlighting.

Sorry to report that it still does not highlight the moderators posts on my board using the default SMF theme. yes I have uploaded the new version, and yes the checkmark is checked on the boards. It only highlights the global mods and Admin posts.

Have you set the moderators to the boards?
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 12, 2008, 01:41:55 PM
Yes of course, I have had moderators for a long time.

I did an experiment though. I set up a new membergroup called "staff" and assigned the moderators to that as their primary membergroup, then their posts do get colored. I think the mod is working off of primary membergroups, and moderators aren't members of primary membergroups, which may be why this mod always fails to color the moderator's posts. Admin & Global mods ARE members of primary membergroups. I think the author needs to look into this aspect of the problem.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 12, 2008, 08:46:18 PM
You are correct that this mod does normally work of primary membergroups, however moderators are an exception. If (and only if) the member is a 'Regular Member' then when they post in a forum which they moderate, they will get the color for a moderator.

I know that you probably will still think that there is a bug, so here is an example of it working perfectly:
http://www.verbtest.com/smfdemo/index.php?topic=3.0
http://www.verbtest.com/smfdemo/index.php?topic=5.0

The user lhvwb2, is a regular member in one of the boards and a moderator in the other. The color is different for the moderator post.
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 12, 2008, 08:48:24 PM
Those links are really bad -

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b mod_mono/1.9 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.verbtest.com Port 80
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 12, 2008, 09:01:32 PM
I know, normally my host is really good, but for some reason they aren't working at the moment.

Anyway, the issue that you could be experiencing, would only be occuring if the users that you are setting to moderators, do not have 'Regular Member' as their primary membergroup. I have already thought about ways to change this, I could possibly put a setting in the admin area that allows you to chose between a few different behaviours, ie. "Only Override the Regular Members color", "Use The Moderator Color If the Primary Membergroup has no color" and "Override All Primary Membergroup colors for moderators."
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 12, 2008, 09:05:31 PM
Quote from: LHVWB on August 12, 2008, 09:01:32 PM

Anyway, the issue that you could be experiencing, would only be occuring if the users that you are setting to moderators, do not have 'Regular Member' as their primary membergroup.

Let me play with my member settings given this information and I will post what I find. Thanks...
Title: Re: Highlight Message Backgrounds
Post by: xrunner on August 13, 2008, 04:41:38 PM
Quote from: LHVWB on August 12, 2008, 09:01:32 PM
Anyway, the issue that you could be experiencing, would only be occuring if the users that you are setting to moderators, do not have 'Regular Member' as their primary membergroup. I have already thought about ways to change this, I could possibly put a setting in the admin area that allows you to chose between a few different behaviours, ie. "Only Override the Regular Members color", "Use The Moderator Color If the Primary Membergroup has no color" and "Override All Primary Membergroup colors for moderators."

I have verified that this was causing the issues on my forum. Might be good to put this in the notes for your mod to let people understand how it works better. Thanks.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on August 14, 2008, 03:33:00 AM
@xrunner,
I am glad that you have it working now. I have updated the documentation so that this is clearer.

As I said, I may add some settings to a later version, although unless anyone needs it, I probably won't... ;)
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 13, 2008, 10:57:50 PM
Hey, I'm having an issue,

I put in red (#FF0000) for my Administrator group but when I go and post it doesn't show up? Am I doing something wrong?  :-\
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 13, 2008, 11:08:57 PM
Have you enabled the 'Highlight Post Backgrounds?' setting?
Are you using the default theme, or have you aplied the necessary edits for your custom theme?
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 13, 2008, 11:19:12 PM
I am using a semi- edited default theme,

Changes made:

Added banner through Admin CP
Change the New / No new post icons

Packages:

Modification Packages
   Mod Name    Version    
1.    Highlight Message Backgrounds    1.1    [ Uninstall ] [ List Files ] [ Delete ]
2.    Global Headers Footers    1.4.1    [ Uninstall ] [ List Files ] [ Delete ]
3.    Apache Error Handler    1.0    [ Uninstall ] [ List Files ] [ Delete ]
4.    Karma Buttons    1.0    [ Uninstall ] [ List Files ] [ Delete ]
5.    Skype Integration    1.0    [ Uninstall ] [ List Files ] [ Delete ]
6.    Stars And Badges    2.1    [ Uninstall ] [ List Files ] [ Delete ]
7.    VisualWarning    1.42    [ Uninstall ] [ List Files ] [ Delete ]
8.    Profile Comments    1.4    [ Uninstall ] [ List Files ] [ Delete ]
9.    Award Mod    1.11    [ Uninstall ] [ List Files ] [ Delete ]
10.    SimplePortal    2.0.4    [ Uninstall ] [ List Files ] [ Delete ]
11.    The Rules    1.06    [ Uninstall ] [ List Files ] [ Delete

I have both options checked on (Highlight post and Highlight PM).




Attached is a screenshot of my test post.

Anything else needed just say.

Also I am not sure if the edited version of default does anything? I just changed some images. Nothing else.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 13, 2008, 11:46:25 PM
It should work fine with the default theme, especially if there were no template edit errors when you installed it.

Are you getting any related errors in your error log?
Forum Error Log (http://docs.simplemachines.org/index.php?topic=150)

Also, did you put '#FF0000' or 'FF0000'? The first value would not have saved properly.
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 13, 2008, 11:53:29 PM
I put #FF0000 in my Administrator value. I left my First and Second values blank.

I have no errors related to the Mod in the log.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 13, 2008, 11:56:53 PM
Well, this should be an issue. But do you have the 'Highlight Post Backgrounds?' setting ticked for that board? You can change it when you modify a board.

If that isn't the issue then something must be going wrong with the template edits, so can you post your 'Display.template.php' file?
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 14, 2008, 12:00:29 AM
I checked the board I am using for the test and the checkbox it checked.

Attached the file.

Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 14, 2008, 12:12:18 AM
There don't appear to be any errors with that file. Can you post your 'Display.php' file? The issue may be there.

Also, can you check to see if the PM highlighting is working, and if the highlighting will work for any other membergroups?
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 14, 2008, 12:40:49 AM
I made a new account and made it GM and that didn't work either.

PM highlight does not work.

I can't find a display.php file in my default folder.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 14, 2008, 12:46:11 AM
It should be located in your 'sources' folder ('/sources/Display.php').
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 14, 2008, 12:58:42 AM
Here. Thought it was in themes sorry :p.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 14, 2008, 01:11:02 AM
Okay, I can't find any errors with that file either. The only other file that I could imagine could be having errors is the 'Load.php' file. Although it should be working fine if you didn't have any install errors.
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 14, 2008, 01:13:36 AM
Nope no install errors... :\.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 14, 2008, 01:16:34 AM
Can you post your 'Load.php' file? That is the last place that could be having errors.

Also, is your default theme with edits separate to the normal default theme as a 'duplicate'? Or is it in the 'default' folder?
Title: Re: Highlight Message Backgrounds
Post by: Josh- on September 14, 2008, 01:55:10 AM
My edited version (i change only 2 images) is on the original "default" folder.

Load.php attached.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on September 15, 2008, 03:35:44 AM
@Josh-,
I can't find any issues with that file either. Can you try to uninstall and then reinstall the mod to see if that makes it work?

Note to All:

Version 1.11:
Updated for SMF 1.1.6 and SMF 2 Beta 4.
Title: Re: Highlight Message Backgrounds
Post by: Mr_Lon on October 09, 2008, 10:01:11 PM
 :( I had Highlight Message Backgrounds 1.11 up and working fine but goofed it up somehow? I updated to v1.1.6 and had some problems with a couple Php scripts and now it's not working. I see that:
I must have goofed something else up too........

Any HELP PLEASE

Lon
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on October 10, 2008, 01:08:14 AM
@Mr_Lon,
Well , the most sensible solution would be to either manually uninstall the mod or overwrite all of your files with clean versions (this is a bad option because it would uninstall all mods - although it might fix any other issues you have).

If you want to uninstall the mod manually:
1) You can use the  'Manual Install Instructions for SMF' function to get a list of edits that this mod makes, and then you can perform the reverse, so that you remove all of the mods code.
2) I should be able to remove it for you if you all the files listed by the mod site with that function.

If you want to overwrite all your forum files:
You should extract the contents of the 'Large upgrade' for SMF 1.1.6 into your SMF directory, using FTP.
How do I use FTP? / What is FTP? (http://docs.simplemachines.org/index.php?topic=480)
Title: Re: Highlight Message Backgrounds
Post by: isaacd93 on October 20, 2008, 02:36:59 PM
how can i make it work for a different theme... the theme i want to use is  http://murpo.com/design/index.php
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on October 20, 2008, 04:25:50 PM
Can you post your '/Themes/{themename}/Display.template.php' and '/Themes/{themename}/PersonalMessage.template.php' files?
Title: Re: Highlight Message Backgrounds
Post by: isaacd93 on October 21, 2008, 04:44:45 PM
i dont have a personalmessage.template.php file theres the display one
Title: Re: Highlight Message Backgrounds
Post by: Paracelsus on October 21, 2008, 05:17:24 PM
Nice Mod.

- Is it possible to restrict its use by board(s)?
- Could it be possible to remove highlight feature from topic starting posts?
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on October 21, 2008, 06:18:57 PM
@isaacd93,
Try the attached file.

@Paracelsus,
1) That is already a feature of this mod. You can turn it on/off for certain boards when you modify/create any paticular board, in the admin panel under 'Manage Boards'.
2) That should be possible. Perform the edit below for your '/Themes/{themename}/index.template.php' file.

Find this code:
!empty($message['highlightcolor']) ? 'background-color:#'.$message['highlightcolor'].';' : ''
Replace with this code:
!empty($message['highlightcolor']) && $message['id'] != $context['first_message'] ? 'background-color:#'.$message['highlightcolor'].';' : ''
Title: Re: Highlight Message Backgrounds
Post by: Paracelsus on October 22, 2008, 04:05:04 AM
Quote from: LHVWB on October 21, 2008, 06:18:57 PM
@isaacd93,
Try the attached file.

@Paracelsus,
1) That is already a feature of this mod. You can turn it on/off for certain boards when you modify/create any paticular board, in the admin panel under 'Manage Boards'.
2) That should be possible. Perform the edit below for your '/Themes/{themename}/index.template.php' file.

Find this code:
!empty($message['highlightcolor']) ? 'background-color:#'.$message['highlightcolor'].';' : ''
Replace with this code:
!empty($message['highlightcolor']) && $message['id'] != $context['first_message'] ? 'background-color:#'.$message['highlightcolor'].';' : ''

It works great! Tkx.

The only thing I miss is a feature to restrict background highlighting to member that started the topic instead of the whole group in every topic, otherwise it's perfect.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on October 22, 2008, 04:50:09 AM
That should be really easy, try the code below:
!empty($message['highlightcolor']) && $message['id'] != $context['first_message'] && $context['topic_starter_id'] == $message['member']['id'] ? 'background-color:#'.$message['highlightcolor'].';' : ''

That code will only highlight the posts of the topics author not including the first post.

Also, I meant the 'Display.template.php' file, not the 'index.template.php' file. ;)
Title: Re: Highlight Message Backgrounds
Post by: Paracelsus on October 22, 2008, 10:21:44 AM
Quote from: LHVWB on October 22, 2008, 04:50:09 AM
That should be really easy, try the code below:
!empty($message['highlightcolor']) && $message['id'] != $context['first_message'] && $context['topic_starter_id'] == $message['member']['id'] ? 'background-color:#'.$message['highlightcolor'].';' : ''

That code will only highlight the posts of the topics author not including the first post.

Also, I meant the 'Display.template.php' file, not the 'index.template.php' file. ;)

;D I got that part... I'll try your little tuning and tell you later how it went.
Title: Re: Highlight Message Backgrounds
Post by: Paracelsus on October 22, 2008, 10:27:47 AM
Superb! Thanks. ;)
Title: Re: Highlight Message Backgrounds
Post by: isaacd93 on October 23, 2008, 10:03:22 AM
works thanks
Title: Re: Highlight Message Backgrounds
Post by: Alpay on December 22, 2008, 01:33:49 PM
Dear LHVWB (http://www.simplemachines.org/community/index.php?action=profile;u=150164)
I would like permission to translate your mod, Highlight Message Backgrounds (http://custom.simplemachines.org/mods/index.php?mod=1310) into Turkish. If you accept, I also want to kindly ask you to release it in the mod site, so that I won't be violating any redistribution rules via redistibuting the mod myself. Thank you in advance.

Best Regards,
Alpay (http://www.simplemachines.org/community/index.php?action=profile;u=39002)

Modifications.turkish.php
Quote// Highlight Message Backgrounds Mod Text.
$txt['HighlightMessageBackgrounds_tab_heading'] = 'Mesaj Arkaplan Rengi';
$txt['HighlightMessageBackgrounds_post'] = 'Mesaj Arkaplan Rengi Aktif?';
$txt['HighlightMessageBackgrounds_pm'] ='Pm Mesaj Arkaplanı Aktif??';
$txt['HighlightMessageBackgrounds_colors'] = 'Grup Üyelikleri İçin Renkler ( Hexadecimal Renk Kodları geçerlidir 000000 gibi.):';
$txt['HighlightMessageBackgrounds_description'] = 'Bu Ayarlar Sadece Mesaj Arkaplanları Rekleri için geçerlidir, <br />Unutmayınız standart html renk kodları geçerlidir eğer daha fazla yardım istiyorsanız <a href="http://en.wikipedia.org/wiki/Web_colors">Tıklayınız</a>.';
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on December 22, 2008, 05:33:49 PM
@Alpay,
Thank you for doing that translation. I will try to update the mod as soon as possible. :)
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on February 08, 2009, 05:12:14 AM
v1.12
Upgraded for SMF 1.1.8 and SMF 2 RC1.
Removed support for SMF 2 Beta 3.1 and 4.
Added Turkish translation thanks to Alpay.

@Alpay,
Sorry that I took so long to update this mod, I have now added the turkish translation. Thanks for making it. :)
Title: Re: Highlight Message Backgrounds
Post by: Joe N on February 18, 2009, 11:48:03 AM
Awesome, I have been wanting a mod to colour my posts

Thanks  ;D
Title: Re: Highlight Message Backgrounds
Post by: Jessikard on June 11, 2009, 10:58:45 AM
 :'( the package is damaged or invalid  :'(
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on June 11, 2009, 07:48:41 PM
@Jessikard,
Try redownloading it, and then reuploading it.

Also try chmoding your 'packages' directory to 0777.
Title: Re: Highlight Message Backgrounds
Post by: Jessikard on June 11, 2009, 08:04:58 PM
same error and i don't want to install manually - to many changes

i thought it would run with smf1.1.9 because i read
QuoteCompatible With:
    1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 2.0 RC1, 2.0 RC1-1

is there a way to manage it ?
Title: Re: Highlight Message Backgrounds
Post by: mquin on June 15, 2009, 10:35:54 AM
I'm having a problem with this mod, i'm running SMF RC1-1

When i go "Admin" -> "Boards" -> "Select a board" -> tick the "Highlight Post Backgrounds?" and click "Modify". Go back to that board and scroll to the bottom, it's unticked again, everytime i go to tick it and click "Modify" it unticks it :(, any help please?

Thanks,

Mquin
Title: Re: Highlight Message Backgrounds
Post by: mquin on June 18, 2009, 04:24:52 AM
Can anyone help for the above please?
Title: Re: Highlight Message Backgrounds
Post by: Claud on July 01, 2009, 04:28:47 PM
What mods do you have installed? They might be corrupting. Try check the error log, and try to remember if there where any issues during installation.


I have a problem, when i want to apply this mod on my theme (well regardless which one i choose lol) i get this:
     Execute Modification     ./Themes/RuNet/Display.template.php     Test failed
      1.    Replace    ./Themes/RuNet/Display.template.php    Test failed

FIND:
echo ' <div class="clearfix ', !$is_first_post ? 'topborder ' : '', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', ' largepadding">';

Replace:
echo ' <div class="clearfix ', !$is_first_post ? 'topborder ' : '', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', ' largepadding" ', !empty($message['highlightcolor']) ? 'style="background-color:#'.$message['highlightcolor'].';"' : '', '>';

Please help :p
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on July 02, 2009, 01:27:37 AM
Sorry about the wait on support here, I don't check this topic that often. ;)

@Jessikard,
This mod is compatible with that version, the issue is with your package manager not the mod itself. Please try chmoding your 'packages' directory to 0777 again, if that doesn't work then try creating a directory called 'temp' within your 'packages' directory, and chmoding that to 0777 as well.

@mquin,
Did you have any errors when you installed the mod?

@Claud,
Firstly, I am assuming that you use SMF 2.

You will have to manually apply the mod for your custom themes, it shouldn't be too difficult. I am not sure how much coding experience you have though, you will need to find the correct place to insert the 'style' code below for your specific theme. (That code sets the style of a html element so that it will appear the correct color)


', !empty($message['highlightcolor']) ? 'style="background-color:#'.$message['highlightcolor'].';"' : '', '


If you had no idea what I was talking about then please post the 'Display,template.php' file from your custom theme.
Title: Re: Highlight Message Backgrounds
Post by: Claud on July 02, 2009, 02:42:59 AM
Hi
I understand what i have to do, but i don't know where to insert it :p
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on July 02, 2009, 04:31:56 AM
Try the attached file.
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on July 04, 2009, 11:12:45 PM
Any luck with the attached file Claud?
Title: Re: Highlight Message Backgrounds
Post by: flamechica on November 19, 2009, 04:53:22 AM
Will this be updated for RC2?
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on November 19, 2009, 08:37:22 AM
Quote from: flamechica on November 19, 2009, 04:53:22 AM
Will this be updated for RC2?

When I find the time to do it.
Title: Re: Highlight Message Backgrounds
Post by: Pankaj on February 08, 2010, 02:04:39 AM
I am waiting for RC2 too.
Title: Re: Highlight Message Backgrounds
Post by: Alex4108 on April 29, 2010, 05:45:03 PM
Cant use for SMF 1.1.11
Tried renaming the install and modification XML's.  Any help?
Title: Re: Highlight Message Backgrounds
Post by: chinaren on June 22, 2010, 05:10:57 PM
Quote from: Pankaj on February 08, 2010, 02:04:39 AM
I am waiting for RC2 too.
Me for RC3!! My members are clamoring for this one!
Title: Re: Highlight Message Backgrounds
Post by: chinaren on June 22, 2010, 05:27:07 PM
Mmm, looking at it, I think the main thing is to replace the bits in the templates that use tables.  (I lack the skill to do this mind!!)


There was another mod I installed with almost exactly this same issue, though I now forget what that mod was, but the update was done by Sabre.  



Title: Re: Highlight Message Backgrounds
Post by: Ry60003333 on July 10, 2010, 04:57:04 AM
My members and other Administrators would also LOVE to have this modification, but we are also running RC3. :'(
Title: Re: Highlight Message Backgrounds
Post by: chinaren on December 24, 2010, 01:00:23 AM
...and now RC4.   :'(
Title: Re: Highlight Message Backgrounds
Post by: PLAYBOY on June 19, 2011, 02:12:19 PM
Is this gonna be updated for 2.0?
Right now it doesnt install it on 2.0
Title: Re: Highlight Message Backgrounds
Post by: Nathaniel on June 20, 2011, 12:39:27 AM
Quote from: PLAYBOY on June 19, 2011, 02:12:19 PM
Is this gonna be updated for 2.0?
Right now it doesnt install it on 2.0

I will try to get to this mod over the next weeks. It needs to be rewritten for curve, from memory it looked bad without colouring the curved edges, which was going to involve dynamically generating curve images.
Title: Re: Highlight Message Backgrounds
Post by: chinaren on June 20, 2011, 06:44:48 AM
Quote from: Nathaniel on June 20, 2011, 12:39:27 AM
I will try to get to this mod over the next weeks. It needs to be rewritten for curve, from memory it looked bad without colouring the curved edges, which was going to involve dynamically generating curve images.


OMG, it would be awesome to get this back. It's one of the two mods my members really miss. 
Title: Re: Highlight Message Backgrounds
Post by: Grim Line on July 21, 2011, 01:16:08 PM
Please can you upgrade this for 2.0 Nathaniel <3
Title: Re: Highlight Message Backgrounds
Post by: PLAYBOY on July 22, 2011, 04:30:49 AM
Quote from: Nick; on July 21, 2011, 01:16:08 PM
Please can you upgrade this for 2.0 Nathaniel <3

Please somebody update this for 2.0!
Title: Re: Highlight Message Backgrounds
Post by: Grim Line on July 30, 2011, 05:41:11 PM
I'm trying to install this and when i install it i get the following error.

QuoteTable 'unpublis_unpublis.boards' doesn't exist
File: /home/unpublis/public_html/Packages/temp/install-smf2.php
Line: 20

Line 20 is;

$smcFunc['db_add_column']('boards', $column_info);

My version is: 2.0

As i can see it has a "." and not a "_" because there is a databse called;

QuoteUnpublis_boards

But there isn't one called;

QuoteUnpublis.boards

How do i fix this?
Title: Re: Highlight Message Backgrounds
Post by: manyon on September 19, 2011, 08:49:29 AM
Quote from: Grim Line on July 30, 2011, 05:41:11 PM
How do i fix this?

Grim Line,
  in the install-smf2.php file, find the line


$smcFunc['db_add_column']('boards', $column_info);


and insert {db_prefix} so that it looks like:


$smcFunc['db_add_column']('{db_prefix}boards', $column_info);


Manyon
Title: Re: Highlight Message Backgrounds
Post by: HunterP on September 25, 2011, 05:16:06 AM

I've been reading this topic/modification and am actually looking for a different approach. A moderator can post as a regular member (normal replies) or as moderator (like: back on topic!). When posting as moderator, my staff members make their text red. It might be better to highlight the posting as your modification does, but with an additional checkbox...
Title: Re: Highlight Message Backgrounds
Post by: PLAYBOY on November 16, 2011, 06:06:37 AM
Quote from: Nathaniel on June 20, 2011, 12:39:27 AM
Quote from: PLAYBOY on June 19, 2011, 02:12:19 PM
Is this gonna be updated for 2.0?
Right now it doesnt install it on 2.0

I will try to get to this mod over the next weeks. It needs to be rewritten for curve, from memory it looked bad without colouring the curved edges, which was going to involve dynamically generating curve images.

Its been 5 months.
Will anybody please update this mod to install for 2.0.1?
Title: Re: Highlight Message Backgrounds
Post by: chinaren on November 30, 2011, 10:23:26 PM
Quote from: PLAYBOY on November 16, 2011, 06:06:37 AM
Its been 5 months.
Will anybody please update this mod to install for 2.0.1?


:'(   I most heartily agree!  I'd love to have this one back on 2.0.1!!
Title: Re: Highlight Message Backgrounds
Post by: Devicon on July 02, 2012, 06:18:41 PM
will this ever be upgraded?
Title: Re: Highlight Message Backgrounds
Post by: Biology Forums on July 02, 2012, 09:34:40 PM
Is it possible to make it so that the topic's subject line in the message index is colored instead?
Title: Re: Highlight Message Backgrounds
Post by: nephire on July 03, 2012, 02:45:24 PM
I get a bunch of errors when I want to install it .. uhm
http://gyazo.com/f229b70bec0feae9188d094c6c497d1a.png?1341340861
Title: Re: Highlight Message Backgrounds
Post by: Devicon on July 03, 2012, 09:27:07 PM
I don't know, but i would really like to use this xD