首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

dedecms调用discuz论坛帖子课程

2012-06-27 
dedecms调用discuz论坛帖子教程a href/dz/viewthread.php?tid[field:tid /]·[field:subject functio

dedecms调用discuz论坛帖子教程
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}

这样可以调特定板块的主题
论坛最新主题:<br/>
{dede:loop table="cdb_threads" if="fid=5 and displayorder!=-1" sort="tid" row="10"}
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}


这样可以显示精华帖。

论坛最新主题:<br/>
{dede:loop table="cdb_threads" if="fid=5 AND digest>0 and displayorder!=-1 " sort="tid" row="10"}
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}



这样又可以按查看次数排序:
论坛最新主题:<br/>
{dede:loop table="cdb_threads" if="fid=5 and displayorder!=-1" sort="views" row="10"}
<a href="/dz/viewthread.php?tid=[field:tid /]">
·[field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /])
</a>
<br/>
{/dede:loop}

热点排行