My Steemit Friends Update: Witness Voting Power Ranking can now exclude users with 0 witness votes. Search & page browsing functions work under both modes.

in #utopian-io7 years ago (edited)

New Features

Some new features have been added to the Witness Voting Power Ranking, which you can access at http://mysteemitfriends.online/witnessvoting.php

Feature 1

You can see on the left hand side of the page, there is now an "Options" box, which will allow you to select between to modes - whether you want to include all users or to exclude users who have not voted for any witnesses. See the difference in ranking for the two modes.

Mode 1: All users.
image.png

Mode 2: Users who have voted for at least one witness.

image.png

Feature 2

The search function will work under both modes (Make sure you click "Refresh" to get into that mode first). Here are some possibilities:

In All Users mode, my ranking is:

image.png

In "Votes Casted >0" mode, my ranking is:

image.png

You can click the blue link at the bottom of the ranking to see your name highlighted in the tables.

image.png

In the "Votes Casted > 0" mode, if you search for a user who has casted 0 votes, it will return this result:

image.png

In either modes, if you search for a user who has set their proxy to another user, it will return this result:

image.png

Feature 3

The page browsing features will work under both modes and retrieve the ranking table for which ever mode you are on.

image.png

How did you implement it/them?

In witnessvoting.php, I created a radio button form to collect input from the user as to whether they want all users included in the ranking, or if they just want the users who have voted for at least one witness included in the ranking. I then used PHP to retrieve this input and then use an IF statement to alter the SQL query according to what the user has chosen. I also edited the PHP code for the username search box and page browsing links to make sure they work under both modes.

In get_voting_rank.php, I again used a PHP If statemnt to modify the SQL query for querying the database under both modes, and return the correct result depending on which query was executed. A second query is executed in the search result to find out a user's proxy if they are not part of the ranking. If they did not have a proxy and are not part of the ranking, then it must mean that they have not casted any witness votes (only occurs in Witness votes >0 mode).



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

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

Thank you so much Vladimir

Awesome work! Do you have any other ideas? I think I had. Let me know if you haven't. There are other stuff you can add to your website.

Hey @teamsteem. Is there another website that shows what @daltono suggested below? Thanks. And I haven't finished doing up your ideas yet, so I will keep going. Thanks.

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 utopian!!

Waao these little Tweeks make this tool more refined bro.thanks for this continues development.

Thanks mate :)

Wow Eddie! You never fail to impress. Keep up the great work!

Nice information thanks for sharing

thanks for guiding us to new system of Witness Voting Power Ranking..I hope we get something new from you..

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.027
BTC 60678.52
ETH 2339.38
USDT 1.00
SBD 2.48