Notes with Ravinder on Badging System Development Part II


 
Thread Tools Search this Thread
Top Forums Web Development Notes with Ravinder on Badging System Development Part II
# 29  
Old 01-02-2019
Quote:
Originally Posted by Neo
No. Hurry.
Take your time. Glad you like the three new badges... Smilie
Hey Neo,

Following will be my approach in order to get consecutive days BADGE's creation.

Step 1st: Create a field named daily_login_count in user TABLE(mysql).
Step 2nd: Now whenever user logs in to forum then check condition if (TODAY's date-1)==lastvisit(fied value) then add 1 in daily_login_count.(I know this method should be invoked when user is clicking on LOGIN button and able to successfully login Smilie )
Step 3rd:
i- Now check if value of daily_login_count>=1 && daily_login_count<14 then BADGE color should be orangered.
ii- Check if value of daily_login_count>=14 && daily_login_count<30 then BADGE color should be darkorange.
iii- Check if value of daily_login_count>=30 && daily_login_count<60 then BADGE color should be lightgray.
iv- Check if value of daily_login_count>=60 && daily_login_count<90 then BADGE color should be limegreen.
v- Check if value of daily_login_count>=90 && daily_login_count<120 then BADGE color should be blue.
vi- Check if value of daily_login_count>=120 && daily_login_count<150 then BADGE color should be indigo.
vii- Check if value of daily_login_count>=150 && daily_login_count<180 then BADGE color should be black.

Step 4th: In case condition 2nd is NOT TRUE means user is logging after some days then make daily_login_count=1 and change BADGE color to red.

Thanks,
R. Singh

Last edited by RavinderSingh13; 01-02-2019 at 10:22 AM..
# 30  
Old 01-02-2019
Well, we don't need to invoke on login, because sometimes a user will not logout for days or weeks.

We can invoke when user views any page, but I guess the best is "showthread" because anyone who is looking at a thread, is "active"...

Regarding your badging logic, I thought you were going to write badge logic for consecutive days active, no?

Your logic seems to only count days, consecutive days or not....

Is that want you want? Just counting days? Not consecutive days?
# 31  
Old 01-02-2019
Quote:
Originally Posted by Neo
Well, we don't need to invoke on login, because sometimes a user will not logout for days or weeks.
We can invoke when user views any page, but I guess the best is "showthread" because anyone who is looking at a thread, is "active"...
Regarding your badging logic, I thought you were going to write badge logic for consecutive days active, no?
Your logic seems to only count days, consecutive days or not....
Is that want you want? Just counting days? Not consecutive days?
No, I have taken care of consecutive days, if condition 2nd is NOT TRUE means (today's date - 1) != lastlogin) then it again sets daily_login_count to 1 rather than adding 1 to its count, hence taken care of consecutive thing.

Now coming to logging out logic(I have a question here), whenever we see Who is Online page then after 29 mins I see people will not be seen isn't it they are logged out now from forum(sorry till now I thought this only that user's sessions have 30 mins expiring time)?

Thanks,
R. Singh
# 32  
Old 01-02-2019
WOL based on session activity is not the same as logging in and out; otherwise, every time you when to have tea or go for dinner and come back to your computer you would have to login again.

Obviously, you don't have to login every time you go away from an hour. At least for me, I rarely login to the forums, even when I wake up in the morning and turn on my Mac Pro; my login is still valid when I visit the forums.

It is not an issue, there are many ways to invoke a script, we do not need to invoke on login, like I said.

I will run the script on "showthread" page, so you need to take that into account and check that you only increment the day++ count IFF it has not already been incremented for that day.

You can do that in many ways.... but you cannot do it solely based on login.
# 33  
Old 01-03-2019
Update:

41 of 48 prototype badges done, or 85%.

Ravinder is working on the logic for a "consecutive days or forum activity" badge, which sounds cool, so that would be number 42 I guess, which will leave 6 "Reserved" badges left to do.

If one of those "Reserved" badges is allocated for the the mod system of member ranking; then that means:

Code:
41 Badges Done
1 Badge Under Development (Ravinder)
1 Badge for Mod Scoring / Points (Reserved)

This is real progress in a relatively short time.

If anyone has an idea for a badge, please post!

Thanks.
# 34  
Old 01-03-2019
Quote:
Originally Posted by Neo
Update:
41 of 48 prototype badges done, or 85%.
Ravinder is working on the logic for a "consecutive days or forum activity" badge, which sounds cool, so that would be number 42 I guess, which will leave 6 "Reserved" badges left to do.
If one of those "Reserved" badges is allocated for the the mod system of member ranking; then that means:
Code:
41 Badges Done
1 Badge Under Development (Ravinder)
1 Badge for Mod Scoring / Points (Reserved)

This is real progress in a relatively short time.
If anyone has an idea for a badge, please post!
Thanks.
Thanks Neo for letting us know the status. 1 more badge name came into my mind just now so posting it here. How about a badge for sharing experience on any projects/any story(may be WAR stories forum things). It could be awarded by MODs/Admins to person who shared nice experiences in that forum?(It is not a system generated one).

Kindly do let me know your thoughts on same, till then I am thinking more badges. Let me know if you like it.

EDIT: Ok, got 1 more in just now, how about if a person newly joins if get a THANKS within a week of joining forums we could give him/her "enthusiast" BADGE etc, how about this one?

Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
# 35  
Old 01-03-2019
I like your idea about a Mod issues badge to anyone who has posted some outstanding project or story. That badge can be nominated by a Mod and discussed in the Mod forum and when we approve it; I can add that user's userid to the array and it's done, easy.

Regarding, making a badge based on "getting a thanks within a week", the problem for that badge is that few people will achieve it and so that badge will remain "lightgray" forever for some number greater than 99% of the forum members and after a week passes, they will never have a chance to get that badge; so I think I'll pass on that one.. but that's for the idea!
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

Badging System: UNIX.COM Bug Hunter Badge (New)

I have moved the bug badge out of reserve and into the main stream. Basically, I will assign a color level like the others, based on who has made a good actionable bug report for UNIX.COM. "Good" means screenshots, links, and even details from web dev tools our the HTML source code. So far,... (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

Status of Badging System - Beta 1

Dear All, Here is the current status of the badging system: The Beta 1 phase of the new badging system is close to completion. 42 prototype badges have been "allocated" 6 prototype badge slots are held in reserve The "alert you have new badges" prototype is running and is currently... (4 Replies)
Discussion started by: Neo
4 Replies

3. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies
Login or Register to Ask a Question