Top 10 Posters today and This Week

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

Previous topic - Next topic

Dragonsbrethren

Quote from: burtybob on June 07, 2008, 04:05:58 PM
Quote from: Dragonsbrethren on June 07, 2008, 03:08:22 PM
I have Member Color Link installed. I could try uninstalling that and reinstalling this mod to see if the problem clears up.

I would only recomend doing this if one or the other is not working! if they are both working fine leave them untill there is a problem as i can not see any reason for the error.

The problem is definitely with Member Color Link and not this mod, Member Color Link is causing an error on an unmodified copy of Stats.php. This mod is working fine.

burtybob

Quote from: Dragonsbrethren on June 08, 2008, 03:57:09 AM
Quote from: burtybob on June 07, 2008, 04:05:58 PM
Quote from: Dragonsbrethren on June 07, 2008, 03:08:22 PM
I have Member Color Link installed. I could try uninstalling that and reinstalling this mod to see if the problem clears up.

I would only recomend doing this if one or the other is not working! if they are both working fine leave them untill there is a problem as i can not see any reason for the error.

Ahhh, thanks dragonsbrethren is that a tried and tested this mod is ok without the membercolours??
Or just a theory on the knowledge you have that the member colours causes errors, either way thanks :D.
By the way this is not a new version just a re-released under me rather than karl and as karl said in his topic he has no idea what it is either!
The problem is definitely with Member Color Link and not this mod, Member Color Link is causing an error on an unmodified copy of Stats.php. This mod is working fine.
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

jossanaijr

Quote from: Dragonsbrethren on June 08, 2008, 03:57:09 AM
Quote from: burtybob on June 07, 2008, 04:05:58 PM
Quote from: Dragonsbrethren on June 07, 2008, 03:08:22 PM
I have Member Color Link installed. I could try uninstalling that and reinstalling this mod to see if the problem clears up.

I would only recomend doing this if one or the other is not working! if they are both working fine leave them untill there is a problem as i can not see any reason for the error.

The problem is definitely with Member Color Link and not this mod, Member Color Link is causing an error on an unmodified copy of Stats.php. This mod is working fine.
Well, I do not have Member Color Link installed...

burtybob

Quote from: jossanaijr on June 14, 2008, 06:22:02 PM
Quote from: Dragonsbrethren on June 08, 2008, 03:57:09 AM
Quote from: burtybob on June 07, 2008, 04:05:58 PM
Quote from: Dragonsbrethren on June 07, 2008, 03:08:22 PM
I have Member Color Link installed. I could try uninstalling that and reinstalling this mod to see if the problem clears up.

I would only recomend doing this if one or the other is not working! if they are both working fine leave them untill there is a problem as i can not see any reason for the error.

The problem is definitely with Member Color Link and not this mod, Member Color Link is causing an error on an unmodified copy of Stats.php. This mod is working fine.
Well, I do not have Member Color Link installed...
Please see
Karls Topic
For the information on this issue! Neither he before me or me currently can see why this is, mine works fine! as dragonsbrethren says his is!
I do not have any ideas! sorry
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

pp08

ok this installed perfect and i thought it was working perfectly but its not showing stats for the week both are just showing stats for the day can someone tell me how to change it so it will show both day and week thanks in advance

WH33LS


Assistance

I d/l Top 10_Posters_today_and_this_month.zip
and it showed for the week
~playing poker~

burtybob

Quote from: Assistance on July 09, 2008, 10:41:00 AM
I d/l Top 10_Posters_today_and_this_month.zip
and it showed for the week
I presume you mean the heading said "Week" not Month, if so uninstall and reinstall the one ive just uploaded and it should name properly now, im going to do the week and month now :D
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

Assistance

yes the title of the mod after install, the title on the stats page ...... said week
couldn't reference my actual stats as the posts were all this week.
~playing poker~

kamili34


tk2012

I'm running 2.0 b3.1 and only have 4 mods on my site currently:

Member Awards
DomainTools
Stars & Badges
Users Online Today (wk/month)

For the week it works correctly with Name / Post Bar / Post Count
For the month, it is missing the Name, but shows the Post Bar / Post Count correctly.

I looked in the Error Log and got a couple errors.  The errors do all stem from the Sources/Stats.php file ranging from line 478-482 with all errors being undefined.  If you would like a copy of those lines, I wil be more than happy to post along with any other information you need in order to get some assistance.

Thanks!

burtybob

Quote from: tk2012 on July 30, 2008, 03:00:01 AM
I'm running 2.0 b3.1 and only have 4 mods on my site currently:

Member Awards
DomainTools
Stars & Badges
Users Online Today (wk/month)

For the week it works correctly with Name / Post Bar / Post Count
For the month, it is missing the Name, but shows the Post Bar / Post Count correctly.

I looked in the Error Log and got a couple errors.  The errors do all stem from the Sources/Stats.php file ranging from line 478-482 with all errors being undefined.  If you would like a copy of those lines, I wil be more than happy to post along with any other information you need in order to get some assistance.

