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:
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.
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.
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
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!
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
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
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
good to hear from you Dan :) you're living everyone's dream life :) hope to do what you're doing one day.