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.

Recent topics appearance v.2

View previous topic View next topic Go down

In progress Recent topics appearance v.2

Post by Anzo on October 15th 2014, 9:36 pm

Hello.

A while back, Ange gave me a code to customize the Latest Topics appearance, the topic is archived here: http://help.forumotion.com/t136001-recent-topics-appearance

I have a problem though that I only noticed now with members, and many have reported it as well. Whenever someone changes his/her Avatar (using either external URL or forumotion's upload) the image appears broken, just like here:



Is there any method to fix the images? Because whenever someone changes his/her avatar they experience this.

I tried clearing my browser's catch but It didn't work.

Thanks in advance.

Anzo
Forumember

Posts : 303
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by _Twisted_Mods_ on October 15th 2014, 9:42 pm

you will probably have to wait on ange for this sense she wrote the code she would know better then anyone

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Luffy on October 15th 2014, 10:57 pm

@Anzo wrote:Hello.

A while back, Ange gave me a code to customize the Latest Topics appearance, the topic is archived here: http://help.forumotion.com/t136001-recent-topics-appearance

I have a problem though that I only noticed now with members, and many have reported it as well. Whenever someone changes his/her Avatar (using either external URL or forumotion's upload) the image appears broken, just like here:



Is there any method to fix the images? Because whenever someone changes his/her avatar they experience this.

I tried clearing my browser's catch but It didn't work.

Thanks in advance.
Hello Anzo,

The recent topic avatars are a little bit complicated. I have something similar to my forum also and when someone changes his/her avatar image the image at the recent topic widget stays the same for like 24hours and then it changes. Except if i clear the cookies completely with codes and staff. With that after my login to the forum and as soon as i view one of the post provided in the recent topic widget, the avatars appear correctly. Maybe you are facing the same thing but with the difference of the broken image.

Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Ange Tuteur on October 15th 2014, 11:25 pm

Hello Anzo,

Your avatars appear as :

Probably because you hide profiles from Guests. ^^

What type profile are you using : Advanced or Simple ?

Thanks

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Anzo on October 15th 2014, 11:32 pm

Avatars aren't hidden for guests though, I logged out to check and It's the same thing. Also, our profiles are the Advanced Type.

Anzo
Forumember

Posts : 303
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by SLGray on October 15th 2014, 11:34 pm

Clear your browser's cache.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Ange Tuteur on October 15th 2014, 11:37 pm

@Anzo wrote:Avatars aren't hidden for guests though, I logged out to check and It's the same thing. Also, our profiles are the Advanced Type.
That's because they're cached for you. Wink

It could be a problem with where the images are hosted. What is the link of the broken images ?

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Anzo on October 15th 2014, 11:49 pm

I tried both ways. Whether it's an external link or directly uploaded from the profiles it's the same issue. Also @SLGray I've cleared my browser's catch before I opened this topic, nothing changed.

Anzo
Forumember

Posts : 303
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Ange Tuteur on October 15th 2014, 11:54 pm

Try replace your script by :
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_ava2.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= {};
 
  $('.topicRow').each(function(){
            to_replace[$(this).find('a[href^="/u"]').attr('href').substr(2)]= 1;
            $(this).find('a[href^="/u"]').before('<span class="mini_ava2 member'+$(this).find('a[href^="/u"]').attr('href').substr(2)+'"></span>');
        });
 
      for(i in to_replace)
        {
            set_avatar(i);
        };
 
  });

and then clear your cache so you can see if there are any changes.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Anzo on October 16th 2014, 12:15 am

No changes. It actually looks way different now even.

Now the Images are only located before the 2nd line not before the entire area as It used to be.

Anzo
Forumember

Posts : 303
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Luffy on October 16th 2014, 12:19 am

@Anzo wrote:No changes. It actually looks way different now even.

Now the Images are only located before the 2nd line not before the entire area as It used to be.

Ηello Anzo,

Forumotion experiences some problems with images. Now on my forum as well most of the images are displayed with the cracked icon also. Lets hope is not something important and it will be fixed soon!

Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Anzo on October 16th 2014, 12:21 am

Oh, so It's not from my forum's side?

Anzo
Forumember

Posts : 303
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Luffy on October 16th 2014, 12:22 am

I don't think so! Lets hope its this and nothing serious has happened!






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Anzo on October 16th 2014, 12:26 am

I hope so.

I'll put back the old script, in case you check the forum @Ange

Anzo
Forumember

Posts : 303
Reputation : 6
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

In progress Re: Recent topics appearance v.2

Post by Ange Tuteur on October 16th 2014, 4:47 am

It's okay to put the old script back. Wink

I noticed that some images are taking their time to load. Could be me though.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

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