Hivejs: How to set post/comment options - Wie man Beitrags-/Kommentareinstellungen setzt. #8

in #hive2 years ago (edited)

EN

In my last post I showed how easy it is to publish a post or comment using Hivejs.

Now I would like to show you how to add more settings to your post or comment. This is done with the function hive.broadcast.commentOptions, which is also quite simple. You just have to take care of a few things.

  • wif your private posting key
    author your username you posted with
  • permlink the permlink you set for the post, see previous post
  • maxAcceptedPayout maximum amount you accept as reward
  • percentHiveDollars 0= 100% powerup, 10000 = 100% HBD, where 50% is paid out as HBD and 50% as HP.
  • allowVotes Are votes allowed.
  • allowCurationRewards Are rewards wanted
  • extensions additional setting like beneficiaries, who should be beneficiaries.

maxAcceptedPayout

The value "1000000.000 HBD" is often used, if it is the maximum I haven't found out yet, but should be enough ;)

percentHiveDollars

The rewards are basically paid out at least 50:50 in HBD and HivePower. So here 100% (10000) is equal to the 50%.

Example with 10000:

Example at 8000:

Example at 7800:

The percentage cannot be increased once it has been set, only decreased, otherwise you will get the following error message:

allowVotes & allowCurationRewards

You can disable votes and also rewards. If you disable votes, you won't get any rewards!

extensions

If you want someone else to participate in the rewards, you can set the beneficiaries here.

Here is valid:

  • Maximum 127 beneficiaries
  • sum must be 10000 (100%)
  • Accounts must be listed in alphabetical ascending order and no one may be listed twice.
  • The option must be set before the 1st vote. Once a vote has been placed, this cannot be set again.

Therefore, the options should be set immediately after publishing.

Yesterday's example, extended by the options can be found here, use this only locally, never enter your private posting key on jsfiddle!

Since this time it is quite simple, I won't go into the code in detail. If you still have questions, feel free to leave a comment. The best is to mention @mein-senf-dazu, so that I get it.

For testing, this post will also be published with my code and my account @mein-senf-dazu will be considered with 5% of the rewards. From this you can see if it worked.

##DE

In meinem letzten Beitrag habe ich gezeigt, wie einfach es ist einen Beitrag oder ein Kommentar zu veröffentlichen mithilfe von Hivejs.

Nun möchte ich euch zeigen, wie ihr weitere Einstellungen für euren Beitrag bzw. Kommentar vornehmen könnt. Dies erfolgt mit der Funktion hive.broadcast.commentOptions, die ebenfalls recht simpel ist. Man muss lediglich paar Sachen beachten.

  • wif Dein privater Posting-Schlüssel
  • author dein Username mit dem du gepostet hast
  • permlink der von dir festgelegte permlink für den Beitrag, siehe vorheriger Beitrag
  • maxAcceptedPayout Maximaler Betrag, den man als Reward akzeptiert
  • percentHiveDollars 0= 100% Powerup, 10000 = 100% HBD, wobei 50% als HBD und 50% als HP ausgezahlt werden.
  • allowVotes Sind Votes erlaubt
  • allowCurationRewards Sind Rewards gewollt
  • extensions zusätzliche Einstellung wie beneficiaries, wer soll begünstigt sein.

maxAcceptedPayout

Der Wert "1000000.000 HBD" wird oft verwendet, ob es das Maximum ist, habe ich noch nicht herausgefunden, sollte aber reichen ;)

percentHiveDollars

Die Rewards werden grundsätzlich mind. 50:50 in HBD und HivePower ausgezahlt. Somit sind hier 100% (10000) gleich den 50%

Beispiel bei 10000:

Beispiel bei 8000:

Beispiel bei 7800:

Die Prozentzahl kann, nachdem Sie einmal gesetzt wurde nicht mehr erhöht werden, sondern nur noch verringert, ansonsten erhaltet ihr folgende Fehlermeldung:

allowVotes & allowCurationRewards

Man kann Votes deaktivieren und auch Rewards. Wenn man Votes unterbindet, gibts natürlich auch keine Rewards!

extensions

Möchte man jemand anderen an den Rewards beteiligen, kann man hier die beneficiaries einstellen.

Hier gilt:

  • Maximal 127 Begünstigte
  • Summe muss 10000 (100% ergeben)
  • die Accounts müssen in alphabetisch aufsteigender Reihenfolge angegeben werden und es darf keiner doppelt vorkommen.
  • Die Option muss vor dem 1. Vote gesetzt werden. Sobald ein Vote abgegeben wurde, kann dies nicht mehr gesetzt werden.

Daher sollten die Optionen direkt nach dem Veröffentlichen gesetzt werden.

Das gestrige Beispiel, erweitert um die Optionen findet ihr hier, nutzt diesen nur Lokal, gebt nie euren privaten Posting-Schlüssel auf jsfiddle ein!

Da auch diesmal es doch ganz simpel ist, gehe ich nicht auf den Code näher ein. Wer dennoch Fragen hat, kann gern ein Kommentar da lassen. Am besten @mein-senf-dazu erwähnen, damit ich es mitbekomme.

Zum Testen, wird auch dieser Beitrag mit meinem Code veröffentlicht und mein Account @mein-senf-dazu mit 5% der Rewards berücksichtigt. Daran könnt ihr sehen, ob es geklappt hat.

Sort:  

Yay! 🤗
Your content has been boosted with Ecency Points, by @mein-senf-dazu.
Use Ecency daily to boost your growth on platform!

Support Ecency
Vote for new Proposal
Delegate HP and earn more

🍕 PIZZA !
@hive-coding! The Hive.Pizza team manually upvoted your post.

Please vote for pizza.witness!

Congratulations @hive-coding! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You published more than 10 posts.
Your next target is to reach 20 posts.
You received more than 600 upvotes.
Your next target is to reach 700 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Check out the last post from @hivebuzz:

CBRS Hive Infographic Contest - Get your badge and win 1000 HIVE
Our Hive Power Delegations to the October PUM Winners
Feedback from the November 1st Hive Power Up Day - New Turnout Record
Support the HiveBuzz project. Vote for our proposal!