PDA

View Full Version : Miscellaneous Hacks - Top Posters List


Paul M
01-02-2010, 10:00 PM
As of 23 Nov 2017 this modification has been withdrawn.

This displays a page with the Top Forum Posters for a given set of periods. Two of the periods are fixed ('This Month' & 'Overall') but can be turned off in the options. The other three periods are user definable (in days). The default values for these columns are 1 day, 7 days & 28 days (note that 0 = off).

* The number of posters to be shown can be set, the default is the Top 10 posters.
* You can select which usergroups are included (or excluded) in the count, so members in banned groups etc are not shown
* You can exclude individual userids such as rss posters.
* You can exclude forums from the counts - however, this exclusion does not apply to the final "overall" count.
* If enabled, this will also add a link to your Quick Links or Community Links menus.
* There is an option to prefix the link path if you use something like CMPS.
* Usergroup & forum settings now display actual lists rather than needing csv id lists.

To install just unzip the xml file and import it using the Product Manager


History:

v4.0.1 : 03-Jan-2010 : Initial release for vb 4.0.0 Gold.
v4.0.2 : 12-Jan-2010 : Fixed WOL location. Added userid exclusion facility.
v4.0.3 : 17-Jan-2010 : Updated settings display. Added forum exclusion facility.
v4.0.4 : 20-Jan-2010 : Internal update, not released.
v4.0.5 : 26-Jan-2010 : Various updates.
v4.0.6 : 16-Feb-2010 : Settings update.
v4.0.7 : 27-Feb-2010 : Style code updates for vB 4.0.2.
v4.0.8 : 26-Sep-2010 : Install Code Updated.
v4.0.9 : 06-Nov-2010 : Install code updated.

v4.1.0 : 04-Dec-2010 : Updated for vBulletin 4.1.
v4.1.1 : 05-Mar-2011 : Fix possible array issue.

v4.1.7.0 : 16-Oct-2011 : Updated for vBulletin 4.1.7.

v4.2.0.0 : 24-May-2012 : Updated for vBulletin 4.2.0.

BlackJacket
01-03-2010, 11:40 AM
Thanks Paul. Tagged for later...

MARCO1
01-03-2010, 11:45 AM
Very Nice work Pual, Rated 5 stars :)

04wayne
01-03-2010, 12:26 PM
Marked as installed. And rated 5 stars. Thank you very much for this, pal. Very helpful for my 'Posters Of The Week' :D

albibak
01-04-2010, 06:42 PM
Paul M,

Thanks for the mod
Please, find in attachment the french translation
You can find the french topic for this mod here: http://forum.vbulletin-fr.org/modifications/1088-Liste-des-plus-bavards

vulture
01-05-2010, 09:24 AM
I get this error:

MySQL Error : MySQL server has gone away
Error Number : 2006

kersti
01-06-2010, 09:34 AM
Works well, however, the list seems a bit odd - would love to be able to define the following

- last day
- last week (7 days)
- last month (28 days)
- last year (365 days)
- overall

But I can't seem to get this to work and when I do think I've got it the order is skewed

Paul M
01-06-2010, 09:42 AM
Only the first three columns can have their time period defined, so you cannot do the above.

Boots
01-06-2010, 10:24 AM
Installed.

Paul, how about an option to exclude certain userid's ? I'd like to get my RSS bot off there if I could.

Paul M
01-06-2010, 01:47 PM
Hmmm, seems reasonable, I will consider that.

Boots
01-06-2010, 01:56 PM
Great! :D

tahrim
01-15-2010, 03:44 AM
nice one

HeyMe
01-16-2010, 08:40 AM
Thanks for this, I need something like this for a posting contest, but I want to exclude posts in some forums from being counted, can you add this feature ?

Paul M
01-16-2010, 09:09 AM
I'll consider that for the next update.

Paul M
01-17-2010, 12:27 PM
<u>4.0.3</u>

Updated settings display.
Added forum exclusion facility.

HeyMe
01-22-2010, 07:29 AM
4.0.3

