Top 10 Posters today and This Week

Started by burtybob, June 03, 2008, 11:34:31 PM

Previous topic - Next topic

willsteele

Glad this mod is back for SMF 2.0.  Anyone have any thoughts on my questions from a couple weeks ago?

Quote from: willsteele on June 10, 2011, 09:46:55 AM
Is there any way to exclude boards, topics, posts, etc. that are "private"?  That is, only available to certain admin and set to not have posts count towards total post count.

I am showing differences in some of the stats due to that.  For instance, one member is a top 10 poster with 643 posts but it shows 706 in the top 10 posters this year section.  (this forum is only a month old so there isn't any discrepancies as far as the year start time)  Those 63 posts are posts from the private area not supposed to count towards total post count.

Any help is appreciated.  Great mod.

tyty1234

Are you asking that I restrict posts from all private boards and not have them count towards the total post count per stat?
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

willsteele

That sounds about right.

I have a board where posts do not count towards post count.  This particular one is private and I would like it to not count towards the total stats if possible.  I am planning another board (not private) where I will also make the posts not count towards total post count.  I suppose it would be nice to have an option or setting for what to have or not.

Sorry if that doesnt make any sense.

tyty1234

Hmm, the only thing I can think of that might work is if you do the following to Stats.php.

Code (Find) Select

$request = $smcFunc['db_query']('', '
SELECT t.id_member_started, t.id_first_msg, COUNT(*) AS hits
FROM {db_prefix}topics AS t
LEFT JOIN {db_prefix}messages AS m ON (t.id_first_msg = m.id_msg)' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
WHERE t.id_board != {int:recycle_board}
AND m.poster_time > {int:start_time}' : '
WHERE m.poster_time > {int:start_time}') . '
GROUP BY id_member_started
ORDER BY hits DESC
LIMIT 20',
array(
'recycle_board' => $modSettings['recycle_board'],
'start_time' => forum_time(false, $start_time[$time]),
)
);


Code (Replace With) Select

$request = $smcFunc['db_query']('', '
SELECT t.id_member_started, t.id_first_msg, COUNT(*) AS hits
FROM {db_prefix}topics AS t
LEFT JOIN {db_prefix}messages AS m ON (t.id_first_msg = m.id_msg)' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
WHERE t.id_board != {int:recycle_board}
AND m.poster_time > {int:start_time}
AND {query_wanna_see_board}' : '
WHERE m.poster_time > {int:start_time}
AND {query_wanna_see_board}') . '
GROUP BY id_member_started
ORDER BY hits DESC
LIMIT 20',
array(
'recycle_board' => $modSettings['recycle_board'],
'start_time' => forum_time(false, $start_time[$time]),
)
);


Would you mind testing this out and tell me the results? :)
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

willsteele

#244
Sure I'll give it a go.  The only area that I see where it has the discrepancy is between the top 10 posters and top 10 posters this year.  The numbers shown in the top 10 this year are the ones with the posts added that are not supposed to count towards total post count.


edit to add:  tried it out... No change in any numbers.  its not really a big deal.  its jsut that some members have noticed the discrepancy in the numbers and have questioned it.  It would be cool I think for an admin to be able to adjust settings for what info would show in the stat center.

tyty1234

Quote from: willsteele on June 23, 2011, 09:40:27 PM
It would be cool I think for an admin to be able to adjust settings for what info would show in the stat center.
I was thinking of implementing that, and kept forgetting about it haha. I'll consider it later.
However, I think I showed you the wrong edits...lol. Try this instead.

Code (Find) Select

// Setup the query.
$query_result = '
SELECT ' . implode(', ', $query[$top10]['select']) . '
FROM ' . $query[$top10]['from'] . '' . (array_key_exists('left_join', $query[$top10]) ? '
LEFT JOIN ' . $query[$top10]['left_join'] : '') . '
WHERE ' . $query[$top10]['where'] . '' . (array_key_exists('and', $query[$top10]) ? '
AND ' . $query[$top10]['and'] : '') . '' . (array_key_exists('group', $query[$top10]) ? '
GROUP BY ' . $query[$top10]['group'] : '') . '
ORDER BY ' . $query[$top10]['order'] . '
LIMIT 10';


Code (Replace With) Select

