Widget de últimos cadastros Dom 21 Jul 2013 - 23:06
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Nome do Arquivo: Widget de últimos cadastros Autor: Daemon
Funcionalidade: PunBB
Categoria: Recursos BestSkins
Neste tutorial iremos colocar um widget personalizado mostrando uma lista de últimos membros cadastrados em seu fórum.
Primeiro iremos aceder a painel de controle módulos portal & widgets gestão dos widgets do fórum criar um widget personalizado
Nome do widget: A sua escolha
Utilizar um table type: Sim
Título do widget: A sua escolha
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>
Qualquer dúvida em relação a este tutorial crie um tópico com o mesmo título.
Gostou? Não custa reputar ...