phpBB Forum

It is currently Mon 21. May 2012, 10:23

All times are UTC + 1 hour

Forum rules


Hello dearest user and welcome to our EQDKP-Plus support forum.

Please read the following rules and terms before posting anything! Failure in doing so will result in being ignored or being banned. Posting in our boards means you have read, understood and accepted those rules.

English Board Rules – Click here



Post new topic Reply to topic  [ 5 posts ] 
Author Message
Offline
 Post subject: Attendance based on join date?
PostPosted: Fri 22. Jul 2011, 17:19 

Joined: Fri 22. Jul 2011, 17:16
Posts: 6
Hello,

I've recently switched over to using EQDKP Plus (used BBDKP on my old website). I'm trying to have new members (recruits) have their Attendance based on the raids they've been to since they've joined. However, the attendance % seems to be based on all raids in the past "x" days.

How can I make a member's attendance percent only be based from the date that they join?

Thank you.



Top
 Profile  
 
Offline
 Post subject: Re: Attendance based on join date?
PostPosted: Fri 22. Jul 2011, 19:47 
Core-Developer
User avatar

Joined: Tue 11. Mar 2008, 13:26
Posts: 2298
you should have 4 attedances available: lifetime (since first raid), last 90/60/30 days


Never write unrequested PMs to me! - Schreibt mir nie unaufgefordert PNs!
ImageImage



Top
 Profile  
 
Offline
 Post subject: Re: Attendance based on join date?
PostPosted: Fri 22. Jul 2011, 20:24 

Joined: Fri 22. Jul 2011, 17:16
Posts: 6
Is there an easy way to use the Lifetime % when it's duration is less than each of the time spans?

Example:
Lifetime shows 100% (past 2 days), 30 days shows 12% (past 30 days)

I just want to make sure I didn't miss an option. I'll try to dig in the code if I can't find an option.

*edit* Also, the "Lifetime" value in the column off the Memberlist shows differently than on the Member's individual page. This looks like a bug though.

Code:
       if($conf_plus['pk_attendanceAll']==1)
       {

         $raid_count_all = $db->query_first('SELECT count(*) FROM ' . RAIDS_TABLE) ;
       }


This code doesn't seem to be taking into account the member's first raid.



Top
 Profile  
 
Offline
 Post subject: Re: Attendance based on join date?
PostPosted: Sat 23. Jul 2011, 12:59 
Core-Developer
User avatar

Joined: Tue 11. Mar 2008, 13:26
Posts: 2298
hmm the description in the settings says "attendance on all raids", so not since the join of the member. means lifetime on standings-page is not possible in 0.6.
its working in 0.7, but we're still in alpha there.

if you have some knowledge of php and mysql, you might be able to change it, so you can see lifetime on standings-page, otherwise you'll have to wait for 0.7, sry.


Never write unrequested PMs to me! - Schreibt mir nie unaufgefordert PNs!
ImageImage



Top
 Profile  
 
Offline
 Post subject: Re: Attendance based on join date?
PostPosted: Sat 23. Jul 2011, 23:55 

Joined: Fri 22. Jul 2011, 17:16
Posts: 6
Ok, thanks for your reply. Glad to see it's working in a future version. :)

I did go ahead and alter the code as needed. I simply just had to make the raid_count fuction more global and use it on the memberlist page. I'm guessing this probably caused more queries than normal, but I wasn't too worried.

My code ended up looking like this:
Code:
         $percent_of_raids_all = raid_count($row['member_firstraid'], time(), $row['member_name']);
         $individual_raid_count_all = ( $rc[$row['member_name']] > 0 ) ? $rc[$row['member_name']] : 0;
         
         $percent_of_raids_30 = raid_count(mktime(0, 0, 0, date('m'), date('d')-30, date('Y')), time(), $row['member_name']);
         $individual_raid_count_30 = $rc_30[$row['member_name']];
         if ($individual_raid_count_30 == $individual_raid_count_all)
         {
            $percent_of_raids_30 = $percent_of_raids_all;
         }
         
         $percent_of_raids_60 = raid_count(mktime(0, 0, 0, date('m'), date('d')-60, date('Y')), time(), $row['member_name']);
         $individual_raid_count_60 = $rc_60[$row['member_name']];
         if ($individual_raid_count_60 == $individual_raid_count_all)
         {
            $percent_of_raids_60 = $percent_of_raids_all;
         }
          
         $percent_of_raids_90 = raid_count(mktime(0, 0, 0, date('m'), date('d')-90, date('Y')), time(), $row['member_name']);
         $individual_raid_count_90 = $rc_90[$row['member_name']];
         if ($individual_raid_count_90 == $individual_raid_count_all)
         {
            $percent_of_raids_90 = $percent_of_raids_all;
         }



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

(C) The EQdkp-Plus Developer Team
EQdkp Plus Template by Ramon Kaes