Steve
New Member
A member for 8½ years... Exceptional service from Proboards experts 👍
Posts: 81
inherit
205390
0
Jan 6, 2024 5:55:11 GMT -8
Steve
A member for 8½ years... Exceptional service from Proboards experts 👍
81
February 2014
raptor47
|
Post by Steve on Sept 27, 2022 11:07:45 GMT -8
Hi all.
I had originally posted this on the Support Boards, but Scott suggested I repost here...
Original post:
Hi all.
I know this is maybe a long shot (possibly an understatment lol), but is it at all possible to change the default color in the 'Font Color' dropdown we can use when creating a post?
In case I'm not explaining: When I (or another member) begins to write a reply in 'Create Post' there is a 'Font Color' button (next to the B button as above) ...
The default color when you open the dropdown seems to be set at #1979e6
I would like to permanently change this default colour to #5f7788 to avoid having to type in the Hex code each time. So that all I or my members need to do, is click the 'OK' button on the dropdown.
I've tried looking for a way but I'm at a loss to find any solution.
As I said, I know it's a long shot, and you might think I'm being a tad lazy, but it's annoying the hell out of me lol. I would appreciate any help you can give. I'm assuming that there has to be somewhere to change it, or there wouldn't be a default colour in the dropdown in the first place?
Regards in advance,
Steve.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Sept 27, 2022 14:43:17 GMT -8
Hi all.
I had originally posted this on the Support Boards, but Scott suggested I repost here...
Original post:Hi all. I know this is maybe a long shot (possibly an understatment lol), but is it at all possible to change the default color in the 'Font Color' dropdown we can use when creating a post? In case I'm not explaining: When I (or another member) begins to write a reply in 'Create Post' there is a 'Font Color' button (next to the B button as above) ... The default color when you open the dropdown seems to be set at #1979e6 I would like to permanently change this default colour to #5f7788 to avoid having to type in the Hex code each time. So that all I or my members need to do, is click the 'OK' button on the dropdown. I've tried looking for a way but I'm at a loss to find any solution. As I said, I know it's a long shot, and you might think I'm being a tad lazy, but it's annoying the hell out of me lol. I would appreciate any help you can give. I'm assuming that there has to be somewhere to change it, or there wouldn't be a default colour in the dropdown in the first place? Regards in advance, Steve. Try adding this to either your global footer, or at the very bottom of your Posting Page Template. <script type="text/javascript"> $(document).ready(function(){ $('.ui-colorPicker').click(function(){ $('#colorPicker-input').find('input').val('5f7788').keyup(); $('#colorPicker-preview').css('background-color', '#5f7788'); }); }); </script>
|
|
Steve
New Member
A member for 8½ years... Exceptional service from Proboards experts 👍
Posts: 81
inherit
205390
0
Jan 6, 2024 5:55:11 GMT -8
Steve
A member for 8½ years... Exceptional service from Proboards experts 👍
81
February 2014
raptor47
|
Post by Steve on Sept 28, 2022 9:54:18 GMT -8
Hi Todge,
Thanks for the reply. I'm not 100% sure I can do what you've suggested, I'm not exactly an expert in coding etc.
I did try adding your code to the bottom of the Posting Page Template but nothing changed.
Anyhoo, thanks, I thought there might have be a hex code somewhere I could simply change, but it's clearly more complicated than that if at all possible.
Regards,
Steve.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 28, 2022 10:48:09 GMT -8
Steve Try replacing the above code with this <script> $('body').one('mousedown.colorPicker',function(){ $('.ui-colorPicker').data('colorPicker').hex = '5f7788'; }); </script> It uses event delegation to try and get around that tricky timing issue Edits:
- -- - I thought there might have be a hex code somewhere I could simply change - -- - If you wish to have the above code encapsulated in a plugin then here it is as a plugin you can install with a simple color selector added to the UI for easy hex input
Question: How do I install plugins that are not in the online library?Follow the arrows below. Plugins must be .pbp format.It's that simple!
Better to use the built-in setter for hex rather than set it directly since that setter can convert and normalize values replace: $('.ui-colorPicker').data('colorPicker').hex = '5f7788'; with: $('.ui-colorPicker').colorPicker('setHex','5f7786');
|
|
Steve
New Member
A member for 8½ years... Exceptional service from Proboards experts 👍
Posts: 81
inherit
205390
0
Jan 6, 2024 5:55:11 GMT -8
Steve
A member for 8½ years... Exceptional service from Proboards experts 👍
81
February 2014
raptor47
|
Post by Steve on Sept 29, 2022 9:24:35 GMT -8
Hi Chris,
I added your code at the end:
Admin Layout Templates Posting Page
It seems to be working great so far, and if I need to I assume all I need to do to change the default colour in future is change the Hex Code.
Thanks again. Amazing how you guys can take the time to work on the tiny things members bring to you. I might actually try to add the Plug-in at some point too.
Very much appreciated,
Regards Sir,
Steve.
|
|