Boas-vindas ao Power Pixel

Junte-se a comunidade! Crie o seu próprio conteúdo, e faça amizades.EntrarCriar uma conta

Background Categorias

3 participantes

Alexandre51 Alexandre51  • Seg 10 Fev 2014 - 13:24

Background Categorias Empty Background Categorias Seg 10 Fev 2014 - 13:24

Qual é minha questão:
Gostaria de saber como faço para mudar a cor do Background das categorias e deixar na mesma cor do Background das estatisticas.
Segue imagem para poderem entender melhor..

[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Obrigado

Endereço do meu fórum:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Versão:
PunBB

Target Target  • Seg 10 Fev 2014 - 13:28

Background Categorias Empty Re: Background Categorias Seg 10 Fev 2014 - 13:28

Olá!
Existe uma possibilidade fazer tal efeito com jQuery. Tentarei fazer o código, peço que espere;
Enquanto isto, verifique estes seletores:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Até +! Wink

Alexandre51 Alexandre51  • Seg 10 Fev 2014 - 16:37

Background Categorias Empty Re: Background Categorias Seg 10 Fev 2014 - 16:37

Entao...
Agora a tarde percebi que o codigo para mudar as estatisticas fez desaparecer o campo preto que tem na imagem abaixo.
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

E os tutoriais passados tb nao resultaram :/

Target Target  • Seg 10 Fev 2014 - 16:49

Background Categorias Empty Re: Background Categorias Seg 10 Fev 2014 - 16:49

Olá!

Amigo, estes código não são para mudar as estatísticas !
Mais sim as categorias!

Até +! Wink

Target Target  • Seg 10 Fev 2014 - 17:07

Background Categorias Empty Re: Background Categorias Seg 10 Fev 2014 - 17:07

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é +! Wink

Alexandre51 Alexandre51  • Seg 10 Fev 2014 - 18:55

Background Categorias Empty Re: Background Categorias Seg 10 Fev 2014 - 18:55

Entao Amigo.
No cod 1 nao aconteceu nada.
E no 2 nao apareceu isso:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Target Target  • Seg 10 Fev 2014 - 19:20

Background Categorias Empty Re: Background Categorias Seg 10 Fev 2014 - 19:20

Olá,
Deixo o código que mais lhe agrada ativado em teu fórum, para que eu possa visualizar!

Até +! Wink

Alexandre51 Alexandre51  • Ter 11 Fev 2014 - 6:16

Background Categorias Empty Re: Background Categorias Ter 11 Fev 2014 - 6:16

Opa, Agora deixei os códigos do 2

Alexandre51 Alexandre51  • Qui 13 Fev 2014 - 6:16

Background Categorias Empty Re: Background Categorias Qui 13 Fev 2014 - 6:16

Pode fechar...

[K]oke [K]oke  • Qui 13 Fev 2014 - 12:05

Background Categorias Empty Re: Background Categorias Qui 13 Fev 2014 - 12:05

[sucesso=Tópico Resolvido; e Bloqueado][/sucesso]Movido para: Arquivo - Pedido de código

Conteúdo patrocinado  • 

Background Categorias Empty Re: Background Categorias

Permissões neste sub-fórum
Não podes responder a tópicos