Updated settings display.
Added forum exclusion facility.
Thanks a lot!! Marked as installed & I will be testing it :)

DoubleGlasses
01-23-2010, 02:40 AM
I just installed this product - but it's only displaying user names.

Check the screenshot below.

Any suggestions?

https://vborg.vbsupport.ru/

yilmaz68
01-23-2010, 03:56 AM
installed, thanks Paul !

Paul M
01-23-2010, 03:54 PM
I just installed this product - but it's only displaying user names.

Check the screenshot below.

Any suggestions?

http://img522.imageshack.us/img522/871/capturetopposters.png

At a guess I would say you have changed the text colour that usernames are displayed with to white, so they are white on white. Edit the css_custom_top.css template to make the box background colours more suitable for your forum.

atmaca
01-23-2010, 07:31 PM
Thanks Paul, nice add-on. :) Turkish translation can be downloaded from the attachment. To install, overwrite your language pack.

Trek
01-24-2010, 07:19 PM
Installed, works good but doesn't use the stylevars. Edited the CSS to do what I wanted though.

Thanks!

Paul M
01-24-2010, 09:43 PM
What stylevars exactly ?

synseal
01-24-2010, 09:55 PM
Great, works fine, Thank You!.

Trek
01-24-2010, 11:07 PM
What stylevars exactly ?

Most everything in the CSS is hardcoded to a color, a light color. As I use a darker theme on my site it didn't go well.

I mostly used the stylevar blockrow to fix it so it looked the way I needed.

Carmack
03-02-2010, 11:37 PM
This is fantastic! Very simple!

If I wanted to call to the script to make a "top posters" Forum Box that only included all-time top posters, how would you recommend I do this?

MedellinStyle
03-03-2010, 07:24 AM
This is fantastic! Very simple!

If I wanted to call to the script to make a "top posters" Forum Box that only included all-time top posters, how would you recommend I do this?

YEs how to apply this to a sidebar block?? please please!!

Paul M
03-03-2010, 10:56 AM
You cannot do that - other than to write a whole new modification to do it.

HeyMe
06-11-2010, 07:37 PM
I think I found a bug in this one, posts deleted softly still get counted, can you please look at this?

Thanks in advance.

BadgerDog
06-12-2010, 07:16 PM
Installed ... very nice Paul .. thank you .. :)

For those wanting to change CSS variables to suit custom styles, this mod uses:

custom_top.css

Regards,
Badger

HeyMe
06-15-2010, 05:51 PM
I think I found a bug in this one, posts deleted softly still get counted, can you please look at this?

Thanks in advance.
I replaced line 270 with this:
$where = $wherecond."AND rpl.dateline > $start[$col] AND rpl.visible = 1";

It seems to work, please let me know Paul M if this fix is healthy, thanks :)

Paul M
06-15-2010, 10:02 PM
If you wish to exclude moderated and soft deleted posts then that will work fine.

Sicilian
06-17-2010, 11:57 AM
Great Mod, thank you.

Only niggle I have is the link to cableforum. Is it possible to remove the link? I dont mind making a donation in order to be able to remove the link. Thank you.

Paul M
06-17-2010, 12:40 PM
Yes, you can remove it for a small donation.

Sicilian
06-17-2010, 01:07 PM
Yes, you can remove it for a small donation.

:cool: Please pm me details, thank you :up:

BillyD
06-19-2010, 07:17 PM
Hi, thank you for the mod. I have installed it but the top posters page is empty. Not sure what is wrong...?

http://forums.soccerfansnetwork.com/misc.php?do=topposters

Paul M
06-19-2010, 09:22 PM
That looks a bit like the template is missing, id suggest removing it, and re-installing it.

BillyD
06-20-2010, 12:56 PM
Paul, thanks so much for the response. I uninstalled the hack and re-installed it and no success....what could I have done wrong? I saved the xml file and then uploaded it via Import Product. Thanks..

BillyD
06-20-2010, 10:13 PM
It randomly started working...maybe a cache problem. Thanks.

KURTZ
07-26-2010, 04:00 PM
italian lang :)

