Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Aimeri2 on September 22, 2014, 01:44:44 PM

Title: Need Help: Dropdown Color
Post by: Aimeri2 on September 22, 2014, 01:44:44 PM
I am using: SMF 2.0.8

I am trying to add a new color to the "Change Color" drop-down when posting/editing a post.  So far I have edited the Subs.php, adding in:

array(
'tag' => 'hotpink',
'before' => '<span style="color:#FF0066;" class="bbc_color">',
'after' => '</span>',
),


I then went into the Post.english.php file and added:

$txt['hotpink'] = 'Hot Pink';

Under:

$txt['change_color'] = 'Change Color';

So it looks like:


$txt['change_color'] = 'Change Color';
$txt['black'] = 'Black';
$txt['red'] = 'Red';
$txt['yellow'] = 'Yellow';
$txt['pink'] = 'Pink';
$txt['green'] = 'Green';
$txt['orange'] = 'Orange';
$txt['purple'] = 'Purple';
$txt['blue'] = 'Blue';
$txt['beige'] = 'Beige';
$txt['brown'] = 'Brown';
$txt['teal'] = 'Teal';
$txt['navy'] = 'Navy';
$txt['maroon'] = 'Maroon';
$txt['lime_green'] = 'Lime Green';
$txt['hotpink'] = 'Hot Pink';


I seem to be missing something though because "Hot Pink" does not appear in the drop down menu.
I should note that if I use:

[color=hotpink]Text Goes Here[/color]

Then it shows the proper color.   I just can not get it in the drop down menu.

Thank you in advance for any help!
Title: Re: Need Help: Dropdown Color
Post by: Shambles on September 22, 2014, 02:30:19 PM
You will need to make an equivalent change to GenericControls.template.php in your Themes/default folder.
Title: Re: Need Help: Dropdown Color
Post by: Aimeri2 on September 22, 2014, 02:55:04 PM
Thank you very much Shambles.  Has been driving me nuts.   I really appreciate the help!
Title: Re: Need Help: Dropdown Color
Post by: Arantor on September 22, 2014, 02:59:40 PM
In fact the change made to Subs.php was actually unnecessary; that essentially gave you a [hotpink] bbcode instead of adjusting the color bbcode.
Title: Re: Need Help: Dropdown Color
Post by: Aimeri2 on September 22, 2014, 03:45:51 PM
Ohh okay, thanks for the clarification Arantor!