刪除smalltext這個簡介字段,然後每次查詢文章內容,並截取80個文字來作爲文章簡介,使用於一些對簡介無需自定義的網站。
支持指定數據表查詢。
函數:
function user_smalltext($id,$stb,$fontNume = 80,$tabe='news'){
global $empire,$dbtbpre;
$fr=$empire->fetch1("select newstext from {$dbtbpre}ecms_{$tabe}_data_{$stb} where id='{$id}'");
//自定義處理
if($tabe!='news'){
}
return mb_substr( strip_tags($fr['newstext']), 0, $fontNume, 'UTF-8');
}