No Rich Text Descriptions
Added the meta tags to the main.php file for the desired content. Now, when posting the link a small description and image show for the project in apps like Discord and Twitter.
The solution was straightforward, find the needed tags and add the desired information to the server:
Pin Existing Content!
This implementation took so much more time to plan and figure out than I anticipated. Between IPFS acting up during testing, PHP not running the python script, and SteemConnect redirect issues this little bit of code does not do justice on how much time I had to spend hacking my way through this feature.
However voilà! Now both content creators and application developers can use @nebulus to pin their content for 1 STEEM. The pining works with any IPFS hash, to be honest. Whether it is from @dtube, @dsound, or you uploaded something to your server, you can pin in on Nebulus.
The price is needed since we are not able to check the size of the file which the user wants to pin, and any pin downloads to the server taking up more space and leaving less space for account holders. As the price of STEEM increases, we plan to move away from the hard-coded 1 STEEM to $1 worth of STEEM (or some fair amount) to keep the price reasonable.
Pinning is the first step towards federating this service with many nodes. The
pin.py script is set as a cron job and scans the blockchain for transfers to @nebulus with a hash. At the same time, the script looks for any transfer with the word init. When the script finds "init" a counter ticks up followed by some math to create a round-robin style pin function. This way everyone fills up at different rates and not at the same time.
pin function gets called at the very bottom of the python script to get the output of the
roundRobin function. The round-robin function returns a number that is then used to determine if the node should pin the content found in the transaction list for the Nebulus steem account.
blockNum is set as a global variable so all functions may call the information it holds. Setting this to a variable is better than hard-coding it in every function, so we only have to change it once, and even set it to something else via the STEEM blockchain if needed in the future.
We are using BEEM, by @holger80, to access the STEEM blockchain.
All images came from royalty and attribution free sources unless specified.
Join us over at the Creators' Guild Discord group! We are here to encourage, support and increase the creation of quality content.
If you have any questions about the future of Steem
or my witness please feel free to message
jrswab#3134 on Discord.
Looking to support my content creation efforts outside of the Steem Blockchain?
Check out jrswab.com/support