New Feature: Cumulative Voter Details & more

in #utopian-io7 years ago (edited)

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

lo.PNG

The Cummulatives in other fiat (naira)

zz.PNG

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):

@akintunde: 0.1237 sbd ,7 vote(s)
@bleepcoin: 2.6959 sbd ,4 vote(s)
@alfred1: 0.0024 sbd ,3 vote(s)
@jegede: 0.004 sbd ,3 vote(s)
@jo5h: 0.0037 sbd ,3 vote(s)
@reachout: 0.1408 sbd ,3 vote(s)
@we-are: 0.0146 sbd ,3 vote(s)
@we-are-africa: 0.0182 sbd ,3 vote(s)
@we-are-nigeria: 0.2292 sbd ,3 vote(s)
@we-are-one: 0.0095 sbd ,3 vote(s)
@zcool: 0.0022 sbd ,3 vote(s)
@bafspotlight: 0.0014 sbd ,2 vote(s)
@fanen: 0.004 sbd ,2 vote(s)
@hackerzizon: 0.0019 sbd ,2 vote(s)
@iamthegray: 0.0047 sbd ,2 vote(s)
@pkalmik: 0.002 sbd ,2 vote(s)
@ulqu3: 0.0004 sbd ,2 vote(s)
@animefanrd: 0.0002 sbd ,1 vote(s)
@atare: 0.002 sbd ,1 vote(s)
@aydayodeji: 0.0012 sbd ,1 vote(s)
@byykke: 0.002 sbd ,1 vote(s)
@caps: 0.0002 sbd ,1 vote(s)
@carloniere: 0.0007 sbd ,1 vote(s)
@ceemo: 0.0016 sbd ,1 vote(s)
@cheekah: 0.001 sbd ,1 vote(s)
@cifer: 0.0249 sbd ,1 vote(s)
@crypaf: 0.002 sbd ,1 vote(s)
@ejemai: 0.379 sbd ,1 vote(s)
@friendly-fenix: 0.0012 sbd ,1 vote(s)
@fullabeans: 0.0007 sbd ,1 vote(s)
@gandhibaba: 0.0119 sbd ,1 vote(s)
@geniusnabiy: 0.0021 sbd ,1 vote(s)
@henryn2020: 0.0281 sbd ,1 vote(s)
@idowu-kunlere: 0.002 sbd ,1 vote(s)
@ifeoluwa88: 0.002 sbd ,1 vote(s)
@ihtiht: 0.0222 sbd ,1 vote(s)
@jeaniepearl: 0.0203 sbd ,1 vote(s)
@jjay: 0.0022 sbd ,1 vote(s)
@josephace135: 0.0388 sbd ,1 vote(s)
@leopardis: 0.0252 sbd ,1 vote(s)
@lucashunter: 0.0117 sbd ,1 vote(s)
@maysarah: 0.0021 sbd ,1 vote(s)
@megalithic: 0.0132 sbd ,1 vote(s)
@michelios: 0.1476 sbd ,1 vote(s)
@mosunomotunde: 0.0371 sbd ,1 vote(s)
@motivatorjoshua: 0.0031 sbd ,1 vote(s)
@mrposyble: 0.0009 sbd ,1 vote(s)
@murez-nst: 0.0043 sbd ,1 vote(s)
@musicfromsoul: 0.0222 sbd ,1 vote(s)
@nataly2317: 0.0007 sbd ,1 vote(s)
@onasani: 0.0008 sbd ,1 vote(s)
@passive: 0.1405 sbd ,1 vote(s)
@pelvis: 0.0011 sbd ,1 vote(s)
@podarkov: 0.0022 sbd ,1 vote(s)
@ramb: 0.0003 sbd ,1 vote(s)
@shemzy: 0.0005 sbd ,1 vote(s)
@smartkhan: 0.0613 sbd ,1 vote(s)
@snowpea: 0.0007 sbd ,1 vote(s)
@spederson: 0.0015 sbd ,1 vote(s)
@starbele: 0.0005 sbd ,1 vote(s)
@steem3: 0.021 sbd ,1 vote(s)
@steemnaira: 4.3591 sbd ,1 vote(s)
@trituratusmiedos: 0.0004 sbd ,1 vote(s)
@utopian-io: 93.9656 sbd ,1 vote(s)
@wafrica: 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

Sort:  

This is a helping and great post @akintunde. I could see my name in the details. Thanks for sharing this post

You are welcome. I am glad you like it

Thanks for using the wafrica tag! @wafrica can give just one upvote per day!

Honestly, I don't know how it works but you're doing well good job bro

Keep it up

Blessings

It adds all the votes you receive from a single person in a week and sum it up in terms of worth and number of times the vote was given.

Smiles

I got all that from the post

It's the adding of PHP and removing of white spaces and all the jargons I didn't get

The website and I are one. The source codes... Let's just say they're outta my league

Blessings

Sorry! I have to explain all that to Utopian

Thank you for the contribution. It has been approved.

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

If you know front or backend devs interested in taking over chainBB please have them message me.
surfyogi on telegram, sy7 on wire, jeffpap on skype

Hey you may visit discord to be in touch with them.

Hey @akintunde 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

great contribution, I have just bookmarked it.. I will be reffering to it any time i need it

Welcome @akintunde, how can I find you on discord

Just search for @akintunde#1928

Wow very good work, congratulations, is a great contribution. May God continue to give you wisdom to continue contributing this type of work that help everyone. Successes and may God bless you!

Amen , thanks for the prayers . I really do appreciate your support

By the way I'm going to ask you a question to see if you can get me out of doubt, it has happened to me on some occasions, that I vote and instead of adding, subtracting, that is, the person has for example 1, 21 and vote and instead of going up at 1.22, down to 1.20 ... why does that happen? and I really do not know why it happens, and I vote for another person and if it adds up. I do not understand!!! This week and the past has happened to me.

An upvote can not cause that. The only reason why someone's upvote might be reduced is because of the fluctuation in the price of SBD.

When the price of SBD comes down, all posts will mostly start experiencing a reduction in sbd payout.

Excellent friend, what a good job. I'm going to try them. Thanks for sharing....

Thanks @blessed-girl. I would really love your feedback on this

Great and amazing work done. Thanks for raising the flag of West Africa high. Continuously come out with such amazing great works. @akintunde you have won the post of the day from curator @steemgh. Congrats man. I really love this.

Waoh. Thanks @steemgh. I saw your resteem. it is well appreciated. Thanks , one more time