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

in #utopian-io6 years ago (edited)

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

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

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

image.png

  • How did you implement it/them?

Relevant commits:

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.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Do you know if the data for contribution are still off? They didn't seemed to have changed for me.

I just tried your ID and it didn't show up anything.. Either this is a bug or the result is confidential LOL

@justyy I just changed a bit of code to make it faster.

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?

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.
[utopian-moderator]

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.

Number 3 (HTTPS) now complete. Still looking into number 2. Thanks @justyy.

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. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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

You're doing a great job @magicmonk. mysteemitfriends it's so complex

thank you alex :)

Capture.JPG2.JPG
Really this is a very helpful site. thank @magicmonk for creating this site for us.

thanks jareen

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.031
BTC 69066.32
ETH 3740.86
USDT 1.00
SBD 3.65