begin of thinksaas 3.68

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2023-06-22 13:33:25 +08:00
commit 963ec1b2ea
2746 changed files with 331806 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
<?php
defined('IN_TS') or die('Access Denied.');
//插件信息
return array(
'hook'=>'home_index_right', //钩子
'name' => '首页最新文章',
'version' => '1.0',
'desc' => '首页最新文章',
'url' => 'http://www.thinksaas.cn',
'email' => 'thinksaas@qq.com',
'author' => '邱君',
'author_url' => 'http://www.thinksaas.cn',
'isedit' => '0',
);
+16
View File
@@ -0,0 +1,16 @@
<div class="card">
<div class="card-header">最新文章</div>
<div class="card-body">
{if $arrArticle}
<div class="commlist">
<ul>
{loop $arrArticle $key $item}
<li><a href="{tsUrl('article','show',array('id'=>$item['articleid']))}">{$item['title']}</a></li>
{/loop}
</ul>
</div>
{else}
<div class="c9">暂无文章</div>
{/if}
</div>
</div>
+24
View File
@@ -0,0 +1,24 @@
<?php
defined('IN_TS') or die('Access Denied.');
function article(){
$arrArticle = aac('article')->findAll('article',array(
'isaudit'=>0
),'addtime desc','articleid,cateid,userid,title,gaiyao,path,photo,count_view,count_comment,addtime',10);
foreach($arrArticle as $key=>$item){
$arrArticle[$key]['title'] = tsTitle($item['title']);
$arrArticle[$key]['content'] = tsDecode($item['content']);
$arrArticle[$key]['user'] = aac('user')->getSimpleUser($item['userid']);
if($item['cateid']){
$arrArticle[$key]['cate'] = aac('article')->find('article_cate',array(
'cateid'=>$item['cateid'],
));
}
}
include template('article','article');
}
addAction('home_index_right','article');