We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Microsoft Word-like Color Choose Box
Topic Started: Aug 15 2010, 03:18 AM (260 Views)
Bismuth666
Member
[ * ]
Board Address: Private
Board Software: ZetaBoards
Description: Despite the default color choose in reply page (on Zetaboards), I want it to be something like this, full with additional color too as if in Microsoft Word.

Is there anyone could help me? Thanks in advance ^_^
Offline Profile Goto Top
 
Roby-ZNR
Member Avatar
Efficacy
[ *  *  *  *  *  * ]
Below the Board
Code:
 
<script type='text/javascript'>
/* <![CDATA[ */
(function() {
if (location.href.indexOf('post/?mode=2&type=1') !==-1 || location.href.indexOf('post/?type=1&mode=1') !==-1) {
var add_colors = [ '#9300C4', '#5a70b3', '#80a0ff', '#fb8a00', '#090', '#fe0', '#ee4a2d', '#fff', '#000' ],
i = add_colors.length;
$('select[name=fcolor] option:not(:first)').each(function() { $(this).remove(); });
while (i--) {
$('select[name=fcolor]').append("<option value=" +add_colors[i]+ " style='background-color: " +add_colors[i]+ "; width: 100%; height: 5px; margin: auto; margin-bottom: 3px;'></option>");
}
}
})();
/* ]]> */
</script>

I've already included the colors that are on ZB by default, but to add more you would just edit this line.
Code:
 
[ '#9300C4', '#5a70b3', '#80a0ff', '#fb8a00', '#090', '#fe0', '#ee4a2d', '#fff', '#000', 'ANOTHER_COLOR', 'AND_ANOTHER', 'ONE_MORE' ]

You can use either HEX values as the color or the plain color name such as red.
Offline Profile Goto Top
 
Bismuth666
Member
[ * ]
Works!! Thank you very much, the plain color edit makes it easier :wink:
Offline Profile Goto Top
 
Roby-ZNR
Member Avatar
Efficacy
[ *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic