/** * return all online players as an array * * @return array */ public static function getAll($extra = null) { $rows = Self::all(); if ($rows->count() == 0) { return false; } $return = collect([]); foreach ($rows as $row) { $char = \distro\tfs10\Character::find(playerIdToName($row['player_id'])); $item = collect(['name' => $char->getName(), 'vocation' => $char->getVocation(), 'level' => $char->getLevel()]); if (!is_null($extra)) { foreach ($extra as $key) { $item->put($key, $char->{$key}); } } $return->push($item->all()); } return $return; }
</td> <td> <small> by <?php $latest = $thread->last(); ?> <a href="#"><img src="<?php echo assets('assets/img/forum-latest.png'); ?> " class="forum-post-latest" width="8" height="8"></a> <?php echo char_link(playerIdToName($latest->posted_by)); ?> , <abbr title="<?php echo Carbon\Carbon::createFromTimestamp($latest->created); ?> "><?php echo ago($latest->created); ?> </abbr> </small> </td> </tr> <?php } ?>
echo $thread->id; ?> " name="thread_id"> <table> <tr class="header"> <th colspan="2">Unlock thread <?php echo e($thread->title); ?> </th> </tr> <tr> <td colspan="2">Are you sure you want to unlock thread <strong><?php echo e($thread->title); ?> </strong> by <strong><?php echo playerIdToName($thread->posted_by); ?> </strong>?</td> </tr> <tr class="transparent noborderpadding"> <th width="20%"></th> <td> <input type="submit" class="button" value="Submit"> <a href="<?php echo url('?subtopic=forum&board=' . $thread->board_id . '&thread=' . $thread->id); ?> " class="button">Back</a> </td> </tr> </table> </form>
echo url('?subtopic=forum&board=' . $board->id); ?> "><?php echo e($latest->title); ?> </a><br> <small> by <a href="#"><img src="<?php echo assets('assets/img/forum-latest.png'); ?> " class="forum-post-latest" width="8" height="8"></a> <a href="#"><?php echo playerIdToName($latest->posted_by); ?> </a>, <abbr title="<?php echo Carbon\Carbon::createFromTimestamp($latest->created); ?> "><?php echo ago($latest->created); ?> </abbr> </small> <?php } else { ?> - <?php
</div> <?php } else { ?> <?php foreach ($news as $news) { ?> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><?php echo $news['title']; ?> </h3> </div> <div class="panel-body"> <?php echo $news['content']; ?> <hr> <small>Written <?php echo ago($news['created']); ?> by <a href="#"><?php echo playerIdToName($news['posted_by']); ?> </a></small> </div> </div> <?php } }
/** * Get highscore * * @retur array */ public function getHighscore() { $per_page = $this->perPage(); $ignore = config('highscore', 'ignore'); if ($this->skillid == 7 or $this->skillid == 8) { $query = app('character')->where('group_id', '<', $ignore)->orderBy($this->skill_column, 'desc')->paginate($per_page)->appends($this->appends); } else { $query = self::orderBy($this->skill_column, 'desc')->where('group_id', '<', $ignore)->paginate($per_page)->appends($this->appends); } foreach ($query as $player) { $return[self::$loop]['rank'] = self::$loop; $return[self::$loop]['name'] = playerIdToName($player['id']); $return[self::$loop]['level'] = $player['level']; $return[self::$loop]['experience'] = $player['experience']; $return[self::$loop]['value'] = $player[$this->skill_column]; if (!is_null(self::$customfields)) { foreach (self::$customfields as $customfield) { $return[self::$loop][$customfield] = e($player[$customfield]); } } self::$loop++; } $this->setPagination($query); return ['result' => $return]; }
</span> <h2><?php echo $news->title; ?> </h2> </header> <div class="news-content"> <?php echo strip_tags($news->content, '<p><h1><h2><strong><em><b><i><ul><ol><li><u><strike><hr><br><a><img>'); ?> </div> <footer class="news-footer"> Published by <?php echo char_link(playerIdToName($news->posted_by)); ?> in <a href="<?php echo url('?subtopic=forum&board=' . $news->board_id); ?> ">Latest News</a> (<a href="<?php echo url('?subtopic=forum&board=' . $news->board_id . '&thread=' . $news->id); ?> "><?php echo $news->countReplies(); ?> comments</a>). </footer>