35dir分类目录程序是一款出色的网站目录程序,程序早就已不更新,官方网站也打不开,更不用说提供相关的帮助服务和技术支持,网上已经很难找到35dir标签调用使用说明文档了,所以今天给大家梳理了35dir的标签,希望给有仍在用35dir分类目录程序的网友带来帮助。
35dir程序主要选用Smarty做为模板引擎,标签的左/右结束符可根据“source/include/smarty.php”文档来改动,可改为你自己喜欢的方式,程序默认使用“{#”和“#}”来表明标签的刚开始和结束,比如:{#$变量名#}。
升級Smarty模板引擎只需免费下载最新的版本,遮盖“source/extend/smarty”文件目录下的文档就可以。针对不了解Smarty模板引擎的盆友,可参照Smarty有关操作手册。
一、网站通用标签
{#$site_root#}网站根目录
{#$site_name#}网站名称
{#$site_title#}网站标题
{#$site_url#}网站的URL
{#$site_keywords#}网站关键词
{#$site_description#}网站描述
{#$site_copyright#}网站底部版块,支持HTML
{#$site_rssRSS#}RSS订阅图标
{#$site_path#}面包屑导航,例如:当前位置:35分类目录 > 娱乐休闲
二、网站函数标签(以下函数返回值均为数组)
1、分类列表函数
get_categories($cate_id, $top_num, $is_best)
参数说明:
$cate_id 默认为0,当指定cate_id值时,则显示指定cate_id下的内容
$top_num 设置显示记录的条数,默认显示所有,指定值时,显示指定数目的记录
$is_best 是否显示推荐的内容,默认为false,设为true,显示推荐的内容
使用示例:
{#foreach from=get_categories(1, 10, false) item=item#}
{#$item.cate_name#} ({#$item.cate_postcount#})
{#/foreach#}
循环体中可使用的字段:
$cate_id 分类ID
$cate_name 分类名称
$cate_childcount 当前分类下的子分类数
$cate_postcount 分类下的内容统计,例如“娱乐休闲(2020)”分类下有2020个站点
$cate_link 分类链接
2、显示站点列表函数
get_websites($cate_id = 0, $top_num = 10, $is_best = false, $sortby = 'utime', $order = 'desc')
参数说明:
$cate_id 默认为0,当指定cate_id值时,则显示指定cate_id下的内容
$top_num 设置显示记录的条数,默认显示10条记录,指定值时,显示指定数目的记录
$is_best 是否显示推荐的内容,默认为false,设为true,显示推荐的内容
$sort_by 默认为utime,可选值为(instat-点入次数, outstat-点出次数, views-浏览次数, utime-更新时间),当指定值时,则按指定字段来进行内容排序
$order 默认为DESC,可选值为(DESC为倒序排列,ASC为正序排列)
使用示例:
{#foreach from=get_websites(0, 10, false) item=new#}
{#$new.web_name#}
{#$new.web_name#}
{#$new.web_intro#}
{#$new.web_url#} - {#$new.web_utime#}
{#/foreach#}
循环体中可使用的字段:
$web_id 站点ID
$cate_name 分类名称
$web_name 网站名称
$web_url 网站URL
$web_tags 网站TAG标签
$web_thumb 网站缩略图
$web_intro 网站简介
$web_utime 更新时间
$web_views 浏览次数
$web_arank Alexa世界排名
$web_prank Google PageRank
$web_srank Sogou Rank
$web_link 网站详细链接
3、 数据归档函数(注:此函数需要使用双重循环来实现)
get_archives()
使用示例:
{#foreach from=get_archives() key=year item=arr#}
{#$year#}年
{#foreach from=$arr key=month item=sitecount#}
{#$month#}月
{#/foreach#}
{#/foreach#}
4、友情链接函数
get_links()
使用示例:
{#foreach from=get_links() item=item#}
{#$item.link_name#}
{#/foreach#}
循环体中可使用的字段:
$link_name 链接名称
$link_logo LOGO地址
$link_ur 链接URL
5、广告函数
get_adcode(广告ID)
使用示例:
{#get_adcode(1)#}
6、 自定义标签
后台的所添加的自定义标签,均可通过这样{#$label.标签名称#}的方式来调用
使用示例:
{#$label.google_300x250#}
7、站点统计
{#$stat.模块名称#},可调用的有category, website
使用示例:
共 {#$stat.category#} 个主题分类,共收录个 {#$stat.website#} 站点
以下是各个页面模块可使用的标签说明:
列表页通用标签$weblist、$showpage,可用于directory.html, update.html, archives.html, search.html
$weblist 网站列表
$showpage 列表分页(显示首页,上一页,下一页,尾页)
使用示例:
{#foreach from=$weblist item=item name=list_website#}
{#$item.web_name#}
{#$item.web_name#}
{#$item.web_intro#}
{#$item.web_url#}
PageRank:{#$item.web_prank#} / 10
AlexaRank:{#$item.web_arank#}
人气指数:{#$item.web_views#}
收录时间:{#$item.web_utime#}
{#foreachelse#}
该目录下无任何内容!
{#/foreach#}
{#$showpage#}
三、具体页面标签
1、网站首页(index.html)
可使用上面的所有标签及函数。
2、目录列表页专用标签(directory.html)
$category_name 当前分类名称
$child_category 数组格式)当前分类下的子分类
使用示例:
{#$category_name#}
{#foreach from=$child_category item=c#}
{#if $cate_id == $c.cate_id#}
{#$c.cate_name#} ({#$c.cate_postcount#})
{#else#}
{#$c.cate_name#} ({#$c.cate_postcount#})
{#/if#}
{#/foreach#}
循环体中可使用的字段:
$cate_id 分类ID
$cate_name 分类名称
$cate_postcount 分类下的内容统计,例如“娱乐休闲(2020)”分类下有2020个站点
$cate_link 分类链接
3、最近更新页专用标签(update.html)
$days 当前选择的时间周期
$timescope (数组格式)时间范围
使用示例:
{#foreach from=$timescope item=v key=k#}
{#if $days == $v.time_id#}
{#$v.time_text#}
{#else#}
{#$v.time_text#}
{#/if#}
{#/foreach#}
循环体中可使用的字段:
$time_id 时间周期,例如:24小时,3天内,1周内
$time_text 时间名称
$time_link 时间链接