The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Avatars on the last topic

4 posters

Go down

Solved Avatars on the last topic

Post by TheCrow Sat 23 Nov 2013 - 19:15

Hello. I am using these codes for the avatars in the last topic and something is wrong because whenever i put the code in the forum it comes this message that i am trying to load a page too many times and it needs refresh all the times.. Can u tell me if it has something wrong in the code and whats the problem?

CSS:

Javascript:

these codes i use in forum versions:
phpbb2 & punbb

Thank you!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by SLGray Sat 23 Nov 2013 - 20:17

When you have too many requests on the same page, you will get that message. I believe there is no way to change the code to stop that message.


Avatars on the last topic Slgray10

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

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sat 23 Nov 2013 - 20:39

Look, i was using this code on my ex forum version which was phpbb2 and it was working fine.. But now i am trying to put it again and it shows this message in any page i go! This is my problem. Not only to the forum but anywhere i go it shows this message.. This is why i posted this message here...
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by SLGray Sat 23 Nov 2013 - 20:53

So this happens if you are not even on a forum hosted by Forumotion?


Avatars on the last topic Slgray10

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

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sat 23 Nov 2013 - 21:18

Yes and this is why its weird..
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by SLGray Sat 23 Nov 2013 - 21:21

Well then it is on your side, not Forumotion, if it is happening everywhere. Try clearing your browser's cache.


Avatars on the last topic Slgray10

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

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sat 23 Nov 2013 - 21:28

I did that but the weird of all is that whenever i put the code this happens.. if i remove the code it doesn't do it..
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Dark Nexus Sat 23 Nov 2013 - 23:39

If you're not using Forumotion you'd probably be better off asking on a site like Stack Overflow.
avatar
Dark Nexus
New Member

Male Posts : 1
Reputation : 0
Language : English

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur Sun 24 Nov 2013 - 3:11

In that code you're using the AJAX .load() function. It doesn't look like it caches the loaded data either.

Depending on how many forums you have that this icon is being applied to, you're sending many requests to load a users avatar each time you're on the index. If you keep going over your request limit, I highly suggest you remove that code.

On the French support there is a tuto which caches the data so it only has to load on your first visit.

Please try this tuto: Avatar of who posted last on the forum index

You don't have to use it, it is only a suggestion.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sun 24 Nov 2013 - 4:03

At first, i am the founder of one forum and on the other one i am just an admin/helper. This is weird because when i had this on my ex-version (phpbb2) worked fine but now it doesn't. Is it possible, because the forum has a lot of categories to load these icons to show this message?

For the link you showed me this will work on both versions? Phpbb2 & Punbb?
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur Sun 24 Nov 2013 - 4:27

Depending on how many "Last posts" are show on the index, if a lot, the amount of load functions would no doubt take a toll on your requests.

The link I provided works on all versions from what I tested.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sun 24 Nov 2013 - 4:28

ok solved.. i will post one more and bedtime!!

Topic can close!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur Sun 24 Nov 2013 - 4:30

Topic Solved and Archived

Unarchived at authors request
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sun 24 Nov 2013 - 17:01

Hello once again and thank you for opening this again.

The codes i provided at the first topic don't work on punbb. why is that?

i just realized that!! lol
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur Sun 24 Nov 2013 - 17:18

The selectors would need to be changed over to the ones used in punbb.

Here its is:
Code:
$(document).on('ready', function() {
        $('.statused td.tcr').prepend('<div class="avatar-index"><div>');
        $('.statused td.tcr .avatar-index').each(function () {
            var profileUser = $(this).parent().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 + '#profile-advanced-right .main-content.clearfix.center img:eq(0)');
        });
    });
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sun 24 Nov 2013 - 17:24

Its appears that it shows it to the homepage but it doesnt show the image of the avatar...

forum: http://informationforum.forumgreek.com
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur Sun 24 Nov 2013 - 17:28

Your forum has a bit things different on it from default punbb, try this:
Code:
    $(document).on('ready', function() {
            $('.statused td.tcr').prepend('<div class="avatar-index"><div>');
            $('.statused td.tcr .avatar-index').each(function () {
                var profileUser = $(this).parent().children('span').children('center').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 + '#profile-advanced-right .main-content.clearfix.center img:eq(0)');
            });
        });
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by TheCrow Sun 24 Nov 2013 - 17:31

You are the best!!!!!! I wish you all the thanks i can get from the universe!!!

Thanks, thanks, thanks, thanks!!!!!! :wouhou: :wouhou: 


SOLVED!!!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur Sun 24 Nov 2013 - 17:33

You're welcome ^^ I love you

Topic Solved and Archived
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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