• Daily Support was created for Forumotion support, troubleshooting your problems with your computer, with your network or with your life. We offer graphic design services like graphic creations, good tutorials and many others! I hope you like this theme, i worked a lot to make it.
    Look at our new code! This is a nice loading screen for all versions Very Happy Read more
    Look at our new code! This is a nice Windows 8 Styled navigation bar! Read more
    Look at our new code! This is a code for partner, similary to our partner script! You have to choose your forum version, from the next list...Read more.
Daily Support ™

Tutorials, protection, discussions, graphic design, forumotion help, codes, gaming, roleplay, counter-strike 1.6, metin2, mt2, cs 1.6, cs 1.6 codes, mt2 codes, powerfull forum


You are not connected. Please login or register

Last post avatar

View previous topic View next topic Go down  Message [Page 1 of 1]

1Last post avatar Empty Last post avatar
Mon Sep 09, 2013 9:27 am
LolWesta

LolWesta

DailySupport Winner

DailySupport Winner
LolWesta
LolWesta
Posts : 74
Daily Points : 2608
Likes : 2
Warns : One warn
punBB
Hi!
How can i implement on my punBB forum a last post avatar like here:
Last post avatar 6Xf46cO


Thank you! Very Happy 


2Last post avatar Empty Re: Last post avatar
Mon Sep 09, 2013 9:40 am
Dishonored

Dishonored

Webmaster

Webmaster
Dishonored
Dishonored
Posts : 450
Daily Points : 735
Likes : 34
Warns : No warnings
punBB
Hi!
Please add to your JS codes:
Code:

$(function(){
 
    if(!window.localStorage) return;
 
    // Avatar par défaut
    var default_avatar= 'http://2img.net/i/fa/invision/pp-blank-thumb.png';
 
    // Temps de cache, ici 24 h * 60 m * 60 s * 1000 ms donc un jour
    var caching_time= 24*60*60*1000;
 
    // Temps de cache d'une erreur, ici 60 s * 1000 ms donc une 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);
    };
 
});
And to your CSS:
Code:
.mini_ava {
  float: left;
}
.mini_ava img {
  width: 40px;
  height: 40px;
  margin: 0 5px;
  border-radius: 10px;
  transition: all 1s;
  -moz-transition: all 1s;
  -webkit-transition: all 1s;
  -o-transition: all 1s;
}
.mini_ava img:hover
{
  zoom: 130%;
}



Source: http://help.forumgratuit.ro/t44802-avatarul-postatorului-la-ultimele-mesaje


3Last post avatar Empty Re: Last post avatar
Mon Sep 09, 2013 11:08 pm
mangaka

mangaka

Support Moderator

Support Moderator
mangaka
mangaka
Posts : 12
Daily Points : 12
Likes : 0
Warns : No warnings
punBB
Is this solved?


4Last post avatar Empty Re: Last post avatar
Tue Sep 10, 2013 5:25 am
LolWesta

LolWesta

DailySupport Winner

DailySupport Winner
LolWesta
LolWesta
Posts : 74
Daily Points : 2608
Likes : 2
Warns : One warn
punBB
Yup! Thank you!!


5Last post avatar Empty Re: Last post avatar
Tue Sep 10, 2013 6:43 am
Hauvën

Hauvën

Moderator

Moderator
Hauvën
Hauvën
Posts : 73
Daily Points : 113
Likes : 4
Warns : No warnings
phpBB3
This topic was solved. I'll lock and arhive this!


6Last post avatar Empty Re: Last post avatar

Sponsored content

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum