create account

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

View this thread on: hive.blogpeakd.comecency.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)
authormagicmonk
permlinkmysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator
categoryutopian-io
json_metadata{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":115297211,"name":"MySteemitFriends","full_name":"Bulletproofmonk/MySteemitFriends","html_url":"https://github.com/Bulletproofmonk/MySteemitFriends","fork":false,"owner":{"login":"Bulletproofmonk"}},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","steemdev","steemit","steemtools","programming"],"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"],"image":["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"],"moderator":{"account":"justyy","time":"2018-02-28T00:27:28.683Z","reviewed":true,"pending":false,"flagged":false},"questions":[],"score":0}
created2018-02-27 08:35:48
last_update2018-02-28 00:27:27
depth0
children12
last_payout2018-03-06 08:35:48
cashout_time1969-12-31 23:59:59
total_payout_value35.591 HBD
curator_payout_value13.079 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,682
author_reputation1,101,353,089,695,235
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 HBD
percent_hbd10,000
post_id40,815,158
net_rshares10,627,334,328,652
author_curate_reward""
vote details (63)
@alexandraioana26 ·
$0.05
You're doing a great job @magicmonk. *mysteemitfriends* it's so complex
👍  
properties (23)
authoralexandraioana26
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180227t150343927z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["magicmonk"],"app":"steemit/0.1"}
created2018-02-27 15:03:45
last_update2018-02-27 15:03:45
depth1
children1
last_payout2018-03-06 15:03:45
cashout_time1969-12-31 23:59:59
total_payout_value0.037 HBD
curator_payout_value0.010 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length71
author_reputation9,768,002,864,979
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,889,611
net_rshares8,836,292,696
author_curate_reward""
vote details (1)
@magicmonk ·
thank you alex :)
properties (22)
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{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-28 06:37:24
last_update2018-02-28 06:37:24
depth2
children0
last_payout2018-03-07 06:37:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length17
author_reputation1,101,353,089,695,235
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,052,399
net_rshares0
@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)
authorjareen61
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180227t084530819z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["magicmonk"],"image":["https://steemitimages.com/DQmQbt5VYcRH9ZESz4jnrVrBZob2bS6cdgHHQqhZmEGT5xx/Capture.JPG2.JPG"],"app":"steemit/0.1"}
created2018-02-27 08:45:09
last_update2018-02-27 08:45:09
depth1
children1
last_payout2018-03-06 08:45:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length195
author_reputation1,712,359,823,235
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,816,731
net_rshares2,209,046,203
author_curate_reward""
vote details (1)
@magicmonk ·
thanks jareen
properties (22)
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{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-28 06:38:09
last_update2018-02-28 06:38:09
depth2
children0
last_payout2018-03-07 06:38:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation1,101,353,089,695,235
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,052,531
net_rshares0
@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)
authorjustyy
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t002955703z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-28 00:29:57
last_update2018-02-28 00:33:06
depth1
children2
last_payout2018-03-07 00:29:57
cashout_time1969-12-31 23:59:59
total_payout_value0.300 HBD
curator_payout_value0.099 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length611
author_reputation280,616,224,641,976
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,988,665
net_rshares71,794,878,157
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)
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{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-28 06:10:30
last_update2018-02-28 07:19:21
depth2
children0
last_payout2018-03-07 06:10:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length185
author_reputation1,101,353,089,695,235
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,047,716
net_rshares0
@magicmonk ·
Number 3 (HTTPS) now complete. Still looking into number 2. Thanks @justyy.
properties (22)
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{"tags":["utopian-io"],"users":["justyy"],"app":"steemit/0.1"}
created2018-02-28 11:32:36
last_update2018-02-28 11:32:36
depth2
children0
last_payout2018-03-07 11:32:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length75
author_reputation1,101,353,089,695,235
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,104,225
net_rshares0
@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)
authorteamsteem
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180227t213924888z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-27 21:39:24
last_update2018-02-27 21:39:24
depth1
children3
last_payout2018-03-06 21:39:24
cashout_time1969-12-31 23:59:59
total_payout_value0.300 HBD
curator_payout_value0.099 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length98
author_reputation284,804,541,406,803
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,963,591
net_rshares71,794,878,157
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)
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{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-28 00:32:21
last_update2018-02-28 00:32:21
depth2
children1
last_payout2018-03-07 00:32:21
cashout_time1969-12-31 23:59:59
total_payout_value0.297 HBD
curator_payout_value0.099 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length110
author_reputation280,616,224,641,976
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,989,061
net_rshares70,690,341,570
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)
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{"tags":["utopian-io"],"users":["justyy"],"image":["https://steemitimages.com/DQmYAJtdFFLRbmwpy1otrppwv5kSt5VCSebwMxvbkX9Q3M3/image.png"],"app":"steemit/0.1"}
created2018-02-28 06:33:18
last_update2018-02-28 06:33:18
depth3
children0
last_payout2018-03-07 06:33:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length144
author_reputation1,101,353,089,695,235
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,051,671
net_rshares0
@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)
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{"tags":["utopian-io"],"users":["teamsteem"],"app":"steemit/0.1"}
created2018-02-28 06:34:30
last_update2018-02-28 06:35:18
depth2
children0
last_payout2018-03-07 06:34:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length325
author_reputation1,101,353,089,695,235
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,051,888
net_rshares0
@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)
authorutopian-io
permlinkre-magicmonk-mysteemitfriends-online-new-feature-2-dates-filter-in-contributors-ranking-date-integration-with-contribution-calculator-20180228t155524871z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-28 15:55:24
last_update2018-02-28 15:55:24
depth1
children0
last_payout2018-03-07 15:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.182 HBD
curator_payout_value0.061 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,007
author_reputation152,955,367,999,756
root_title"MySteemitFriends.Online new feature: 2 Dates filter in Contributors ranking, date integration with contribution calculator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,157,353
net_rshares44,260,829,931
author_curate_reward""
vote details (1)