destoon各类调用汇总

根目录、模板目录和样式目录:

{DT_PATH}
{DT_SKIN}

导入头脚:

{template 'header'}
{template 'footer'}

对应模块首页:

{$MODULE[$moduleid][linkurl]} //注:$moduleid表示对应模块的ID号

对应模块列表页:

{$MODULE[$moduleid][linkurl]}list.php?catid=$catid  //注:$catid表示调用的分类的ID号

发布某模块信息:

{$MODULE[2][linkurl]}my.php?mid=$moduleid&action=add

调用广告:

{ad(27)}  //注:27表示广告位为27的广告

时间函数:

{date('Y-m-d',$t[addtime])} // 注:addtime是添加时间,可以换别的

控制字符数:

{dsubstr($t[company],30)}  //注:company是公司名称字段,可以换别的。30表示字符数为15个

版权信息:

{$DT[copyright]} 

客服电话:

{$DT[telephone]}

ICP备案号:

{$DT[icpno]}

本月:

addtime>$today_endtime-30*86400

供应:

(level=1)
{php $tags = tag("moduleid=5&table=sell&length=30&condition=status=3 and catid=? and level=?&pagesize=10&order=addtime desc&template=null")}

求购:

(level=1)
{php $tags = tag("moduleid=6&table=buy&length=30&condition=status=3 and catid=? and level=?&pagesize=10&order=addtime desc&template=null")}

行情:

