Important changes on the curation trail page at Steemauto.com

in #utopian-io7 years ago (edited)

steemauto.png

Updated some codes on back-end and front-end of steemauto.com
By these changes, curation trail page changed and now looks better.
Search function added and you can share your trail's link. On that page, users will be able to follow, unfollow or change settings.
Also, I will update fanbase and posting page as soon as I can.
BTW. you don't need to understand these codes.

Commit link: Added search function, added pages buttons to the buttom of table and configured list to display by pages, added page for each searched trail, added follow, unfollow and settings button to that page, changed links of trails and ... .

Some codes of search function:

...
...
<div class="content"> (html comment removed:  1 )
<?  if($searchtrail == 1){  ?>
        <div class="row" style="margin:0 !important"> (html comment removed:  2 )
            <div class="col-md-3"></div>
                <div class="col-md-6"> (html comment removed:  3 )
                    <div class="card"> (html comment removed:  4 )
                        <div class="content"> (html comment removed:  5 )
                            <h3>Searching for trail: </h3><br>
                            <? 
                            $stmt = $conn->prepare("SELECT EXISTS(SELECT * FROM `trailers` WHERE `user`=?)");
                            $searchedtrail = $_GET['trail'];
                            $stmt->bind_param('s', $searchedtrail);
                            $stmt->execute();
                            $result = $stmt->get_result();
                            $row = $result->fetch_assoc();
                            foreach($row as $exists){}
                            if($exists == 1){
                                $stmt = $conn->prepare("SELECT * FROM `trailers` WHERE `user`=?");
                                $stmt->bind_param('s', $searchedtrail);
                                $stmt->execute();
                                $result = $stmt->get_result();
                                $row = $result->fetch_assoc();
                                $resultt = $conn->query("SELECT EXISTS(SELECT * FROM `followers` WHERE `follower` = '$name' AND `trailer`='$searchedtrail')");
                                foreach($resultt as $y){
                                    foreach($y as $y){}
                                }
                                if($y == 1){
                                    $alreadyfollowed = 1;
                                }else{
                                    $alreadyfollowed = 0;
                                }
                                ?>
                                <strong>Trail name:</strong><span> <? echo htmlspecialchars($searchedtrail); ?></span><br>
                                <strong>Description:</strong><span> <? echo htmlspecialchars($row['description']); ?></span><br>
                                <strong>Followers:</strong><span> <? echo $row['followers']; ?> (<a href="/dash.php?i=15&id=1&user=<? echo htmlspecialchars($searchedtrail); ?>">Show enable followers</a>)</span><br><br>
                                <? if($alreadyfollowed){ ?>
                                    <button onclick="if(confirm('Are you sure?')){unfollow('<? echo $row['user']; ?>');};" class="btn btn-danger">UNFOLLOW</button>
                                    <button onclick="showset('1');" class="btn btn-primary">Settings</button>
                                    <? 
                                    $resultt = $conn->query("SELECT * FROM `followers` WHERE `follower` = '$name' AND `trailer`='$searchedtrail'");
                                    foreach($resultt as $n){}
                                    ?>
                                    (html comment removed:  Settings )
                                <div class="row" style="margin:0 !important;">
                                    <div style="text-align:left; display:none; padding:20px;" id="set1" class="col-md-12">
                                        <form onsubmit="settings('<? echo $row['user']; ?>'); return false;">
                                                <label>Settings for Trailer: <a href="https://steemit.com/@<? echo $row['user']; ?>" target="_blank">@<? echo $row['user']; ?></a></label>
                                                <div id="setweight<? echo $row['user']; ?>" <? if($n['fcurator'] == 1){echo 'style="display:none;"';} ?>><label>Weight: Default Weight is 100%. leave it empty to be default.</label>
                                              <input id="weight<? echo $row['user']; ?>" placeholder="Voting Weight" name="weight" type="number" class="form-control" value="<? echo $n['weight']/100; ?>" step="0.01" min="0" max="100">
                                              </div>
                                             <li style="margin-top:5px; margin-bottom:5px;" class="list-group-item">
                                                Follow Curator Weight:
                                                <div class="material-switch pull-right">
                                                    <input id="fcurator<? echo $row['user']; ?>" name="fcurator" class="fcurator" type="checkbox" <? if($n['fcurator'] == 1){echo 'checked';} ?>/>
                                                    <label for="fcurator<? echo $row['user']; ?>" id="fcurator1" class="label-primary"></label>
                                                </div>
                                            </li>
                                              <label>Time to wait before voting. Default Time is 0 minutes.</label>
                                              <input id="aftermin<? echo $row['user']; ?>" value="<? echo $n['aftermin']; ?>" placeholder="Upvoting After X Minutes." name="aftermin" type="number" class="form-control" step="1" min="0" max="30">
                                                <li style="margin-top:5px; margin-bottom:5px;" class="list-group-item">
                                                Enabled:
                                                    <div class="material-switch pull-right">
                                                        <input id="enable<? echo $row['user']; ?>" name="enable" class="enable" type="checkbox" <? if($n['enable'] == 1){echo 'checked';} ?>/>
                                                        <label for="enable<? echo $row['user']; ?>" id="enable" class="label-success"></label>
                                                    </div>
                                                </li>
                                              <input style="margin-top:10px;"value="Save Settings" type="submit" class="btn btn-primary">
                                         </form>
                                     </div>
                                </div>
                                <script>
                                    $(document).ready(function() {
                                        if(document.getElementById('fcurator<? echo $row['user']; ?>').checked){
                                              $('#setweight<? echo $row['user']; ?>').hide(500);
                                          }else{
                                               $('#setweight<? echo $row['user']; ?>').show(500);
                                          } 
                                        $('#fcurator<? echo $row['user']; ?>').change(function() {
                                            if(document.getElementById('fcurator<? echo $row['user']; ?>').checked){
                                                  $('#setweight<? echo $row['user']; ?>').hide(500);
                                              }else{
                                                   $('#setweight<? echo $row['user']; ?>').show(500);
                                              }      
                                        });
                                    });
                                </script>
                                (html comment removed:  /Settings )
                                <? }else{ ?>
                                    <button onclick="if(confirm('Are you sure?')){follow('<? echo $row['user']; ?>');};" class="btn btn-primary">FOLLOW</button>
                                <? } ?>
                                <?  
                            }else{ ?>
                                <p style="color:red;">Can't find. That Trail should register on steemauto and become a trail.</p>
                            <?
                            }
                            ?>
                        </div> (html comment removed:  /5 )
                    </div> (html comment removed:  /4 )
                </div> (html comment removed:  /3 )
            <div class="col-md-3"></div>
        </div> (html comment removed:  /2 --
        <?
    }else{ ?>
...
...

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.
For more information about steemauto check this post: Steemauto - free and unlimited auto upvote and auto posting service


Regards,
Steem witness,
Mahdi Yari,
2018-01-31



Posted on Utopian.io - Rewarding Open Source Contributors
)

Sort:  

Keep up the good work with SteemAuto! Approved!

You can contact us on Discord.
[utopian-moderator]

That are really good at what they knows

Hey @stoodkev, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

I just followed @steemauto. I also registered to steemauto for the improvement of my account. Thanks a lot. I'll follow you too @stoodkev.

Hey @mahdiyari I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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

i was using an other platform for trail but when i have time i will change it to steemauto. streemian was ok and steemauto was bad looking. now streemian is down and steemauto looks better.

Good info.....Everybody will be helped from it
thanks for share with us

Thanks for such an amazing info....

Thanks for the awesome post. I have followed, upvoted your post. Just follow me and upvote this comment for future upvote for your content.
Please bro 1 upvote me..

great post . Thanks for share with us.

Thanks u very much, mas @mahdiyari good job 👍

hello is there any way to disable all use of steemauto . I have a lot of people selected on curation trail and fanbase and its made my voting power go down to 3% . is there any way to just pause/stop it all right now just until my power goes back up!

now, you can stop one by one./
soon, I will add some option for this purpose.

I'm new with steemauto.com and found out about this feature. Very nice! :)