[Tutorial] Sistema de cutucadas
Página 1 de 1 • Compartilhe
- Zump
- Tempo Online : 33d 4h 43m 44s
Mensagens : 52
Reputação : 53
Informações:
Autor: Zump (While)
Funcionalidade: Todas as versões
Acesse:
E Crie um novo Javascript com investimento em todas as paginas com esse código:Painel de Controle ☛ Modulos ☛ Html e Javascript ☛ Gestão dos codigos Javascript
- Código:
window.location.pathname.match(/\/u\d+/) && $(function() {
if (!_userdata.session_logged_in) return;
var lang = {
poke : 'Cutucar',
message : 'você foi cutucado por mim!'
},
a = document.createElement('DIV'), b = poke(window.location.pathname.match(/u(\d+)/)[1], document.title.match(/.*? - (.*)/)[1]), c = document.getElementById('profile-advanced-right') || document.getElementById('page-body');
a.style.textAlign = 'right';
a.appendChild(b);
c.insertBefore(a,c.firstChild);
if (window.location.pathname.match(/wall/) && $('.message-footer').length) {
for (var i = 0, c = $('.message-footer'); i<c.length; i++) {
var d = document.createElement('LI'), e = poke($('.message-header:eq('+i+') a').attr('href').match(/u(\d+)/)[1], $('.message-header:eq('+i+') a').text());
d.appendChild(e);
c[i].insertBefore(d,c[i].firstChild);
}
}
function poke(id, unm) {
var a = document.createElement('A');
if (id == _userdata.user_id) return a;
a.href = '/privmsg?mode=post&u=' + id;
a.innerHTML = lang.poke;
a.className = 'pokie';
a.onclick = function(e) {
var id = this.href.match(/u=(\d+)/)[1];
e.preventDefault();
$.post('/privmsg', {
subject : lang.poke,
message : lang.message,
username : unm,
mode: 'post',
post: 'Enviar'
},function() { window.location.pathname = '/'});
};
return a;
};
});
Feito isto,Acesse:
E Adicione esse código:Painel de Controle ☛ Visualização ☛ Imagens e Cores ☛ Cores ☛ Folha de estilo css
- Código:
a.pokie {
color:#474 !important;
font-size:12px;
text-decoration:none !important;
text-transform:uppercase;
background:url(http://i38.servimg.com/u/f38/18/45/41/65/c11.png) no-repeat 3px center #9C9;
border:1px solid #7A7;
border-radius:3px;
display:inline-block;
padding:4px 6px;
padding-left:25px;
}
a.pokie:hover {
background-color:#ADA;
background-position:6px center;
border-color:#8B8;
}
a.pokie:active { background-position:8px center }
Resultado:
Tópicos semelhantes
Cria uma conta ou logue para postar uma mensagem.
Você precisa ser um membro, para poder postar uma resposta.
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|