The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Last Poster Avatars Out of the Box(?)

View previous topic View next topic Go down

Solved Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 4th 2014, 5:44 pm

Hi,
i want to move the last posters' avatars out of the box.
from this:




to something like this:


J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Luffy on May 4th 2014, 6:13 pm

Can you send us the index_box template? I will correct it for you.






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Pizza Boi on May 4th 2014, 6:18 pm

Hi Very Happy

For the avatar, please use this:

Code:
.mini_ava img {
position: absolute;
right: 290px;
}

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 4th 2014, 6:24 pm

if i ctl+scroll it moves from there.. position absolute is not what i want i thinkLaughing

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Pizza Boi on May 4th 2014, 6:26 pm

Hi Very Happy

Hmm... that's natural since it adapts to the zooming in and zooming out of stuff. Try using percentage values and see if it adapts, if not, I'll check other methods.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 4th 2014, 6:27 pm

it still does..

maybe change anything from index_box or the javascript?

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Luffy on May 4th 2014, 6:30 pm

You just need to change the avatar element in the template and set it out of the box.






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 4th 2014, 6:36 pm

its nothing at index_box.
i followed this tutorial: (only css and js)

http://help.forumotion.com/t132473-avatar-of-who-last-posted-on-the-index

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Pizza Boi on May 4th 2014, 6:47 pm

Hi Very Happy

This would work if the avatar doesn't get hidden e.e:

Code:
.mini_ava img {
position: relative;
right: 90%;
}

Tearing my hair off about this at the moment ._.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 4th 2014, 8:15 pm

maybe i give u the js code?
i think its says something about position xD

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Pizza Boi on May 4th 2014, 8:16 pm

Hi Very Happy

Sure, I can use any resources I can for help. Thanks a lot!

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 4th 2014, 8:17 pm

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);
            };
       
      });

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 7th 2014, 4:27 pm

Bump

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Ange Tuteur on May 8th 2014, 4:58 am

This will place it outside of the last post span however, you will need to make modifications to your CSS. It would be best you post your CSS for that here after installing the code below.
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).before('<div class="mini_ava member'+$(this).attr('href').substr(2)+'"></div>');
            });
       
          for(i in to_replace)
            {
                set_avatar(i);
            };
       
      });

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 8th 2014, 1:22 pm

thats working but i need to change the position to left but its getting hidden


J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Ange Tuteur on May 9th 2014, 1:10 am

Remove overflow:hidden; from .pun table .tcr

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 9th 2014, 4:56 pm

i dont have :O

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Pizza Boi on May 9th 2014, 6:47 pm

Hi Very Happy

You should check this portion: .pun table .tcr . There's overflow: hidden; there, you should remove that part.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Ange Tuteur on May 10th 2014, 5:01 am

Then add this :
Code:
.pun table .tcr { overflow:visible !important; }

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by J0k3R^ on May 10th 2014, 8:17 am

working Very Happy

*Solved*

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Last Poster Avatars Out of the Box(?)

Post by Jophy on May 10th 2014, 9:58 am

Solved

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

Back to top Go down

View previous topic View next topic Back to top


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