[Tutorial] Widget de últimos cadastrados

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Admin
Admin
Administrador
Tempo Online : 250d 6h 21m 59s
Mensagens : 693
Reputação : 4
https://bestweb.forumeiro.com

MensagemAdmin Seg Out 03, 2016 9:05 pm

Informações:

Autor: Daemon
Versões: Todas as versões
Introdução: Widget de últimos cadastrados

Instalação:

Acesse:
Painel de controle ->> módulos -> portal & widgets -> gestão dos widgets do fórum
Então crie um novo widget com esse código:

Código:
<script>
jQuery(document).ready(function() {
 var joined = sessionStorage.getItem('joined');
 if(joined) {
   jQuery('#joined').html(joined);
 } else {
 jQuery.get('/memberlist?mode=joined&order=DESC&submit=Ok&username', function(j) {
   jQuery('#joined').html(jQuery('.table a[href^="/u"]:lt(5)', j));
   jQuery('#joined').find('a[href^="/u"]').each(function() {
    jQuery(this).wrap('<div class="m_b_j"></div>');
    var join = jQuery(this).attr('href');
    jQuery(this).after('<span class="date"></span>');
    jQuery(this).next().load(join+' .main #field_id-4 dd div', function() {
     jQuery(this).text(jQuery(this).text());
     sessionStorage.setItem('joined', jQuery('#joined').html());
    });
   });
 });
 }
});
</script>
<div id="joined"></div>
<style>
#joined .m_b_j {
margin: 4px 0;
}
#joined .m_b_j:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
#joined a span {text-decoration: none;}
#joined .m_b_j img {
-moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
background: #fff;
border: 1px solid #D5D5D5!important;
box-shadow: 0 2px 2px rgba(0,0,0,0.1);
float: left;
height: 32px;
margin: 0 3px;
padding: 1px;
width: 32px;
}
#joined .m_b_j img:hover {
-moz-box-shadow: 0 2px 2px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.5);
border-color: #666;
box-shadow: 0 2px 2px rgba(0,0,0,0.5);
}
#joined .date {
display: block;
margin-top: 5px;
margin-left: 45px;
font: 11px helvetica, arial, sans-serif;
color: #777777;
}
#joined .date:before {
content: 'Cadastro: ';
}
</style>

Resultado:
[Tutorial] Widget de últimos cadastrados Nm10

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

Cria uma conta ou logue para postar uma mensagem.

Você precisa ser um membro, para poder postar uma resposta.

Criar conta

Participe de nossa comunidade, basta se registrar. É Fácil!


Criar uma conta

Logar

Já tem uma conta? Sem problemas, Logue agora.


Logar-se

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