create account

MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page. by magicmonk

View this thread on: hive.blogpeakd.comecency.com
· @magicmonk · (edited)
$76.57
MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page.
- <a href="http://mysteemitfriends.online">My Steemit Friends Tool website.</a><br> 
- <a href="http://github.com/Bulletproofmonk/MySteemitFriends">Github repository.</a> 
- <a href="https://github.com/Bulletproofmonk/MySteemitFriends/commit/27ffbd06452924db7b387f43c86f715b2b377a59">Commit for this update</a><br><br>

### New Features
- What feature(s) did you add?

The Contributors Ranking table on My Steemit Friends has a new feature - a new Article Count column, for you to see how many articles your contributors have voted on. Please test this feature out by going to http://mysteemitfriends.online/contributors.php, enter your username and click "Show Contributors. You will then see not only the amount contributed by each user towards your earnings, but also how many times they have voted you on the right hand side column. 

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532673/gvtxmtlvhh5ehwlwxljb.png)

If you click on any of the "article counts", you will also be taken to the "Contribution Calculator" built previously, where it will list all the articles which this user has voted on, as well as show you this voter's ranking in comparison with other voters for each of the articles.

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532815/if9autrtu0ff7zmfgpiu.png)

You can also see an "Exclude Comments" checkbox is currently ticked by default (new feature added to contribution calculator). If you untick this checkbox and click "Calculate" again, you will see that comments will be included in the contribution calculator.

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532908/q8pctntg2zdmallvwjlj.png)

- How did you implement it/them?

<a href="https://github.com/Bulletproofmonk/MySteemitFriends/commit/27ffbd06452924db7b387f43c86f715b2b377a59">Relevant commit</a><br>

contributors.php: New "article count" column in Contributor's ranking: I made another SQL query called "votecounting (on lines 205-219) which counts how many votes each voter has given the user. Then I joined the result from this table to the previous query result and added one more column to the select query. I also made the result from this query link to the contribution calculator using a combination of Javascript and PHP.

