<ul id="g60s4"><pre id="g60s4"></pre></ul>
<strong id="g60s4"><nav id="g60s4"></nav></strong>
<ul id="g60s4"></ul>
  • <tr id="g60s4"></tr>
  • 
    
  • 或者

    織夢DedeCMS調用discuz X2指定板塊

    作者:月光邊境 瀏覽:280 發(fā)布時間:2018-05-09
    分享 評論 0

    第一種方法:

      {dede:sql sql="select * from ultrax.pre_forum_ thread where fid=37 limit 0,10"}

      <li><a href="/bbs/forum.php?mod=viewthread&tid=[field:tid /] ">

      [field:subject function="cn_substr('@me',60)" /] [field:lastpost function="date('m-d H:M','@me')" /] </a></li>

      {/dede:sql}

      ultrax.pre_forum_ thread為數(shù)據(jù)庫和表名。

      Fid是板塊的id。

      第二種方法:

      1. 網上的教程都是針對 Dz7.0, dx1.0 dx1.5 dx2.0 數(shù)據(jù)表名已 經變化,所以table="cdb_threads"要改成table="pre_forum_thread"。

      2. 一般論壇都安裝在BBS子目錄下,所以引用的地址應改為:

      &n bsp; 如果是discuz 動態(tài)論壇,href="[field:global.cfg_cmspath/]/bbs/viewthread.php? tid=[field:tid /]”

      如果是discuz 靜態(tài)論壇,href="[field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1-1.html"

      說明:[field:global.cfg_cmspath/] 為dede安裝目錄,你也可以使用絕對路 徑,如:

      href=你 的網站/bbs/thread-[field:tid /]-1-1.html

      1. dede調用 Dx1.0之后,包括 dx1.5, dx2.0 靜態(tài)論壇最新主題 的方法:(偽靜態(tài))

      {dede:loop table="pre_forum_thread" if="displayorder!=- 1" sort="tid" row="10"}<a href=" [field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1- 1.html">?[field:subject function="cn_substr ('@me',30)" /]</a><br/>{/dede:loop}

      2、論壇指定版塊帖子調用方法: (偽靜態(tài))

      { dede:loop table=“pre_forum_thread” if="fid=1 or fid=2 and displayorder!=-1" sort="tid" row="6" }

      <a href=" [field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1-1.html" target="_blank">

      · [field:subject function="cn_substr(' @ me',50)" /] </a>

      <br/>

      { /dede:loop }

      其中的fid=1 or fid=2是論壇主題分類id,可以按照自己要求來修改,如 果是一個分類就直接寫fid=x

      3、論壇調精華主題調用代碼如下 :(偽靜態(tài))

      {dede:loop table=“pre_forum_thread” if="displayorder!=-1" sort="tid" row="10"}

      <a href=" [field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1- 1.html">

      · [field:subject function="cn_substr('@me',30)" /] ([field:lastpost function="date('m-d H:M','@me')" /]) </a>

      <br/>

      {/dede:loop}

      4. 如果想調用某個板塊的精華主題 代碼如下:(偽靜態(tài))

      {dede:loop table=“pre_forum_thread” if="fid=5 and displayorder!= -1" sort="tid" row="10"}

      <a href=" [field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1- 1.html">

      [field:subject function="cn_substr('@me',30)" /]([field:lastpost function="date('m-d H:M','@me')" /]) </a>

      <br/>

      {/dede:loop}

      其中的fid=5是論壇主題分類id,可以按照自己要求來修改,

      如果想調用論壇所有 的板塊的最新精華主題只要去掉fid=5 and 就可以了。

      4、調用的帖子列表這可以按查看 次數(shù)排序,(偽靜態(tài))

      {dede:loop table=“pre_forum_thread” sort="views" row="10"}

      <a href=" [field:global.cfg_cmspath/]/bbs/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}

      其中sort="views" 就是控制按照查看 次數(shù)排序的代碼

      5、論壇置頂版塊帖子調用方法舉 例:(偽靜態(tài))

      { dede:loop table=“pre_forum_thread” sort="dateline" if="fid='3' and typeid='51'" row="10" }

      <a href=" [field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1-1.html" target="_blank">

      · [field:subject function="cn_substr(' @ me',30)" /]</a> <br>

      { /dede:loop }

      論壇最新主題調用:

      {dede:loop table=" pre_forum_thread " 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}

      調用特定板塊的主題

      {dede:loop table=" pre_forum_thread" 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 table=" pre_forum_thread " 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/>

      調用論壇指定板塊精 華帖(按查看次 數(shù)排序):

      論壇最新主題: <br/>

      {dede:loop table=" pre_forum_thread " 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}

      以往的方法都是針對Dz7.0,dx1.0 dx1.5 dx2.0 數(shù)據(jù)表名已經變化,所以table="cdb_threads"要改成table="pre_forum_thread"。

      2. 開啟了偽靜態(tài)論壇與動態(tài)論壇引用地址 是不一樣的。假設論壇安裝在BBS子目錄下,那么引用的地址應改為:

      discuz靜態(tài)論壇,href="[field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1-1.html"

      discuz動態(tài)論壇,href="[field:global.cfg_cmspath/]/bbs/viewthread.php?tid=[field:tid /]”

      說明: [field:global.cfg_cmspath/]為dede安裝目錄,你也可以使用絕對路徑,如:

      href=http://www.piaoxian.net/bbs/thread-[field:tid /]-1 -1.html

      href=http://www.piaoxian.net/thread-[field:tid /]-1- 1.html (開啟bbs為子域名)

      結合網上關于dede調用dz7.0以前的教程,得出dede調用 dx靜態(tài)論壇最新方法:

      1. dede調用 Dx1.0之后,包括dx1.5,dx2.0 靜態(tài)論壇最新主題的方法 :(偽靜態(tài))

      1. {dede:loop table="pre_forum_thread" sort="tid" row="10"}<a href=" [field:global.cfg_cmspath/]/bbs/thread-[field:tid /]-1- 1.html">?[field:subject function="cn_substr ('@me',30)" /]</a><br/>{/dede:loop}

      2. 我調用的是最新發(fā)布的帖子。調用代碼如下:

      3. <UL>

      {dede:loop table='**********.pre_forum_thread' sort='tid' row='16' }

      <LI><A href="/shequ/forum.php? mod=viewthread&tid=[field:tid /]" target=_blank> [field:subject function='cn_substr(@me,32)'/]</A> </LI>

      {/dede:loop}

      </UL>

      4. 說明:**********.pre_forum_thread 其中的**********是你的數(shù)據(jù)庫名稱 ,另外還要把代碼中的shequ修改為你的 discuz x的安裝目錄名稱。你的DZX目錄是什么就寫什么,這 點很重要!如果你是調用的靜態(tài)的,那么就把代碼中的鏈接改為的格式就可以了。 根據(jù)你的網站需要你還可以修改其中的調用條數(shù)row='16'

      5. 上面是動態(tài)內容的調用,如果你的論壇做了偽靜態(tài)處 理,那么調用的鏈接、修改下就可以了!調用演示如下:

      6. <UL>

      {dede:loop table='**********.pre_forum_thread' sort='tid' row='16' }

      <LI><A href="/shequ/thread-[field:tid /]-1- 1.html" >[field:subject function='cn_substr(@me,32)'/] </A> </LI>

      {/dede:loop}

      </UL>

      7. 如果調用的需要新窗口打開的話,可以在 shequ/thread-[field:tid /]-1- 1.html后面加上 target="_blank" 例如:

      8. <UL>

      {dede:loop table='**********.pre_forum_thread' sort='tid' row='16' }

      <LI><A href="/shequ/thread-[field:tid /]-1- 1.html" target=_blank>[field:subject function='cn_substr (@me,32)'/]</A> </LI>

      {/dede:loop}

      </UL>

      9. 最后,下面發(fā)一個DEDE調用 discuz x的家園home.php最新日志的代碼調用代碼如下(動態(tài)調用演 示):

      10. {dede:loop table='你的數(shù)據(jù)庫名.pre_home_blog' sort='blogid' row='12'}

      <LI>·<A href="/你的DZ X安裝子目錄名/home.php?mod=space&uid=[field:uid/]&do=blog&id= [field:blogid/]"

      target=_blank>[field:subject function='cn_substr(@me,28)'/] </A> </LI>

      {/dede:loop}

      11. 同樣你要修改你的數(shù)據(jù)庫名,或你安裝DZX的目錄名,其實都很簡單 ,以前DEDE調用DZ的時候數(shù)據(jù)表名不一樣,論 壇的cdb_threads數(shù)據(jù)表名變成了現(xiàn)在的pre_forum_thread UCHOME的 uchome_blog變成了現(xiàn)在的pre_home_blog。


    亚洲午夜成人精品无码色欲 | 99re这里有免费视频精品| 国产精品永久久久久久久久久| 美日韩一区二区三区| 日韩精品一区二区三区在线观看| 国产精品久久久久久久久久免费 | 人妻少妇精品无码专区动漫| 国产精品久久久久久| 中文精品久久久久国产网址| 日韩精品极品视频在线观看免费| 久热香蕉精品视频在线播放 | 久久久g0g0午夜无码精品| 国产精品成人在线| 国产精品福利一区二区| 国美女福利视频午夜精品| 国产短视频精品一区二区三区| 精品免费久久久久久久| 国产福利91精品一区二区| 国产私拍福利精品视频推出| avtt天堂网久久精品| 免费精品国产自产拍在| 最新欧美精品一区二区三区| 欧美精品久久天天躁| 高清国产一级精品毛片基地| 高清国产精品久久| 国产精品久久精品福利网站| 国产成人无码aa精品一区| vvvv99日韩精品亚洲| 亚洲高清日韩精品第一区| 中文字幕日韩一区| 高清免费久久午夜精品| 国产精品高清免费网站| 中文字字幕在线精品乱码app| 99精品视频在线观看| 国产乱子伦精品无码码专区| 久久精品人人爽人人爽| 99热精品在线免费观看| 精品久久久久久无码专区不卡| 思思re热免费精品视频66| 黑巨人与欧美精品一区| 国产精品2018|