Problemas com o botão 'curtir' nos tópicos

3 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Problemas com o botão 'curtir' nos tópicos

Mensagem por Karol Marinho 28.03.16 2:55

Detalhes da questão


Endereço do fórum: http://portalhf.forumeiros.com
Versão do fórum: PhpBB3

Descrição


Boa noite!

A partir do TUTORIAL sobre adicionar o botão "curtir" nos tópicos, como visto aqui, fiz todos os passos referentes à aplicação do código, porém este não surtiu efeito algum.
Seria algum erro meu?
Você podem ver que não há botão algum nos tópicos, como nesse tópico exemplo:

Aqui minha página CSS:

Código:
/************FONTES****************/

@font-face {
font-family: 'Amatic SC';
font-style: normal;
font-weight: 400;
src: local('Amatic SC Regular'), local('AmaticSC-Regular'), url('http://themes.googleusercontent.com/static/fonts/amaticsc/v3/DPPfSFKxRTXvae2bKDzp5D8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
}

@font-face {
  font-family: 'Wire One';
  font-style: normal;
  font-weight: 400;
  src: local('Wire One'), local('WireOne'), url(http://themes.googleusercontent.com/static/fonts/wireone/v3/fas9dl2wmMkt5rCu-aBez_esZW2xOQ-xsNqO47m55DA.woff) format('woff');
}

 @font-face { font-family: "sueellen"; src: url('http://themes.googleusercontent.com/static/fonts/sueellenfrancisco/v2/TwHX4vSxMUnJUdEz1JIgrrtXaZAN_aGv07JTA91X2HI.woff'); }
 
@font-face { font-family: "caviardreams"; src: url('http://static.tumblr.com/4yxykdm/xXTlrecqr/caviardreams.ttf'); }

/************FIM DAS FONTES****************/

/************MENU****************/
a.mainmenu {
background-color:
transparent;
  padding: 7px;
margin-top: 30px!important;
margin-right: -8px !important;
 font-weight: 400!important;
font-family: helvetica,Serif !important;
font-size: 11px;
color:
#A1A1A1;
width: 880px;
text-transform: uppercase;
border-bottom: 3px solid
#628B9B;
  -webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
a.mainmenu:hover {
background-color:
transparent;
padding: 7px;
margin-top: 30px!important;
margin-right: -8px !important;
font-weight: 400!important;
font-family: helvetica,Serif !important;
font-size: 11px;
  color:transparent;
text-shadow: 0px 0px 1px #A1A1A1;
width: 880px;
text-transform: uppercase;
border-bottom: 3px solid
#628B9B;
  -webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}

/************FIM DO MENU****************/

#wrap {
border: 4px solid #;
box-shadow: 0 0 10px 2px #000000;
}
p {
overflow: auto;
max-height: 300px;
display: block;
margin: auto;
text-transform: uppercase;
font-size: 9px;
}
.h3 {
font-size: 12px;
text-transform: uppercase;
text-align: left;
text-shadow: 1px 1px 1px #000000;
letter-spacing: 0px;}
li.header dl.icon {
height: 42px;
  background-color:#628B9B;
  border-bottom: 0px dotted #120707;
  background-repeat:repeat;
font-family:arial;
letter-spacing: 2px;
padding: 10px 6px 0px;
font-size: 8px;
text-align: center;
text-shadow: 0 2px 2px black;
text-transform: uppercase;
vertical-align: middle;
}
  .table-title h2 {
color: #BDBDBD;
  text-shadow: 1px 1px 1px #000000;
font-family: amatic sc;
font-size: 32px;
letter-spacing: 4px;
font-style: normal;
text-transform: uppercase;
}
ul.forums {
background: #030303;
    margin-top:-0px;
background-repeat: repeat-yes;
border-radius: 0px 0px 0px 0px;
border-bottom: 8px solid #628B9B;
  box-shadow:0px 2px 8px #000000;
}
.desc9 {
  border-bottom:10px solid #070303;
  border-right: 10px solid #070303;
  border-radius: 100px 0px 0px 100px;
 background-color:#120707;
background-repeat: repeat;
  text-transform:uppercase;
color: #565656;
  font-family:arial;
display: block;
font-size: 9.5px;
line-height: 100%;
margin-left: 70px;
margin-top: 5px;
padding: 10px;
text-align: justify;
text-shadow: 0px 0px 2px #000000;
width: auto;
letter-spacing: 0px;
}
.desc8 {
  border-bottom:10px solid #070303;
  border-right: 10px solid #070303;
  border-left: 10px solid #070303;
 background-color:#120707;
background-repeat: repeat;
  text-transform:uppercase;
color: #565656;
  font-family:arial;
display: block;
font-size: 9.5px;
line-height: 100%;
margin-left: 70px;
margin-top: 5px;
padding: 0px;
text-align: justify;
text-shadow: 0px 0px 2px #000000;
width: auto;
letter-spacing: 0px;
}


.post {
background: #030303;
background-repeat: repeat;
background-position: center;
  border-bottom: 8px solid #628B9B;
  padding:10px 10px 10px 10px;
  color:#797a79;
}

.postprofile dd {
text-align: left;
}
.postprofile dd, .postprofile dt {
margin-top: 10px;
margin-right: 5px;
margin-left: 5px;
}
dl.codebox {
  background-color:#628B9B;
  background-image:url('http://i877.photobucket.com/albums/ab335/LuiRopez/patt.png');
  border-radius: 15px 15px 15px 15px;
color:white;
    text-transform:none;
  border: 1px solid #120707;
}
.postprofile{
text-align: center;
}
.postprofile dt a img {
box-shadow: 1px 1px 2px #000000;
margin-top: 0px;
width:200px;
  margin-bottom:8px;
  height:400px;
}
.postprofile {
background-image: url('http://i48.tinypic.com/2aikcns.jpg');
  border-radius: 0px 0px 100px 0px / 0px 0px 50px 0px;
margin-top: 17px;
border-left: 9px double #120707;
float: right;
font-family: arial;
  line-heighr:90%;
  text-transform:uppercase;
margin-right: -3px;
padding-top: 13px;
color: #d4d4d4;
text-align: center;
width: 205px;
box-shadow:0px 2px 5px #000000;
}

.postprofile a:link, .postprofile a:active, .postprofile, .postprofile dt.author a {
color: #d4d4d4;  
line-height: 40%;
font-weight:800;
  margin-bottom:-15px;
letter-spacing: 1px;
font-style:normal;
  text-transform:uppercase;
text-decoration: none;
  text-shadow: 1px 1px 1px #000000;
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
.postprofile a:hover {  
    margin-top:0px;
letter-spacing: 3px;
font-style:normal;
  text-transform:uppercase;
text-shadow: 1px 1px 1px #000000;
  -webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
p.author {
  background-image: url('http://i48.tinypic.com/2aikcns.jpg');
position: relative;
right: -7em;
color:#e3e3e3;
background-color:#000000;
text-align: center;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
padding: 3px !important;
text-transform: lowercase;
  box-shadow: 0px 2px 5px #000000;
}
a.forumtitle {
    border-bottom: 1px dotted #202020;
    color: #FAF0E6;
    display: block;
    font-family: Wire One;
    font-size: 25px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 12px;
    margin: 0;
    opacity: 0.7;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}
a.forumtitle:hover {
    color: orange;
    opacity: 1;
    text-decoration: none;
}

a.mainmenu[href="/faq"] { display : none; }
a.mainmenu[href="/gallery/index.htm"] { display : none; }
a.mainmenu[href="/calendar"] { display : none; }
a.mainmenu[href="/search"] { display : none; }
a.mainmenu[href="/groups"] { display : none; }

dd.lastpost {
position: absolute!important;
left: 1000px;
}


.h3{background: rgba(255,255,255,0.6);
color: black;
padding: 9px;
border-radius: 5px;
border: 1px solid black;
text-align: center;}.module{border: 2px solid rgba(255, 255, 255, 0.6);
border-radius: 16px;}

.postbody ul.profile-icons img:hover, .post-options img:hover, .posting-icons img:hover, .borderwrap div div a img:hover, .options a img:hover, .right a img:hover, .noprint a img:hover {
bottom: -2px;
opacity: 0.7;
padding: 0px;
position: relative;
}
 


/*******CURTIR NO POST********/
  #rep_post .reput_vote {
  background-color: #daedfb;
  color: #666;
  -khtml-user-select: none;
  -moz-transition: all,0.15s;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-transition: all,0.15s;
  -webkit-touch-callout: none;
  -webkit-transition: all,0.15s;
  -webkit-user-select: none;
  background: #f0f0f0 url(https://cdn1.iconfinder.com/data/icons/social-media-13/24/Like-16.png) no-repeat 6px center;
  background-size: 12px;
  clear: both;
  color: #666;
  cursor: pointer;
  display: table;
  font-size: 11px;
  font-weight: 400;
  line-height: 18px;
  margin: 5px;
  padding: 3px 5px 3px 25px;
  text-align: right;
  transition: all,0.15s;
}
.reput_vote.zero {
  background-color: #6a6a6a;
}
  
  
  .BS_like:hover {
  background-color: #daedfb;
  color: #666;
}
.BS_like {
  -khtml-user-select: none;
  -moz-transition: all,0.15s;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-transition: all,0.15s;
  -webkit-touch-callout: none;
  -webkit-transition: all,0.15s;
  -webkit-user-select: none;
  background: #f0f0f0 url(https://cdn1.iconfinder.com/data/icons/social-media-13/24/Like-16.png) no-repeat 6px center;
  background-size: 12px;
  clear: both;
  color: #666;
  cursor: pointer;
  display: table;
  font-size: 11px;
  font-weight: 400;
  line-height: 18px;
  margin: 5px;
  padding: 3px 5px 3px 25px;
  text-align: right;
  transition: all,0.15s;
  user-select: none;
}

.BS_like:before {
  content: "Curtir";
}
  
  #rep_post .bs_inline {
  list-style: none;
}
  
  .BS_like:hover {
  background-color: #daedfb;
  color: #666;
}
  
  #rep_post {white-space: nowrap;margin: 6px 4px;float: right;}
#rep_post .bs_inline {list-style: none;}
#rep_post .bs_inline > li {display: inline-block;margin: 0 3px;}
#rep_post .bs_inline > li:first-child {margin-left: 0;}
#rep_post .bs_inline img {display: none;}
#rep_post span img {cursor: pointer;}


.reput_vote.positive {background-color: #8db13e;}
.reput_vote.zero {background-color: #6a6a6a;}

#rep_post .reput_vote:before {
  content: "Curtidas ";
}
/***********FIM CURTIR************/

Aqui o código javascript com a alteração já feita, como pede no tutorial:
Código:
/***
* Código: IPB Like System
* Data de criação: 18/07/2014
* Atualização: 31/03/2015
* Autor: Daemon
* Versão: 1.2
* Inspirado: IPB
* Acesse: http://bestskins.net & http://ajuda.forumeiros.com
* Não distribuir, ou remover os créditos do autor.
***/
function bestskins_ls() {
  // Imagem de reputação
  var reputation_UP = 'http://www.agrotube.com.br/images/seta_baixo.png';
  for(var x = $('.vote'), i = 0, vote; (vote = x[i++]); ) {
                var qtd = 0,
                    barra = $('.vote-bar', vote)[0],
                    botao = $('.vote-button', vote)[0];                      
                if (barra) {
                    var numbarra = barra.title.match(/\d+/g);
                        qtd = Math.round(parseInt( numbarra[1] ) * parseInt( numbarra[0] )) / 100;
                }
            
 
                botao = botao ? '<li><span onclick="bestskinsVoto(\'' + botao.firstChild.href + '\',this);" class="BS_like"><img src="' + reputation_UP + '" alt="+" class="rep_up"></span></li>' : '<li style="display: none;"><img src="' + reputation_UP + '" alt="+" class="rep_up"></li>';
                var numrep = '<li>' + (qtd == 0 ? '<span class="reput_vote zero">' + qtd + '</span>' : '<span class="reput_vote positive">' + qtd + '</span>') + '</li>';
                var htmlFinal =
                '<div class="rep_bar clearfix" id="rep_post">' +
                '      <ul class="bs_inline">' + botao + numrep  + '</ul>' +
                '</div>';
  $('.postbody', vote.parentNode.parentNode.parentNode).append( htmlFinal );
  }
  x.remove();
};
function bestskinsVoto(b,a) {
  a.onclick = '#';
    $.get(b, function() {
    a.parentNode.style.display = 'none';
    var verify = a.parentNode.nextSibling.firstChild.innerHTML;
    if(verify == 0) {
        a.parentNode.nextSibling.firstChild.classList.remove('zero'),
        a.parentNode.nextSibling.firstChild.classList.add('positive');
    }
    var c = a.parentNode.nextSibling.firstChild, b = parseInt(/\d+/.exec(c.innerHTML)[0])+1;
    c.innerHTML = c.innerHTML.replace(/\d+/,b);
    });
};
if (document.readyState ===  'complete') {
        bestskins_ls();
} else {
      document.addEventListener('DOMContentLoaded', function() {
        bestskins_ls();
      });
}

Agradeço de antemão a ajuda ^^


Última edição por Karol Marinho em 29.03.16 0:29, editado 1 vez(es)
Karol Marinho

Karol Marinho
*****

Membro desde : 25/01/2011
Mensagens : 414
Pontos : 635

http://acripta.forumeiros.com/

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por Key of Destiny 28.03.16 3:10

E aí, amiga? Tudo certo?

Tente esse código de AddOn do Daemon, já que o seu é a versão 1.2, e veja se funciona: https://ajuda.forumeiros.com/t100715-.
Key of Destiny

Key of Destiny
****

Membro desde : 15/12/2015
Mensagens : 273
Pontos : 442

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por GSCode 28.03.16 3:12

Olá,

Tente...

Código:
/***
* Código: IPB Like System
* Data de criação: 18/07/2014
* Atualização: 31/03/2015
* Autor: Daemon
* Versão: 1.2
* Inspirado: IPB
* Acesse: http://bestskins.net & http://ajuda.forumeiros.com
* Não distribuir, ou remover os créditos do autor.
***/
function bestskins_ls() {
  // Imagem de reputação
  var reputation_UP = 'http://www.agrotube.com.br/images/seta_baixo.png';
  for(var x = $('.vote'), i = 0, vote; (vote = x[i++]); ) {
                var qtd = 0,
                    barra = $('.vote-bar', vote)[0],
                    botao = $('.vote-button', vote)[0];                     
                if (barra) {
                    var numbarra = barra.title.match(/\d+/g);
                        qtd = Math.round(parseInt( numbarra[1] ) * parseInt( numbarra[0] )) / 100;
                }
           
 
                botao = botao ? '<li><span onclick="bestskinsVoto(\'' + botao.firstChild.href + '\',this);" class="BS_like"><img src="' + reputation_UP + '" alt="+" class="rep_up"></span></li>' : '<li style="display: none;"><img src="' + reputation_UP + '" alt="+" class="rep_up"></li>';
                var numrep = '<li>' + (qtd == 0 ? '<span class="reput_vote zero">' + qtd + '</span>' : '<span class="reput_vote positive">' + qtd + '</span>') + '</li>';
                var htmlFinal =
                '<div class="rep_bar clearfix" id="rep_post">' +
                '      <ul class="bs_inline">' + botao + numrep  + '</ul>' +
                '</div>';
  $('.postbody', vote.parentNode.parentNode.parentNode).append( htmlFinal );
  }
  x.remove();
};
function bestskinsVoto(b,a) {
  a.onclick = '#';
    $.get(b, function() {
    a.parentNode.style.display = 'none';
    var verify = a.parentNode.nextSibling.firstChild.innerHTML;
    if(verify == 0) {
        a.parentNode.nextSibling.firstChild.classList.remove('zero'),
        a.parentNode.nextSibling.firstChild.classList.add('positive');
    }
    var c = a.parentNode.nextSibling.firstChild, b = parseInt(/\d+/.exec(c.innerHTML)[0])+1;
    c.innerHTML = c.innerHTML.replace(/\d+/,b);
    });
};
if (document.readyState ===  'complete') {
        bestskins_ls();
} else {
      document.addEventListener('DOMContentLoaded', function() {
        bestskins_ls();
      });
}

Até mais.
GSCode

GSCode
Membro

Membro desde : 11/10/2013
Mensagens : 591
Pontos : 1031

http://testforumbrasil.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por Karol Marinho 28.03.16 3:18

Olá!

Tentei os dois códigos, tanto o da Key, quanto o do GSCode... Nenhum resultou.
Será talvez algo da página CSS que está interferindo?
Triste

Edit

Tirei o css para ver se funcionava só os códigos java e css do botão curtir, e mesmo assim não funcionou.
Karol Marinho

Karol Marinho
*****

Membro desde : 25/01/2011
Mensagens : 414
Pontos : 635

http://acripta.forumeiros.com/

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por GSCode 28.03.16 3:30

Olá,

Poderia me fornecer uma conta teste?

Até mais.
GSCode

GSCode
Membro

Membro desde : 11/10/2013
Mensagens : 591
Pontos : 1031

http://testforumbrasil.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por Karol Marinho 28.03.16 3:35

Olá... Mando-lhe o login por aqui mesmo, ou por MP?
Karol Marinho

Karol Marinho
*****

Membro desde : 25/01/2011
Mensagens : 414
Pontos : 635

http://acripta.forumeiros.com/

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por GSCode 28.03.16 3:44

Boas... aqui mesmo... para que todos possam ter acesso e tentarem resolver. Peço que nas autorizações da conta apenas bloqueie a criação de tópicos e respostas.

Até mais.
GSCode

GSCode
Membro

Membro desde : 11/10/2013
Mensagens : 591
Pontos : 1031

http://testforumbrasil.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por Karol Marinho 28.03.16 3:48

Aqui está...

Spoiler:
Karol Marinho

Karol Marinho
*****

Membro desde : 25/01/2011
Mensagens : 414
Pontos : 635

http://acripta.forumeiros.com/

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por GSCode 28.03.16 21:07

Olá, boa tarde...

Conta inválida.... Reveja as informações da mesma.

Até mais.
GSCode

GSCode
Membro

Membro desde : 11/10/2013
Mensagens : 591
Pontos : 1031

http://testforumbrasil.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por Key of Destiny 28.03.16 21:46

Você tem mais algum javascript ativado? Se sim, tente desativá-lo e deixar só o do código de like. Pode ser algum conflito.
Key of Destiny

Key of Destiny
****

Membro desde : 15/12/2015
Mensagens : 273
Pontos : 442

Ir para o topo Ir para baixo

Tópico resolvido Re: Problemas com o botão 'curtir' nos tópicos

Mensagem por Karol Marinho 29.03.16 0:29

Excluí alguns códigos até ver se funcionava, e deu certo, não só esse como outros códigos que não funcionavam.

Muito obrigado aos dois!!!!

Tópico resolvido!
Karol Marinho

Karol Marinho
*****

Membro desde : 25/01/2011
Mensagens : 414
Pontos : 635

http://acripta.forumeiros.com/

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

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