Support jOOmla! Autoit!
 
不装组件也让你的文章显示出关键字来--[1] 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2006-07-31 | View Count View: 15924 | Digg Count Digg: 64

在编辑文章的时候,meta 参数里有关键字项, 那么为什么不直接把他提取出来呢?

修改方法:

 components/com_content/content.php 1330行下面[或$params = new mosParameters( $row->attribs );上行]加

//以下加上是为了获取tags
$links = '';
$keys = explode( ',', $row->metakey );
foreach ($keys as $key) {
 $key = trim( $key );
 if ($key) { 
 $link="index.php?option=com_search&searchphrase=all&ordering=newest&searchword=";
 $link.=rawurlencode($key);
 $links.="<a href='".$link."'>".$key."</a>&nbsp;&nbsp;"; 
 }
}
if ($links!=""){
 $row->fulltext.="<div align='right'  style='background-color:#efefef';>Tags: ". $links ."</div>";
}
//结束 

在你编辑文章的时候,如果是多个关键字就用英文半角的逗号,分开就可以了。当然你有写这个的话,那么默认有的“相关文章” 模块也就有内容的了!


Permanent URL: http://www.autoit.cn/index.php/content/view/64/25.html

Shares: Google书签 Yahoo书签 雅虎收藏夹 365Key网摘 新浪ViVi 百度收藏 天极网摘 diglog 和讯网摘 POCO网摘 YouNote网摘 博拉网 天下图摘 spurl blogmarks BlinkList reddit digg Del.icio.us   |  Tags: 关键字  tags  

« First « 1 2 » Last »
 
vm模块中显示产品图片的名称放在图下方   增加文章右上角三个小图标被点击的统计