建站帮助

诚信合作, 高质专业!

Phpcms V9调用Discuz X2.5论坛最新帖、最热帖、热门版块排行方法

2012-08-21 09:14:43 浏览 我要评论

具体代码为:

{pc:get sql="SELECT * FROM discuzx.pre_common_member order by credits desc" num="10" cache="" return="data"}
{loop $data $key $val}
<span>
<a href="http://论坛网址/space-uid-{$val[uid]}.html"><img alt="{$val[username]}" src="http://论坛网址/uc_server/avatar.php?uid={$val[uid]}&size=small" /></a>
<a href="http://论坛网址/space-uid-{$val[uid]}.html">{str_cut($val[username],9,'')}</a>
</span>
{/loop}
{/pc}

 

四、Phpcms V9调用Discuz X2.5论坛热门版块排行:

{pc:get sql="SELECT * FROM discuzx.pre_forum_forum order by threads desc" num="10" cache="" return="data"}
{loop $data $key $val}
<li><span><a href="http://论坛网址/forum-{$val[fid]}-1.html">{$val[name]}</a>& amp; lt;/span> <span><!--<span class="fatieshu">{$val[threads]}</span>主题 -->共<span class="fatieshu">{$val[posts]}</span>帖 今<span class="fatieshu">{$val[todayposts]}</span>帖</span>< /li>
{/loop}
{/pc}

 

五、Phpcms V9调用Discuz X2.5论坛最热帖:

{pc:get sql="SELECT * FROM discuzx.pre_forum_thread order by views desc" num="6" cache="" return="data"}
{loop $data $key $val}
<li><a href="http://论坛网址/thread-{$val[tid]}-1-1.html">{str_cut($val[subject],54,'')}</a></li>
{/loop}
{/pc}

 

六:Phpcms V9调用Discuz X2.5论坛最新帖:

{pc:get sql="SELECT * FROM discuzx.pre_forum_thread order by tid desc" num="6" cache="" return="data"}
{loop $data $key $val}
<li><a href="http://论坛网址/thread-{$val[tid]}-1-1.html">{str_cut($val[subject],54,'')}</a></li>
{/loop}
{/pc}

Enjoy it! 上面的Phpcms V9调用Discuz X2.5论坛数据代码,你不妨试试,碰到问题可以联系CMSYOU探讨!

我要收藏
点个赞吧

相关阅读

本月热门

精选推荐

在线客服

扫一扫,关注我们

扫一扫,关注我们