Olá, fiz as edições que possam ser necessárias!
[Código 1 - Tutorial 1 (Substitua o segundo código passado no tutorial por este] - Código:
jQuery(document).ready(function($){
$('body').prepend('<span class="custom_theme"><input type="text" id="colorpicker" /></span>');
var customElements = ".stat-round, .stat-round";
var customText = ".pun .posthead, .pun .posthead a, #wrap p.author, #ipbwrapper .post-header, #ipbwrapper .post-header a";
$('#colorpicker').ColorPicker({
onSubmit: function(hsb, hex, rgb, el) {
$(el).val(hex);
$(el).ColorPickerHide();
$(el).css("backgroundColor", "#" + hex);
$(customElements).css("background-color", "#" + hex);
$(customText).css("color", "#" + hex);
$.cookie('customcolor',hex,{ expires: 365, path: '/'});
},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
},
onChange: function (hsb, hex, rgb) {
$(customElements).css("background-color", "#" + hex);
$(customText).css("color", "#" + hex);
$.cookie('customcolor',hex,{ expires: 365, path: '/'});
}
})
.bind('keyup', function(){
$(this).ColorPickerSetColor(this.value);
});
if ( ($.cookie('customcolor') != null)) {
$(customElements).css("background-color", "#" + $.cookie('customcolor'));
$(customText).css("color", "#" + $.cookie('customcolor'));
$("#colorpicker").val($.cookie('customcolor'));
}
else{
$(customElements).css("background-color","#000");
$(customText).css("color","#000");
}
});
Caso tenha gostado do segundo tente:
[Substitua o código jQuery passado no tutorial por este]
- Código:
jQuery(function () {
jQuery("#pun-head").prepend('<img src="http://i74.servimg.com/u/f74/17/49/01/62/themee10.png" alt="Change background image" title="Trocar a imagem de fundo" id="nav_background" />');
jQuery("#emptyidleft").prepend('<div id="toggle_background" style="display: none;"><div id="editorPrimary" class="themeBoxes" style="display: block"><span id="bg1" style="background-color: #b22b2b;" data-main="b22b2b">Vermelho</span><span id="bg2" style="background-color: #cea128;" data-main="#cea128">Banana</span><span id="bg3" style="background-color: #353F3F;" data-main="#353F3F">Escurecido</span><span id="bg4" style="background-image: -webkit-linear-gradient(#e7e7e7,#E2E2E2) !important;background-image: -moz-linear-gradient(#e7e7e7,#E2E2E2) !important;background-image: -khtml-linear-gradient(#e7e7e7,#E2E2E2) !important;background-image: -o-linear-gradient(#e7e7e7,#E2E2E2) !important;background-image: -ms-linear-gradient(#e7e7e7,#E2E2E2) !important;color:#727272 !important;" data-main="#e7e7e7,#E2E2E2">Normal</span></div></div>');
jQuery("#editorPrimary span").click(function () {
jQuery(".stat-round").removeClass("bg1 bg2 bg3 bg4 bg_custom").addClass(jQuery(this).attr("id"));
my_setcookie("editorPrimary", jQuery(this).attr("id"), true);
});
jQuery("#custom_submit").click(function () {
var urlbg = jQuery("#custom_input").val();
jQuery(".stat-round").removeClass("bg1 bg2 bg3 bg4 bg_custom").addClass("bg_custom").css("background-image", "url('" + urlbg + "')");
my_setcookie("editorPrimary", urlbg, true);
});
jQuery("#nav_background").click(function () {
jQuery("#toggle_background").slideToggle()
});
if (my_getcookie("editorPrimary") != "") {
if (my_getcookie("editorPrimary").length > 4) {
jQuery(".stat-round").addClass("bg_custom").css("background-image", "url(" + my_getcookie("editorPrimary") + ")");
} else {
jQuery(".stat-round").addClass(my_getcookie("editorPrimary"))
}
}
});
Tente e boa sorte!
Até +!