My Steemit Friends Update: Between 2 dates feature added to contribution calculator & upvote stats

in #utopian-io6 years ago (edited)

New Features

  • What feature(s) did you add?

In My Steemit Friends, previous to this update, you can only look up upvote statistics between one date and today. After this update, you are able to look up between date1 and date2, how much $ user A has contributed to user B, as well as all the upvote statistics.

To test out the features, please go to http://mysteemitfriends.online, you will see this screen:

image.png

From here, enter your username and click the blue "Upvote Stats" button, and you will see some upvote statistics. In the filter box, you will now see 2 dates, which you can change and click "Update" to filter the results. By default, the two dates are between 3 months ago and today.

image.png

You can then click on the number of upvotes to go to the contribution calculator page, which will have matching dates to the main page. You can then again adjust the dates if you wish and calculate the contribution amount again by pressing the blue button. You can also click reverse lookup and see how much the reverse contribution is (from author to voter) within the same dates.

image.png

You will also notice that the navigation bar menu has changed to the same colored buttons as the buttons on the main page. This will bring some consistency to the user.

  • How did you implement it/them?

index.php

In order to change from "the last X months" to "between 2 dates", a lot of editing was required in the SQL code executed on the database. Every SQL statement that involved dates had to be edited. PHP IF-statements were used so that if a user had bookmarked a certain query that involved using Months, it will still work, however the new way is to use the two dates. Links to the contribution calculator page also had to be updated with the two new dates. Jquery is now used to hide the newly aligned buttons when one of them is pressed, and to show them again when the results show up. You can see which lines were edited in the above link.

upvotelist.php

Because this page had one date already implemented, it was easier to change to two dates, but there was still quite a bit of editing involved in the SQL code. I also made sure that the reverse lookup works using the same variables for dates obtained from the URL in PHP. You can see which lines were edited in the above link.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

Indeed another good post.

Please consider sanitising the user inputs and using prepared statements to prevent SQL injection.

$todate = $_GET["toDate"];
if ($todate) {$sql.=$todate;} else {$sql.=date("Y-m-d");}

You can contact us on Discord.
[utopian-moderator]

Hey @helo, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Thank you for the expert advice helo. Will definitely include this in future updates.

Another great update. Thanks!

Great addition Eddie! Just got back from the Galapagos. With the awful internet I've been kind of MIA, and some of my Steemit Friends have stopped up-voting me, but not you! Thank you for that. I'll use your new addition and put in the dates I was gone for and see who my real Steemit friends are! lol Love this app you made. Hope you have been well! -Dan

good to hear from you Dan :) you're living everyone's dream life :) hope to do what you're doing one day.

Amazing @magicmonk another excellent and informative featured update in #steemtools section.

contribution calculator & upvote stats not only show the best informative info related to upvotes but it also help us to communicate our followers it shows us who is involved with us .

Thank you @magicmonk for this amazing sharing

Extraordinary, crypto-evolved, many creators of novelty in the development of crypto-coupled currency

Thanks for contribution

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

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.030
BTC 60238.27
ETH 3215.90
USDT 1.00
SBD 2.46