Updated curation trail and queue voting + upvote server on Steemauto
utopian-io·@mahdiyari·
0.000 HBDUpdated curation trail and queue voting + upvote server on Steemauto
<center> </center> Updated some codes on back-end of steemauto.com By these changes, curation trail should work fine. You don't need to understand that codes. Commits: [Number 1](https://github.com/mahdiyari/steemauto/commit/3f4c31591034289846ee8b412c9503d24469f83b): Streaming blocks and upvoting curation trail. Some codes: ``` ... ... var users=[];//fanbase var users1=[];//trailers var users2=[];//commentupvote var server = https://private_server; //upvoting server con.query('SELECT `user` FROM `trailers` WHERE `followers`>0', function (error, results, fields) { //Selecting Trailers for(i in results){ users1.push(results[i].user); } }); // Updating Users List Every 10 Minutes setInterval(function(){ try{ con.query('SELECT `user` FROM `trailers` WHERE `followers`>0', function (error, results, fields) { var busers=[]; for(i in results){ busers.push(results[i].user); } users1 = busers; }); } catch(e){ console.log('error in updating users'+e); } },600000); ... ... ``` [Number 2](https://github.com/mahdiyari/steemauto/commit/d61c1ac2b0932f853a10be1ac8a9a4018d7f48b6): Checking upvote queue and upvoting after x minutes. Some codes: ``` ... ... //streaming block numbers steem.api.streamBlockNumber(function (err1, newestblock) { console.log(newestblock); }); // Upvote function - included 0 seconds delay! var delay = 0; function upvote(voter,author,permlink,weight,type){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { if(this.responseText == 1){ console.log('up done'); }else if(this.responseText == 0){ console.log('err in up.'); } } }; xmlhttp.open("GET", server+'/?wif='+wifkey+'&voter='+voter+'&author='+author+'&permlink='+permlink+'&weight='+weight , true); xmlhttp.send(); return 1; } ... ... ``` [Number 3](https://github.com/mahdiyari/steemauto/commit/9ae060058e3cba24392e067af07d5b963392cfde): Upvote server which is running on a private node server. Some codes: ``` ... ... if(wif && voter && author && permlink && weight){ steem.api.getContentAsync(author, permlink, function(erz, rez) { //checking if post already upvoted or not if(!erz && rez){ var voted = 0; for(j in rez['active_votes']){ if(rez['active_votes'][j].voter == voter){ voted = 1; break; } } if(voted == 0){ steem.broadcast.vote(wif,voter,author,permlink,weight,function(downerr, result){ //broadcasting upvote if(!downerr && result){ res.end('1'); }else{ res.end('0'); } }); }else{ res.end('0'); } }else{ res.end('0'); } }); } ... ... ``` More information about codes included as comments on each file. *** #### What is Steemauto? Steemauto comes with amazing features, Schedule post, Build a Fanbase, or leave a curation trail for users all around the world to follow. Steemauto is open source, unlimited, secure and free app for steem users. *** Regards, Steem witness, Mahdi Yari, 2018-01-29 <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@mahdiyari/updated-curation-trail-and-queue-voting-upvote-server-on-steemauto">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
👍 defango, thepassenger, khalilalfamahera, thethreehugs, gambit.coin, siyulaters, endee, steemit-bot, tariksaran, waniphotography, williams-owb, andreeamta, safwan10000, animefanrd, lovetdy, jamesmovic, andrelion, mrxplicit, ghevangelist, amazingearth, caps, mctursh, silentpartnerio, ohmylove, gangplankhg, embesilikat, buksnuf, steemslav, arzy, lavinas, dobartim, sarhadi, andrewclk, gangplankhq, mahdiyari, madscientistx69, peak.endrule, shiningowl, see5staar, sheilamae, nature.indonesia, reko, nettybot, msp3k, cajun, pizaz, matrixonsteem, brotato, coonass, squirrelnuts, steemliberator, witnessstats, r2steem2, steemcreate, steemdevs, yazanstorm, nxah, uzair.khan, alexis555, lorden, teuku.reza, wdougwatson, yvonneinoregon, mamacharo, reekadoh, blockgators, moscato, mzuami, ladybirdec, krissy330, scarl, eroc216, smilewithme, rachaeldwatson, kennybrown, amayahaley21, openmusic, lukakorba, lusterdoom, tebriz, herfie, mohamedsabry, msabolik, lovros, xmkd, osobiggie, world-photo, cauac, rsrestinga, playfull, angrysage, cryptowani, empati58, disonreign, briggsy, matheusggr, ivarskreldanton, guest123, primus1, satre, florenced, sagor24, reseller, luisitonews, learnguitar, kose, sixexgames, robileo, phbr, krimka, mahtabuddin, rishi556, xak, totyahmed731993, dysc0rd, saroona, transcript-junky, duckmast3r, steemit-earn, alamin0263, cmroxburgh, droucil, camaund, hooiyewlim, omar-hesham, chibikko, dakster, violetmed, chibikko-snap, asfuriah, youssefb, dammyzee, apok, helo, madviking, cryptocurrencya, crypto570, shaharyarbaig, kofpato, leonardomso, jlordc, kid1412, stanvic, mitthradiumn, steveconnor, dootdoot, conflaxus, triplethreat, thashadowbrokers, tittilatey, jeezy, test.with.dots, pi-pi, listentosteem, gravy, aaronwashere, roundbeargames, olayhemy, nehomar, drjessemeyer, sakilansary, olavic, walkinharmony, exxe, nuridin, letsmakes, sthitaprajna, mrs.roy, promosteem, rikki-ch, shielajing, artax89, kousarabbas, peterkkim96, cryptowarrior88, simonjoy, sephirods, janiefiteny15, ibile, jfmrt15, askari, roberttre4, engineeringsteem, aamirqazi, twigg, arkhan412002, medicalgrower, alvin2, steeminformation, bidhanghimire, bestsohag1, luisbps, epic-fail, eliasahmed, itsjessamae, xettrinabin, swati123, tnelectronics, crescendoofpeace, sanks7, bradfordtennyson, rnmn1517, nasimmd, bestnazmul2, astafar, supersoju, jozef230, khadimhussain, msrasel, sudhirk121287, malenna, techmaster, shivohum2015, steemcategary56, sagheer46, tantrum, akkha, eliorojas, frissonsteemit, evernoticethat, sarfraz786, arggil, monirul22, indianteam, jamessteempower, suheri, cheapogroovo, mhdriza, andisantos, moca, kamalkhann, valorforfreedom, abuhasan, lowlylutfur, tuckerjtruman, knightwarrior, jogabonito, adonisabril, vishire, cryptodollar1, arslanq, neemanbhat, starlost, ayumastura, vlogger56, olesh, salmanrauf, chobs, huwaid, onegin, crokkon, bestmspulok1, amitsharma, logan1617, princecom, asifhanzala, jza, hostfatan, katteasis, helamia, shaifullah, jjprac, darkshadow147, steemulator, enzolnes13, revan746, brondon, rajenra, walidchabir, absn, queenlaurenxo, stanjames, rbreauxfl, brittuf, freeforall, udiptheeng, hashray, angelgarz, sawrdjr, ttalk, onlyonce, aaronnguyen, abdullahmushtaq, salahchiva, xerohour, alidervash, alajij2014, ledjo1991, a-0-momo, yadyasir, a-0-labon, kingjan, hariman, woking, sparklez, shinidanitv, bco, thebitcoinparty, btcbillionaires, tahirafzal, nafisacom, ausbitbank, suhendi, resteemable, jimmyrai28, spotlight, mdnazmul, ihtiht, steemauto, starrkravenmaf, theodosis63, bluetechno, kingyus, opportunity4u, earnonlinewith, iodoorclubmunich, zacherybinx, blackmagic, ewuoso, talalofficial, elbleess, phogyan, tradeownsystems, odibezeking, intellectualsoul, mhmegh, tonygreene113, rusinho027, harryp3, traba-emo, amazingtech100, hasitpbhatt, yudiana, maidisangkot, nirgf, kenking, yanga, rohu03, naideth, investor7, argentoescribe, cryptocomic, e-gaucho, senseibabs, gordon92, callme, tijani, angelfidel, zipplyo, jeffiyaro, dks100, keshawn, jamiz, life.goals, spacetrucker, ekjosh, mdsalahuddin, ivan.atman, kingingodwin, ayenanda, fiderlet, slacktmusic, mashiliyanage, oilprinzz, prechi, zakariashikder, dxdei, damzxyno, thecreatorx, aauthespian1, ronikarain, bcrafts, nazmul82, favoursampson, techmojo, videogeek, whaproject, ryankofi, marianaceleste, djlethalskillz, pyaesoneaung1774, shakeelptc1234, annepage, spiry-btc, dwarfche, utopian-io, frozia, shuvo5, kingsident, agusalim86, engkotbaceeraya, bobsthinking, historylover, funb, andersonadeli, ahmadraza1234, oliens, lasseme, xlogan,