DESTOON核心代理商
首页
模板
整站模板
商铺模板
功能插件
会员中心
企业官网
授权
定制
设计稿
平台网站
企业官网
案例
企业官网
B2B网站
行业平台
外贸平台
百科
热门搜索
答网友问
技术文章
联系
微信联系
标签大全
高级标签
系统标签
系统常量
系统常用变量
系统函数
网站设置
各模块连接
各模块名称
会员模块常用调用
会员信息
通用调用
头部header区域
底部footer区域
常用调用
常用调用
列表页
通用
供应
供应-求购-商城共用
知道
商城
公司
内容页
通用
文章
品牌
商铺页
商铺页
手机版
手机版
时间
{date('Y-m-d', $t[addtime])} 年-月-日 {date('Y-m-d h:i:s', $t[addtime])} 年-月-日 时:分:秒 (这里,如果你的小时需要24小时制就用大写H,12小时制就用小写h,其中的 - 分隔符可以随意替换 如 / )
简介
{$t[introduce]}
缩略图
{$t[thumb]}
alt标签
{$t[alt]}
标题
{$t[title]}
信息id
{$t[itemid]}
连接地址
{$t[linkurl]}
信息分类名称
在标签里传递&showcat=1参数,然后在模板里写<a href="{$t[caturl]}">{$t[catname]}</a>
当前频道点击排行
<!--{tag("moduleid=$moduleid&condition=status=3 and addtime>$today_endtime-30*86400&catid=$catid&areaid=$cityid&order=hits desc&pagesize=".$MOD[page_shits])}-->
当前频道推荐1的文章
<!--{tag("moduleid=$moduleid&condition=status=3 and level=1&catid=$catid&areaid=$cityid&order=".$MOD[order]."&pagesize=".$MOD[page_srec])}-->
推荐图文
<!--{tag("moduleid=$moduleid&length=20&condition=status=3 and level=3 and thumb!=''&catid=$catid&areaid=$cityid&pagesize=".$MOD[page_srecimg]."&order=".$MOD[order]."&width=120&height=90&cols=2&template=thumb-table")}-->
万能子分类调用
<!--{php $tags=tag("table=category&condition=moduleid=5 and parentid=0&order=catid desc&template=null")}--> {loop $tags $t} <a href="{cat_url($t[catid])}">{$t[catname]}</a> {/loop} 可以调用任意分类的子分类, moduleid=5为模块id parentid=0 为上级分类id 调用顶级分类时为 0
多表联查指定分类的公司和会员信息
<!--{php $tags=tag("table=dt_member m,dt_company c&prefix=&condition=m.userid=c.userid and catids like '%,".$catid.",%'&catid=$catidareaid=$cityid&pagesize=10&page=$page&showpage=1&order=c.vip desc&template=list-company");}-->
随机排序
rand() 这个用在调用信息时随机排序时在调用标里使用, 示例 &order=rand()
调用指定行业的公司
<!--{tag("moduleid=4&condition=groupid=6&fenlei=1 and and catids like '%,".$catid.",%'&catid=3&areaid=$cityid&pagesize=2&order=fromtime desc&template=c_tu")}--> 指定行业语句 catids like '%,".$catid.",%'&catid=3
调用当前栏目名称
function cat_name($CAT) { global $MODULE, $db; if(!$CAT) return ''; $arrparentids = $CAT['catid']; $arrparentid = explode(',', $arrparentids); $pos = ''; $target = $target ? ' target="_blank"' : ''; $CATEGORY = array(); $result = $db->query("SELECt catid,moduleid,catname,linkurl FROM {$db->pre}category WHERe catid=($arrparentids)"); while($r = $db->fetch_array($result)) { $CATEGORY[$r['catid']] = $r; } foreach($arrparentid as $catid) { if(!$catid || !isset($CATEGORY[$catid])) continue; $pos .= ''.$CATEGORY[$catid]['catname'].''; } return $pos; } 在include/global.func.php里面插入这段代码,前台可以用{cat_name($CAT)}来获取当前栏目名称
距离发布时间函数
function timetodate2($show_time) { $now_time = date("Y-m-d H:i:s",time()); $now_time = strtotime($now_time); $dur = $now_time - $show_time; if($dur < 0){ return $the_time; }else{ if($dur < 60){ return $dur.'秒前'; }else{ if($dur < 3600){ return floor($dur/60).'分钟前'; }else{ if($dur < 86400){ return floor($dur/3600).'小时前'; }else{ if($dur < 259200){//3天内 return floor($dur/86400).'天前'; }else{ return date("Y-m-d H:i:s",$show_time); } } } } } }
公司LOGO调用方法
1、在/include中 查找到 global.func.php 这个文件 在这个文件中添加一个函数: function get_company_setting($userid, $key = '', $cache = '') { global $db; if($key) { $r = $db->get_one("SELECt * FROM {$db->pre}company_setting WHERe userid=$userid AND item_key='$key'", $cache); return $r ? $r['item_value'] : ''; } else { $setting = array(); if($cache) { $query = $db->query("SELECt * FROM {$db->pre}company_setting WHERe userid=$userid", $cache); } else { $query = $db->query("SELECt * FROM {$db->pre}company_setting WHERe userid=$userid", $cache); } while($r = $db->fetch_array($query)) { $setting[$r['item_key']] = $r['item_value']; } return $setting; } } 这个函数在module->company->global.func.php 中也有直接复制就行了 同时删掉 这个文件中的 这个函数,不然进company 会因为加载了两个同名函数而报错! 2、在首页需要显示logo的地方运用此函数 <!--{php $tags=tag("table=category&condition=parentid=0 and moduleid=4&order=listorder asc&template=null");}--> {loop $tags $i $t} <div id="xHTabC_{$i+1}" {if $i==0}class="newcar_con" style="display: block;margin-top: 10px; min-height:110px;"{/if} {if $i>0} class="newcar_con" style="display: none;margin-top: 10px; min-height:110px; "{/if} > <ul> <!--{php $tags2=tag("moduleid=4&condition=vip>0 and level>0 and catids like '%,".$t[catid].",%'&order=fromtime desc&template=null");}--> {loop $tags2 $t2} <li style="width:130px; overflow:hidden; float:left; min-height:110px;"> <div style="width:130px;text-align: center; height:110px; overflow:hidden; float:left; padding:0px"> <a href="{$t2[linkurl]}" target="_blank"><img src="{get_company_setting($t2[userid], $key = 'logo', $cache = '')}" width="80" height="80" alt=""/> <br><span>{$t2[company]}</span></a></div> </li> {/loop} </ul> </div> {/loop}
隔行加class
{if ($key%2==0)} class="top_end"{else} {/if} 从第一行加起 {if ($key%2==1)} class="top_end"{else} {/if} 从第二行加起
当日信息加红
列表页修改方法: module/sell/list.inc.php加上 $timetoday = strtotime(date("Y-m-d",time()));//今天0点的时间点 查找while($r = $db->fetch_array($result)) {后面的 $r['editdate'] = timetodate($r['edittime'], 5); 替换成 if ($r['edittime']>$timetoday){ $r['editdate'] = '<span style="color:red">'.timetodate($r['edittime'], 5).'</span>'; }else { $r['editdate'] = timetodate($r['edittime'], 5); } 在template/default/tag/list-sell.htm 查找{timetodate($t[edittime], $datetype)} 替换成 {$t[editdate]}
«上一页
1
2
…
3
4
5
6
7
8
…
11
12
下一页»
共234条/12页
咨询电话
13878897862
微信咨询
业务咨询