<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指定板塊

    作者:月光邊境 瀏覽:281 發布時間: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為數據庫和表名。

      Fid是板塊的id。

      第二種方法:

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

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

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

      如果是discuz 靜態論壇,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 靜態論壇最新主題 的方法:(偽靜態)

      {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、論壇指定版塊帖子調用方法: (偽靜態)

      { 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、論壇調精華主題調用代碼如下 :(偽靜態)

      {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. 如果想調用某個板塊的精華主題 代碼如下:(偽靜態)

      {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、調用的帖子列表這可以按查看 次數排序,(偽靜態)

      {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" 就是控制按照查看 次數排序的代碼

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

      { 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/>

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

      論壇最新主題: <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 數據表名已經變化,所以table="cdb_threads"要改成table="pre_forum_thread"。

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

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

      discuz動態論壇,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靜態論壇最新方法:

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

      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. 我調用的是最新發布的帖子。調用代碼如下:

      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 其中的**********是你的數據庫名稱 ,另外還要把代碼中的shequ修改為你的 discuz x的安裝目錄名稱。你的DZX目錄是什么就寫什么,這 點很重要!如果你是調用的靜態的,那么就把代碼中的鏈接改為的格式就可以了。 根據你的網站需要你還可以修改其中的調用條數row='16'

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

      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. 最后,下面發一個DEDE調用 discuz x的家園home.php最新日志的代碼調用代碼如下(動態調用演 示):

      10. {dede:loop table='你的數據庫名.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. 同樣你要修改你的數據庫名,或你安裝DZX的目錄名,其實都很簡單 ,以前DEDE調用DZ的時候數據表名不一樣,論 壇的cdb_threads數據表名變成了現在的pre_forum_thread UCHOME的 uchome_blog變成了現在的pre_home_blog。


    99这里只精品热在线获取| 国内精品久久久久影院免费| 手机看片福利日韩国产| 无码aⅴ精品一区二区三区 | 国产精品色午夜视频免费看| 一夲道无码人妻精品一区二区| 亚洲欧洲久久久精品| 国产精品日韩AV在线播放| 国产精品资源一区二区| 精品国产乱码久久久久久| 亚洲国产精品成人综合色在线| …久久精品99久久香蕉国产| 亚洲麻豆精品果冻传媒| 精品一区二区三区波多野结衣| 99re在线视频精品| 久久99国产精品尤物| 182tv精品视频在线播放| 精品少妇无码AV无码专区| 精品亚洲成AV人在线观看| 2022国产成人精品福利网站| 久久亚洲精品成人无码网站| 亚洲国产成人精品久久| 久クク成人精品中文字幕| 玖玖精品在线视频| 无码国产精品一区二区免费| 最新日韩精品中文字幕| 国产日产欧产精品精品浪潮| 精品国产柚木在线观看| 国产精品伦理一二三区伦理 | 日韩免费福利视频| 亚欧无码精品无码有性视频| 国产精品亚洲αv天堂无码| 国产亚洲午夜高清国产拍精品| 亚洲伊人久久精品影院| 国产精品免费观看调教网| 熟女精品视频一区二区三区| 精品人无码一区二区三区| 2017国产精品自拍| 精品少妇人妻AV免费久久洗澡| 国产午夜精品福利| 老司机精品视频免费|