My Steemit Friends Update: Contribution Calculator stand alone page with From Date, Better integration with Conversation Record

in utopian-io •  7 years ago  (edited)

New Features

  • What feature(s) did you add?

The contribution calculator which can calculate how much $ user A has contributed to user B in the last X months, is now a stand alone page, which you can access via:

http://mysteemitfriends.online/upvotelist.php

Or from the red "$ Calculator" button on the main page.

image.png

Previously, the contribution calculator can only calculate the amount contributed in the last X months. Now you can enter a specific date, with a default date being 3 months before today.

When you are on this page, you can simply type in a voter's username and an author's username, and select a "From Date", then click the blue "Calculate contribution amount" button. You will then see how much the voter has contributed to the author, as well as a list of articles below with the ranking of the voter's contribution with respect to others for each article.

image.png

Back to the main menu. If you enter your user name and then click Upvote Stats, you will see the following screen:

image.png

If you click on a user name, you will see the Green Conversation Record button has been added to each user's context menu. You can then click on the green button to see all of your conversations with that user.

image.png

  • How did you implement it/them?

upvotelist.php

I added the from date feature by adding an HTML date control in the form, whose data is sent to the PHP file to be processed when user clicks submit. I used IF and IF-ELSE statements in PHP to ensure that the date displayed initially corresponds to the the number of months previously submitted by the user in the Upvote Stats page, if they came from that page. Otherwise the date will by default be 3 months. When the user submits a new date, the page refreshes with the new date in mind for the SQL queries, and calculates how much money the voter has contributed to the author using SteemJS async functions.

index.php

I added the $ Calculator button to the main menu as well as the navbar using bootstrap classes. I modified the CSS to made sure they are displayed inline to conserve space. I used Javascript to ensure when the upvote or ranking buttons are pressed, the other buttons are hidden while waiting for results. I used bootstrap popovers to dispaly the context menu for each user, which includes the button to the conversation record. I used PHP to ensure that if you press the conversation button or the $ calculator buttons, it will open up those pages with your user name and/or your voter's user name.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

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

thank you so much vladimir!

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

thank you very much

Your contributions are so valuable!!

  ·  7 years ago Reveal Comment

Thanks a lot dear,you are the best,keep it up magicmonk.

Thank you for sharing such an amazing information.