OurCouponHome
09-08-2010, 10:59 PM
Thanks!! My members have been asking for this since our upgrade!

audis3
10-16-2010, 09:06 PM
Can it be done in block with tabs?

Paul M
10-17-2010, 01:33 PM
Nope.

Kyo-dono
12-23-2010, 08:38 AM
Can you add mini-avatars and link with username too? Very nice add-on. :)

Installed.

Paul M
12-23-2010, 09:43 AM
You can edit the templates to do that if you prefer it on your site, but i wont be adding them as a default in the mod. :)

ProFifaLeagues
12-23-2010, 10:24 AM
Paul is there a way to have this show in the forum blocks ?

Paul M
12-23-2010, 11:20 AM
Not without writing a seperate mod, the system for blocks is very diferent.

ProFifaLeagues
12-23-2010, 01:02 PM
Cheers for the quick answer Paul!
Maybe one for the future???

lycheepassion
12-24-2010, 09:14 AM
Hey I installed but I don't see it? Need it for a giveaway thanks!

ceho
01-10-2011, 04:33 PM
Looks like this has stopped working on vB 4.1.1 Beta, can anybody confirm this or is it just my test forum?

Paul M
01-10-2011, 08:15 PM
Its your forum. Its fine on my 4.1.1 beta.

ceho
01-11-2011, 10:44 AM
Looks like I was too tired last night, I stupidly forgot that I changed some usergroup settings, of course they're not counted in a test forum.... Argh! Sorry for the confusion mate!

Kyo-dono
01-13-2011, 06:29 AM
Working this mod in 4.1.1?

Paul M
01-13-2011, 11:03 AM
As it says ;

vB Version: 4.x.x

Kyo-dono
01-13-2011, 11:36 AM
Thanks. Is it possible to remove "Top Posters by Paul Marsden" at the bottom?

Paul M
01-13-2011, 03:52 PM
Why ?

Kyo-dono
01-13-2011, 05:23 PM
I like your mod. Thank for it. :)
But i don't like the optic of bottom line. Its only a feeling. I can't explain it. ^^
Is there a legal way to remove the branding?

Paul M
01-13-2011, 08:07 PM
Anyone who donates is free to remove the branding. :)

ehsanix
01-14-2011, 03:39 PM
Paul M-how to apply this to a sidebar block?
help plsssssss

Paul M
01-14-2011, 03:52 PM
You cannot, its not designed for the sideblock.

jgt58
01-17-2011, 02:11 PM
with a css edit for background color , works flawlessly on 4.1.1. Might wanna consider putting background color as a option in the options for those who dont know how to edit css sheets for dark colored forums

mindway
02-06-2011, 11:05 AM
how can i display this on top of each page... for instance call the plugin at top of each page...

Paul M
02-06-2011, 08:20 PM
You cannot do that, its designed to be its own page.

beatyourtruck
03-09-2011, 01:46 AM
Excellent Paul. Working perfectly on 4.1.2.

Thank you! 8)

Strauss
03-29-2011, 12:21 PM
awesome thanks!

dlewisr
04-20-2011, 06:19 PM
Cheers mate. Job's a good 'un

Alan_SP
04-26-2011, 12:14 AM
how can i display this on top of each page... for instance call the plugin at top of each page...

You cannot do that, its designed to be its own page.

Well, it could be done, if he really want it and want to do a bit work on it.

You need to change template Top_posters, remove everything except table code for creating list and usual HTML page code. The rest is just how vBulletin creates its own pages, so it could go and in this case it should go.

Then find template that is used everywhere. You should use either navbar or footer (i.e. if you want it on top or bottom of your forum). After that, just put iframe html code calling top posters. :)

If you don't know about what I'm talking, don't do this.

Alan_SP
04-26-2011, 12:26 AM
Paul, excellent mod, really like it. I use it for Top 100 posters, so I needed to add poster's position number (you can get lost in this many posters).

If someone wants to do this, edit this template:

Top_Posters_Bit

find: {vb:raw posts.username}

add before: {vb:raw posts.row}.

