[Tutorial] Quote sem mudança de página
Página 1 de 1
[Tutorial] Quote sem mudança de página
Quote sem mudança de página |
--> Tutoriais, dicas e astúcias <--
Quote sem mudança de página
Quote sem mudança de página
1º - Conheça o código:
PunBB:
- Código:
$(function () {
$('a[href*="mode=quote"]').click(function () {
var nPost = $(this).closest('.post').find('a').first().attr('name');
var pathname = window.location.protocol + "//" + window.location.host + "" + window.location.pathname;
var link = $(this).attr('href');
$.get(link , function (a) {
var text = $(a).find('#text_editor_textarea[name="message"]').val();
$("#text_editor_textarea").sceditor('instance').insertText(''+text+' [url='+pathname+'#'+nPost+']Quote do post: '+nPost+'[/url]');
});
$('body').stop().animate({
scrollTop: $('#quick_reply').offset().top
}, 1500);
return false;
});
});
PunBB3:
- Código:
$(function () {
$('a[href*="mode=quote"]').click(function () {
var nPost = $(this).closest('.post').find('.inner div').first().attr('id');
var pathname = window.location.protocol + "//" + window.location.host + "" + window.location.pathname;
var link = $(this).attr('href');
$.get(link , function (a) {
var text = $(a).find('#text_editor_textarea[name="message"]').val();
$("#text_editor_textarea").sceditor('instance').insertText(''+text+' [url='+pathname+'#'+nPost+']Quote do post: '+nPost+'[/url]');
});
$('body').stop().animate({
scrollTop: $('#quick_reply').offset().top
}, 1500);
return false;
});
});
Invision:
- Código:
$(function () {
$('a[href*="mode=quote"]').click(function () {
var nPost = $(this).closest('.post').find('.postdetails div').first().attr('id');
var pathname = window.location.protocol + "//" + window.location.host + "" + window.location.pathname;
var link = $(this).attr('href');
$.get(link , function (a) {
var text = $(a).find('#text_editor_textarea[name="message"]').val();
$("#text_editor_textarea").sceditor('instance').insertText(''+text+' [url='+pathname+'#'+nPost+']Quote do post: '+nPost+'[/url]');
});
$('body').stop().animate({
scrollTop: $('#quick_reply').offset().top
}, 1500);
return false;
});
});
PunBB2:
- Código:
$(function () {
$('a[href*="mode=quote"]').click(function () {
var nPost = $(this).closest('.post').first().attr('id').split('p')[1];
var pathname = window.location.protocol + "//" + window.location.host + "" + window.location.pathname;
var link = $(this).attr('href');
$.get(link , function (a) {
var text = $(a).find('#text_editor_textarea[name="message"]').val();
$("#text_editor_textarea").sceditor('instance').insertText(''+text+' [url='+pathname+'#'+nPost+']Quote do post: '+nPost+'[/url]');
});
$('body').stop().animate({
scrollTop: $('#quick_reply').offset().top
}, 1500);
return false;
});
});
2º - Onde colocar o código
Primeiro iremos aceder ao Painel de controle Módulos HTML & JAVASCRIPT Gestão dos códigos JavaScript Crie um novo.
3º - Resoltado:
© Web Design
Se tiver alguma dúvida relacionada com este tópico crie um tópico com o seguinte título: Quote sem mudança de página |
Migas- Moderador
- Mensagens : 23
Reputação : 7
Barra de respeito às regras :
Tópicos semelhantes
» [Tutorial]Doação de pontos
» [Tutorial] Tópico quente
» [Tutorial] Cadastro em lightbox
» [Tutorial] Pop up de login
» [Tutorial] Categoria retrátil - IPB
» [Tutorial] Tópico quente
» [Tutorial] Cadastro em lightbox
» [Tutorial] Pop up de login
» [Tutorial] Categoria retrátil - IPB
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|