Este código ainda funciona?

2 participantes

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

Tópico resolvido Este código ainda funciona?

Mensagem por Uatyla 29.04.16 23:57

Detalhes da questão


Endereço do fórum: http://www.vidadeaquarista.com
Versão do fórum: PhpBB3

Descrição


Olá a todos!

gostaria de saber si este código ainda funciona, pois o mesmo não surtiu efeito em meu fórum

link do tutorial: https://ajuda.forumeiros.com/t64222-tutorial-sistema-de-reputacao-com-likes


Última edição por Uatyla em 02.05.16 1:36, editado 1 vez(es)
Uatyla

Uatyla
Hiper Membro

Membro desde : 16/05/2012
Mensagens : 2489
Pontos : 3537

http://www.vidadeaquarista.com https://www.facebook.com/MinhaVidadeAquarista?ref=hl https://twitter.com/VidadeAquarista

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por while 30.04.16 1:50

Olá Uatyla, infelizmente esse tutorial não funciona mais...
while

while
Hiper Membro

Membro desde : 24/04/2016
Mensagens : 3263
Pontos : 4761

http://www.ajuda.forumeiros.com https://www.facebook.com/profile.php?id=100012157981279

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por Uatyla 30.04.16 1:58

puts! mais tem algum semelhante?
Uatyla

Uatyla
Hiper Membro

Membro desde : 16/05/2012
Mensagens : 2489
Pontos : 3537

http://www.vidadeaquarista.com https://www.facebook.com/MinhaVidadeAquarista?ref=hl https://twitter.com/VidadeAquarista

Ir para o topo Ir para baixo

  • 0

Tópico resolvido Re: Este código ainda funciona?

Mensagem por while 30.04.16 2:31

Olá amigo, crie dois JS , ambos com investimento nos topicos.

Um com esse codigo:
Código:
var like_version = 'phpbb3';
var DOM_IS_READY = false;
jQuery(function(){DOM_IS_READY=true;});
var vote_singular = 'Like';
var vote_plural = 'Likes';

E outro com este:
Código:
/*
 * A New Like/Dislike system for Invision Forumotion Boards.
 * Copyright © by AvacWeb. All Rights Reserved.
 * Use and  modification of this script is not allowed without this entire copyright notice in the original,
 * copied, or modified script. No distribution without consent from origin.
 */
function lglike(b,a){var d=a.innerHTML;a.innerHTML="Loading...";a.onclick="#";$.get(b,function(){a.className+=" LGnovote";a.innerHTML=d;var c=a.nextSibling,b=parseInt(/\d+/.exec(c.innerHTML)[0])+1;c.innerHTML=c.innerHTML.replace(/\d+/,b)})};
 
function init_lg_like_system() {
    var x = $('.vote');
    for (var i = 0, l = x.length; i < l; i++) {
        var vote = x[i],
            count = 0,
            plus = 0;
        var bar = $('.vote-bar', vote)[0];
        var button = $('.vote-button', vote)[0];
        if (bar) {
            var info = bar.title.match(/\d+/g);
            count = info[0];
            var percent = info[1];
            plus = Math.round(parseInt(percent) * parseInt(count)) / 100;
        }
        button = button ? '<span onclick="lglike(\'' + button.firstChild.href + '\',this);" class="LGlike">' + vote_singular + '</span>' : '<span class="LGlike LGnovote">' + vote_singular + '</span>';
 
        var votes_text = '<span class="LGlikecount">' + plus + ' ' + (plus == 1 ? vote_singular : vote_plural) + '</span>';
 
        if (like_version === 'phpbb3' || like_version === 'PHPBB3') {
            $('.corners-bottom', vote.parentNode.parentNode)
        .before('<div class="LGvote" style="margin:3px">' + button + votes_text + '</div>');
        } else if (like_version === 'invision' || like_version === 'Invision' || like_version === 'INVISION') {
            $(vote.parentNode.parentNode.parentNode.nextSibling.lastChild)
        .prepend('<li><div class="LGvote">' + button + votes_text + '</div></li>');
        } else if (like_version === 'punbb' || like_version === 'PUNBB') {
            $('.postfoot', vote.parentNode.parentNode.parentNode.parentNode)
        .before('<div class="LGvote" style="margin:3px">' + button + votes_text + '</div>');
        }
          else if (like_version === 'PHPBB2' || like_version === 'phpbb2') {
            $('.postbody')
        .append('</br></br><div class="LGvote" style="margin:3px">' + button + votes_text + '</div>');
        }
    }
    x.remove();
};
 
if (DOM_IS_READY == true) {
    init_lg_like_system();
} else {
    $(function () {
        init_lg_like_system();
    });
}

E deixe esse codigo css:
Código:
 
