Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: PlayGroundFor.us on March 31, 2004, 01:34:42 PM

Title: Default posting color
Post by: PlayGroundFor.us on March 31, 2004, 01:34:42 PM
Ok, this probably has been asked for before, but I couldn't find it. Some of my users (on one of my sites) have asked to be able to select a text color by default for all of their posts. I would like to see as option in the profile for them to select this option. Either a mod or as feature in SMF would be great. I don't have the skills to code this myself (yet).
Title: Re: Default posting color
Post by: Ben_S on March 31, 2004, 02:09:26 PM
What about boards with more than one theme, what may look ok on one theme may be unreadable on another, and if you redesign your site at some stage and change the background colour, the old posts may not be readable.
Title: Re: Default posting color
Post by: PlayGroundFor.us on March 31, 2004, 02:40:37 PM
Quote from: Ben_S on March 31, 2004, 02:09:26 PM
What about boards with more than one theme, what may look ok on one theme may be unreadable on another, and if you redesign your site at some stage and change the background colour, the old posts may not be readable.

I would hope that it would be an selectable option, but I must admit I hadn't thought about that part of it.
Title: Re: Default posting color
Post by: [Unknown] on March 31, 2004, 10:46:27 PM
Could be a theme-per-theme option...

-[Unknown]
Title: Re: Default posting color
Post by: PlayGroundFor.us on April 01, 2004, 10:24:35 PM
That would be cool
Title: Re: Default posting color
Post by: [Unknown] on April 01, 2004, 11:20:34 PM
Well, if you read my tutorial on how to create custom profile fields (http://unknown.network32.net/tutorial.smf_custom-profile), that will show you how to do the basics of it.

Then all you have to do is something like this in the postbox sub template under the Post template, find:
if ($context['show_bbc'])

Add just above that:
if ($message == '')
   $message = '[color=' . $options['post_default_color'] . ']<br /><br />[/color]';

This way, even if you upgraded, it would keep working - as long as you make things changes to a new theme - not default.

-[Unknown]
Title: Re: Default posting color
Post by: PlayGroundFor.us on April 02, 2004, 02:18:20 PM
Thank you for your help and I will read the tutorial.