As posts.raw isn't defined, you need to create it. Edit plugin Top posters that uses hook misc_start (all plugins have same name, so look for hook).

Find:

$posts['userid'] = $posts[$col]['userid'];
$posts['username'] = $posts[$col]['username'];
$posts['postcount'] = vb_number_format($posts[$col]['postcount']);
$templater = vB_Template::create('Top_Posters_Bit');
$templater->register('posts',$posts);
$toppostrow .= $templater->render();

Add right before or after this code: $posts['row'] = $row+1;

That's it, you have users postion before users name. :) I attached modified file.

billstelling
04-26-2011, 03:00 AM
awesome mod! I like it allot, well done.

jack150464
06-05-2011, 10:45 PM
How do I change the background color?

thanks

Paul M
06-06-2011, 12:12 PM
You would need to edit the custom CSS.

rasp187
06-12-2011, 04:13 AM
You would need to edit the custom CSS.

Any way you can detail this more, like how I make it darker for my dark skins instead of white? Great mod, btw. Thanks a lot!

Paul M
06-12-2011, 10:35 AM
Sorry, I cannot give specific examples - the custom css is a template supplied as part of the mod, you can edit as you wish.

Paul M
10-16-2011, 12:21 PM
Updated: This is now available for the 4.1.x series of vBulletin only.

Alan_SP
12-09-2011, 09:17 AM
Paul, could you make that users' names appear how they look like in postbit (with different colors)?

vividbreeze
01-04-2012, 01:15 AM
Is there a homepage widget for this too? Kinda like the top 5 poster one I saw long ago?

nodofollow
01-08-2012, 06:57 PM
work with 4.1.9 ?

Paul M
01-08-2012, 08:43 PM
As it says : vB Version: 4.1.x

Danny Diamond
01-09-2012, 02:12 AM
Installed. It would be cool if you could make it so it appeared under "Who's online" and a bit smaller.

Overall its a sweet mod though. Thanks for it.

lazytown
01-30-2012, 10:07 PM
This is a great mod, and I used to run it on 3.x. However, I had to disable it because it is an absolute resource hog on my large forum (5+mil posts). Running it the first time spiked my server load for 30 seconds from 2 to 8 (and tied up mysql). subsequent runs still take over 15 seconds. This is on a very fast server (8cpu, 12gig, 15K scsi raid 10, xcache, sphinx, etc).

Are there any options to cache tho results or reduce server load? Maybe a cron job once per day?

lazytown
01-30-2012, 10:30 PM
Interesting... If I enable the monthly count, it takes forever.. If I do 28 days it also takes forever. But if I do 1 day, 7 days and all time, it takes only a second or two. 14 days maybe adds 1 second. There is a threshold of some type where it takes vastly longer, so it's not linear. Could it have to do with some cache filling up (vbulletin, mysql or xcache)?

Paul M
01-31-2012, 06:40 PM
Do you have the Post.Dateline index on your forum ?

Do you use the usergroup filtering ?

lazytown
01-31-2012, 10:08 PM
Thanks for the reply.

Yes, I have a Post.Dateline index.

I tried it with and without usergroup filtering, no noticeable difference.

Have you tried it on a very large forum?

Nirjonadda
03-03-2012, 01:24 PM
Installed...working fine on 4.1.10

Paul M
03-03-2012, 05:24 PM
Have you tried it on a very large forum?

My forum has 2 million posts, it renders the whole page in < 1 second.

Trevor Matthews
03-03-2012, 06:50 PM
Installed, works perfectly in 4.1.11

ZEN888
05-30-2012, 05:54 AM
Hi,
I installed the 4200 on VB4.2, it did not work. No display of any numbers.

Paul M
05-30-2012, 11:27 AM
Works just fine for me on 4.2

ZEN888
06-01-2012, 12:35 AM
It is okay now. My forum was upgraded from VB4.1.11 to VB4.2. I needed to uninstall the older version of Top Posters, and to revert the Top Posters templates left in the system before I could install the VB4.2 Top Posters. Thanks.

