diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index 46393073..9b1deb44 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -93,6 +93,12 @@ class Article extends Common ]) ->bypk($id) ->find(); + if (!$detail->isEmpty()) { + $detail->release_time = date('Y-m-d H:i:s', strtotime($detail->release_time)); + if (cookie('think_lang') == 'en-us') { + $detail->release_time = 'Posted on ' . date('F j, Y', strtotime($detail->release_time)); + } + } View::assign('detail', $detail); // 获取分享配置相关 diff --git a/app/index/view/pc/article/detail.html b/app/index/view/pc/article/detail.html index 3cc13ac7..007ca723 100644 --- a/app/index/view/pc/article/detail.html +++ b/app/index/view/pc/article/detail.html @@ -3,164 +3,160 @@ {notempty name="detail.seo_title"}{$detail.seo_title}{else /}{__BLOCK__}{/notempty} {/block} {block name="seo"} -{notempty name="detail.seo_keywords"} - - -{else /} -{__BLOCK__} -{/notempty} + {notempty name="detail.seo_keywords"} + + + {else /} + {__BLOCK__} + {/notempty} {/block} {block name="style"} {/block} {block name="main"}
- -
-
-
-
-

{$detail.title}

-

{$detail.release_time}

-
- -
{$detail.content|raw}
-
- - - - {notempty name="comments"} -
-
- {:lang_i18n('评论')} - {volist name="comments" id="cm"} -
- {$cm.name}: -

{$cm.content}

-
- {/volist} -
-
- {/notempty} -
-
- {notempty name="share_config"} -
-

{:lang_i18n('分享')}

- -
- {/notempty} -
-

{:lang_i18n('留言')}

-
- {:lang_i18n('名称')} - - {:lang_i18n('电子邮箱')} - -

{:lang_i18n('您的电子邮件地址不会被公开')}

- {:lang_i18n('留言内容')} - -
{:lang_i18n('提交留言')}
-
-
-
-
- {notempty name="$recommends"} -
- -
-
-

{:lang_i18n('你可能还喜欢')}

-

-
- -
-
- {/notempty} + +
+
+
+
+

{$detail.title}

+

{$detail.release_time}

+
+ +
{$detail.content|raw}
+
+ + {notempty name="comments"} +
+
+ {:lang_i18n('评论')} + {volist name="comments" id="cm"} +
+ {$cm.name}: +

{$cm.content}

+
+ {/volist} +
+
+ {/notempty} +
+
+ {notempty name="share_config"} +
+

{:lang_i18n('分享')}

+ +
+ {/notempty} +
+

{:lang_i18n('留言')}

+
+ {:lang_i18n('名称')} + + {:lang_i18n('电子邮箱')} + +

{:lang_i18n('您的电子邮件地址不会被公开')}

+ {:lang_i18n('留言内容')} + +
{:lang_i18n('提交留言')}
+
+
+
+
+ {notempty name="$recommends"} +
+ +
+
+

{:lang_i18n('你可能还喜欢')}

+

+
+ +
+
+ {/notempty}
{/block} {block name="script"} {/block} \ No newline at end of file