Dede首页调用代码大全(含连载、分类信息、圈子、会员、问答)
代码:
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
{dede:sql sql="Select id,bookname,author,pubdate,body,litpic From dede_story_books order by id desc limit 0,10"}
<td><a href="/book/[field:id function='DedeID2Dir(@me)'/]/[field:bookname function='GetPinyin(@me)'/]-[field:id/].html"><img src="[field:litpic/]" border="0" width="75" height="100" /></a><br /><a href="/book/[field:id function='DedeID2Dir(@me)'/]/[field:bookname function='GetPinyin(@me)'/]-[field:id/].html">[field:bookname function="cn_substr('@me',12)"/]</a>
</td>
{/dede:sql}
</tr>
</table>
功能:最新连载内容调用,含栏目名称、书名、章节名、发布时间。
代码:
<table width="688" border="0" cellpadding="0" cellspacing="0">
{dede:bookcontentlist row='10' booktype='0' orderby='lastpost' author='' keyword=''}
<tr>
<td align="left" width="30"></td>
<td width="300" align="left">[field:cataloglink/] [field:booklink/]</td>
<td width="318" align="left">[field:contentlink/]</td>
<td width="40" align="right">[field:lastpost function="GetDateMk(@me)"/]</td>
</tr>
{/dede:bookcontentlist}
</table>
功能:热门图书调用
代码:
{dede:booklist row='5' booktype='0' titlelen='10' imgwidth='80' imgheight='100' orderby='weekcc'}[field:imglink /]{/dede:booklist}
功能:推荐图书调用
代码:
{dede:booklist row='5' booktype='0' titlelen='10' imgwidth='80' imgheight='100' orderby='commend'}[field:imglink /]{/dede:booklist}
分类信息
功能:调用地区与类型
代码:
{dede:infolink}
<b>地区:</b>[field:nativeplace /]<br />
<b>类 型:</b>[field:infotype /]
{/dede:infolink}
功能:调用最新信息
代码:{dede:arclistsg row='10' titlelen='32' orderby='pubdate' channelid='-8' idlist=''}
[[field:typelink/]] [field:textlink/][field:pubdate function="MyDate('m-d',@me)"/]
{/dede:arclistsg}
功能:分类信息图片调用
代码:
{dede:arclistsg row='1' titlelen='30' flag='c,a' infolen='80' orderby='pubdate' channelid='-8' typeid='6' imgwidth='105' imgheight='137'}
<a href="[field:arcurl/]">[field:image/]</a><br/><a href="[field:arcurl/]" >[field:title /]</a>{/dede:arclistsg}
会员模块
功能:分列显示,按积分排行,带头像。正确链接到会员个人空间。
代码:
<table border="0" width="220" cellspacing="0" cellpadding="0">
<tr>
{dede:sql sql="Select mid,userid,uname,face,scores From dede_member order by scores desc limit 0,2"}
<td align="center" width="110"><a href="[field:global name="cfg_cmspath"/]/member/index.php?uid=[field:userid/]" target="_blank"><img src="[field:face/]" alt='[field:spacename/]' width="52" height="52" / border="0"><br>[field:uname/]<br>积分:[field:scores/]< /a></td>
{/dede:sql}
</tr>
</table>
圈子模块
功能:调用圈子标题,分10行显示
代码:
{dede:sql sql=" SELECT groupimg,groupid,groupname FROM dede_groups WHERE ishidden=0 ORDER BY threads DESC LIMIT 0,10"}
<li><a href="group/group.php?id=[field:groupid/]" title="[field:groupname/]" target="_blank"> [field:groupname/]</a></li>
{/dede:sql}
功能:热门圈子,调用图片及标题,分10列显示
代码:
<table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0">
<tr>
{dede:sql sql=" SELECT groupimg,groupid,groupname FROM dede_groups WHERE ishidden=0 ORDER BY threads DESC LIMIT 0,10"}
<td><a href="group/group.php?id=[field:groupid/]" _fcksavedurl=""group/group.php?id=[field:groupid/]"" title="[field:groupname/]" target="_blank"><img src="[field:groupimg/]" border="0" width="75" height="100" /><br /> [field:groupname function="cn_substr('@me',12)"/]</a>
</td>
{/dede:sql}
</tr>
</table>
功能:圈子话题调用。
代码:{dede:sql sql=" SELECT subject,digest,replies,gid,tid FROM dede_group_threads WHERE closed=0 ORDER BY dateline DESC LIMIT 0,10"}
<li><a href="group/viewthread.php?id=[field:gid/]&tid=[field:tid/]" _fcksavedurl=""group/viewthread.php?id=[field:gid/]&tid=[field:tid/]"" title="[field:subject/]" target="_blank"> [field:subject/]</a></li>
{/dede:sql}
功能:最新圈子,调用图片及标题,分10列显示
代码:
<table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0">
<tr>
{dede:sql sql=" SELECT groupimg,groupid,groupname FROM dede_groups WHERE ishidden=0 ORDER BY groupid DESC LIMIT 0,3"}
<td><a href="group/group.php?id=[field:groupid/]" _fcksavedurl=""group/group.php?id=[field:groupid/]"" title="[field:groupname/]" target="_blank"><img src="[field:groupimg/]" border="0" width="75" height="100" /><br /> [field:groupname function="cn_substr('@me',12)"/]</a>
</td>
{/dede:sql}
</tr>
</table>
下载模块
功能:显示符号、标题及发布日期
代码:
<table width=98% border=0 cellspacing=0 cellpadding=0>
{dede:arclist row='10' titlelen='36' typeid="120" orderby='pubdate'}
<tr>
<td width=2%></td>
<td valign=bottom width=80% ><font color="#0000ff">↓</font> <a href="[field:arcurl /]">[field:title /]</a></td>
<td align=right valign=middle width=18% class=font_green>[field:pubdate function="MyDate('m-d',@me)"/]</td>
</tr>
{/dede:arclist}
</table>
问答模块
功能:包含问答分类及问答标题。
代码:
{dede:ask row='10' qtype=''}
<span class="tclass">[<a href='[field:typeurl/]'>[field:tidname/]</a>]</span>
<span class="tlink"><a href="[field:url/]">[field:title/]</a></span><br />
{/dede:ask}
下一篇: imxh.com.ru终于要悲催了