Avatars in Index [PhPBB3]
4 posters
Page 1 of 1
Avatars in Index [PhPBB3]
How do I get Avatars to show in the index next to the latest post.
Example:
http://www.worldduelingacademy.com/
My forum:
http://terribadacademy.forumotion.com/
Example:
http://www.worldduelingacademy.com/
My forum:
http://terribadacademy.forumotion.com/
Re: Avatars in Index [PhPBB3]
Hello,
Visit: Administration Panel => Modules => HTML & Javascrip => Javascript Codes Management => Create a new code javascript:
Title: Avatar index
Placment: In the home page
Javascript code:
Visit: Administration Panel => Modules => HTML & Javascrip => Javascript Codes Management => Create a new code javascript:
Title: Avatar index
Placment: In the home page
Javascript code:
- Code:
$(document).on('ready',function(){$('.forumline tr .row3.over').prepend('<div class="avatar-index"><div>');$('.forumline tr .row3.over .avatar-index').each(function(){var profileUser=$(this).parent().children('span').children('span').children('strong').children('a').attr('href');$(this).html('<a href="'+profileUser+'" class="avatar-index-enlace"><img src="http/cdn1.iconfinder.com/data/icons/basicset/user_64.png" alt="No Avatar" /></a>');$(this).children('a').load(profileUser+' .forumline .row1.gensmall[align="center"]:eq(0) img:eq(0)')})});
- Code:
.avatar-index img {
border: 1px solid #DDD;
height: 50px;
margin: 0 5px;
padding: 1px;
width: 50px;
}
Guest- Guest
Re: Avatars in Index [PhPBB3]
Not workingKenan wrote:Hello,
Visit: Administration Panel => Modules => HTML & Javascrip => Javascript Codes Management => Create a new code javascript:
Title: Avatar index
Placment: In the home page
Javascript code:Visit: Administration Panel => Display => Colors => CSS Stylesheet:
- Code:
$(document).on('ready',function(){$('.forumline tr .row3.over').prepend('<div class="avatar-index"><div>');$('.forumline tr .row3.over .avatar-index').each(function(){var profileUser=$(this).parent().children('span').children('span').children('strong').children('a').attr('href');$(this).html('<a href="'+profileUser+'" class="avatar-index-enlace"><img src="http/cdn1.iconfinder.com/data/icons/basicset/user_64.png" alt="No Avatar" /></a>');$(this).children('a').load(profileUser+' .forumline .row1.gensmall[align="center"]:eq(0) img:eq(0)')})});
- Code:
.avatar-index img {
border: 1px solid #DDD;
height: 50px;
margin: 0 5px;
padding: 1px;
width: 50px;
}
Re: Avatars in Index [PhPBB3]
Can i have code for phpBB2
saltarski- Forumember
- Posts : 126
Reputation : 3
Language : Polish / French / English
Re: Avatars in Index [PhPBB3]
Well kenan helped and thank you kenan for helping a fellow member
Guest- Guest
Re: Avatars in Index [PhPBB3]
1. Is it on the right lines given from kenan?Scorpi94 wrote:But it's not working!!
2. Are you using Phpbb3?
3.if those don't work just search.
Guest- Guest
Re: Avatars in Index [PhPBB3]
Administration Panel => Modules => HTML & Javascrip => Javascript Codes Management => Create a new code javascript: Only in index !
That in your Administration Panel ~> Display ~> Colours ~> CSS
I used and in my old forum with phpBB3 and work .
- Code:
$(function(){
if(!window.localStorage) return;
// Avatar por defecto
var default_avatar= 'http/illiweb.com/fa/invision/pp-blank-thumb.png';
// Tiempo de cache, aqui 24 h * 60 m * 60 s * 1000 ms entonces un día
var caching_time= 24*60*60*1000;
// Tiempo de cache de un error, ici 60 s * 1000 ms entonces un minuto
var caching_error= 60*1000;
var set_avatar= function(id) {
$('.mini_ava.member'+id).html('<img src="'+get_avatar(id)+'" />');
};
var get_avatar= function(id) {
if(localStorage.getItem('t_ava'+id) < +new Date - caching_time || (localStorage.getItem('d_ava'+id)==default_avatar && localStorage.getItem('t_ava'+id) < +new Date - caching_error))
{
localStorage.setItem('d_ava'+id, default_avatar);
$.get('/u'+id, function (d){
localStorage.setItem('t_ava'+id,+new Date);
localStorage.setItem('d_ava'+id, $('#profile-advanced-right .module:first div img:first,.forumline td.row1.gensmall:first > img, .frm-set.profile-view.left dd img,dl.left-box.details:first dd img, .row1 b .gen:first img, .real_avatar img',d).first().attr('src')||default_avatar);
set_avatar(id);
});
}
return localStorage.getItem('d_ava'+id);
};
var to_replace= {};
$('dd.lastpost strong a.gensmall, .ipbtable tr td:last-child span strong a.gensmall, .table td.tcr strong a.gensmall, .forumline .row3.over strong a.gensmall').each(function(){
to_replace[$(this).attr('href').substr(2)]= 1;
$(this).closest('td,dd').prepend('<div class="mini_ava member'+$(this).attr('href').substr(2)+'"></div>');
});
for(i in to_replace)
{
set_avatar(i);
};
});
That in your Administration Panel ~> Display ~> Colours ~> CSS
- Code:
.mini_ava{
position: relative;
z-index: 9999!important;
margin-left: 99px;
}
.mini_ava img {
width: 34px;
height: 34px;
-webkit-border-radius: 100px;
border-radius: 100px;
position: absolute;
z-index: 9999!important;
margin-top: -3px;
}
I used and in my old forum with phpBB3 and work .
Similar topics
» Avatars in the Index Problem
» Mini avatars in boarding index
» Phpbb3 Avatar Index
» How to delete default Avatars/Add More Avatars?
» phpBB3 Forum Index Issue
» Mini avatars in boarding index
» Phpbb3 Avatar Index
» How to delete default Avatars/Add More Avatars?
» phpBB3 Forum Index Issue
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum