Boas-vindas ao Power Pixel

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

Houdini Houdini  • Seg 21 Abr 2014 - 10:59

Problema no Melhor Resposta Empty Problema no Melhor Resposta Seg 21 Abr 2014 - 10:59

Minha questão:
Vejam a imagem abaixo:

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

Notem que esta duplicando o botão de honrar, que e o botão curtir, so alterei o nome....

queria saber se e possível ajustar isso?


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

Versão:
PunBB

DeeW. DeeW.  • Qua 23 Abr 2014 - 11:52

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta Qua 23 Abr 2014 - 11:52

Poderia fornecer o código utilizado?

Cepheus Cepheus  • Qua 23 Abr 2014 - 13:15

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta Qua 23 Abr 2014 - 13:15

Você está usando o código atual? veja se na edição não existe essa linha repetida!.

Um tópico que pode ajudar: https://bestskins.forumeiros.com/t1931-melhor-resposta-atual

Houdini Houdini  • Qua 23 Abr 2014 - 19:24

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta Qua 23 Abr 2014 - 19:24

Aqui está o JS:

Código:

$(function(){
    $('.post .posthead[style="background-color:#dfedd1;"]').append('<div id="bestpost" class="answerBadgeInPost">Aventura Finalizada</div>').attr('style','background: #dfedd1;border: 2px solid #97BB73;margin-left: -3px;border-top: none;');
    var topicauthor = $('.post #bestpost').parents('.post').find('.user .username a').html();
    var topicavatar = $('.post #bestpost').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a img').attr('src');
    var urlavt= $('.post #bestpost').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a').attr('href');
    var topicpost = $('.post #bestpost').parents('.post').find('.posthead a').attr('href');
    var topicdata = $('.post #bestpost').parents('.post').find('.posthead h2 .data-post').html();
    var bestTopic = $('.post #bestpost').parents('.post').find('.entry-content').html();
if($('#bestpost').length){
    $('.main.paged').before('<div class="postbox">
<span class="playfoto"><img src="'+topicavatar+'" /></span>
<span class="playpost">Aventura Finalizada</span> '+topicauthor+', '+topicdata+'<div style="border: 1px solid #ddd; border-bottom: 1px solid #ececec; margin: 3px;"></div><div style="display: inline-block;">'+bestTopic+'</div><a href="'+topicpost+'">
        <span class="playpost" style="background: #B3B3B3;margin-left: 830px;margin-top: 10px;margin-bottom: 15px;">Visualizar toda a aventura <img class="icon" src="http://i.imgur.com/omzqZnf.png"></span></a>
</div>');}
    });

e aqui está o CSS:

Código:

/*feature box*/
.postbox {
border-radius: 10px;
margin-top: 25px;
max-width: 100%;
background: #dfedd1;
border: 2px solid #97BB73;
padding: 6px;
width: 90%;
margin-left: 50px;
min-height: 60px;
}
#bestpost {
color: #6E8F2C;
font-weight: 700;
padding: 0 10px;
height: 30px;
line-height: 30px;
position: relative;
float: right;
margin: 2px -2px 10px 560px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius: 0px 0px 3px 3px;
border-radius: 0px 0px 10px 10px;
background: #dfedd1;
border: 2px solid #97BB73;
border-top: none;
}
.playfoto {
float: left;
padding: 1px;
border: 1px solid #d5d5d5;
background: #fff;
-webkit-box-shadow: 0px 2px 2px rgba(0,0,0,0.1);
-moz-box-shadow: 0px 2px 2px rgba(0,0,0,0.1);
box-shadow: 0px 2px 2px rgba(0,0,0,0.1);
margin-right: 8px;
}
.playfoto:hover {
border-color: #7d7d7d;
}
.playfoto img {
width: 50px;
height: 50px;
}
.playpost {
background: #7ba60d;
display: inline-block;
height: 16px;
line-height: 16px;
padding: 3px;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
color: #fff;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
vertical-align: middle;
margin-right: 8px;
}

DeeW. DeeW.  • Qua 23 Abr 2014 - 22:40

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta Qua 23 Abr 2014 - 22:40

@[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Poderia me passar seu jScript do Honrar? o problema pode estar nele! Wink

Até!

Daemon Daemon  • Qua 23 Abr 2014 - 23:11

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta Qua 23 Abr 2014 - 23:11

Reputação da mensagem: 100% (1 votos)
Troque o código JS por este:
Código:

$(function(){
    $('.post .posthead[style="background-color:#dfedd1;"]').append('<div id="bestpost" class="answerBadgeInPost">Aventura Finalizada</div>').attr('style','background: #dfedd1;border: 2px solid #97BB73;margin-left: -3px;border-top: none;');
    var topicauthor = $('.post #bestpost').parents('.post').find('.user .username a').html();
    var topicavatar = $('.post #bestpost').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a img').attr('src');
    var urlavt= $('.post #bestpost').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a').attr('href');
    var topicpost = $('.post #bestpost').parents('.post').find('.posthead a').attr('href');
    var topicdata = $('.post #bestpost').parents('.post').find('.posthead h2 .data-post').html();
    var bestTopic = $('.post #bestpost').parents('.post').find('.entry-content div').last().prev().html();
if($('#bestpost').length){
    $('.main.paged').before('<div class="postbox">
<span class="playfoto"><img src="'+topicavatar+'" /></span>
<span class="playpost">Aventura Finalizada</span> '+topicauthor+', '+topicdata+'<div style="border: 1px solid #ddd; border-bottom: 1px solid #ececec; margin: 3px;"></div><div style="display: inline-block;">'+bestTopic+'</div><a href="'+topicpost+'">
        <span class="playpost" style="background: #B3B3B3;margin-left: 830px;margin-top: 10px;margin-bottom: 15px;">Visualizar toda a aventura <img class="icon" src="http://i.imgur.com/omzqZnf.png"></span></a>
</div>');}
    });
Até!

Houdini Houdini  • Qui 24 Abr 2014 - 8:19

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta Qui 24 Abr 2014 - 8:19

Daemon escreveu:Troque o código JS por este:
Código:

$(function(){
    $('.post .posthead[style="background-color:#dfedd1;"]').append('<div id="bestpost" class="answerBadgeInPost">Aventura Finalizada</div>').attr('style','background: #dfedd1;border: 2px solid #97BB73;margin-left: -3px;border-top: none;');
    var topicauthor = $('.post #bestpost').parents('.post').find('.user .username a').html();
    var topicavatar = $('.post #bestpost').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a img').attr('src');
    var urlavt= $('.post #bestpost').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a').attr('href');
    var topicpost = $('.post #bestpost').parents('.post').find('.posthead a').attr('href');
    var topicdata = $('.post #bestpost').parents('.post').find('.posthead h2 .data-post').html();
    var bestTopic = $('.post #bestpost').parents('.post').find('.entry-content div').last().prev().html();
if($('#bestpost').length){
    $('.main.paged').before('<div class="postbox">
<span class="playfoto"><img src="'+topicavatar+'" /></span>
<span class="playpost">Aventura Finalizada</span> '+topicauthor+', '+topicdata+'<div style="border: 1px solid #ddd; border-bottom: 1px solid #ececec; margin: 3px;"></div><div style="display: inline-block;">'+bestTopic+'</div><a href="'+topicpost+'">
        <span class="playpost" style="background: #B3B3B3;margin-left: 830px;margin-top: 10px;margin-bottom: 15px;">Visualizar toda a aventura <img class="icon" src="http://i.imgur.com/omzqZnf.png"></span></a>
</div>');}
    });
Até!

Funcionou perfeitamente Daemon, valeu cara....

waghcwb waghcwb  • Qui 24 Abr 2014 - 13:06

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta Qui 24 Abr 2014 - 13:06

[sucesso=Dúvida sanada]
Tópico trancado[/sucesso]

Conteúdo patrocinado  • 

Problema no Melhor Resposta Empty Re: Problema no Melhor Resposta

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