// Setup the query.
$query_result = '
SELECT ' . implode(', ', $query[$top10]['select']) . '
FROM ' . $query[$top10]['from'] . '' . (array_key_exists('left_join', $query[$top10]) ? '
LEFT JOIN ' . $query[$top10]['left_join'] : '') . '
WHERE ' . $query[$top10]['where'] . '
AND {query_wanna_see_board}' . (array_key_exists('and', $query[$top10]) ? '
AND ' . $query[$top10]['and'] : '') . '' . (array_key_exists('group', $query[$top10]) ? '
GROUP BY ' . $query[$top10]['group'] : '') . '
ORDER BY ' . $query[$top10]['order'] . '
LIMIT 10';
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

willsteele

No luck on that either.  Like I said.. no big deal.  Thanks for tryin and I look forward to the update with adjustable settings. ;)   Thanks.

kaung

Hi Ty,

I am having the same problems as what the previous users mentioned months before.
Top 10 Topic Starters Today, this week, this month, and this year all showing the same. (Been about 6 months since 1st install)

I tried to troubleshoot and no avail.
The new package/version did not solve the issue either.

I tested on RC4 first (main forum in both Default and Current Theme)
Then tested out on clean RC5 to see if it's plugin issue. Same problem.
Still same problem with the latest.

Thanks.

Quote from: zeroskil on May 03, 2010, 06:20:22 PM
Hi,

I have this mod installed on 2.0 RC3 and the stats for Top 10 Topic Starters Today, this week, this month, and this year are all showing the same stats (stats are only correct for "Today").

Can you look into this when you have a chance please?  I have version 2.5.1 installed.

Thanks!
Quote from: Joker™ on July 06, 2010, 03:50:30 AM
Quote from: zeroskil on May 03, 2010, 06:20:22 PM
Hi,

I have this mod installed on 2.0 RC3 and the stats for Top 10 Topic Starters Today, this week, this month, and this year are all showing the same stats (stats are only correct for "Today").

Can you look into this when you have a chance please?  I have version 2.5.1 installed.

Thanks!

+1 . i m also having same issue

tyty1234

Oh, that's what you guys are talking about. I will definitely look into this, sorry for not addressing it before :-\
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

hcfwesker

I was just fixing to come here and post the same issue for Top 10 Topics starters for the day, week, month, and year.

Glad to see i'm not the only one.  Hope a fix comes soon. :)

andyac

i installed this but i dont see a difference in the stats...

jaisi

some here dont see any difference in the stats i'am using 2.0 gold

jaisi


timned88

same problem here on 2.0.1
topics started are all the same for week,day,month, year

PLEASE HELP


XHIBIT911

Anyone have a php code for a top 5 poster block I wish to place on my homepage using 2.0.2 and portamx

novill

Quote from: kaung on June 24, 2011, 06:58:04 PM
Hi Ty,

I am having the same problems as what the previous users mentioned months before.
Top 10 Topic Starters Today, this week, this month, and this year all showing the same. (Been about 6 months since 1st install)

I tried to troubleshoot and no avail.
The new package/version did not solve the issue either.

I tested on RC4 first (main forum in both Default and Current Theme)
Then tested out on clean RC5 to see if it's plugin issue. Same problem.
Still same problem with the latest.

Thanks.

Quote from: zeroskil on May 03, 2010, 06:20:22 PM
Hi,

I have this mod installed on 2.0 RC3 and the stats for Top 10 Topic Starters Today, this week, this month, and this year are all showing the same stats (stats are only correct for "Today").

Can you look into this when you have a chance please?  I have version 2.5.1 installed.

Thanks!
Quote from: Joker™ on July 06, 2010, 03:50:30 AM
Quote from: zeroskil on May 03, 2010, 06:20:22 PM
Hi,

I have this mod installed on 2.0 RC3 and the stats for Top 10 Topic Starters Today, this week, this month, and this year are all showing the same stats (stats are only correct for "Today").

Can you look into this when you have a chance please?  I have version 2.5.1 installed.

Thanks!

+1 . i m also having same issue

I have the same statistic error with the categories, any solution?

frm.da.hell

When will this mod available for 2.0.2?

novill

If you want to install just change the package-info.xml.

Flowing section:

<install for="2.0 - 2.0.99">
<uninstall for="2.0 - 2.0.99">

I have attached the modified package-info.xml, good luck with that.

Arantor

Or even just use the emulate function in the admin panel to avoid even having to edit the package in the first place...

Advertisement: