国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > php开源 > DedeCMS > phpcms首页get调用phpwind版块最新帖子

phpcms首页get调用phpwind版块最新帖子

来源:程序员人生   发布时间:2013-10-10 11:57:45 阅读次数:3023次
如何在phpcms首页get调用phpwind论坛某一版块的最新帖子?要求标题带有地址链接

研究一下,已经自己搞定

某版块最新10条正确表达:
        {get dbsource="pw" sql="SELECT `tid`,`fid`,`author`,`subject`,`lastpost` FROM `pw_threads` WHERE `fid` = '13'  ORDER BY  `lastpost` DESC" rows="10" }
          <li><a href="../phpwind/read.php?tid-{$r[tid]}.html" }">{str_cut($r[subject], 45)}</a></li>
        {/get}

某版块精华10条正确表达:
        {get dbsource="pw" sql="SELECT `tid`,`fid`,`author`,`subject`,`digest` FROM `pw_threads` WHERE `fid` = '13'  ORDER BY  `digest` DESC" rows="10" }
          <li><a href="../phpwind/read.php?tid-{$r[tid]}.html" }">{str_cut($r[subject], 45)}</a></li>
        {/get}

多个版块最新10条正确表达:
        {get dbsource="pw" sql="SELECT `tid`,`fid`,`author`,`subject`,`lastpost` FROM `pw_threads` WHERE `fid`IN(3,22,26) ORDER BY  `lastpost` DESC" rows="10" }
          <li><a href="../phpwind/read.php?tid-{$r[tid]}.html" }">{str_cut($r[subject], 45)}</a></li>
        {/get}
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生