DevilGreeny
06-11-2012, 06:53 PM
Work fine with VB4.1.12
Could you please help me a small trouble?

I want to display more poster, with page navigation ( page 1, page 2... last page )
I want to display the Overall column, could you please edit that ?

Please help me

Paul M
06-11-2012, 08:34 PM
I want to display more poster, with page navigation ( page 1, page 2... last page )
I want to display the Overall column, could you please edit that ?

1. You can display more by changing the setting, however, there is no paging in this.

2. Edit what ? There is already an overall column.

DevilGreeny
06-12-2012, 08:58 AM
1. You can display more by changing the setting, however, there is no paging in this.

2. Edit what ? There is already an overall column.

thanks for your support
i mean that , there is only one "overall" column, delete the week,month column

how to display like that ?

Paul M
06-12-2012, 04:04 PM
Sorry, but I still dont understand what you are asking.

barakuda
06-12-2012, 06:58 PM
Tagged for later

DevilGreeny
06-13-2012, 04:25 AM
I mean that :

I only want a page where i can display list member who post much ( overall ) in all time
I don't need the column : week, month , i only need the column : overall
Could you please edit that for me ?

DevilGreeny
06-19-2012, 06:52 PM
Please read it and help me Paul :(

Paul M
06-20-2012, 09:03 PM
You need to help yourself first.

Simply turn the other columns off.

It will look a bit odd tho.

tommyxv
07-28-2012, 05:52 PM
Paul, any way to convert this to a Top Referrer mod? Or add a top referrer column?

emperatour
08-21-2012, 08:19 AM
In version 4200, my forum path will be redirected to the plugin's page:

http://www.myforum.com/forum/
to
http://www.myforum.com/forum/misc.php?do=topposters

This way I can access the forum index only using this page /forum/forum.php.

Can you tell me what may cause this ?

Thanks,

Paul M
08-22-2012, 01:34 AM
I dont understand your post tbh.

emperatour
08-23-2012, 05:10 PM
I dont understand your post tbh.
After enabling this plugin, when I browse to www.myforum.com/forum/ the page redirects to www.myforum.com/forum/misc.php?do=topposters instead of redirecting to www.myforum.com/forum/forum.php.

Paul M
08-24-2012, 12:48 AM
There is no code to perform redirects in it.

Amaury
11-24-2012, 12:51 AM
Installed!

Two questions, though:
What controls the background?
Is it possible to create a plugin hook or something to make the Current Activity be "Viewing Page Top Posters" (Top Posters being a link) instead of that Viewing Top Posters with the URL?http://i101.photobucket.com/albums/m62/AmauryGarcia/TopPosters.png


https://vborg.vbsupport.ru/

EDIT: Never mind the first one.

I fixed it by inserting this into the additional.css template, changing the color accordingly when I added it to the additional.css template for Dance of the Dream Eater (Light).

.toptable td {
border: 1px solid black;
}

.toptable .alt1 {
border: 1px solid black;
background: #323232;
}

.toptable .alt2 {
border: 1px solid black;
background: #323232;
}

Amaury
11-28-2012, 03:16 AM
Is it possible to create a plugin hook or something to make the Current Activity be "Viewing Page Top Posters" (Top Posters being a link) instead of that Viewing Top Posters with the URL?[/LIST][IMG]http://i101.photobucket.com/albums/m62/AmauryGarcia/TopPosters.png[

http://i101.photobucket.com/albums/m62/AmauryGarcia/Activity-2.png

Bump.

SoloX
12-15-2012, 07:21 AM
generates lots of load on the server with many users. anyway to cache this?

Paul M
12-16-2012, 10:12 PM
Multiple repeat posts removed. If someone is going to answer you they will, we dont need repeated posts with huge images every week.

SoloX
12-23-2012, 02:31 AM
here is what i did to reduce the load on the server.

i created a cron job to run every 4 hrs and save output to an html file. i then created a link in Quick Links ..

0 0,4,8,12,16,20 * * * /usr/bin/curl http://mydomain.com/forums/misc.php?do=topposters > /var/www/localhost/htdocs/forums/top.html

Amaury
12-29-2012, 10:48 PM
Okay, I got it to sort of work.

online_location_unknown:

if ($userinfo['activity'] == 'topposters')
{
$handled = true;
$userinfo['action'] = $vbphrase['top_view'];
$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';
}I changed it to this:

if ($userinfo['activity'] == 'topposters')
{
$handled = true;
$userinfo['action'] = "Viewing Page";
$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';
}However, I still can't get the URL to just be a simple hyperlink (Top Posters).

if ($filename == 'topposters.php')
{
$userinfo['activity'] = 'topposters';
}
I tried changing that to this, but it just made it appear as an unknown location:

switch ($filename == 'topposters.php')
{
case 'topposters.php':
$userinfo['activity'] = 'Top Posters';
break;
}Any help?

EDIT: I changed online_location_unknown again and made it this:

switch ($userinfo['activity'])
{
case 'Top Posters':
$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';
$userinfo['action'] = "Viewing Page";
$handled = true;
break;
}...and the activity name is still not working how I want it to.

This is what it should be:
Viewing Page Top Posters (http://www.kh-mediaflare.net/misc.php?do=topposters)

This is what it says:
Viewing Page http://www.kh-mediaflare.net/misc.php?do=topposters

Any help will be greatly appreciated.

Paul M
12-30-2012, 12:06 AM
You seem to be over complicating a simple change.

Simply replace ;
$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';


With
$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbphrase['top_list'].'</a>';


Nothing else needs to be done.

Amaury
12-30-2012, 12:22 AM
You seem to be over complicating a simple change.

Simply replace ;
$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbulletin->options['bburl'].'/misc.php?do=topposters</a>';With
$userinfo['where'] = '<a href="misc.php?do=topposters">'.$vbphrase['top_list'].'</a>';Nothing else needs to be done.

I really appreciate the help, Paul, and I apologize. I've modified plugins for activity name stuff before, and this one was just getting to me because of that extra information.

Anyway, I reverted the changes I did and changed what you told me to change, and it worked.

The only additional change I made was changing this:

$userinfo['action'] = $vbphrase['top_view'];...to this:

$userinfo['action'] = "Viewing Page";That way it says Viewing Page Top Posters instead of Viewing Top Posters Top Posters.

Thanks again, Paul! :)

Paul M
12-30-2012, 11:20 PM
You should not change the code, but simply edit the phrase.

Amaury
12-30-2012, 11:22 PM
You should not change the code, but simply edit the phrase.

Thanks, Paul. I'll do that now.

root2012
04-26-2013, 05:44 AM
After enabling this plugin, when I browse to www.myforum.com/forum/ the page redirects to www.myforum.com/forum/misc.php?do=topposters instead of redirecting to www.myforum.com/forum/forum.php.



exactly the same problem I have I already did fix it for

xxdestinyxx
01-02-2014, 11:34 PM
Hey Paul,

My forum has been using this application for quite awhile and we LOVE it.

Recently we implemented a change where if a member posts less than 100 characters it does not add to their post count. We used this mod (https://vborg.vbsupport.ru/showthread.php?t=256069) to do it.

The issue which has arisen is that although their post count does not increase, on your modification it still does. We have been using your modification to keep track of how many posts a member makes each month.

Is it possible for me to edit the code somewhere to have it pulling from the active post count and not just if the member makes a post at all? And by "possible for me to edit" I mean, if this is possible can you help show me how? (Location/what to replace etc).

I would sincerely appreciate it.

Paul M
01-03-2014, 12:45 AM
For the most part this counts the physical posts, so it would not be very easy to exclude posts certain posts. You could probably do it with some fancy SQL check, but that would likely put a burden on the query processing, which would certainly slow it down on larger forums.

xxdestinyxx
01-04-2014, 03:42 PM
Alright, thank you Paul :)

We only average about 50 members, but we're using justhost at the moment and they suck when it comes to SQL connections so I'd rather not burden it.

RSNF
02-14-2014, 03:36 PM
Great Mod thanks for this!!