Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
[7.0.x] Top Posters in Last X Days
#312682 01/14/2007 10:49 PM
Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Top Posters in X Days

Description: This changes the Top Posters Portal box to reflect top posters in last X days
which keeps the list more current. Otherwise the same people tend to stay on that list.

Working under: 7.0.2

Any pre-requisites: none

Author: JoshPet www.JoshuaPettit.com
for discussion and bugs go to www.ubbdev.com

Date: 1/14/07

Credits: One of my clients for commissioning it

Files Altered: /cache_builders/top_posters.php, /languages/english/island_top_posters.php

Database Altered: none

Info: Make this modification, set the number of days you'd like to use, and clear your cache


Attached Files
2339-TopPostersLastXDays.txt (2.11 KB, 181 downloads)
Sponsored Links
Re: [7.0.x] Top Posters in Last X Days
JoshPet #312689 01/15/2007 6:32 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
Works fine in 7.1 - only difference being the location of the language string.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: [7.0.x] Top Posters in Last X Days
Ian_W #312696 01/15/2007 7:02 AM
Joined: Jan 2000
Posts: 5,795
Likes: 8
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,795
Likes: 8
Looks good Josh, keep up the good work smile


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.0.x] Top Posters in Last X Days
Gizmo #312727 01/16/2007 4:48 PM
Joined: Apr 2001
Posts: 96
Power User
Offline
Power User
Joined: Apr 2001
Posts: 96

Nice idea!

What if I wanted to have both though?
Could it be converted to a custom island?


GangsterBB.NET (Ver. 7.3)
2007 Content Rulez Contest - Honorable Mention
UBB.classic 6.7.2 - RIP
Browser: Firefox 2.0
Re: [7.0.x] Top Posters in Last X Days
jgeoff #312730 01/16/2007 6:35 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Yes, you'd need to add the appropriate code into your custom island tho. (php code above to the top and the template code down below).


- Allen wavey
- What Drives You?
Sponsored Links
Re: [7.0.x] Top Posters in Last X Days
AllenAyres #313273 02/25/2007 7:54 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Does anyone have the Code for this as Custom Island.
Ive been trying but get an error when i submit it?

Its probably because i havnt split it correctly like Allen sugests.

Thanks in advance.

Mark.


BOOM 7.6.+ rocks....
Re: [7.0.x] Top Posters in Last X Days
Mark_S #313276 02/25/2007 8:22 PM
Joined: Jan 2000
Posts: 5,795
Likes: 8
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,795
Likes: 8
This only works in 7.0; see this for 7.1


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.0.x] Top Posters in Last X Days
Gizmo #313278 02/26/2007 4:51 AM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Gizmo there two diffrent subjects.
I have that one running you linked too.

Ive seen this "Top Posters in Last X Days "
Running on a 7.1 board, Ian W's.

I think its a really neat addon,
but i'm having problems with the code.

Maybe Ian would be so kind to share the code?

Mark.


BOOM 7.6.+ rocks....
Re: [7.0.x] Top Posters in Last X Days
Mark_S #313279 02/26/2007 5:12 AM
Joined: Jan 2000
Posts: 5,795
Likes: 8
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,795
Likes: 8
Sorry, it was late when i posted, i was confusing it for another mod; but I haven't heard of this running succuessfully in 7.1 other than ian's forum


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.0.x] Top Posters in Last X Days
Gizmo #313287 02/26/2007 3:53 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
I'm going to have another go at this tonight.
Probably screw it up lol...

If i get it working will post below. 7.1


BOOM 7.6.+ rocks....
Sponsored Links
Re: [7.0.x] Top Posters in Last X Days
Mark_S #313288 02/26/2007 4:30 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Should be pretty much the same code, with the exception of Ian's noted language string difference.


- Allen wavey
- What Drives You?
Re: [7.0.x] Top Posters in Last X Days
jgeoff #313290 02/26/2007 5:10 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
I realised my mistake frown

For what ever reason? ( I blame too much coffee )

I had in my head that it was a custom island add in?

Originally Posted by jgeoff

What if I wanted to have both though?
Could it be converted to a custom island?


