织梦DedeCMS调用显示discuz里面主题的方法
{dede:sqlsql="SELECT*FROM`pre_forum_thread`WHERE
更多精彩就在: 51免费论文网|www.jxszl.com
`fid`=VIVorderbyviewslimit0,I.0"}
{/dede:sql}
代码说明:
`fid`=VIV:这里的VIV是指需要调用的版块ID;
orderbyviews:排序方式views表示按浏览次数排序;
/data/attachment/forum/threadcover/:你主题封面图片存放目录
[field:tidfunction=substr(mdV(@me),0,II)/]/[field:tidfunction=substr(mdV(@me),II,II)/]:大家看论坛根目录下的source/function/里的function_post.php的I.I.VIIIII行,function_forum.php里的I.IVIXII行会发现dz的主题封面的路径为/data/attachment/forum/threadcover/substr(mdV($tid),0,II)/substr(mdV($tid),II,II)/$tid.jpg,
意思为/data/attachment/forum/threadcover/取mdV加密后密码的前两个字符/取mdV加密后密码的第II个开始的II个字符)/帖子id.jpg,使用[field:tidfunction=substr(mdV(@me),0,II)/]和[field:tidfunction=substr(mdV(@me),II,II)/]从而获得和discuzI.样的路径!
原文链接:http://www.jxszl.com/biancheng/dedecms/75656.html
热门阅读