Choose from our various pricing plans. There is a package for everyone!


Limit the number of Top posters

View previous topic View next topic Go down

Tutorial Limit the number of Top posters

Post by L! on Sun Jul 29, 2012 12:57 pm

Hi CSSHelp-ers. Very Happy

Today I'm going to show you a new tutorial about changing the Top posters list, certainly the number of posters. For default, that list have a top of 20 posters. We can limit it to 10, or what number we want. With some jQuery we can do it. You have to add the codes to Javascript codes management, and to set it to all pages.

phpBB2:
Code:
$(document).ready(function(){
if(document.URL.indexOf('memberlist?mode=overall_posters') != -1){
$('form').next('table.forumline').addClass('toplist');
$('.toplist tr:has("th.thTop")').addClass('not_this');
$('.toplist tr:not(".not_this")').addClass('this');
$('.toplist tbody tr.this:eq(19)').hide();
$('.toplist tbody tr.this:eq(18)').hide();
$('.toplist tbody tr.this:eq(17)').hide();
$('.toplist tbody tr.this:eq(16)').hide();
$('.toplist tbody tr.this:eq(15)').hide();
$('.toplist tbody tr.this:eq(14)').hide();
$('.toplist tbody tr.this:eq(13)').hide();
$('.toplist tbody tr.this:eq(12)').hide();
$('.toplist tbody tr.this:eq(11)').hide();
$('.toplist tbody tr.this:eq(10)').hide();
}
});

$(function(){
$('a:contains("Overall top 20 posters")').text('Overall top 10 posters');
});

phpBB3:
Code:
$(document).ready(function(){
if(document.URL.indexOf('memberlist?mode=overall_posters') != -1){
$('form').next('div.forumbg.forumbg-table').addClass('toplist');
$('.toplist tbody tr:eq(19)').hide();
$('.toplist tbody tr:eq(18)').hide();
$('.toplist tbody tr:eq(17)').hide();
$('.toplist tbody tr:eq(16)').hide();
$('.toplist tbody tr:eq(15)').hide();
$('.toplist tbody tr:eq(14)').hide();
$('.toplist tbody tr:eq(13)').hide();
$('.toplist tbody tr:eq(12)').hide();
$('.toplist tbody tr:eq(11)').hide();
$('.toplist tbody tr:eq(10)').hide();
}
});

$(function(){
$('a:contains("Overall top 20 posters")').text('Overall top 10 posters');
});

PunBB:
Code:
$(document).ready(function(){
if(document.URL.indexOf('memberlist?mode=overall_posters') != -1){
$('.frm-form .table').addClass('toplist');
$('.toplist tbody tr:eq(19)').hide();
$('.toplist tbody tr:eq(18)').hide();
$('.toplist tbody tr:eq(17)').hide();
$('.toplist tbody tr:eq(16)').hide();
$('.toplist tbody tr:eq(15)').hide();
$('.toplist tbody tr:eq(14)').hide();
$('.toplist tbody tr:eq(13)').hide();
$('.toplist tbody tr:eq(12)').hide();
$('.toplist tbody tr:eq(11)').hide();
$('.toplist tbody tr:eq(10)').hide();
}
});

$(function(){
$('a:contains("Overall top 20 posters")').text('Overall top 10 posters');
});

Invision:
Code:
$(document).ready(function(){
if(document.URL.indexOf('memberlist?mode=overall_posters') != -1){
$('.borderwrap.member-list').addClass('toplist');
$('.toplist .box-content .member:eq(19)').hide();
$('.toplist .box-content .member:eq(18)').hide();
$('.toplist .box-content .member:eq(17)').hide();
$('.toplist .box-content .member:eq(16)').hide();
$('.toplist .box-content .member:eq(15)').hide();
$('.toplist .box-content .member:eq(14)').hide();
$('.toplist .box-content .member:eq(13)').hide();
$('.toplist .box-content .member:eq(12)').hide();
$('.toplist .box-content .member:eq(11)').hide();
$('.toplist .box-content .member:eq(10)').hide();
}
});

$(function(){
$('a:contains("Overall top 20 posters")').text('Overall top 10 posters');
});
avatar
L!
Premium Member


Age : 19
Posts : 105
Join date : 2012-07-05
Reputation : 5

View user profile http://www.ldevelopment.org/

Back to top Go down

Tutorial Re: Limit the number of Top posters

Post by RSguideMaker on Sun Jul 29, 2012 1:46 pm

This is a good tutorial. I will try it out on my forum in a while, and get back to you on what I think Smile



Please do not request help via PM! Post on the forums where it can help everyone.
avatar
RSguideMaker
Support Moderator
Support Moderator

Age : 18
Posts : 421
Join date : 2012-05-23
Reputation : 9

View user profile http://euanfitzpatrick.co.nf/

Back to top Go down

Tutorial Re: Limit the number of Top posters

Post by Mati™ on Tue Jul 31, 2012 2:39 pm

Really nice tut

Congratulations, your tutorial has been accepted.
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: Limit the number of Top posters

Post by Leo on Tue Jul 31, 2012 6:49 pm

Excellent tutorial! I just added this to my forum (:
Good job! up
avatar
Leo
Member
Member

Age : 20
Posts : 196
Join date : 2012-07-10
Reputation : 4

View user profile

Back to top Go down

Tutorial Re: Limit the number of Top posters

Post by L! on Tue Jul 31, 2012 11:26 pm

Glad you like it and thanks! Smile
avatar
L!
Premium Member


Age : 19
Posts : 105
Join date : 2012-07-05
Reputation : 5

View user profile http://www.ldevelopment.org/

Back to top Go down

Tutorial Re: Limit the number of Top posters

Post by Leo on Wed Aug 01, 2012 12:42 am

I found a bug.
I have it set to Top 10 posters.

But when I click the link
http://urandom.forumotion.com/memberlist?mode=overall_posters
It still says Overall top 20 posters.
avatar
Leo
Member
Member

Age : 20
Posts : 196
Join date : 2012-07-10
Reputation : 4

View user profile

Back to top Go down

Tutorial Re: Limit the number of Top posters

Post by Sponsored content


Sponsored content


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