I was trying to get it as a custom island,
so i could have both, but i was being greedy....

So i'm having problems converting it too a custom island.

Summary..

The code works great smile
I cant suss a second island to run at the same time.

Thanks to JoshPet for a better Top Posters.

p.s Is there anyway to modify out a banned user?


BOOM 7.6.+ rocks....
Re: [7.0.x] Top Posters in Last X Days
Mark_S #313293 02/26/2007 7:50 PM
Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, I'm running this on 7.1 sites, no changes.

Re: [7.0.x] Top Posters in Last X Days
Gizmo #313295 02/27/2007 4:06 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
Originally Posted by Gizmo
Sorry, it was late when i posted, i was confusing it for another mod; but I haven't heard of this running succuessfully in 7.1 other than ian's forum


Runs fine - no issues - just change the string mentioned and you will be fine smile


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: [7.0.x] Top Posters in Last X Days
Ian_W #314492 06/19/2007 8:31 PM
Joined: Oct 2006
Posts: 21
Newbie
Offline
Newbie
Joined: Oct 2006
Posts: 21
I've made this work with both Top Posters in Last 30 Days and Top Posters overall. Example of both in play

I've taken Josh's instructions and updated them on how to have BOTH on your forums.

Sorta my first foray off my own back...and it's a bit trickier to do with custom islands because of the way the system forces content creation on the customs. Hopefully this works for you smile

Oh, and this is working on 7.1.1

Attached Files
2418-Update_to_TopPostersXDays.txt (3.92 KB, 79 downloads)
Last edited by Carte Blanche; 06/19/2007 8:32 PM.
Re: [7.0.x] Top Posters in Last X Days
Carte Blanche #314493 06/19/2007 9:45 PM
Joined: Nov 2003
Posts: 482
Enthusiast
Offline
Enthusiast
Joined: Nov 2003
Posts: 482
nice mod

and i love that dark theme you have...

:rawk:

Re: [7.0.x] Top Posters in Last X Days
sirdude #314626 06/28/2007 12:43 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
The original mod works fine in 7.2 smile

Except as previously mentioned the language file is now in /languages/xxxx/portal_islands.php



Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: [7.0.x] Top Posters in Last X Days
Ian_W #315965 10/06/2007 9:40 PM
Joined: Sep 2005
Posts: 136
Journeyman
Offline
Journeyman
Joined: Sep 2005
Posts: 136
I attempted this and I got

Parse error: syntax error, unexpected '<' in /home/riddle6/public_html/hprpg/cache_builders/custom/portal_box_7.php on line 2

Re: [7.0.x] Top Posters in Last X Days
AshtarRose #315966 10/06/2007 9:58 PM
Joined: Sep 2005
Posts: 136
Journeyman
Offline
Journeyman
Joined: Sep 2005
Posts: 136
Is here anything like 'Top Poster of the Month' out there that could display the top poster of the month instead of a list. Or if I can get this working, can I edit it to do that?

Re: [7.0.x] Top Posters in Last X Days
AshtarRose #315967 10/06/2007 10:37 PM
Joined: Jan 2000
Posts: 5,795
Likes: 8
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,795
Likes: 8
Ensure you're pasting content between the EOF lines


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.0.x] Top Posters in Last X Days
Gizmo #315968 10/06/2007 11:29 PM
Joined: Sep 2005
Posts: 136
Journeyman
Offline
Journeyman
Joined: Sep 2005
Posts: 136
Nah Giz, I put it all under the EOF and nothing works, I get a blank white page

Re: [7.0.x] Top Posters in Last X Days
AshtarRose #315972 10/07/2007 8:16 AM
Joined: Jan 2000
Posts: 5,795
Likes: 8
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,795
Likes: 8
So it's for sure above the bottom EOF; and under the initial EOF>>> ?


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.0.x] Top Posters in Last X Days
Gizmo #315973 10/07/2007 8:17 AM
Joined: Jan 2000
Posts: 5,795
Likes: 8
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,795
Likes: 8
If so, please post the full code you're using.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.0.x] Top Posters in Last X Days
Gizmo #316542 12/31/2007 11:38 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
This needs a rewrite for 7.3 - I have tried, but can't quite get it correct frown frown


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: [7.0.x] Top Posters in Last X Days
Ian_W #316668 01/29/2008 8:05 AM
Joined: Aug 2002
Posts: 32
User
Offline
User
Joined: Aug 2002
Posts: 32
Originally Posted by Gizmo
So it's for sure above the bottom EOF; and under the initial EOF>>> ?