.LGlike {
  background: #105289;
  padding: 3px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-shadow: -1px 0.5px #888;
  box-shadow: 1px 1px 1px #888;
  cursor: pointer;
  margin-right: 4px;
 }
 .LGvote { margin: 0 5px; }
 .LGnovote {
  filter:Alpha(opacity=50);
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  text-shadow: none;
 }

Atenciosamente While.
while

while
Hiper Membro

Membro desde : 24/04/2016
Mensagens : 3263
Pontos : 4761

http://www.ajuda.forumeiros.com https://www.facebook.com/profile.php?id=100012157981279

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por Uatyla 30.04.16 2:48

De certa forma deu certo! mais gostaria que ele ficasse posicionado no canto superior direito é possível?
Para entender melhor visite o meu fórum http://www.vidadeaquarista.com/t1339-nitrito-do-aquario-muito-alto#10242
Uatyla

Uatyla
Hiper Membro

Membro desde : 16/05/2012
Mensagens : 2489
Pontos : 3537

http://www.vidadeaquarista.com https://www.facebook.com/MinhaVidadeAquarista?ref=hl https://twitter.com/VidadeAquarista

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por while 30.04.16 2:52

Claro! Troque o css por este:

Código:
 
.LGlike {
  background: #105289;
  padding: 3px;
  float:right;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-shadow: -1px 0.5px #888;
  box-shadow: 1px 1px 1px #888;
  cursor: pointer;
  margin-right: 4px;
 }
 .LGvote { margin: 0 5px; }
 .LGnovote {
  filter:Alpha(opacity=50);
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  text-shadow: none;
 }

Atenciosamente While.
while

while
Hiper Membro

Membro desde : 24/04/2016
Mensagens : 3263
Pontos : 4761

http://www.ajuda.forumeiros.com https://www.facebook.com/profile.php?id=100012157981279

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por Uatyla 30.04.16 3:04

Ficou bugado, ambos ficaram na parte inferior porem imagem na direita e like na esquerda.
Uatyla

Uatyla
Hiper Membro

Membro desde : 16/05/2012
Mensagens : 2489
Pontos : 3537

http://www.vidadeaquarista.com https://www.facebook.com/MinhaVidadeAquarista?ref=hl https://twitter.com/VidadeAquarista

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por while 30.04.16 3:23

Desculpe, é que não tenho acesso ao seu fórum... pois não possuo conta, mas troque o css por este:
Código:
 
.LGlike {
  background: #105289;
  padding: 3px;
  float:right;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-shadow: -1px 0.5px #888;
  box-shadow: 1px 1px 1px #888;
  cursor: pointer;
  margin-right: 4px;
 }
 .LGvote { margin: 0 5px; float:right; }
 .LGnovote {
  filter:Alpha(opacity=50);
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  text-shadow: none;
float:right;
 }

Espero que funcione agora.
Atenciosamente While.
while

while
Hiper Membro

Membro desde : 24/04/2016
Mensagens : 3263
Pontos : 4761

http://www.ajuda.forumeiros.com https://www.facebook.com/profile.php?id=100012157981279

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por Uatyla 30.04.16 3:28

Agora estão juntos no canto inferior direito, para ser mais exato em baixo do perfil dos usuários.
Uatyla

Uatyla
Hiper Membro

Membro desde : 16/05/2012
Mensagens : 2489
Pontos : 3537

http://www.vidadeaquarista.com https://www.facebook.com/MinhaVidadeAquarista?ref=hl https://twitter.com/VidadeAquarista

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por while 30.04.16 4:13

Olá amigo, troque o css por este:
Código:
.LGlike {
  background: #105289;
  padding: 3px;
  float:right;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-shadow: -1px 0.5px #888;
  box-shadow: 1px 1px 1px #888;
  cursor: pointer;
  margin-right: 270px;
 }
 .LGvote { margin: 0 5px; float:right;}
 .LGnovote {
  filter:Alpha(opacity=50);
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  text-shadow: none;
float:right;
margin-left:20px;
margin-top: -2px;
 }
.LGlikecount {margin-right:20px;}

Atenciosamente While.
while

while
Hiper Membro

Membro desde : 24/04/2016
Mensagens : 3263
Pontos : 4761

http://www.ajuda.forumeiros.com https://www.facebook.com/profile.php?id=100012157981279

Ir para o topo Ir para baixo

Tópico resolvido Re: Este código ainda funciona?

Mensagem por Uatyla 30.04.16 4:25

não deu certo não, então vou deixa do jeito, do 1º código mesmo ok!
Uatyla

Uatyla
Hiper Membro

Membro desde : 16/05/2012
Mensagens : 2489
Pontos : 3537

http://www.vidadeaquarista.com https://www.facebook.com/MinhaVidadeAquarista?ref=hl https://twitter.com/VidadeAquarista

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