Color Picker
#1
Can someone assist me in coding up a colour picker for one of my themes.
I'm no good at jQuery and dont know where to start.
Although ive found this posted around; http://www.eyecon.ro/colorpicker/

I will happily pay for your time.

Thank you
Reply
#2
This may helps you: http://www.mybbsecurity.net/topic-colorpicker-not-save
Reply
#3
Yep Ive read it Wink But apart from finding the link in the OP I couldn't continue any further.
Reply
#4
(2012-08-24, 12:12 PM)BleepyEvans Wrote: Yep Ive read it Wink But apart from finding the link in the OP I couldn't continue any further.

I've debated on giving this a shot myself, but it's tricky. Undecided
Try checking out the jQuery tuts on Codecademy. Once you know the basics it's really easy to understand how the color picker works.
(2012-09-25, 08:28 PM)Leefish Wrote:
(2012-09-25, 08:19 PM)xStefan Wrote: Just got back from gym and eat some kit kats...

I am uninterested in your eating habits.
Reply
#5
Well, so long as you're pretty good with jQuery this isn't too much trouble. Basically set all the elements you want changed to a variable, then inside an if statement (If a color cookie has been set) change those element's CSS.

If you mean just showing the color picker, simply upload the files to your server, then you'll want to include the files in your headerinclude:

<script type="text/javascript" src="{$mybb->settings['bburl']}/colorpicker/js/colorpicker.js"></script>
<link rel="stylesheet" media="screen" type="text/css" href="{$mybb->settings['bburl']}/colorpicker/css/colorpicker.css" />

then invoke it by adding this to your code somewhere:

<div id="colorSelector"><div style="background-color: #DDD"></div></div>
<div id="colorpickerHolder"></div>

The plugin comes with some pretty useful stuff as well, like onChange.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)