Got a blank page at first, then noticed that the island was built just not shown...
- - - -
$body = <<
EOF;
- - - -

Note! Carte Blanches instructions might have an error as in the above text it was first called top_post_30.php, had to change to top_posters_30.php as that was my filename at least!


Organizer
Re: [7.0.x] Top Posters in Last X Days
Organizer #316669 01/29/2008 8:22 AM
Joined: Aug 2002
Posts: 32
User
Offline
User
Joined: Aug 2002
Posts: 32
I got another issue with 7.2.2 and the verison from Carte Blanches, the style in the box screws up, if cut and paste as below the backgroun goes black and my default backgroun on all other boxes are white... if I leave more of the original code it end up being either double heading or leave a bit less and I get a box in a box (in both cases then with right styles though)...

Any idea? (code below)

{$tbopen}
{section name=user loop=$users}
{$users[user].posts}

{$users[user].name}


{/section}
{$tbclose}


Organizer
Re: [7.0.x] Top Posters in Last X Days
Ian_W #316732 02/19/2008 2:37 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Originally Posted by Ian_W
This needs a rewrite for 7.3 - I have tried, but can't quite get it correct frown frown
My members need to know whos spamming over 30 days.

If this can be sorted for 7.3 it would make alot of my
members very happy.

Still amazed this is not stock.
The best Top Posters ive seen.


BOOM 7.6.+ rocks....
Re: [7.0.x] Top Posters in Last X Days
Mark_S #316745 02/21/2008 6:08 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
Indeed - I did try for several hours - got almost there, but the output was in the wrong format/order LOL


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: [7.0.x] Top Posters in Last X Days
Ian_W #316761 02/28/2008 5:15 AM
Joined: Oct 2006
Posts: 21
Newbie
Offline
Newbie
Joined: Oct 2006
Posts: 21
There may be issues with my tweaks, as I said, it was my first foray into it, and actually, I've turned off the standard and custom islands showing posters.

I do recall I had to do some tweaking to get it to look just right, and stated, it was working in 7.1.1 but I didn't try it out with 7.2.2 and I have no idea how it'll play with 7.3

If I recall, I essentially took the original top posters embedded stuff, created the same thing and tweaked it according to Josh's or someone else's script and named it slight differently so that the original function still existed and my altered one could too. But, heck, that's been some time ago and my brain being all mushy at the moment....bleh.

Re: [7.0.x] Top Posters in Last X Days
Ian_W #316815 03/26/2008 2:34 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Originally Posted by Ian_W
Indeed - I did try for several hours - got almost there, but the output was in the wrong format/order LOL
Huge thanks wink

You've had a month since the last try.
< tease > You don't quit that easily normally lol

This should be stock smile
Members love the fact is dynamic and changes.


BOOM 7.6.+ rocks....
Re: [7.0.x] Top Posters in Last X Days
Mark_S #316823 03/28/2008 2:21 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
Still no joy frown

Sorry about that - would love to have this running in 7.3


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: [7.0.x] Top Posters in Last X Days
Ian_W #317078 05/28/2008 5:59 AM
Joined: Apr 2007
Posts: 42
User
Offline
User
Joined: Apr 2007
Posts: 42
Does it not work in 7.3?

Re: [7.0.x] Top Posters in Last X Days
willing #317080 05/28/2008 9:55 AM
Joined: Nov 2003
Posts: 482
Enthusiast
Offline
Enthusiast
Joined: Nov 2003
Posts: 482
7.3-ized version below:

PHP Code

<?php
// Number of days - Top Posters in X days - Edit as needed
$days = 1;

if (!
defined('UBB_MAIN_PROGRAM')) {
exit;
}
$today = $html -> get_date();
$limittime = ($today - ($days * 86400));