(level=1,2,3,4,5)
{php $tags = tag("moduleid=7&table=quote&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

公司:

{php $tags = tag("moduleid=4&table=company&condition=groupid>5&pagesize=10&order=fromtime desc&template=null")}

展会:

(level=1)
{php $tags = tag("moduleid=8&table=exhibit&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

资讯:

(level=1,2,3,4,5)
{php $tags = tag("moduleid=21&table=article_21&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

招商:

(level=1)
{php $tags = tag("moduleid=22&table=info_22&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

品牌:

(level=1)
{php $tags = tag("moduleid=13&table=brand&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

人才:

{php $tags = tag("moduleid=9&table=job&length=30&condition=status=3 and catid=?&pagesize=10&order=addtime desc&template=null")}
{php $tags = tag("moduleid=9&table=resume&length=30&condition=status=3 and catid=?&pagesize=10&order=addtime desc&template=null")}

知道:

(level=1)
{php $tags = tag("moduleid=10&table=know&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

专题:

(level=1,2,3,4,5)
{php $tags = tag("moduleid=11&table=special&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

图库:

(level=1,2,3,4,5)
{php $tags = tag("moduleid=12&table=photo&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

视频:

(level=1)
{php $tags = tag("moduleid=14&table=video&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

下载:

(level=1)
{php $tags = tag("moduleid=15&table=down&length=30&condition=status=3 and catid=? and thumb<>'' and level=?&pagesize=10&order=addtime desc&template=null")}

论坛:

{php $tags=tag("table=discuz.cdb_threads&prefix=&condition=status=0 and fid=?&order=dateline desc&pagesize=10&target=_blank&template=null")}

调用模块内容,资讯模块举例:

{php $tagss = tag("moduleid=21&table=article_data_21&condition=itemid=".$t[itemid]."&template=null")}

调用分类,资讯模块举例:

{php $tagss = tag("moduleid=21&table=category&condition=moduleid=21 and parentid=?&pagesize=10&order=catid desc&template=null")}

网站标题:

{$seo_title}

关键字:

{$head_keywords}

网页描述:

{$head_description}

会员升级:

{$MODULE[2][linkurl]}grade.php

收藏本页:

<script type="text/javascript">addFav('收藏本页');</script>

设为首页:

<a href='#' onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.webjx.com');">设为首页</a>

WAP浏览:

{extendurl('wap')}

RSS订阅:

{extendurl('feed')}

商务中心:

{$MODULE[2][linkurl]}

发布信息:

{$MODULE[2][linkurl]}{$DT[file_my]}

排名推广:

{extendurl('spread')}

网站地图:

{DT_PATH}sitemap/

友情链接:

{extendurl('link')}index.php?typeid=1

申请友情链接:

{extendurl('link')}{rewrite('index.php?action=reg')}

调用友情链接:

{php $tags = tag("table=link&length=14&condition=status=3 and typeid=1&pagesize=40&order=addtime desc&template=null")}

网站留言:

{extendurl('guestbook')}

广告服务:

{extendurl('ad')}

版权隐私、使用协议、联系方式、关于我们

{tag("table=webpage&condition=item=1&order=listorder desc,itemid desc&template=list-webpage")}

Copyright.html、agreement.html、contact.html、about.html

地区:

{$AREA[1][areaname]}

投票:

{extendurl('vote')}

登录框模板:

{if $DT[page_login]}{template 'user', 'chip'}{/if}

公告栏:

{extendurl('announce')}

分类模板:

{php $mid=5;}{template 'catalog' 'chip'}

相关评论模板:

{template 'comment', 'chip'}

联系方式模板:

{template 'contact', 'chip'}

留言加盟:

<iframe src="{$MOD[linkurl]}message.php?itemid={$itemid}" name="destoon_message" id="destoon_message" style="width:99%;height:0px;" scrolling="no" frameborder="0"></iframe>

读缓存:

{php $CATEGORY = cache_read('category-21.php');}
{$MODULE[21][linkurl]}{$CATEGORY[5][linkurl]}
<meta http-equiv="x-ua-compatible" content="ie=7"/>

调用栏目名

{php $tags = tag("moduleid=21&table=article_21&length=32 &condition=status=3 &pagesize=11&order=addtime desc&template=null")}    {loop $tags $t}    <li><span class="rq">{date('Y-m-d',$t[addtime])}</span><span class="catn"> {php $tagss = tag("moduleid=21&table=category&condition=moduleid=21 and catid=".$t[catid]."&template=null")}     {loop $tagss $tt}     【<a href="{$tt[linkurl]}" target="_blank">{dsubstr($tt[catname],12)}</a>】     {/loop} </span><a href="{$t[linkurl]}" target="_blank">{$t[title]}</a></li>    {/loop}

调用大分类中的所有

{php $tags = tag("moduleid=26&table=category&condition=moduleid=26 and catid=137&template=null")}
   {loop $tags $t}
  {php $tagss = tag("moduleid=26&length=26&condition=status=3 and level=4 and catid IN(".$t[arrchildid].")&pagesize=4&order=addtime desc&template=null")}
   {loop $tagss $ts}
        <li>•<a href="{$ts[linkurl]}" target="_blank">{$ts[title]}</a></li>
     {/loop}
  {/loop}

产品图片怎么调用middle.jpg中大的图?

<img src="{str_replace('thumb', 'middle', $t[thumb])}" width="{$width}" height="{$height}" alt="{$t[alt]}"/>
(0)

相关推荐

  • destoon实现调用当前栏目分类及子分类和三级分类的方法

    调用当前栏目分类及子分类和三级分类是程序设计里常用的方法,本文就来详细讲述destoon实现调用当前栏目分类及子分类和三级分类的方法.具体操作如下: 在destoon中提供了如下的调用语句: 一级分类名: {$m[catname]} 二级分类名: {$c[catname]} 三级分类名: {$b[catname]} 具体调用示例如下: 一.直接调用分类名称和链接: {loop $maincat $i $m}<dl> {php $child = get_maincat($maincat, $CA

  • destoon实现调用图文新闻的方法

    本文实例展示了destoon调用图文新闻的方法,该功能是非常常见且实用的技巧.分享给大家供大家参考.具体实现方法如下: 主要功能代码如下所示: {if $DT[page_news]} <!--{tag("moduleid=21&length=16&condition=status=3 and level=3 and thumb<>''&pagesize=1&target=_blank&order=addtime desc&widt

  • destoon首页调用求购供应信息的地区名称的方法

    本文实例主要实现了在destoon首页调用求购供应信息的地区名称.这是destoon开发中比较实用的的一个技巧. 实现代码如下: {loop $tags $k $t} [{area_pos($t[areaid], '/', 1)}]{$t[title]} {/loop} 代码说明如下: $t[areaid], '/', 1 第二个参数是地区与子地区的分隔符 第三个参数可选:设为1只显示一级地区分类:设为2显示二级地区分类等.

  • destoon调用自定义模板及样式的公告栏

    destoon中默认的首页公告栏调用方法如下: 复制代码 代码如下: <!–{tag("table=announce&condition=totime=0 or totime>$today_endtime-86400&areaid=$cityid&pagesize=3&datetype=2&order=listorder desc,addtime desc&target=_blank")}–> 这个标签引用的模板文件是t

  • destoon实现调用自增数字从1开始的方法

    本文示例讲述了destoon实现调用自增数字从1开始的方法,在进行数据调用的时候有一定的实用价值.希望对大家的destoon开发有所帮助.具体方法如下: 示例功能:destoon 调用自增数字 从1开始. 具体代码如下: <!--{php $tags=tag("moduleid=14&length=46&condition=status=3&pagesize=10&order=hits desc&template=null");}-->

  • destoon实现资讯信息前面调用它所属分类的方法

    有时候我们需要在一些信息前面添加他所属的分类,让他显示出来,本文介绍的方法虽然有些不具有通用性,但是可以实现这一效果,代码如下,供大家参考: <!--{php $tags=tag("moduleid=21&condition=status=3 and catid IN(263,264,249,327,11,598,599,12,238,237,265,285,328,567,570) and level=6&showcat=1&areaid=$cityid&

  • destoon二次开发模板及调用语法汇总

    一.模板存放及调用规则 模板存放于系统 template 目录,template 目录下的一个目录 例如:template/default/ 即为一套模板 模板文件以 .htm 为扩展名,可直接存放于模板目录 例如 template/default/index.htm 也可以存放于模板目录的子目录里 例如:template/default/member/index.htm 在PHP文件里,使用模板语法为 <?php include template('index'); ?> 或者 <?p

  • destoon调用企业会员公司形象图片的实现方法

    本文实例展示了destoon调用企业会员公司形象图片的实现方法,在进行destoon开发中有很重要的实用价值.分享给大家供大家参考. 具体实现代码如下: <!--{php $tags=tag("table=destoon_member m,destoon_company c&prefix=&condition=m.userid=c.userid and m.username='$username'&template=null")}--> {loop

  • destoon供应信息title调用出公司名称的方法

    在destoon开发中,供应信息title调出公司名称是一个非常实用的方法.本文就以示例形式描述了这一方法的实现过程.具体方法如下: 新建一个供应信息页头模板,把下面的代码,直接覆盖<title>****</title>这部份即可 <title>{$title}_{$item[company]}_{$MOD[name]}_{$DT[sitename]}]}</title> 希望本文所述方法对大家destoon开发能有所帮助.

  • destoon实现调用热门关键字的方法

    本文所述的destoon调用热门关键字的方法是根据数据库里面的保存的搜索的关键字来显示的. 每个模块下面都有各自的关键字 下面是调用的标签: <!--{tag("moduleid=$searchid&table=keyword&condition=moduleid=$searchid and status=3&pagesize=9&order=total_search desc&template=index-keyword")}-->

  • destoon调用discuz论坛中带图片帖子的实现方法

    在destoon开发中有时候我们需要调用论坛的帖子,但是带有图片的帖子该怎么调用出来呢,本文就来实例展示一个可以调用discuz论坛带图片的帖子的方法: 标签代码如下: <!--{php $tags=tag("table=pre_forum_thread i,pre_forum_threadimage t&prefix=&condition=i.tid=t.tid&length=36&order=i.tid desc&pagesize=9&t

  • destoon文章模块调用企业会员资料的方法

    本文实例展示了destoon文章模块调用企业会员资料的方法,对于destoon开发来说非常具有实用价值. 一般来说,为吸引企业会员发布企业文章,当企业会员发布文章后文章底部自动调出该企业会员的企业信息,这样企业会员就比较喜欢发布一些文章.这一功能的具体实现方法如下: 主要代码如下: {if $username} {php $user_status=3;} {php $member = userinfo($username);} {template 'contact', 'chip'} {/if}

随机推荐