@@ -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',
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="card">
|
||||
<div class="card-header">最新话题</div>
|
||||
<div class="card-body">
|
||||
{if $arrTopic}
|
||||
<div class="commlist">
|
||||
<ul>
|
||||
{loop $arrTopic $key $item}
|
||||
<li><a href="{tsUrl('topic','show',array('id'=>$item['topicid']))}">{tsTitle($item['title'])}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
{else}
|
||||
<div class="c9">暂无话题</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
function topic(){
|
||||
|
||||
$arrTopic = aac('home')->findAll('topic',array(
|
||||
'isaudit'=>0,
|
||||
),'addtime desc','topicid,title',10);
|
||||
|
||||
include template('topic','topic');
|
||||
|
||||
}
|
||||
|
||||
addAction('home_index_right','topic');
|
||||
Reference in New Issue
Block a user