$query = "
SELECT
COUNT(*) as Total, p.USER_ID, u.USER_DISPLAY_NAME,
u.USER_MEMBERSHIP_LEVEL, up.USER_NAME_COLOR
FROM
{$config['TABLE_PREFIX']}POSTS p,
{$config['TABLE_PREFIX']}USERS u,
{$config['TABLE_PREFIX']}USER_PROFILE up
WHERE u.USER_ID = up.USER_ID
AND p.POST_POSTED_TIME >
$limittime
AND p.USER_ID != 1
AND p.USER_ID = u.USER_ID
GROUP BY p.USER_ID ORDER BY Total DESC
limit
{$config['TOP_POSTERS']}
"
;
$sth = $dbh->do_query($query);
$users = array();
$i = 0;
while(list(
$total,$uid,$username,$memberlevel,$namecolor) = $dbh->fetch_array($sth)) {
$users[$i]['namecolor'] = $html->user_color($username, $namecolor, $memberlevel);
$users[$i]['name'] = $username;
$users[$i]['posts'] = $total;
$users[$i]['uid'] = $uid;
$i++;
}

$smarty->assign("users",$users);

$island = $smarty->fetch("island_top_posters.tpl");

lock_and_write("{$config['FULL_PATH']}/cache/top_posters.php",$island);

@
chmod("{$config['FULL_PATH']}/cache/top_posters.php",0666);

?>


/cache_builders/top_posters.php

set $days to the number of days you want and *poof*

this also colorizes the username to be consistent..

Re: [7.0.x] Top Posters in Last X Days
sirdude #317097 05/29/2008 9:00 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks SD, works well thumbsup

Open for suggestions on a shorter title smile


- Allen wavey
- What Drives You?
Re: [7.0.x] Top Posters in Last X Days
AllenAyres #317104 05/30/2008 7:43 PM
Joined: Apr 2007
Posts: 42
User
Offline
User
Joined: Apr 2007
Posts: 42
Does it look like what is in the top right on this forum?

Looks good.

So what exactly do I need to do with the above code for 7.3? Is that a new island and exactly what do I need to put in the box? Would be a big help!

thank you

Re: [7.0.x] Top Posters in Last X Days
willing #317106 05/30/2008 8:42 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
You take sd's code and put it in place of the code in the /cache_builders/top_posters.php file. Upload it and edit the post islands language file if you want to change the title.


- Allen wavey
- What Drives You?
Re: [7.0.x] Top Posters in Last X Days
AllenAyres #317107 05/30/2008 9:05 PM
Joined: Apr 2007
Posts: 42
User
Offline
User
Joined: Apr 2007
Posts: 42
It works!

Great.

Can I ask - how often is this data refreshed?

Thank you.

Re: [7.0.x] Top Posters in Last X Days
willing #317110 05/31/2008 2:58 AM
Joined: Oct 2006
Posts: 21
Newbie
Offline
Newbie
Joined: Oct 2006
Posts: 21
I think you set that in your config for islands by saying how long it should be cached for.

Re: [7.0.x] Top Posters in Last X Days
Carte Blanche #317111 05/31/2008 3:04 AM
Joined: Oct 2006
Posts: 21
Newbie
Offline
Newbie
Joined: Oct 2006
Posts: 21
Also, the only problem I have with this is that this forces you to replace the top posters with top posters over the last x days.

As stated previously, I was getting too many people trying to push their epeens on post counts over the long haul that I disabled both of my islands showing top posters overall and top posters over last 30 days, but I think I may bring back just the X days variant because of it's dynamic non accruing nature. I'll see if I can't get it working again in a custom island instead of having it overwriting the original top posters one.

Btw, just as a matter of principles too, I've also disabled showing post counts on my forums because of the idiotic nature of some just trying to push post counts higher with "+1" etc.

Re: [7.0.x] Top Posters in Last X Days
Carte Blanche #317113 05/31/2008 4:33 AM
Joined: Oct 2006
Posts: 21
Newbie
Offline
Newbie
Joined: Oct 2006
Posts: 21
Ok, here's what I've come up with and it's seemingly working.

