帝国CMS列表页显示判断文章来源带连接的方法

admin 2024年1月19日13:55:54帝国cms技巧评论1,257 次浏览阅读模式

内容摘要

帝国CMS列表页显示判断文章来源带连接的方法

文章正文

在列表内容模板里面写如下代码即可!

$userr=$empire->fetch1("select befrom from {$dbtbpre}ecms_news_data_{$r[stb]} where id='$r[id]'");

if(empty($userr[befrom]))

{

$userr[befrom]='IDC笔记'; //没有填写来源显示

}

if($userr[befrom])

{

$userr[befrom]=ReplaceBefrom($userr[befrom]);

}

$listtemp='

[!--tt.name--]   [!--title--]

[!--newstime--]      来源于: '.$userr[befrom].'

[!--smalltext--]... [查阅全文]

';

代码注释

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2024年1月19日13:55:54
  • 转载请务必保留本文链接:https://anyun.org/a/webtips/ecmstips/2024/0119/17604.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: