Staffer Group BR™

Fórum interativo totalmente gratuito!


 VisualizaçõesPermissão deste fórum:
Não podes responder a tópicos


CurtirDiretório deste fórum:
Fóruns » Principal »  » Tutoriais » Tutoriais sobre programação

#1
 D'Leandro™

D'Leandro™
Fundador
Exibir perfil do usuário ao clicar sobre o nickAgora ao clicar sobre o nick de um #usuário você pode ver tudo sobre ele, quantas mensagens ele tem, quando se registrou, adicionar aos amigos/ignorados e muito mais. Com quesito de administrador ou moderador você também tem painel de controle para banir o membro ou editar o seu perfil, tudo isso sem sair do tópico.
Versões de funcionamento: Todas as versões.

O código é bem complexo, mas bem simples ao mesmo tempo, bem... você pode analisar e personaliza-lo como achar melhor, em fim, crie um novo documento #JavaScript no seu fórum e adicione o seguinte #código:
Código:
jQuery(function () {
  /* Tutorial = http://staffergroupbr.stuning.net/t2268- */
  jQuery('li.row a[href*="/u"], .img-whois+p a[href*="/u"], .page-bottom a[href*="/u"], .postprofile a[href*="/u"], p.author a[href*="/u"], form:has(.vf_jumpbox)~a[href*="/u"], .tcr a[href*="/u"], #stats a[href*="/u"], #onlinelist a[href*="/u"], .tcl.tdtopics a[href*="/u"], .pun .user a[href*="/u"], .ipbtable .row1 a[href*="/u"], #fo_stat a[href*="/u"], .activeusers-box a[href*="/u"], td.row3.over a[href*="/u"], .forumline:has(#i_whosonline) a[href*="/u"], span.name a[href*="/u"], span.postdetails a[href*="/u"], #info_open a[href*="/u"]').attr('id', 'profilePopup').click(function () {
    return false
  });
  jQuery('a[href*="/u"]:has(img)').removeAttr('id').click(function () {
    window.open(jQuery(this).attr('href'), '_self');
  });
  jQuery('a#profilePopup').click(function () {
    var UID = jQuery(this).attr('href');
    var UNM = jQuery(this).text();
    jQuery('body').append('<div id="profilefilter" style="position:fixed;top:0px;left:0px;right:0px;bottom:0px;background:rgba(0,0,0, 0.8);cursor:pointer;z-index:10;"></div><div id="profcont-container" style="top: 20%; left: 15%; right: 15%; position: fixed; font-size: 12px; box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5); z-index: 50; background: none repeat scroll 0% 0% rgb(255, 255, 255); padding: 10px 0px 10px 10px; border-radius: 5px;"><div id="userprofile" style="max-height:400px;overflow-y:auto;"><center><span class="profileLoading" style="font-weight:bold;font-size:18px;">Cargando...</span></center></div><span id="profileLinks"><a href="' + UID + '">Ver Perfil</a><span id="interactionLinks"> | <a href="/privmsg?mode=post&u=' + UID.replace('/u', '') + '">Enviar MP</a> | <a href="/privmsg?mode=post_profile&u=' + UID.replace('/u', '') + '">Mensagem dos visitantes</a><span style="float:right;"><a href="/profile?friend=' + UNM.replace(/ /, "+") + '&mode=editprofile&page_profil=friendsfoes">Adicionar como Amigo</a>/<a href="/profile?foe=' + UNM.replace(/ /, '+') + '&mode=editprofile&page_profil=friendsfoes" style="padding-right: 15px;">Ignorados</a></span></span></div>');
    jQuery('#userprofile').load(UID + '#cp-main .panel, .forumline:has(#profile-advanced-details), .clear + #profile-advanced-details');
    if (!document.getElementById('logout')) {
      jQuery('#interactionLinks').remove();
    }
    jQuery('#profilefilter').click(function () {
      jQuery('#profilefilter, #profcont-container').remove();
    });
  });
});
Depois disto salve-o, vá até algum #tópico e clique em cima do nick de algum usuário qualquer.
Para fechar o popup basta clicar fora da mesma.

  • Resultado:

Tutorial - Exibir perfil do usuário ao clicar sobre o nick Sem_ta77




© Staffer Group BR™
PRECISA DE SUPORTE?

Criador: Foroactivo / D'Leandro™
Site: www.staffergroupbr.stuning.net

#2
 azure

azure
Membro
Muito obrigado ae, estarei a usar.

#3
 Master Publicitario

Master Publicitario
Membro
Muito bom!

#4
 Teste123

Teste123
Membro
Bom

#5
 Conteúdo patrocinado