upvotelist.php: I added a checkbox to retrieve the parameter from the URL for whether comments are to be included, and then when the form is resubmitted I also make sure the checkbox value determines which query is submitted. I have also modified the original SQL query to bind variables to the prepared statement in order to reduce the likelihood of an SQL injection.

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@magicmonk/mysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 12 others
properties (23)
authormagicmonk
permlinkmysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page
categoryutopian-io
json_metadata{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":115297211,"name":"MySteemitFriends","full_name":"Bulletproofmonk/MySteemitFriends","html_url":"https://github.com/Bulletproofmonk/MySteemitFriends","fork":false,"owner":{"login":"Bulletproofmonk"}},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","steemdev","steemit","steemtools","programming"],"users":["magicmonk"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532673/gvtxmtlvhh5ehwlwxljb.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532815/if9autrtu0ff7zmfgpiu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532908/q8pctntg2zdmallvwjlj.png"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532673/gvtxmtlvhh5ehwlwxljb.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532815/if9autrtu0ff7zmfgpiu.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519532908/q8pctntg2zdmallvwjlj.png"],"moderator":{"account":"helo","time":"2018-02-26T12:26:33.664Z","reviewed":true,"pending":false,"flagged":false},"questions":[],"score":0}
created2018-02-25 04:42:18
last_update2018-02-26 12:26:33
depth0
children7
last_payout2018-03-04 04:42:18
cashout_time1969-12-31 23:59:59
total_payout_value54.336 HBD
curator_payout_value22.229 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,928
author_reputation1,098,626,896,588,924
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,250,408
net_rshares17,417,654,584,690
author_curate_reward""
vote details (76)
@helo ·
$0.43
Thank you for the contribution. It has been approved.

Good job, I can see as well that you took the time to refactor the code and take care of fixing the prepared statements.   

You can contact us on [Discord](https://discord.gg/uTyJkNm).
**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
authorhelo
permlinkre-magicmonk-mysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page-20180226t123017127z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-26 12:30:21
last_update2018-02-26 12:30:21
depth1
children1
last_payout2018-03-05 12:30:21
cashout_time1969-12-31 23:59:59
total_payout_value0.324 HBD
curator_payout_value0.105 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length297
author_reputation121,547,934,535,311
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,589,256
net_rshares75,957,722,544
author_curate_reward""
vote details (1)
@magicmonk ·
thank you so much helo. You have helped me grow as a developer.
properties (22)
authormagicmonk
permlinkre-helo-re-magicmonk-mysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page-20180226t130527239z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-26 13:05:27
last_update2018-02-26 13:05:27
depth2
children0
last_payout2018-03-05 13:05:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length63
author_reputation1,098,626,896,588,924
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,596,602
net_rshares0
@steemitstats ·
@magicmonk, I always try to support who contribute to open source project, upvote you.
properties (22)
authorsteemitstats
permlink20180225t044606225z-post
categoryutopian-io
json_metadata{"tags":["utopian-io"]}
created2018-02-25 04:46:06
last_update2018-02-25 04:46:06
depth1
children0
last_payout2018-03-04 04:46:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length86
author_reputation351,882,871,185
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,250,987
net_rshares0
@thecrytotrader ·
$0.02
Thanks for adding this because that's the feature that i was talking about few days ago in your comments,thanks man great development
👍  
properties (23)
authorthecrytotrader
permlinkre-magicmonk-mysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page-20180225t050911324z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-25 05:09:12
last_update2018-02-25 05:09:12
depth1
children0
last_payout2018-03-04 05:09:12
cashout_time1969-12-31 23:59:59
total_payout_value0.018 HBD
curator_payout_value0.003 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length133
author_reputation120,415,125,606,468
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,254,314
net_rshares4,394,203,959
author_curate_reward""
vote details (1)
@utopian-io ·
$0.37
### 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. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**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**
👍  
properties (23)
authorutopian-io
permlinkre-magicmonk-mysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page-20180226t142830933z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-26 14:28:30
last_update2018-02-26 14:28:30
depth1
children0
last_payout2018-03-05 14:28:30
cashout_time1969-12-31 23:59:59
total_payout_value0.281 HBD
curator_payout_value0.091 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,007
author_reputation152,955,367,999,756
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,614,681
net_rshares66,050,193,516
author_curate_reward""
vote details (1)
@villani ·
upvoted ![DQmTM45HLPzvkV9hTjpXPYCe3VFwrmjTZKrB1nBGd5LSarN_640x480.png](https://steemitimages.com/DQmdbKa8c6BcEuFsYHMdwBUStPrzL33ZVAcRA3Qw5PRUzKV/DQmTM45HLPzvkV9hTjpXPYCe3VFwrmjTZKrB1nBGd5LSarN_640x480.png)
properties (22)
authorvillani
permlinkre-magicmonk-mysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page-20180225t051402812z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"image":["https://steemitimages.com/DQmdbKa8c6BcEuFsYHMdwBUStPrzL33ZVAcRA3Qw5PRUzKV/DQmTM45HLPzvkV9hTjpXPYCe3VFwrmjTZKrB1nBGd5LSarN_640x480.png"],"app":"steemit/0.1"}
created2018-02-25 05:14:12
last_update2018-02-25 05:14:12
depth1
children0
last_payout2018-03-04 05:14:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length205
author_reputation1,420,794,928,099
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,254,991
net_rshares0
@world-travel-pro ·
$0.03
You're really taking it to a new level well done!
👍  
properties (23)
authorworld-travel-pro
permlinkre-magicmonk-mysteemitfriends-online-new-feature-article-count-included-in-contributors-ranking-integration-with-contribution-calculator-page-20180225t173845529z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-25 17:38:45
last_update2018-02-25 17:38:45
depth1
children0
last_payout2018-03-04 17:38:45
cashout_time1969-12-31 23:59:59
total_payout_value0.023 HBD
curator_payout_value0.006 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length49
author_reputation-405,874,411,594,630
root_title"MySteemitFriends.Online new feature: Article count included in Contributors ranking, integration with Contribution calculator page."
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,386,244
net_rshares5,492,754,949
author_curate_reward""
vote details (1)