use yii\helpers\HtmlPurifier; /* @var $this yii\web\View */ /* @var $model app\modules\home\models\Post */ $this->title = $model->title . '_' . $model->user['username']; $this->params['user'] = $model->user; $this->params['profile'] = $model->userProfile; $this->params['userData'] = $model->userData; ?> <div class="post-view"> <h1 class="post-title"><?php echo Html::encode($model->title); ?> </h1> <div class="post-meta"><i class="glyphicon glyphicon-time icon-muted"></i> <?php echo \app\components\Tools::formatTime($model->created_at); ?> </div> <div class="post-content"> <?php echo HtmlPurifier::process($model->content); ?> </div> <?php $post_tags = $model->tags ? explode(',', $model->tags) : array(); $tags_len = count($post_tags); ?> <?php if ($tags_len > 0) { ?> <span class="tags">
<?php foreach ($model->feeds['feeds'] as $feed) { ?> <li class="post-item"> <div class="post-content"> <?php if (!empty($feed->content)) { echo Html::encode($feed->content); } else { echo strtr($feed['template'], unserialize($feed['feed_data'])); } ?> </div> <div class="clearfix"></div> <div class="post-info"> <i class="glyphicon glyphicon-time icon-muted"></i> <?php echo Tools::formatTime($feed->created_at); ?> </div> </li> <?php } ?> <?php echo InfiniteScrollPager::widget(['pagination' => $model->posts['pages'], 'widgetId' => '#content']); ?> </ul> </div><!-- activity-list --> </div> </div>
if ($data->is_broadcast) { echo "color:#ff6f3d;"; } ?> "> <?php echo Html::a(Html::encode($user['username']), ['/user/view', 'id' => $user['username']]); ?> </p> </div> </div> <div class="col-sm-10"> <div class="thread-head"> <span class="glyphicon glyphicon-time"></span> <?php echo \app\components\Tools::formatTime($data->created_at); ?> </div> <div class="thread-main"> <h3><?php echo Html::a(Html::encode($data->title), $data->url); ?> </h3> <div class="content"> <?php echo HtmlPurifier::process($data->content); ?> </div> </div> </div> </div>
<a href="<?php echo Url::toRoute(['/forum/thread/view', 'id' => $thread['id']]); ?> "><span class="media-title" <?php //if($thread->is_broadcast) echo 'style="color:#ff6f3d"'; ?> ><?php echo Html::encode($thread['title']); ?> </span></a> </h4> <?php echo Html::a(Html::encode($thread['username']), ['/user/view', 'id' => $thread['username']], ['class' => 'thread-nickname']); ?> <span class="thread-time">| <?php echo Tools::formatTime($thread['created_at']); ?> </span> </div> <div class="thread-main"> <?php echo HtmlPurifier::process(Tools::htmlSubString($thread['content'], 300, Url::toRoute(['/forum/thread/view', 'id' => $thread['id']]))); ?> </div> <div class="pull-right thread-right"> <?php if (Yii::$app->user->id == $thread['user_id']) { echo Html::a('<span class="glyphicon glyphicon-pencil"></span> ' . Yii::t('app', 'Update'), ['/forum/thread/update', 'id' => $thread['id']]); } ?> <?php
echo $feed['username']; ?> "/> </a> <div class="profile-details"> <a class="user-name" href="<?php echo Url::toRoute(['/user/view', 'id' => $feed['username']]); ?> " rel="author"> <?php echo Html::encode($feed['username']); ?> </a> <p> <em><?php echo Tools::formatTime($feed['created_at']); ?> </em> </p> </div> </div> <p class="content"> <?php if (!empty($feed['content'])) { echo Html::encode($feed['content']); } else { echo strtr($feed['template'], unserialize($feed['feed_data'])); } ?> </p> </div>
?> </h3> <?php //$this->beginWidget('HtmlPurifier'); ?> <?php echo $post['content']; ?> <?php //$this->endWidget(); ?> </div> <div class="post-footer"> <div class="time"> <?php echo \app\components\Tools::formatTime($post['created_at']); ?> </div> </div> </div> </div> </li> <?php } ?> </ul> <?php echo LinkPager::widget(['pagination' => $pages]); } else { ?> <div class="no-data-found">
</a> </span> <div class="mecc col-md-9"> <a class="mecctitle" href="<?php echo Url::toRoute(['/explore/view-post', 'id' => $post['id']]); ?> " target="_blank"> <h2> <?php echo Html::encode($post['title']); ?> </h2> </a> <address class="meccaddress"> <time><span class="glyphicon glyphicon-time"></span> <?php echo Tools::formatTime($post['created_at']); ?> </time> - <?php if (!empty($post['author'])) { echo Html::a('<span class="glyphicon glyphicon-user"></span> ' . Html::encode($post['author']), ['/user/view', 'id' => $post['author']]); } else { echo '<span class="glyphicon glyphicon-user"></span> ' . Html::encode($post['username']); } ?> - <span title="<?php echo Yii::t('app', 'View Count'); ?> "><span class="glyphicon glyphicon-eye-open"></span> <?php
<a href="<?php echo Url::toRoute(['/forum/thread/view', 'id' => $thread['id']]); ?> "><span class="media-title" <?php //if($thread->is_broadcast) echo 'style="color:#ff6f3d"'; ?> ><?php echo Html::encode($thread['title']); ?> </span></a> </h4> <?php echo Html::a(Html::encode($thread['username']), ['/user/view', 'id' => $thread['username']], ['class' => 'thread-nickname']); ?> <span class="thread-time">| <?php echo \app\components\Tools::formatTime($thread['created_at']); ?> </span> </div> <div class="thread-main"> <?php echo HtmlPurifier::process($thread['content']); ?> </div> <div class="pull-right thread-right"> <?php echo Html::a('<span class="glyphicon glyphicon-comment"></span> ' . Yii::t('app', 'Reply'), ['/forum/thread/view', 'id' => $thread['id']]); ?> <?php if (Yii::$app->user->id == $thread['user_id'] || Yii::$app->user->id == $model->user_id) {
?> </dd> </dl> </td> <td class="hidden-xs" style="width:100px;"> <i class="glyphicon glyphicon-comment"></i> <?php echo Board::getThreadCount($subBoard['id']); ?> </td> <td class="hidden-xs" style="width:150px;"> <i class="glyphicon glyphicon-user"></i> <?php echo $lastThread['username']; ?> <br> <i class="glyphicon glyphicon-time"></i> <?php echo Tools::formatTime($lastThread['created_at']); ?> </td> </tr> <?php } ?> <?php } ?> </tbody> </table> </div> <?php }
<li <?php echo $message['read_indicator'] == false ? 'class="unread"' : ''; ?> > <a href="<?php echo \yii\helpers\Url::toRoute(['/user/message/view', 'id' => $message['id']]); ?> "> <div class="header"> <span class="action"><i class="fa fa-square-o"></i></span> <span class="from"><i class="glyphicon glyphicon-user"></i> <?php echo Html::encode(\app\modules\user\models\User::getInfo($message['sendfrom'])['username']); ?> </span> <span class="date"><span class="glyphicon glyphicon-time"></span> <?php echo Tools::formatTime($message['created_at']); ?> </span> </div> <div class="title"> <span class="action"><i class="fa fa-star-o"></i><i class="fa fa-star bg"></i></span> <?php echo Html::encode($message['subject']); ?> </div> </a> </li> <?php } ?> </ul>
$this->registerMetaTag(['name' => 'description', 'content' => $model['summary']]); ?> <article class="content"> <header> <a href="<?php echo Url::toRoute(['/explore/view-post', 'id' => $model['id']]); ?> "> <h1><?php echo Html::encode($model['title']); ?> </h1> </a> <address class="meccaddress"> <time><span class="glyphicon glyphicon-time"></span> <?php echo Tools::formatTime($model['created_at']); ?> </time> <?php if (!empty($model['origin'])) { echo " - 来源:" . Html::encode($model['origin']); } ?> - <?php if (!empty($post['author'])) { echo Html::a('<span class="glyphicon glyphicon-user"></span> ' . Html::encode($model['author']), ['/user/view', 'id' => $model['author']]); } else { echo '<span class="glyphicon glyphicon-user"></span> ' . Html::encode($model['username']); } ?>
</a> </div> <dl style="margin-bottom:0"> <dt> <?php echo Html::a(Html::encode($subBoard['name']), ['/forum/board/view', 'id' => $subBoard['id']]); ?> </dt> <dd class="hidden-xs" data-toggle="tooltip" data-placement="top" title="Thread Count"> <i class="glyphicon glyphicon-comment"></i> <?php echo Board::getThreadCount($subBoard['id']); ?> </dd> <dd class="hidden-xs"><i class="glyphicon glyphicon-time"></i> <?php echo Tools::formatTime(Board::getLastThread($subBoard['id'])['created_at']); ?> </dd> </dl> </td> <?php } ?> <?php $counter += 1; ?> <?php } ?> </tr> <?php
<img width="50" height="50" class="social-avatar pull-left" src="<?php echo Yii::getAlias('@avatar') . $user->avatar; ?> " /> <div class="profile-details"> <a class="user-name" href="<?php echo Url::toRoute(['/user/view', 'id' => $user->username]); ?> "> <?php echo Html::encode($user->username); ?> </a> <p> <em><?php echo Tools::formatTime($comment['created_at']); ?> </em> </p> </div> </div> <p class="content"> <?php if (!empty($comment['title'])) { ?> <h3><?php echo Html::a(Html::encode($comment['title']), ['/home/comment/view', 'id' => $comment['id']]); ?> </h3> <?php }