MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator by magicmonk

View this thread on steempeak.com
· @magicmonk · (edited)
$48.67
MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator
- <a href="http://mysteemitfriends.online">My Steemit Friends Tool website.</a><br> 
- <a href="http://github.com/Bulletproofmonk/MySteemitFriends">Github repository.</a> 
Relevant commits:
- <a href="https://github.com/Bulletproofmonk/MySteemitFriends/commit/086c6e51dc3e29bc6c140d3d5f89a2f1238b4b99">Commit 2018-02-26</a><br><br>
- <a href="https://github.com/Bulletproofmonk/MySteemitFriends/commit/5c5121f634351b552d6192ec3919e74c933c51c1">Commit 2018-02-27</a><br><br>

### New Features
- What feature(s) did you add?

The Contributors Ranking table on My Steemit Friends has a new feature - the 2 Dates Filter. Now you can find out how much your contributors have contributed to your articles between 2 Dates.  Please test this feature by going to http://mysteemitfriends.online/contributors.php, enter your username and click "Show Contributors. You will then see not only the amount contributed by each user towards your earnings, but also how many times they have voted you on the right hand side column. 

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519650797/mhe8z7b49kawmry4olg9.png)

You will see that by default the 2 dates entered in the filter is the date from the start of Steemit until today. You can change these 2 dates to narrow down your search result. In the example below, I decided to see how much my contributors have contributed towards my earnings between 1/Nov and 1/Dec last year. 

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519719622/mvy8krhhhibeqg03mkl0.png)

You will be taken to the contribution calculator page, where it shows you how their contribution is calculated. The total contribution amount should match up to the previous page, as you can see below. 

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519719709/ih6mlz3bgehyw7xln0kb.png)

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519719757/yfapicbdln2kc10dgzbr.png)

- How did you implement it/them?

Relevant commits:
- <a href="https://github.com/Bulletproofmonk/MySteemitFriends/commit/086c6e51dc3e29bc6c140d3d5f89a2f1238b4b99">Commit 2018-02-26</a><br><br>
- <a href="https://github.com/Bulletproofmonk/MySteemitFriends/commit/5c5121f634351b552d6192ec3919e74c933c51c1">Commit 2018-02-27</a><br><br>

contributors.php: I added two date inputs in the HTML form. When the refresh button is clicked, I used Jquery to append the contents of the two date inputs to the URL and reload the page. When the PHP code on the page detects the two date inputs, it will filter the result with those dates. If there are no dates entered, the default "from" date is 2016-03-30 (when Steemit started) and the "to" date is today's date. I had to restructure the whole prepared SQL statement (it now contains 5 subqueries and 1 main query, each query commented) and bind the dates to the statement. The date filters are applied to the votetime field, which is a field created from extracting the time field in the JSON string in the "active_votes" field in the comments table (using OPENJSON, as shown on line 188) of SteemSQL.

upvotelist.php: I had to remove the rounding for the contribution amount per article. The rounding now occurs at the printing stage only, so even though the amount on the screen is rounded, the background calculations are not rounded. This should ensure that the final amount matches the same amount on the Contributor's Ranking. 


