dede織夢(mèng)函數(shù)詳解介紹:
[1] typeid='' 表示欄目ID,在列表模板和檔案模板中一般不需要指定,在封面模板中允許用","分開(kāi)表示多個(gè)欄目
[2] row='' 表示返回文檔列表總數(shù)
[3] col='' 表示分多少列顯示(默認(rèn)為單列);
[4] titlelen='' 表示標(biāo)題長(zhǎng)度
[5] infolen='' 表示內(nèi)容簡(jiǎn)介長(zhǎng)度
[6] imgwidth='' 表示縮略圖寬度
[7] imgheight='' 表示縮略圖高度
[8] type='' 表示檔案類型,其中空值、不使用這個(gè)屬性或type='all'時(shí)為普通文檔
type='commend'時(shí),表示推薦文檔,等同于 {dede:coolart}{/dede:coolart}
type='image'時(shí),表示必須含有縮略圖片的文檔,等同于{dede:imglist}{/dede:imglist}
{d ede:imginfolist}{/dede:imginfolist}
type='spec'時(shí),表示專題,等同于標(biāo)記{dede:specart}{/dede:specart}
以上屬性值可以聯(lián)合使用,如: type='commend image' 表示推薦的圖片文檔
[9] orderby='' 表示排序方式,默認(rèn)值是 senddate 按發(fā)布時(shí)間排列。
orderby='hot'或orderby='click'表示按點(diǎn)擊數(shù)排列
orderby='pubdate'按出版時(shí)間排列(即是前臺(tái)允許更改的時(shí)間值)"
orderby='sortrank'按文章的新排序級(jí)別排序(如果你想使用置頂文章則使用這個(gè)屬性)
orderby='id'按文章ID排序
orderby='postnum'按文章評(píng)論次數(shù)排序)
orderby='rank'隨機(jī)獲得指定條件的文檔列表
[10] orderway='' 值為 desc 或 asc ,指定排序方式是降序還是順向排序,默認(rèn)為降序。
[11] keyword='' 表示含有指定關(guān)鍵字的文檔列表,多個(gè)關(guān)鍵字用","分開(kāi)
[12] channelid='' 表示特定的頻道模型ID,內(nèi)置的頻道:專題(-1)、文章(1)、圖集(2)、Flash(4)、軟件(3)
[13] limit='起始,結(jié)束' 表示限定的記錄范圍,row屬性必須等于"結(jié)束 - 起始",mysql的limit語(yǔ)句是由0起始的,如
“limit 0,5”表示的是取前五筆記錄,“limit 5,5”表示由第五筆記錄起,取下五筆記錄,使用了本屬性后,row屬性將無(wú)效。
[14] att='數(shù)值' 表示自定義屬性值
[15] subday='天數(shù)' 表示在多少天以內(nèi)的文檔,通常用于獲取指定天數(shù)的熱門文檔、推薦文檔、熱門評(píng)論文檔等
[16] partsort='排列位數(shù)' 表示自動(dòng)獲得父欄目的所有子數(shù)中排列在第幾位的欄目ID,
標(biāo)記為 {dede:autolist}{/dede:autolist} 時(shí),使用本屬性才有效。
-----------------------------------------------------------------------------
function CheckLogin(){
var taget_obj = document.getElementById('_loginform')
myajax = new DedeAjax(taget_obj,false,false,"","","");
myajax.SendGet2("{dede:global name="cfg_memberurl"/}/loginsta.php");
DedeXHTTP = null;}
以下放在調(diào)用位置相應(yīng)
-----------------------------------------------------------------------------------------------
常用標(biāo)簽:
1.
[field:arcurl /] 文章地址
2.
[field:title /] 文章標(biāo)題
常用于首頁(yè)、欄目、文章列表頁(yè)
3.
[field:imglink/]
顯示縮略圖及鏈接地址
4
[field:info/] 文章簡(jiǎn)介
5
[field:description/] 文章簡(jiǎn)介 多用于文章列表頁(yè)
6.
[field:textlink/] 等價(jià)于[field:title /]
7.
[field:pubdate function=strftime('%m-%d',@me)/] 顯示文章發(fā)布時(shí)間,形式為月-日 例如:03-07
8.
[field:pubdate function="GetDateTimeMK(@me)"/] 詳細(xì)時(shí)間,形式為年-月-日 時(shí)-分-秒
9.
[field:filename /]等價(jià)于[field:arcurl /] 常用于欄目、文章列表頁(yè)
10.
[field:typelink /] 欄目地址.
11
[field:typename /] 欄目名稱
12
[field:postnum/] 評(píng)論條數(shù)
13.[field:source/] 來(lái)源
14.
[field:writer/] 作者
j15.
[field:litpic function="CkLitImageView(@me,120)"/] 提取文章縮略圖
16.
[field:click/] 文章點(diǎn)擊次數(shù)
17.
[field:phpurl/]/stow.php?arcID=[field:id/] 相應(yīng)文章加入收藏路徑 常用于欄目、文章列表頁(yè)2 }
18.
[field:phpurl/]/recommend.php?arcID=[field:id/] 推薦文章路徑 常用于欄目、文章列表頁(yè))
文章正文頁(yè)常用調(diào)用標(biāo)簽::
19.
{dede:field name="title"/} 文章標(biāo)題 多用于正文頁(yè)
20.
{dede:field name='pubdate' function='GetDateMk(@me)'/}顯示文章發(fā)布時(shí)間 多用正文頁(yè)
21.
{dede:field name='phpurl'/}/stow.php?arcID={dede:field name=ID/}相應(yīng)文章加入收藏路徑 多用于正文
22.
{dede:field name='phpurl'/}/recommend.php?arcID={dede:field name=ID/}推薦文章路徑多用于正文
23.
{dede:field name='source'/} 來(lái)源: }
24
{dede:field name='writer'/} 作者
25.
{{dede:field name='postnum'/}評(píng)論條數(shù)
26.
{dede:field name='phpurl'/}/feedback.php?arcID={dede:field name=ID/} 相應(yīng)文章所有評(píng)論鏈接
27.
{dede:field name='body'/} 文章內(nèi)容
28.
document.body.oncopy =function () {setTimeout(function () {var text =clipboardData.getData("text");if (text) {text =text + "/r/n參考鏈接:"+location.href;clipboardData.setData("text",text);} },100 ) }
4.文章正文評(píng)論調(diào)用
5.調(diào)用收藏夾,添加文章到各大網(wǎng)站收藏夾
收
color=#58c600>藏
color=#c00012>網(wǎng)
color=#327f00>:
href='javascript:u=location.href;t=document.title;c%20=%20""%20+%20(window.getSelection%20? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url="http://cang.baidu.com/do/add?it="+encodeURIComponent(t)+"&iu="+encodeURIComponent(u)+"&dc="+encodeURIComponent(c)+"&fr=ien#nw=1";window.open(url,"_blank","scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes"); void 0'>
alt=Baidu搜藏 src="/wm_img/baidu.gif" border=0>
href="javascript:window.open('http://shuqian.qq.com/post?title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=960,height=600,left=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)">
title=QQ書簽 alt=QQ書簽 src="/wm_img/qq.gif" border=0>
href="javascript:location.href='http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">
alt=Google書簽 src="/wm_img/google.gif" border=0>
href="javascript:location.href='http://del.icio.us/post?&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)">
title=Del.icio.us alt=Del.icio.us src="/wm_img/delicious.gif" :
border=0>
href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:'')d.getSelection?d.getSelection():'');void(keyit=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&img=http://www.h-strong.com/blog/logo.gif','keyit','scrollbars=no,width=475,height=575,status=no,resizable=yes'));keyit.focus();">
alt=POCO 網(wǎng)摘 src="/wm_img/poco.gif" border=0>
alt=Yahoo書簽 src="/wm_img/yahoo.gif" border=0>
href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:'')d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();">
alt=新浪ViVi src="/wm_img/vivi.gif" border=0>
href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:'')d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();">
alt=365Key網(wǎng)摘 src="/wm_img/365key.gif" border=0>
href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:'')d.getSelection?d.getSelection():'');void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','yesky','scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes'));yesky.focus();">
href="javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:'')document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));">
alt=和訊網(wǎng)摘 src="/wm_img/hexun.gif" border=0>
href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:'')d.getSelection?d.getSelection():'');void(live=window.open('https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url='+escape(d.location.href)+'&title='+escape(d.title)+'&top=1','live','scrollbars=no,status=no,resizable=yes'));live.focus();">
alt="Windows Live" src="/wm_img/live.gif" border=0>
# m8 O* S9 j2 f+ l2 @: U$ N$ ~3 y4 B5 m) `' U
title=鼠標(biāo)選中部分作為描述,提交到diglog.com
onclick="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:'')d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.diglog.com/submit.aspx?title='+escape(d.title)+'&url='+escape(d.location.href)+'&description='+escape(t),'keyit','scrollbars=yes,width=500,height=500,left=65,top=20,status=no,resizable=yes'));keyit.focus();"
href="javascript://">
border=0>
其他調(diào)用:
{dede:mynews row='7' titlelen='30'}
{/dede:mynews}
{dede:group row="8" orderby='threads'}
[field:groupname/]
{/dede:group}
"
圖片調(diào)用:{dede:flink type='image' row='1' col='9' titlelen='22'/}
文字調(diào)用:{dede:flink type='text' row='2' col='9' titlelen='24'/}
[
{dede:hotwords num='20' subday='30'/}
{dede:loop table='pw_threads' sort='tid' row='8' if=''}
·[field:subject function="cn_substr('@me',30)"/]
([field:lastpost function="date('m-d H:M','@me')"/])
{dede:loop}
-----------------------------------文章圖片幻燈片顯示------------------------------------>
linkarr = new Array();
picarr = new Array();
textarr = new Array();
var focus_width=240;
var focus_height=180;
var text_height=24;
var pics = "";
var links = "";
var texts = "";
var swf_height = focus_height+text_height;
var defJpeg = "{dede:global name='cfg_phpurl'/}/img/jpeg.jpg";
{dede:arclist type='image' att='3' row='5' function='FormatScript(@me)'}
linkarr[[field:global name=autoindex/]] = "[field:arcurl/]
picarr[[field:global name=autoindex/]] = "[field:picname/]
textarr[[field:global name=autoindex/]] = "[field:title/]";
{/dede:arclist}
for(i=1;i
if(picarr.indexOf("jpg")==-1 && picarr.indexOf("JPG")==-1) picarr = defJpeg;
if(pics=="") pics = picarr;
else pics += "|"+picarr;
}
for(i=1;i
if(links=="") links = linkarr;
else links += "|"+linkarr;
}
for(i=1;i
if(texts=="") texts = textarr;
else texts += "|"+textarr;
}
document.write(''
Copyright@ 2011-2016 版權(quán)所有:大連千億科技有限公司 遼ICP備11013762-3號(hào) google網(wǎng)站地圖 百度網(wǎng)站地圖 網(wǎng)站地圖
公司地址:大連市沙河口區(qū)中山路692號(hào)辰熙星海國(guó)際2317 客服電話:0411-39943997 QQ:2088827823 37482752
法律聲明:未經(jīng)許可,任何模仿本站模板、轉(zhuǎn)載本站內(nèi)容等行為者,本站保留追究其法律責(zé)任的權(quán)利! 隱私權(quán)政策聲明