public function view($id) { $get_thread = $this->model_thread->get_thread($id); foreach ($get_thread as $t) { $data = array('idCategory' => $t->category, 'category' => $t->category_name, 'topic' => $t->topicName, 'user' => $t->author, 'tanggal' => $t->created_at, 'title' => $t->title, 'status' => $t->status, 'message' => BBCodeParser($t->message)); } $user = sentinel()->getUser(); if ($this->checkTA() == TRUE) { $data['tenagaAhli'] = $user->id; $data['draftSide'] = $this->model_thread->get_all_drafts($user->id); } $data['author'] = user($user->id)->full_name; $data['home'] = site_url('author/'); $data['categoriesSide'] = $this->model_thread->get_categories(); $data['threadSide'] = $this->model_thread->get_thread_from_author($user->id); $data['closeThreads'] = $this->model_thread->get_close_threads($user->id); $data['threadSide'] = $this->model_thread->get_thread_from_author($user->id); $data['closeThreads'] = $this->model_thread->get_close_threads($user->id); $data['authorSide'] = $this->model_thread->get_thread_from_author($user->id); $data['reply'] = $this->model_thread->get_reply($id); $data['countReply'] = count($data['reply']); $data['id'] = $id; if ($this->session->flashdata('success')) { $data['success'] = $this->session->flashdata('success'); } elseif ($this->session->flashdata('failed')) { $data['failed'] = $this->session->flashdata('failed'); } $this->load->view('thread/single', $data); }
echo '<li>' . anchor('forum/thread/category/' . $cat->id, $cat->category_name) . '</li>'; } ?> </ul> <div class="latest-comment"> <h4><i class="fa fa-wechat"></i> Komentar terakhir anda :</h4> <ul> <li> <?php if (!empty($forumLatestComment)) { foreach ($threadLatestComment as $thr) { echo anchor('forum/thread/view/' . $thr->id, $thr->title); } foreach ($forumLatestComment as $comment) { echo '<div class="comment"> <p><b>comment: </b>' . BBCodeParser($comment->message) . '</p> </div>'; } } else { echo '<div class="alert alert-warning">Belum ada komentar dari anda.</div>'; } ?> </li> </ul> <h4><i class="fa fa-wechat"></i> Komentar baru :</h4> <ul> <?php if (isset($newThreadComments)) { foreach ($allThreads as $thr) { $no = 0; foreach ($newThreadComments as $newComments) {
echo $r->created_at; ?> <i class="fa fa-calendar"></i></p> <?php if ($r->updated_at > 0) { echo '<span class="label label-primary pull-right">Edited</span>'; } ?> <!--<p>201 <i class="fa fa-comments"></i></p>--> </div> </div> </div> </div> <div class="card-block"> <p><?php echo BBCodeParser($r->message); ?> </p> </div> <div class="card-footer"> <a href="#reply<?php echo $r->id; ?> " class="btn btn-sm btn-reply" data-toggle="collapse">Quote Reply</a> <?php $userID = auth()->getUser()->id; if ($userID == $r->author) { ?> <div class="pull-right"> <a href="#editReply<?php echo $r->id;
public function view($id) { $get_thread = $this->model_thread->get_thread($id); foreach ($get_thread as $t) { $data = array('idCategory' => $t->category, 'category' => $t->category_name, 'topic' => $t->topicName, 'author' => $t->author, 'tanggal' => $t->created_at, 'title' => $t->title, 'status' => $t->status, 'message' => BBCodeParser($t->message)); } $user = sentinel()->getUser(); $visitorIdentity = visitorIdentity($user->id, $id); $this->model_visitor->saveVisitor($visitorIdentity); $daerahUser = $user->profile->desa_id; if ($this->checkTA() == TRUE) { $data['tenagaAhli'] = $user->id; $data['draftSide'] = $this->model_thread->get_all_drafts($user->id); $data['threadSide'] = $this->model_thread->get_all_threads($daerahUser, $user->id); } else { $data['threadSide'] = $this->model_thread->get_threads_by_user($daerahUser, $user->id); } $data['authorSide'] = $this->model_thread->get_thread_from_author($user->id); $data['categoriesSide'] = $this->model_thread->get_categories(); $data['closeThreads'] = $this->model_thread->get_close_threads($user->id); $data['commentsSide'] = $this->model_thread->get_comments_from_author($user->id); $data['reply'] = $this->model_thread->get_reply($id); $data['countReply'] = count($data['reply']); $data['userID'] = $user->id; $data['topics'] = $this->model_topic->get_approved_topics(); $data['id'] = $id; if ($this->session->flashdata('success')) { $data['success'] = $this->session->flashdata('success'); } elseif ($this->session->flashdata('failed')) { $data['failed'] = $this->session->flashdata('failed'); } $this->load->view('thread/single', $data); }
public function view($id) { $get_thread = $this->model_thread->get_thread($id); foreach ($get_thread as $t) { $data = array('idCategory' => $t->category, 'category' => $t->category_name, 'user' => $t->author, 'tanggal' => $t->created_at, 'title' => $t->title, 'message' => BBCodeParser($t->message)); } $user = sentinel()->getUser(); $visitorIdentity = visitorIdentity($user->id, $id); $this->model_visitor->saveVisitor($visitorIdentity); $data['categoriesSide'] = $this->model_thread->get_categories(); $data['threadSide'] = $this->model_thread->get_all_threads(); $data['reply'] = $this->model_thread->get_reply($id); $data['countReply'] = count($data['reply']); $data['id'] = $id; if ($this->session->flashdata('success')) { $data['success'] = $this->session->flashdata('success'); } elseif ($this->session->flashdata('failed')) { $data['failed'] = $this->session->flashdata('failed'); } $this->load->view('thread/single', $data); }