<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@magicmonk/mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
post_id35,514,564
authormagicmonk
permlinkmysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator
categoryutopian-io
json_metadata"{"repository": {"owner": {"login": "Bulletproofmonk"}, "id": 115297211, "full_name": "Bulletproofmonk/MySteemitFriends", "fork": false, "name": "MySteemitFriends", "html_url": "https://github.com/Bulletproofmonk/MySteemitFriends"}, "moderator": {"pending": false, "account": "justyy", "reviewed": true, "flagged": false, "time": "2018-02-28T00:27:28.683Z"}, "format": "markdown", "platform": "github", "tags": ["utopian-io", "steemdev", "steemit", "steemtools", "programming"], "questions": [], "community": "utopian", "type": "development", "pullRequests": [], "score": 0, "links": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519650797/mhe8z7b49kawmry4olg9.png", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1519719622/mvy8krhhhibeqg03mkl0.png", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1519719709/ih6mlz3bgehyw7xln0kb.png", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1519719757/yfapicbdln2kc10dgzbr.png"], "app": "utopian/1.0.0", "image": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519650797/mhe8z7b49kawmry4olg9.png"]}"
created2018-02-27 08:35:48
last_update2018-02-28 00:27:27
depth0
children12
net_rshares10,627,334,328,652
last_payout2018-03-06 08:35:48
cashout_time1969-12-31 23:59:59
total_payout_value35.591 SBD
curator_payout_value13.079 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length3,682
author_reputation263,026,799,189,538
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (64)
@jareen61 ·
![Capture.JPG2.JPG](https://steemitimages.com/DQmQbt5VYcRH9ZESz4jnrVrBZob2bS6cdgHHQqhZmEGT5xx/Capture.JPG2.JPG)
Really this is a very helpful site. thank @magicmonk for creating this site for us.
👍  
properties (23)
post_id35,515,925
authorjareen61
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180227t084530819z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "users": ["magicmonk"], "image": ["https://steemitimages.com/DQmQbt5VYcRH9ZESz4jnrVrBZob2bS6cdgHHQqhZmEGT5xx/Capture.JPG2.JPG"], "tags": ["utopian-io"]}"
created2018-02-27 08:45:09
last_update2018-02-27 08:45:09
depth1
children1
net_rshares2,209,046,203
last_payout2018-03-06 08:45:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length195
author_reputation1,711,328,304,161
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@magicmonk ·
thanks jareen
properties (22)
post_id35,720,004
authormagicmonk
permlinkre-jareen61-re-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t063807226z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "tags": ["utopian-io"]}"
created2018-02-28 06:38:09
last_update2018-02-28 06:38:09
depth2
children0
net_rshares0
last_payout2018-03-07 06:38:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length13
author_reputation263,026,799,189,538
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@alexandraioana26 ·
$0.05
You're doing a great job @magicmonk. *mysteemitfriends* it's so complex
👍  
properties (23)
post_id35,578,897
authoralexandraioana26
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180227t150343927z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "users": ["magicmonk"], "tags": ["utopian-io"]}"
created2018-02-27 15:03:45
last_update2018-02-27 15:03:45
depth1
children1
net_rshares8,836,292,696
last_payout2018-03-06 15:03:45
cashout_time1969-12-31 23:59:59
total_payout_value0.037 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length71
author_reputation11,991,924,591,569
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@magicmonk ·
thank you alex :)
properties (22)
post_id35,719,887
authormagicmonk
permlinkre-alexandraioana26-re-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t063722937z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "tags": ["utopian-io"]}"
created2018-02-28 06:37:24
last_update2018-02-28 06:37:24
depth2
children0
net_rshares0
last_payout2018-03-07 06:37:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length17
author_reputation263,026,799,189,538
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@teamsteem ·
$0.40
Do you know if the data for contribution are still off? They didn't seemed to have changed for me.
👍  
properties (23)
post_id35,641,748
authorteamsteem
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180227t213924888z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "tags": ["utopian-io"]}"
created2018-02-27 21:39:24
last_update2018-02-27 21:39:24
depth1
children3
net_rshares71,794,878,157
last_payout2018-03-06 21:39:24
cashout_time1969-12-31 23:59:59
total_payout_value0.300 SBD
curator_payout_value0.099 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length98
author_reputation284,009,804,791,421
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@justyy ·
$0.40
I just tried your ID and it didn't show up anything..  Either this is a bug or the result is confidential  LOL
👍  
properties (23)
post_id35,664,103
authorjustyy
permlinkre-teamsteem-re-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t003218031z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2018-02-28 00:32:21
last_update2018-02-28 00:32:21
depth2
children1
net_rshares70,690,341,570
last_payout2018-03-07 00:32:21
cashout_time1969-12-31 23:59:59
total_payout_value0.297 SBD
curator_payout_value0.099 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length110
author_reputation2,057,469,156,047,835
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@magicmonk ·
@justyy I just changed a bit of code to make it faster. ![](https://steemitimages.com/DQmYAJtdFFLRbmwpy1otrppwv5kSt5VCSebwMxvbkX9Q3M3/image.png)
properties (22)
post_id35,719,269
authormagicmonk
permlinkre-justyy-re-teamsteem-re-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t063316813z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "users": ["justyy"], "image": ["https://steemitimages.com/DQmYAJtdFFLRbmwpy1otrppwv5kSt5VCSebwMxvbkX9Q3M3/image.png"], "tags": ["utopian-io"]}"
created2018-02-28 06:33:18
last_update2018-02-28 06:33:18
depth3
children0
net_rshares0
last_payout2018-03-07 06:33:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length144
author_reputation263,026,799,189,538
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@magicmonk · (edited)
hi @teamsteem. I just checked it. The old problem I told you about (where some information was missing) has been fixed.  I don't think they are off, as the data is coming from 2 different sources and they match (one from SteemSQL and the other from SteemJS). Is there any person you're thinking of that it's not accurate for?
properties (22)
post_id35,719,449
authormagicmonk
permlinkre-teamsteem-re-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t063430282z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "users": ["teamsteem"], "tags": ["utopian-io"]}"
created2018-02-28 06:34:30
last_update2018-02-28 06:35:18
depth2
children0
net_rshares0
last_payout2018-03-07 06:34:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length325
author_reputation263,026,799,189,538
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@justyy · (edited)
$0.40
Thank you for the contribution. It has been approved.

