New Features
Users can now see the total vote worth and vote count received in a week from voters.
The vote feature supports fiat conversion, so as to see vote worth in fiat currency.
Users can also copy the details of this vote worth in steem-compatible formats that can be used on their page
This feature also allows you to view the list in Alphabetic Order, Order of Worth and Order of counts and all of this order have their own specific custom copy format
I also made the script more compatible for servers operating less than php 7 while I trimmed some variables to reduce the possibilities of white space error
Below are the new snapshots for New Features
UI of the New Feature
The Cummulatives in other fiat (naira)
From the snapshot, you can see that there is copy text section to copy those details
Below is an example of such copied details (in order of count):
: 0.1237 sbd ,7 vote(s)
: 2.6959 sbd ,4 vote(s)
: 0.0024 sbd ,3 vote(s)
: 0.004 sbd ,3 vote(s)
: 0.0037 sbd ,3 vote(s)
: 0.1408 sbd ,3 vote(s)
: 0.0146 sbd ,3 vote(s)
: 0.0182 sbd ,3 vote(s)
: 0.2292 sbd ,3 vote(s)
: 0.0095 sbd ,3 vote(s)
: 0.0022 sbd ,3 vote(s)
: 0.0014 sbd ,2 vote(s)
: 0.004 sbd ,2 vote(s)
: 0.0019 sbd ,2 vote(s)
: 0.0047 sbd ,2 vote(s)
: 0.002 sbd ,2 vote(s)
: 0.0004 sbd ,2 vote(s)
: 0.0002 sbd ,1 vote(s)
: 0.002 sbd ,1 vote(s)
: 0.0012 sbd ,1 vote(s)
: 0.002 sbd ,1 vote(s)
: 0.0002 sbd ,1 vote(s)
: 0.0007 sbd ,1 vote(s)
: 0.0016 sbd ,1 vote(s)
: 0.001 sbd ,1 vote(s)
: 0.0249 sbd ,1 vote(s)
: 0.002 sbd ,1 vote(s)
: 0.379 sbd ,1 vote(s)
: 0.0012 sbd ,1 vote(s)
: 0.0007 sbd ,1 vote(s)
: 0.0119 sbd ,1 vote(s)
: 0.0021 sbd ,1 vote(s)
: 0.0281 sbd ,1 vote(s)
: 0.002 sbd ,1 vote(s)
: 0.002 sbd ,1 vote(s)
: 0.0222 sbd ,1 vote(s)
: 0.0203 sbd ,1 vote(s)
: 0.0022 sbd ,1 vote(s)
: 0.0388 sbd ,1 vote(s)
: 0.0252 sbd ,1 vote(s)
: 0.0117 sbd ,1 vote(s)
: 0.0021 sbd ,1 vote(s)
: 0.0132 sbd ,1 vote(s)
: 0.1476 sbd ,1 vote(s)
: 0.0371 sbd ,1 vote(s)
: 0.0031 sbd ,1 vote(s)
: 0.0009 sbd ,1 vote(s)
: 0.0043 sbd ,1 vote(s)
: 0.0222 sbd ,1 vote(s)
: 0.0007 sbd ,1 vote(s)
: 0.0008 sbd ,1 vote(s)
: 0.1405 sbd ,1 vote(s)
: 0.0011 sbd ,1 vote(s)
: 0.0022 sbd ,1 vote(s)
: 0.0003 sbd ,1 vote(s)
: 0.0005 sbd ,1 vote(s)
: 0.0613 sbd ,1 vote(s)
: 0.0007 sbd ,1 vote(s)
: 0.0015 sbd ,1 vote(s)
: 0.0005 sbd ,1 vote(s)
: 0.021 sbd ,1 vote(s)
: 4.3591 sbd ,1 vote(s)
: 0.0004 sbd ,1 vote(s)
: 93.9656 sbd ,1 vote(s)
: 1.1374 sbd ,1 vote(s)
I believe these details could be useful for analysis and appreciation of voters
How did you implement it/them?
It was a lot of complex array work. I had to pack each of the voter's details from each post into an array. I did this seperately for posts and then comment. Thereafter, i joined the two arrays together using custom foreach fucntion to avoid duplicate contents,joining the array content involved adding vote counts and worth together, so php custom array functions could not do that, I used a function in post.php (join_voters()). After this, I then re-sorted each array based on worth , count and alphabets using a custom fucntion (array_sort_by_columnR()), also in post.php
To make the script more compatible, I had to change some function name that are reserved in lesser versions of PHP but not in php7
All of this changes can be viewed in the commit below.
Commit link: Commit
Website Link: steempayout.com
Posted on Utopian.io - Rewarding Open Source Contributors