Thanks!
Please supply the errors and the stats file please and i will take a look to see if i can see the problem for you :D
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

tk2012

Here are individual errors from log along with the code it matches up to in php file.  I will also submit one entire block 20 lines below lowest error line and 20 lines above highest error line at the end of this in case the lines don't actually match up correctly.

The zip file I downloaded is titled: Top_10_Posters_this_week_and_this_month.zip


The link location for all of these errors are at:  http://www.motorstorm-rpms.org/XXXXXXXXX/index.php?action=stats
(I "X" out the folder name on site because I don't want traffic, yet)

error 1
Undefined index: realName
File: /var/www/html/community/Sources/Stats.php
Line: 478
'name' => $row_members['realName'],

error 2
8: Undefined index: ID_MEMBER
File: /var/www/html/community/Sources/Stats.php
Line: 479
'id' => $row_members['ID_MEMBER'],

error 3
8: Undefined index: ID_MEMBER
File: /var/www/html/community/Sources/Stats.php
Line: 481
'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],

error 4
8: Undefined index: ID_MEMBER
File: /var/www/html/community/Sources/Stats.php
Line: 482
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'

error 5

Apply Filter: Only show the errors with the same message
8: Undefined index: realName
File: /var/www/html/community/Sources/Stats.php
Line: 482
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'

Complete section
 
   $request = $smcFunc['db_query']('', '
SELECT me.id_member, me.real_name, COUNT(*) as count_posts
FROM {db_prefix}messages AS m
LEFT JOIN {db_prefix}members AS me ON (me.id_member = m.id_member)
WHERE m.poster_time > {int:start_time}
AND m.id_member != 0
GROUP BY me.id_member
ORDER BY count_posts DESC
LIMIT 10',
array(
'start_time' => $starttime,
)
);
         
   $context['top_posters_day'] = array();
   $max_num_posts = 1;
   while ($row_members = mysql_fetch_assoc($request))
   {
      $context['top_posters_day'][] = array(
         'name' => $row_members['realName'],
         'id' => $row_members['ID_MEMBER'],
         'num_posts' => $row_members['count_posts'],
         'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],
         'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'
      );

      if ($max_num_posts < $row_members['count_posts'])
         $max_num_posts = $row_members['count_posts'];
   }
   mysql_free_result($request);

   foreach ($context['top_posters_day'] as $i => $j)
      $context['top_posters_day'][$i]['post_percent'] = round(($j['num_posts'] * 100) / $max_num_posts);

   // Tidy up
   unset($max_num_posts, $row_members, $j, $i);
   
// Top 10 Posters so far this week  (starts sunday)
$starttime = mktime(0, 0, 0, date("n"), date("j"), date("Y")) - (date("N")*3600*24);
// Offset based on forum time
$starttime = forum_time(false, $starttime);

$request = $smcFunc['db_query']('', '
SELECT me.id_member, me.real_name, COUNT(*) as count_posts

burtybob

Hi there,

I am really truly sorry about that totally my fault i have fixed that version and the new Zip is uploaded, to those useing the month on 2.0 and day and month i will fix that as well, thank you for your time and patience.

Thanks,

Ben
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

tk2012

I should just uninstall the package, download the zip again, and then install it?


BTW- Sorry if I attached too much info in my post.  I just saw how long it was.

burtybob

Quote from: tk2012 on July 30, 2008, 03:13:37 PM
I should just uninstall the package, download the zip again, and then install it?


BTW- Sorry if I attached too much info in my post.  I just saw how long it was.

Nah you attached the info i asked for ;) twas a great help :D thank you, yes uninstall, delete package, redownload, reupload, reinstall and tell me if that works correctly. it shld do ;)
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

tk2012

#36
Yes, I resubmitted it and it is working as planned!  Thanks for your help!!!   :D




I'm still getting the first two errors listed above, but they don't seem to be effecting the actual operation of the modification.   ::)

Mskina

#37
Language files for spanish and spanish_es (works also on utf8 files)

<file name="$languagedir/Modifications.spanish.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['top_posters_day'] = '10 Usuarios que m&aacute;s publican (Hoy)';
$txt['top_posters_week'] = '10 Usuarios que m&aacute;s publican (Esta semana)';
]]></add>
</operation>
</file>


<file name="$languagedir/Modifications.spanish_es.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['top_posters_day'] = '10 Usuarios que m&aacute;s publican (Hoy)';
$txt['top_posters_week'] = '10 Usuarios que m&aacute;s publican (Esta semana)';
]]></add>
</operation>
</file>

Rocks-HD

this mod show only Top 10 Today in both sides! I don't know why!

can you help me?

burtybob

Quote from: Rocks-HD on August 19, 2008, 10:14:01 PM
this mod show only Top 10 Today in both sides! I don't know why!

can you help me?

Hey,

can i have a link to the page please?

Thanks,
Burtybob
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

Advertisement: