News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

adding and removing Front Colors

Started by Kat9119, April 23, 2009, 12:16:57 PM

Previous topic - Next topic

Kat9119

I'm looking for a way to add & remove the font colors that are in the drop down box that members use..

I've read in a few very old posts to edit post.template.php, but I don't have that file...

I only have:

BoardIndex.template.php (which I had to add, it didn't come with the theme)
error_log
index.php
index.template.php
style.css

So how do I go about adding and removing font colors?


Edit: I was going to use the file from "Default" theme, but at the top of the file it says version 1.1.5..I'm running 1.1.8 didn't know if that would matter...

shadow82x

Do you mean the color box while posting?

In ./Themes/default/Post.template.php

You can modify
        // Print a drop down list for all the colors we allow!
        if (!isset($context['disabled_tags']['color']))
            echo ' <select onchange="surroundText(\'[color=\' + this.options[this.selectedIndex].value.toLowerCase() + \']\', \'[/color]\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0; document.forms.', $context['post_form'], '.', $context['post_box_name'], '.focus(document.forms.', $context['post_form'], '.', $context['post_box_name'], '.caretPos);" style="margin-bottom: 1ex;">
                            <option value="" selected="selected">', $txt['change_color'], '</option>
                            <option value="Black">', $txt[262], '</option>
                            <option value="Red">', $txt[263], '</option>
                            <option value="Yellow">', $txt[264], '</option>
                            <option value="Pink">', $txt[265], '</option>
                            <option value="Green">', $txt[266], '</option>
                            <option value="Orange">', $txt[267], '</option>
                            <option value="Purple">', $txt[268], '</option>
                            <option value="Blue">', $txt[269], '</option>
                            <option value="Beige">', $txt[270], '</option>
                            <option value="Brown">', $txt[271], '</option>
                            <option value="Teal">', $txt[272], '</option>
                            <option value="Navy">', $txt[273], '</option>
                            <option value="Maroon">', $txt[274], '</option>
                            <option value="LimeGreen">', $txt[275], '</option>
                        </select>';
        echo '<br />';


You can add a color by adding something like
<option value="#324F17">', COLORNAME, '</option>

Also, I suggest using hex color codes for the color value.
Colin B
Former Spammer, Customize, & Support Team Member

Kat9119

Thanks, I did finally get that from a post...but I wasn't sure if it was okay to add the file I mentioned

Advertisement: