切换导航条
此项目
正在载入...
登录
潘浩文
/
scoreshop
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
6 years ago
提交
c98ec2033904721fd3c96fa1ce9d1ce336336e17
1 个父辈
cc712315
1 个管道 的构建
通过
耗费 1 秒
1
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
7 行增加
和
98 行删除
app/portal/controller/ArticleController.php
public/themes/simpleboot3/portal/article.html
app/portal/controller/ArticleController.php
查看文件 @
c98ec20
...
...
@@ -177,6 +177,7 @@ tpl;
foreach
(
$data
as
$k
=>
$v
){
$arr
[
$v
[
'time'
]][]
=
$v
;
}
print_r
(
$arr
);
$this
->
assign
(
'list'
,
$data
);
return
$this
->
fetch
(
':article'
);
}
}
...
...
public/themes/simpleboot3/portal/article.html
查看文件 @
c98ec20
...
...
@@ -18,103 +18,11 @@
<hook
name=
"before_head_end"
/>
</head>
<body
class=
"body-white"
>
<include
file=
"public@nav"
/>
<div
class=
"container tc-main"
>
<div
class=
"row"
>
<div
class=
"col-md-9"
>
<div
class=
"tc-box article-box"
>
<h2>
{$article.post_title}
</h2>
<div
class=
"article-infobox"
>
<span>
{:date('Y-m-d H:i',$article.published_time)} by {$article.user.user_nickname}
</span>
<span>
<a
href=
"javascript:;"
><i
class=
"fa fa-eye"
></i><span>
{$article.post_hits}
</span></a>
<a
href=
"{:url('portal/Article/doLike',array('id'=>$article['id']))}"
class=
"js-count-btn"
><i
class=
"fa fa-thumbs-up"
></i><span
class=
"count"
>
{$article.post_like}
</span></a>
<a
href=
"{:url('user/favorite/add')}"
class=
"js-favorite-btn"
data-title=
"{:base64_encode($article.post_title)}"
data-url=
"{:cmf_url_encode('portal/Article/index',array('id'=>$article['id']))}"
data-table=
"portal_post"
data-id=
"{$article['id']}"
>
<i
class=
"fa fa-star-o"
></i>
</a>
</span>
</div>
<hr>
<div
id=
"article_content"
>
{$article.post_content}
</div>
<if
condition=
"!empty($article['post_source'])"
>
<div>
<b>
注:本文转载自{$article.post_source},转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如有侵权行为,请联系我们,我们会及时删除。
</b>
</div>
</if>
<php>
$after_content_hook_param=[
'object_id'=>$article['id'],
'table_name'=>'portal_post',
'object_title'=>$article['post_title'],
'user_id'=>$article['user_id'],
'url'=>cmf_url_encode('portal/Article/index',array('id'=>$article['id'],'cid'=>$category['id'])),
'object'=>$article
];
</php>
<hook
name=
"after_content"
param=
"after_content_hook_param"
/>
<php>
$comment_hook_param=[
'object_id'=>$article['id'],
'table_name'=>'portal_post',
'object_title'=>$article['post_title'],
'url'=>cmf_url_encode('portal/Article/index',array('id'=>$article['id'],'cid'=>$category['id']))
];
$comment=hook_one('comment',$comment_hook_param);
</php>
<if
condition=
"empty($comment) && cmf_get_current_admin_id()"
>
<div
style=
"border: 1px dashed #ddd;min-height: 200px;padding-top: 50px;"
>
<div
class=
"alert alert-warning"
role=
"alert"
>
此区域这为评论区,请安装评论插件!
<br>
<em>
注:普通用户不会看到此提示!
</em>
</div>
</div>
</if>
{$comment}
</div>
</div>
<div
class=
"col-md-3"
>
<div
class=
"tc-box first-box"
>
<div
class=
"headtitle"
>
<h2>
热门文章
</h2>
</div>
<div
class=
"ranking"
>
<php>
$hot_articles=[];
</php>
<ul
class=
"list-unstyled"
>
<portal:articles
limit=
"5"
order=
"post.post_hits DESC"
>
<php>
$top=$key
<3
?"
top3
"
:
"";</
php
>
<li
class=
"{$top}"
>
<i>
{$key+1}
</i>
<a
title=
"{$vo.post_title}"
href=
"{:url('portal/article/index',array('id'=>$vo['id']))}"
>
{$vo.post_title}
</a>
</li>
</portal:articles>
</ul>
</div>
</div>
</div>
</div>
<include
file=
"public@footer"
/>
<div>
<foreach
name=
"list"
item=
"vo"
key=
"key"
>
<div>
{$vo.key}
</div>
<div>
{$vo.post_title}
</div>
</foreach>
</div>
<include
file=
"public@scripts"
/>
...
...
请
注册
或
登录
后发表评论