分类: 系统运维
2005-07-04 07:59:48
搞定了,要修改好几个地方:
第一个地方是在inc下的functions.php
一,打开function.php
加入以下涵数:
// ==============================================
// <<-- manufacturer holen -->>
// ==============================================
function fetch_manufacturer($param){
global $THEME, $lang, $area;
$tmpl = new Koobi("templates/");
$sql = new dbc("SELECT ctime,id,name,url,hits FROM ".PREFIX."_manufacturer order by ctime limit $param[limit]");
$items = array();
while( $row=$sql->fetchrow()){
$row->website = $row->url;
$pos = strpos ($row->website, ");
if ($pos === false) { $row->website = ".$row->website; }
$row->user = fetchusername($row->uid);
$row->mftime = mygmt($row->ctime);
array_push($items,$row);
}
$tmpl->assign('items', $items);
$tmpl->assign('area', $area);
$tmpl->assign('lang', $lang);
$tmpl->assign('theme', $THEME);
$mf = $tmpl->fetch("$THEME/manufacturer/mf_new.tpl");
return $mf;
}
?>
$this->register_function('fetch_manufacturer','fetch_manufacturer');
?>
{lastthreads forums='1,2,3,4,5' limit='5'}
{fetch_manufacturer limit='5'}
{$mf->name} | {$mf->mftime} | {$mf->hits} |