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 November 23rd 2013, 7:15 pm

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 : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by SLGray November 23rd 2013, 8:17 pm

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 : 51557
Reputation : 3524
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 November 23rd 2013, 8:39 pm

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...


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by SLGray November 23rd 2013, 8:53 pm

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 : 51557
Reputation : 3524
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 November 23rd 2013, 9:18 pm

Yes and this is why its weird..


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by SLGray November 23rd 2013, 9:21 pm

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 : 51557
Reputation : 3524
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 November 23rd 2013, 9:28 pm

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..


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Dark Nexus November 23rd 2013, 11:39 pm

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 November 24th 2013, 3:11 am

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 : 13207
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 November 24th 2013, 4:03 am

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?


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur November 24th 2013, 4:27 am

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 : 13207
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 November 24th 2013, 4:28 am

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

Topic can close!


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur November 24th 2013, 4:30 am

Topic Solved and Archived

Unarchived at authors request
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
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 November 24th 2013, 5:01 pm

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


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur November 24th 2013, 5:18 pm

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 : 13207
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 November 24th 2013, 5:24 pm

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

forum: http://informationforum.forumgreek.com


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur November 24th 2013, 5:28 pm

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 : 13207
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 November 24th 2013, 5:31 pm

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

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


SOLVED!!!


Avatars on the last topic Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Avatars on the last topic

Post by Ange Tuteur November 24th 2013, 5:33 pm

You're welcome ^^ I love you

Topic Solved and Archived
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
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