[TUTORIAL] Marcação da melhor resposta em tópicos (+ PHPBB3)
ShiftActif fórum :: Central ShiftActif :: :: Tutoriais
Página 1 de 1 • Compartilhe
[TUTORIAL] Marcação da melhor resposta em tópicos (+ PHPBB3)
Botão obrigado |
No sistema de fóruns pagos encontramos várias função que poderiam ser adaptados aos fóruns de Forumeiros. Neste tutorial vamos realizar esse grande efeito, conhecido por "Marcação da melhor resposta em tópicos" para a versão PhpBB3.
--> Tutoriais <--
Marcação da melhor resposta em tópicos
Marcação da melhor resposta em tópicos
1º - Javascript:
Esse sistema está disponível somente para fóruns da versão PhpBB3 e PunBB no momento, contudo, fique atento ao nosso tutorial porque ele pode ser alterado a qualquer momento.
Código JavaScript para PhpBB3:
Painel de controle > Módulos > HTML e JavaScript > Gestão dos códigos JavaScript > Criar um novo JavaScript > Investimento > Nos tópicos >
Adicione o seguinte código para PHPBB3:
- Código:
jQuery(function(){jQuery('head').append('<style>#postContent .vote{display:none}</style>');jQuery('img[title="Obrigado já feito"]:first').parents('.post').find('.content').append('<span id="melhor-resp-icon" style="padding: 5px 10px;background: none repeat scroll 0% 0% rgba(0, 224, 0, 0.3);color: black;font: 12px calibri;position: absolute;margin-top: -1.8%;right: 24%;border: 1px solid black;box-shadow: inset 0 0 2px rgba(0,0,0,0.5);border-radius: 5px;">MELHOR RESPOSTA</span>');if(jQuery('#melhor-resp-icon').length){jQuery('.post[style*="background-color:"], .post *[style*="background-color:"]').attr('style','');var nicknameAuthor = jQuery('#melhor-resp-icon').parents('.post').find('.postprofile strong').html();var posttAuthor = jQuery('#melhor-resp-icon').parents('.post').find('.postbody .content div').html();jQuery('.post:first').before('<div id="cont-d" style="padding: 13px 10px 10px;margin-top: 10px;border: 1px solid rgb(173, 173, 173);border-bottom: 5px solid rgb(160, 160, 160);"><span style="padding: 5px 10px;background: none repeat scroll 0% 0% rgba(0, 224, 0, 0.3);color: black;font: 12px calibri;border: 1px solid black;box-shadow: inset 0 0 2px rgba(0,0,0,0.5);border-radius: 5px;">MELHOR RESPOSTA</span> <b>Por:</b> '+nicknameAuthor+'<br><br><div id="postContent" style="padding: 10px 10px 10px 5px;background: none repeat scroll 0% 0% rgb(255, 255, 255);border: 1px solid grey;">'+posttAuthor+'</div></div>');
}});
Código para PunBB:
- Código:
$(function(){$('head').append('<style>#postContent .vote{display:none}</style>');$('img[title="Obrigado já feito"]').parents('.post').find('.posthead').append('<span id="melhor-resp-icon" style="padding: 5px 10px;background: none repeat scroll 0% 0% rgba(0, 224, 0, 0.3);color: black;font: 12px calibri;position: absolute;margin-top: -1.8%;right: 24%;border: 1px solid black;box-shadow: inset 0 0 2px rgba(0,0,0,0.5);border-radius: 5px;">MELHOR RESPOSTA</span>');if($('#melhor-resp-icon').length){$('.post[style*="background-color:"], .post *[style*="background-color:"]').attr('style','');var nicknameAuthor = $('#melhor-resp-icon').parents('.post').find('h4.username').html();var posttAuthor = $('#melhor-resp-icon').parents('.post').find('.entry-content').html();$('.post:first').before('<div id="cont-d" style="padding: 13px 10px 10px;margin-top: 10px;border: 1px solid rgb(173, 173, 173);border-bottom: 5px solid rgb(160, 160, 160);"><span style="padding: 5px 10px;background: none repeat scroll 0% 0% rgba(0, 224, 0, 0.3);color: black;font: 12px calibri;border: 1px solid black;box-shadow: inset 0 0 2px rgba(0,0,0,0.5);border-radius: 5px;">MELHOR RESPOSTA</span> <b>Por:</b> '+nicknameAuthor+'<br><br><div id="postContent" style="padding: 10px 10px 10px 5px;background: none repeat scroll 0% 0% rgb(255, 255, 255);border: 1px solid grey;">'+posttAuthor+'</div></div>');}});
Após a aplicação, basta visualizar um tópico no qual o autor efetuou um "Obrigado" a uma resposta.
© ShiftActif
Se tiver alguma dúvida relacionada com este tópico crie um tópico com o seguinte título: [Dúvida] Marcação da melhor resposta em tópicos |
Tópicos semelhantes
» [TUTORIAL] Avatar na resposta rápida
» [TUTORIAL] Ícones dos tópicos na resposta rápida
» [TUTORIAL] Efeito hover nos números de mensagens e tópicos (Phpbb3)
» [TUTORIAL] Mover tópicos nos tópicos
» [TUTORIAL] Resposta rápida
» [TUTORIAL] Ícones dos tópicos na resposta rápida
» [TUTORIAL] Efeito hover nos números de mensagens e tópicos (Phpbb3)
» [TUTORIAL] Mover tópicos nos tópicos
» [TUTORIAL] Resposta rápida
ShiftActif fórum :: Central ShiftActif :: :: Tutoriais
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos