2013-11-13, 12:40
Tutorial: Avatar member who is online |
This tutorial may help you how to put member's avatar who is online in statistics.
Credits: StaarK*
--> Tutorials, tips and tricks <--
Avatar member who is online
Avatar member who is online
1º - CSS
- Code:
.etMiniAv {
width: 35px;
height: 35px;
background: #FFF;
padding: 1px;
border: 1px solid rgba(204, 204, 204, 0.89)!important;
}
- Code:
#etAvOnline {
font-size: 0px;
}
PhpBB3
- Code:
$(function() {
var version = 'phpBB3|punBB|Invision|phpbb2';
// phpBB3 Version, code created by Extrem-Tutorials
$('#i_whosonline + p a[href*="/u"]').each(function() { // Code is for phpBB3 version of the forumotion;
var url = this.href; // Get url from load avatars of users;
$(this).html('<img src="http://i32.servimg.com/u/f32/15/42/26/78/th/oaspet11.png" class="etMiniAv" />'); // Default avatars of before load function;
$(this).load(url +'#profile-advanced-right .module:eq(0) img:eq(0)',function(et) {
$(this).children('img').attr('class','etMiniAv');
});
});
});
- Read:
- Go to template and search index_body, find the "{LOGGED_IN_USER_LIST}" and replace with "<div class="etMiniAv"> {LOGGED_IN_USER_LIST} </div>"
- Code:
$(function() {
var version = 'phpBB3|punBB|Invision|phpbb2';
// phpBB2 Version, code created by Extrem-Tutorials
$('#etAvOnline a[href*="/u"]').each(function() { // Code is for phpBB2 version of the forumotion;
var url = this.href; // Get url from load avatars of users;
$(this).html('<img src="http://i32.servimg.com/u/f32/15/42/26/78/th/oaspet11.png" class="etMiniAv" />'); // Default avatars of before load function;
$(this).load(url +'#page-body .forumline .gensmall > img:first',function(et) {
$(this).children('img').attr('class','etMiniAv');
});
});
});
- Read:
- Go to template and search index_body, find the "{LOGGED_IN_USER_LIST}" and replace with "<div class="etMiniAv"> {LOGGED_IN_USER_LIST} </div>"
- Code:
$(function() {
var version = 'phpBB3|punBB|Invision|phpbb2';
// punBB Version, code created by Extrem-Tutorials
$('#etAvOnline a[href*="/u"]').each(function() { // Code is for punBB version of the forumotion;
var url = this.href; // Get url from load avatars of users;
$(this).html('<img src="http://i32.servimg.com/u/f32/15/42/26/78/th/oaspet11.png" class="etMiniAv" />'); // Default avatars of before load function;
$(this).load(url +'#profile-advanced-right .main-content.clearfix.center img:first',function(et) {
$(this).children('img').attr('class','etMiniAv');
});
});
});
- Code:
$(function() {
var version = 'phpBB3|punBB|Invision|phpbb2';
// Invision Version, code created by Extrem-Tutorials
$('.ipbtable tr:has("a[href="/viewonline"]") + tr .thin a[href*="/u"]').each(function() { // Code is for Invision version of the forumotion;
var url = this.href; // Get url from load avatars of users;
$(this).html('<img src="http://i32.servimg.com/u/f32/15/42/26/78/th/oaspet11.png" class="etMiniAv" />'); // Default avatars of before load function;
$(this).load(url +'#profile-advanced-right .box-content.profile.center img:eq(0)',function(et) {
$(this).children('img').attr('class','etMiniAv');
});
});
});
A small "plugin" for those who want and tipsy to avatars.
after the line:
- Code:
var url = this.href; // Get url from load avatars of users;
- Code:
var tipsy2 = $(this).text(); // Get name from tipsy avatars of the users;
- Code:
$(this).children('img').attr('class','etMiniAv');
- Code:
$(this).children('img').attr({title: ''+tipsy2+'', class: 'etMiniAv'});
- Code:
$(this).children('img').attr({title: ''+tipsy2+'', class: 'etMiniAv'});
- Code:
$(this).children('.etMiniAv').tipsy({gravity:'se'});
// phpBB2: http://fcd.site40.net/images/91076112618335539525.png
// phpbb3: http://fcd.site40.net/images/85285424562205199591.png
// punBB: http://fcd.site40.net/images/90455773566726703359.png
// Invision: https://i.servimg.com/u/f57/18/54/08/34/invisi10.png
© PunBB Design
If you have any questions related to this topic create a topic with the following title: Avatar member who is online |