Mini Avatar not visible on the index (Punbb)
The forum of the forums :: Support forum :: Forum Design & Appearance Help :: Design & Appearance Problems Archives
Page 1 of 1 • Share •
Mini Avatar not visible on the index (Punbb)
Sorry if I send you one more question. I would like to know how to make visible the mini avatar of the user who wrote on the index. I can not use the option in the panel because I made some changes.
http://rispostecristiane.forumattivo.it/

I used Punbb.
http://rispostecristiane.forumattivo.it/

I used Punbb.
Re: Mini Avatar not visible on the index (Punbb)
Hi 
This should work, hopefully, add this in Javascript:
This in CSS:
Regards,
Pizza Boi

This should work, hopefully, add this in Javascript:
- Code:
$(function(){
if(!window.localStorage) return;
// Avatar by default
var default_avatar= 'http://illiweb.com/fa/invision/pp-blank-thumb.png';
// Time of cache, here : 24hrs * 60m * 60s * 1000ms so one day
var caching_time= 24*60*60*1000;
// Time of cache in case of error, here : 60s * 1000ms so one minute
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);
};
});
This in CSS:
- Code:
/* Mini-avatar in Index */
.mini_ava{
float:left;
}
.mini_ava img {
height: 40px;
margin: 0 5px;
width: 40px;
top: 5px;
position: relative;
border-right: 1px dashed #FA0000;
padding: 0 5px;
}
Regards,
Pizza Boi
Re: Mini Avatar not visible on the index (Punbb)
Hello la valle dell'eco,
I am getting a syntax error from one of your scripts :
Find this :
and replace it with :
For the avatar, have you tried the following ?
http://help.forumotion.com/t133214-new-option-show-avatars-in-the-column-last-posts
I am getting a syntax error from one of your scripts :
Find this :
- Code:
$(document).ready(function(){
var rdtOn=$('.rdtOn strong').html();
var lastUser=$('.lastUser strong').html();
var totalUser=$('.totalUser strong').html();
var totalPost=$('.totalPost strong').html();
$('ul.statsPers').prepend('<li><span>'+totalPost+'</span> Total Posts</li><li><span>'+totalUser+'</span> Total Member</li><li><span>'+lastUser+'</span> Newest Member</li><li><span>'+rdtOn+'</span> Most Online</li>');
and replace it with :
- Code:
$(document).ready(function(){
var rdtOn=$('.rdtOn strong').html();
var lastUser=$('.lastUser strong').html();
var totalUser=$('.totalUser strong').html();
var totalPost=$('.totalPost strong').html();
$('ul.statsPers').prepend('<li><span>'+totalPost+'</span> Total Posts</li><li><span>'+totalUser+'</span> Total Member</li><li><span>'+lastUser+'</span> Newest Member</li><li><span>'+rdtOn+'</span> Most Online</li>');
});
For the avatar, have you tried the following ?
http://help.forumotion.com/t133214-new-option-show-avatars-in-the-column-last-posts
Re: Mini Avatar not visible on the index (Punbb)
I have found and corrected the error.
I tried the codes of the tutorial but I have already changed that with this code.
I tried the codes of Pizza Boi. Nothing.
I do not understand. I did the test here ( http://aureomicina.forumattivo.it/) and be seen.
Instead this is the situation on the forum.


There must be an explanation.
I tried the codes of the tutorial but I have already changed that with this code.
- Code:
<td class="tcr">
<div class="lastpost">
<!-- BEGIN switch_topic_title -->
<a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
<!-- END switch_topic_title -->
{catrow.forumrow.USER_LAST_POST}
</div>
</td>
</tr>
<!-- END forumrow -->
I tried the codes of Pizza Boi. Nothing.
I do not understand. I did the test here ( http://aureomicina.forumattivo.it/) and be seen.
Instead this is the situation on the forum.


There must be an explanation.

Re: Mini Avatar not visible on the index (Punbb)
Replace the last post by :
Remove the script for avatars, then go to : Display > Structure and hierarchy > enable Show avatars in the column "Last posts"
- Code:
<td class="tcr">
<!-- BEGIN avatar -->
<span class="lastpost-avatar">{catrow.forumrow.avatar.LAST_POST_AVATAR}</span>
<!-- END avatar -->
<div class="lastpost">
<!-- BEGIN switch_topic_title -->
<a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
<!-- END switch_topic_title -->
{catrow.forumrow.USER_LAST_POST}
</div>
</td>
</tr>
<!-- END forumrow -->
Remove the script for avatars, then go to : Display > Structure and hierarchy > enable Show avatars in the column "Last posts"
Re: Mini Avatar not visible on the index (Punbb)
Try replacing it with this :
- Code:
<td class="tcr">
<div class="lastpost">
<!-- BEGIN avatar -->
<span class="lastpost-avatar">{catrow.forumrow.avatar.LAST_POST_AVATAR}</span>
<!-- END avatar -->
<!-- BEGIN switch_topic_title -->
<a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
<!-- END switch_topic_title -->
{catrow.forumrow.USER_LAST_POST}
</div>
</td>
</tr>
<!-- END forumrow -->
Re: Mini Avatar not visible on the index (Punbb)
Thank you very much.
I do not know how you say in English, but "sei in gamba"
solved
I do not know how you say in English, but "sei in gamba"
solved
The forum of the forums :: Support forum :: Forum Design & Appearance Help :: Design & Appearance Problems Archives
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum