@@ -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,24 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
function hottopic(){
|
||||
|
||||
$arrHotTopics = aac('group')->findAll('group_topic',array(
|
||||
'isaudit'=>0,
|
||||
),'count_comment desc,count_view desc,isrecommend desc,addtime desc','topicid,title',25);
|
||||
|
||||
echo '<div class="card">';
|
||||
echo '<div class="card-header">推荐话题</div>';
|
||||
echo '<div class="card-body">';
|
||||
echo '<div class="commlist">';
|
||||
echo '<ul>';
|
||||
foreach($arrHotTopics as $key=>$item){
|
||||
echo '<li><a href="'.tsUrl('group','topic',array('id'=>$item['topicid'])).'">'.tsTitle($item['title']).'</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
|
||||
addAction('home_index_right','hottopic');
|
||||
Reference in New Issue
Block a user