__________     __ __     __  _______    ________
  / ____/ __ \   / // /    / / / /  _/ |  / / ____/
 / / __/ / / /  / // /_   / /_/ // / | | / / __/
/ /_/ / /_/ /  /__  __/  / __  // /  | |/ / /___
\____/\____/     /_/    /_/ /_/___/  |___/_____/

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

STEEMASK UPDATE: Homepage feeds Available

BY: @profchydon | CREATED: June 9, 2018, 9:35 p.m. | VOTES: 18 | PAYOUT: $48.86 | [ VOTE ]

STEEMASK UPDATE: Homepage feeds Available

Repository

https://github.com/profchydon/steemask

https://steemitimages.com/0x0/https://cdn.utopian.io/posts/ed76864e56873ef04e9556dbc3027a1035a2Logo_Result_1a.jpg

What is the project about?

SteemAsk is a question and answer website that is been built to allow users ask both steem and non-steem related question while getting reply from other members of the community. Many steemit users especially newbies need guidance and most times they wish can get access to other members and ask question to help them be successful on steemit. SteemAsk provides the platform for this, and users can also search for questions to get quick answers. SteemAsk is the stackoverflow of the steem blockchain.

How does it work?

SteemAsk works exactly like every other question and answer forum, but on SteemAsk:

Previous Update

https://steemit.com/utopian-io/@profchydon/steemask-update-complete-user-data-now-available-on-profile-page-user-profile-displays-only-steemask-related-post-new-logo

New Features

[IMAGE: https://cdn.steemitimages.com/DQmW2LMgvegmMkTbXWFNY9oscf9BYNTZXw3L4YibHubzCRF/steemaskhome.png]

How i implemented this?

As soon as the webpage is ready, using $(document).ready(function () { i retrieved steemask posts using the steem.api.getDiscussionsByCreated

https://github.com/profchydon/steemask/commit/070586d7eeafd583b9f69018df8facbd5e92e0a5

$(document).ready(function () {

    function fetchFeeds() {
      var query = { limit: 100, tag: "steemask",};

      steem.api.getDiscussionsByCreated(query, function (err, result) {

        var post = result;

        $.each(post,function(key,value){

          var body = jQuery.trim(value.body).substring(0, 600);
          var img = "https://steemitimages.com/u/"+value.author+"/avatar";
          var pending_payout = parseFloat(value.pending_payout_value);
          var paid_out = parseFloat(value.total_payout_value) + parseFloat(value.curator_payout_value);
          if (pending_payout != 0.00) {
              var payout = pending_payout;
          }else {
              var payout = paid_out;
          }
          var tags = JSON.parse(value.json_metadata);

          tags = tags.tags;

Since the format of the posts is markdown, i used the showdown.js plugin to convert the post body to plain text

https://github.com/profchydon/steemask/commit/eb9f537778f4558fb95b38222333f905d1d8a182

// Instantiate a new showdown converter object
          var converter = new showdown.Converter();
          //converts markdown to html
          body = converter.makeHtml(body);

          body = body.replace(/(<([^>]+)>)/ig,"").replace(/]*)?>.*?<\/a>/ig,"").replace(/(?:https?|ftp):\/\/[\n\S]+/g,"").substr(0, 600) + '...';

Loader animation was implemented using simple html, css and jquery

https://github.com/profchydon/steemask/commit/2687288a443a6faabab711dd451680c4fc746152

Trending and hot posts were retrieved using steem.api.getDiscussionsByTrending(query, function (err, result) and steem.api.getDiscussionsByHot(query, function (err, result)

https://github.com/profchydon/steemask/commit/573bfc2bb3f6414aa1bdb130e31661f7288430a0

Commits:

All commits are placed above in their respective positions.

Roadmap

How to contribute

You can contact me on discord: @profchydon

TAGS: [ #utopian-io ] [ #development ] [ #steemask ] [ #open-source ]

Replies

@rasjkeee92 | June 9, 2018, 9:36 p.m. | Votes: 0 | [ VOTE ]

Uncomplicated article. I learned a lot of interesting and cognitive. I'm screwed up with you, I'll be glad to reciprocal subscription))

@zohaib336 | June 9, 2018, 10:35 p.m. | Votes: 0 | [ VOTE ]

Nice and informative article. I learnt many question about it. Thanks for sharing.

@faizazohaib | June 9, 2018, 10:51 p.m. | Votes: 1 | [ VOTE ]

Nice information.I would like to be the part of steamAsk.

@gloeze | June 10, 2018, 6:11 a.m. | Votes: 1 | [ VOTE ]

I love how it works, simple and direct. This needs more visibility on the steem blochchain.

@amosbastian | June 11, 2018, 5:54 p.m. | Votes: 0 | [ VOTE ]

Thanks for the contribution, @profchydon! What are the basic functionalities that don't work yet?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.

Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

@profchydon | June 11, 2018, 7 p.m. | Votes: 0 | [ VOTE ]

Hi @amosbastian
Most of the basic functionalities are working now exception of posting and upvoting functionality which will be addressed in the next update. Hopefully in the next update, users should be able to ask questions and also uovote questions.

@utopian-io | June 11, 2018, 6:05 p.m. | Votes: 0 | [ VOTE ]

Hey @profchydon
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

@simspread | June 12, 2018, 7:05 a.m. | Votes: 0 | [ VOTE ]

Resteemed. Great work @profchydon

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>