1. My second contributor is utopian-io  so the amount shown is the final or before 25% taken out?
2. I think you are doing a great work here however, may I suggest that you may need to refactor/restructure your code i.e. separate presentation from logics (check design patterns of MVVM or MVC). The advantage is that people can come can contribute to your project, which can be counted as a real open source project.
3.  Need HTTPS !!!



You can contact us on [Discord](https://discord.gg/uTyJkNm).
**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
post_id35,663,752
authorjustyy
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t002955703z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2018-02-28 00:29:57
last_update2018-02-28 00:33:06
depth1
children2
net_rshares71,794,878,157
last_payout2018-03-07 00:29:57
cashout_time1969-12-31 23:59:59
total_payout_value0.300 SBD
curator_payout_value0.099 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length611
author_reputation2,057,469,156,047,835
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@magicmonk · (edited)
thanks justyy, will definitely look into your suggestions, much appreciated. the amount shown is whatever it shows on steemit for each article, the total article payout, added together.
properties (22)
post_id35,715,819
authormagicmonk
permlinkre-justyy-re-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t061028685z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "tags": ["utopian-io"]}"
created2018-02-28 06:10:30
last_update2018-02-28 07:19:21
depth2
children0
net_rshares0
last_payout2018-03-07 06:10:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length185
author_reputation263,026,799,189,538
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@magicmonk ·
Number 3 (HTTPS) now complete. Still looking into number 2. Thanks @justyy.
properties (22)
post_id35,764,087
authormagicmonk
permlinkre-justyy-re-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t113237027z
categoryutopian-io
json_metadata"{"app": "steemit/0.1", "users": ["justyy"], "tags": ["utopian-io"]}"
created2018-02-28 11:32:36
last_update2018-02-28 11:32:36
depth2
children0
net_rshares0
last_payout2018-03-07 11:32:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length75
author_reputation263,026,799,189,538
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
$0.24
### Hey @magicmonk I am @utopian-io. I have just upvoted you!
#### Achievements
- Seems like you contribute quite often. AMAZING!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
👍  
properties (23)
post_id35,809,810
authorutopian-io
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t155524871z
categoryutopian-io
json_metadata"{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}"
created2018-02-28 15:55:24
last_update2018-02-28 15:55:24
depth1
children0
net_rshares44,260,829,931
last_payout2018-03-07 15:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.182 SBD
curator_payout_value0.061 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,007
author_reputation152,913,012,544,965
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)