|
不装组件也让你的文章显示出关键字来--[2]
|
|
|
|
Author: Autoit | Date:2006-11-23 | View: 9960 | Digg: 54 |
|
在Blog页也能出现的方法: 放在 修改时间的位置, 所以后台把 是否显示修改时间 选是! [不想在加改什么...了,直接使用现有的用.] 如果你有用过这个是直接改 content.php 的话, 请把改的 content.php 里面的删除. 这次改的是 components/com_content/content.html.php 搜 : function ModifiedDate [大概 860行左右] 在</tr> 下面加: <?php //以下加上是为了获取tags By Autoit
$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> ";
}
}
if ($links!=""){
echo "<tr><td colspan='2' align='right' class='tags'>";
echo "Tags: ".$links;
echo "</td></tr>";
}
//获取tags结束 By Autoit
?>如果你不显示 "修改时间" 的话,把 function ModifiedDate 段里的: <tr>
<td colspan="2" align="left" class="modifydate">
<?php echo _LAST_UPDATED; ?> ( <?php echo $mod_date; ?> )
</td>
</tr>替换为:
<!--<tr>
<td colspan="2" align="left" class="modifydate">
<?php echo _LAST_UPDATED; ?> ( <?php echo $mod_date; ?> )
</td>
</tr>--> Ok. End By Autoit.
Permanent URL: http://www.autoit.cn/index.php/content/view/89/25.html
|