To make it as a custom island, first, you need to create a template file, I called mine "island_top_posters_30.tpl"

This file should have this content in it.

PHP Code

{* Script Version 7.3 *}

<?
php if(!defined('UBB_MAIN_PROGRAM')) exit; ?>
{$tbopen}
{section name=user loop=$users}
<div style="float:right">{$users[user].posts}</div>
<a href="{$config.BASE_URL}/ubbthreads.php?ubb=showprofile&User={$users[user].uid}">{$users[user].name}</a><br />
<div style="clear: both"></div>
{/section}
{$tbclose}


This file should be saved in /templates/default directory.

You can name it whatever you want, you just need to match the name in this next bit, which is what you will put into your custom island.

In the custom island, replace the entire contents with the following code...

PHP Code

/* PHP CODE HERE, IF NECESSARY */
// Number of days - Top Posters in X days - Edit as needed
$days = 30;

if (!
defined('UBB_MAIN_PROGRAM')) {
exit;
}

$today = $html -> get_date();
$limittime = ($today - ($days * 86400));


$query = "
SELECT
COUNT(*) as total, p.USER_ID, u.USER_DISPLAY_NAME,
u.USER_MEMBERSHIP_LEVEL, up.USER_NAME_COLOR
FROM
{$config['TABLE_PREFIX']}POSTS as p,
{$config['TABLE_PREFIX']}USERS as u,
{$config['TABLE_PREFIX']}USER_PROFILE as up

WHERE u.USER_ID = up.USER_ID
AND p.POST_POSTED_TIME >
$limittime
AND p.USER_ID != 1
AND p.USER_ID = u.USER_ID
GROUP BY p.USER_ID ORDER BY total DESC
limit
{$config['TOP_POSTERS']}
"
;
$sth = $dbh->do_query($query);
$users = array();
$i = 0;
while(list(
$total,$uid,$username,$memberlevel,$namecolor) = $dbh->fetch_array($sth)) {
$users[$i]['namecolor'] = $html->user_color($username, $namecolor, $memberlevel);
$users[$i]['name'] = $username;
$users[$i]['posts'] = $total;
$users[$i]['uid'] = $uid;
$i++;
}
// end while


$smarty->assign("users",$users);

$island = $smarty->fetch("island_top_posters_30.tpl");

lock_and_write("{$config['FULL_PATH']}/cache/top_post_30.php",$island);

@
chmod("{$config['FULL_PATH']}/cache/top_post_30.php",0666);


/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
<?php include("/your server path here/cache/top_post_30.php") ?>



EOF;
/* DO NOT CHANGE THE LINE ABOVE */


What it does is when it fires based on the timings you've placed, it uses the "island_top_posters_30.tpl" file as a template to create some html code. it then saves this code in your cache directory as "top_post_30.php" or you can change this to be whatever you want as well. It also chmods it so it's usable, and then creates html content and just sucks in the contents of that file for display.

Thing to note is that you need to use your own server path rather than what I wrote near the bottom..i.e. replace "your server path here" with your server path.

I am by no means a fully proficient php coder, I'm more an engineer who can take existing things and make tweaks to get what I want out of them, so, if I've got "not so elegant" codign practices...this is why. Lord knows I couldn't sit down and yield this stuff from scratch.

If one of you more proficient coders notices any major issues, by all means feel free to post corrections...I'm all about function, not form and won't have feelings hurt smile

One final note, the # of people listed is pulled from the Portal Settings page, the # contained within the Top Posters field. I think it makes for a nice symmetry that if you're running both total top posters and top posters over X days that they have the same # of users listed.

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,529
Posts293,721
Members13,834
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 147
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 26
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,795
Greg Hard 4,625
Top Posters(30 Days)
isaac 3
Top Likes Received
isaac 33
Gizmo 8
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 3
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20200228.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.127s Queries: 98 (0.057s) Memory: 3.6691 MB (Peak: 4.1536 MB) Data Comp: Zlib Server Time: 2020-02-29 06:15:52 UTC
Valid HTML 5 and Valid CSS