面包屑输出:
<?php $fl = $this->question_info['category_info'];$type = "<a href=\"q/list_".$fl['id'].'">'.$fl['title'].'</a>';?>
<?php echo $type."->".$this->crumb['last']['name']?>
友情链接
根据 http://wenda.wecenter.com/question/24347 修改的
增加功能:在后台直接添加友链。
简单过滤。
修改了文件:
- default/admin/link/check.tpl.htm
- app/link/main.php
- app/link/ajax.php
- app/publish/main.php
V 模板
<?php if($this->s_topics){;?>
<div class="container category" style="padding:10px;">
<div class="mod-head common-head">
<h3><?php _e(关联话题);?></h3>
</div>
<div class="mod-body ">
<div class="col-sm-12 controls-row aw-topic-bar" style="color:#999;">
<?php foreach ( $this->s_topics AS $key => $val){;?>
<span class="topic-tag">
<?php echo '<a href="' . get_js_url('/topic/' . $val['topic_id']) . '" target="_blank">' . $val['topic_title'] . '</a>';?>
</span>
<?php };?>
</div>
</div>
</div>
<?php };?>
models/topic.php 848行
/**搜索词模糊调用**/
public function get_search_topics($contents_topic_title,$limit =20)
{
$cigen_ids =$this -> model('search')->search_topics($contents_topic_title,1,$limit);
$cou = count($cigen_ids);
if($cou >1)
{
return array_splice($cigen_ids,1,$cou-1);
}
}
app/topic/main.php 204行
/**话题模糊搜索**/
$search_topics = $this -> model('topic')->get_search_topics($contents_topic_title);
TPL::assign('s_topics', $search_topics);
搜索聚合页面:
已完成正在测试
阅读全文
收起全文