[AP] Daily Goals

[AP] Daily Goals 2.4.3

No permission to download

apathy

Well-known member
In addition, could you add support for @Bob's UBS Blog addon?
I don't have this addon so unfortunately I can't :( Should I ever pick it up I'll deffo support it.
This likewise goes for the previously suggested Showcase Items, which for some reason I thought was the same thing as Articles (which has been supported).
 

apathy

Well-known member
CAS and RMS support would be awesome, too :)
Certainly, additionally I'm also creating our own Abstract class type so other developers can easily create their own goal types (and this opens up the possibility for allowing admins to create their own goals through the admin panel in the future too).
1 or 2 more days and I should have it out.
 

apathy

Well-known member
apathy updated [AP] Daily Goals with a new update entry:

2.3.0

  • Various other cleanups
  • Don't show goals on the streak graph if a user lacks the relevant permission
  • Create style properties
    • Smooth graph lines
    • Show graph line area gradient
    • Show graph line points
    • Streak graph article / AMS color
    • UBS / blog line color
    • Showcase item line color
    • Resource line color
    • CAS / Classifieds ads line color
    • RMS / Review line color
    • IMS / Item line color
    • LD / Link line color
  • Create option callback to disable...

Read the rest of this update entry...
 

nicodak

Well-known member
Hello, great add-on.
is it possible to exclude nodes from the goals because I have nodes that are populated by discussions from RSS feeds and that would completely distort the goals.
Thank you.
 

dfarmer2001

Member
I have a support-related inquiry. So I added this addon to my website, www.referralindexforum.com. After the first day (9/2/2022) it showed the streak information such as the number of posts received and the percentage of the goal met or exceeded during that day. However, after it reset on the second day to begin the third, it doesn't show anything at all in the streak information screen, this is what is shown:
1662262700412.png

However, there were 178 posts, 27 threads, and 2 members. Why did the addon not place that information in the streak info screen?
 

apathy

Well-known member
@dfarmer2001 Is your site using "activity based" job triggers or "cron based"? My only guess is you're using the former, and for one reason or another the job got delayed until past midnight, and so it started counting posts made from September 4th instead of September 3rd.

This used to happen quite a lot in much earlier versions of the addon, but it's now using the same logic as XF's admin panel daily stats, and so I haven't seen it happen in maybe a year or more now. Definitely let me know if you notice it happening again though.
 

dfarmer2001

Member
@dfarmer2001 Is your site using "activity based" job triggers or "cron based"? My only guess is you're using the former, and for one reason or another the job got delayed until past midnight, and so it started counting posts made from September 4th instead of September 3rd.

This used to happen quite a lot in much earlier versions of the addon, but it's now using the same logic as XF's admin panel daily stats, and so I haven't seen it happen in maybe a year or more now. Definitely let me know if you notice it happening again though.
For "activity based" job triggers, I'm not too sure what that is. I assumed I was on "cron based" and I manually ran the cron entries to see if that would help. However, it's still doing the same thing. It worked on September 2nd, but now it doesn't keep track of anything other than the actual daily goals widget that is shown on the main page.

1662435217317.png
 

apathy

Well-known member
For "activity based" job triggers, I'm not too sure what that is. I assumed I was on "cron based" and I manually ran the cron entries to see if that would help. However, it's still doing the same thing. It worked on September 2nd, but now it doesn't keep track of anything other than the actual daily goals widget that is shown on the main page.
Okay, so the progress bars on the main widget do actually change, it's just the "end day stats" on the streak page are showing up as 0?
I've taken a look at 2.3.0s code and It's one of those things where if its failing doing those "end day stats" then the widget shouldn't really be working either... Theyre both relying on the same function which doesnt accept any arguments, the time values are calculated within the function itself.

I guess for now you could take a peak at the xf_ap_daily_goal_history table in your database using Phpmyadmin or something similar, and confirm that the "counter" fields for the relevant entries are indeed 0. We'll see where we can go from there.
 

dfarmer2001

Member
Okay, so the progress bars on the main widget do actually change, it's just the "end day stats" on the streak page are showing up as 0?
I've taken a look at 2.3.0s code and It's one of those things where if its failing doing those "end day stats" then the widget shouldn't really be working either... Theyre both relying on the same function which doesnt accept any arguments, the time values are calculated within the function itself.

I guess for now you could take a peak at the xf_ap_daily_goal_history table in your database using Phpmyadmin or something similar, and confirm that the "counter" fields for the relevant entries are indeed 0. We'll see where we can go from there.
Hmm. Yes, that is very strange. The widget is definitely working, but the streaks are not. I uninstalled and reinstalled the addon but the problem still persists. If you'd like to take a look at it, I can contact you via PM and give you some information. :)
 

dfarmer2001

Member
It randomly started working again the other night. Is there a way to manually reset the streaks to start at day 0 again?
 

apathy

Well-known member
Oof, sorry for not getting back to you, I was pretty certain I had clicked reply but I guess not.. I was going to say wait until the next update before giving me access, but nice to see it sorted itself out.

As of right now unless you delete the entries from your DB yourself then no, I'll include a "reset" button in the next update though.
 

dfarmer2001

Member
Oof, sorry for not getting back to you, I was pretty certain I had clicked reply but I guess not.. I was going to say wait until the next update before giving me access, but nice to see it sorted itself out.

As of right now unless you delete the entries from your DB yourself then no, I'll include a "reset" button in the next update though.
Understood. It's having the same issues again lol. It worked for one day, and now it's pulling 0 again. I'm not sure what the deal is exactly, but maybe the next update will resolve a thing or two.
 
Top