下边就是俺写的dede下载数据模型配置文件.要扩展自己对着数据库改。
{dede:note
rulename='Dede下载模型'
etype='当前系统'
tablename='dw_archives,dw_addonsoft'
autofield='ID'
synfield='aid'
channelid='3'
/}
{dede:field name='typeid' comment='栏目ID' intable='dw_archives' source='value'}{tid}{/dede:field}
{dede:field name='title' comment='文章标题' intable='dw_archives' source='export'}{/dede:field}
{dede:field name='sortrank' comment='排序级别' intable='dw_archives' source='function'}@me = time();{/dede:field}
{dede:field name='arcrank' comment='文档权限' intable='dw_archives' source='value'}{rank}{/dede:field}
{dede:field name='channel' comment='频道类型' intable='dw_archives' source='value'}{cid}{/dede:field}
{dede:field name='writer' comment='文章作者' intable='dw_archives' source='export'}{/dede:field}
{dede:field name='litpic' comment='缩略图' intable='dw_archives' source='function'}@me = @litpic;{/dede:field}
{dede:field name='pubdate' comment='发布时间' intable='dw_archives' source='function'}if(@me!="") @me = GetMkTime(@me);
else @me = time();{/dede:field}
{dede:field name='senddate' comment='录入时间' intable='dw_archives' source='function'}@me = time();{/dede:field}
{dede:field name='typeid' comment='栏目ID' intable='dw_addonsoft' source='value'}{tid}{/dede:field}
{dede:field name='filetype' comment='文件类型' intable='dw_addonsoft' source='value'}.rar{/dede:field}
{dede:field name='language' comment='软件语言' intable='dw_addonsoft' source='export'}{/dede:field}
{dede:field name='os' comment='操作系统' intable='dw_addonsoft' source='value'}winxp/nt/2003{/dede:field}
{dede:field name='officialUrl' comment='官方网址' intable='dw_addonsoft' source='export'}{/dede:field}
{dede:field name='officialDemo' comment='演示地址' intable='dw_addonsoft' source='export'}{/dede:field}
{dede:field name='introduce' comment='软件内容' intable='dw_addonsoft' source='export'}{/dede:field}
{dede:field name='softlinks' comment='下载地址' intable='dw_addonsoft' source='export'}{/dede:field}
要用的这个自定义函数,若是直接用
@me=CombinAddress(@me);就可以了
吧这个函数放到/include/inc_functions.php最后便就ok了
function CombinAddress($address)
{
$curl="";
preg_match_all('/href="(.+?)"/is',$address,$addarray);
for($i=1;$i<=count($addarray[1]);$i++)
{
$curl.="{dede:link text='下载地址$i'}".$addarray[1][$i-1]."{/dede:link}\r\n";
}
return $curl;
}
采集规则和其他不会的看着里的专题不会写的