发布DEDE黄页系统模型和采集数据规则模型
-------------------------------------------
落伍首发,可随意转载
东西比较粗糙,测试可用,供大家参考
-------------------------------------------
黄页自定义模型:
列表附加字段:person,address,zip,telephone,mobile,fax,website,mail,info
附加字段配置:
<field:person itemname="联系人" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:person>
<field:address itemname="地址" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:address>
<field:zip itemname="邮编" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:zip>
<field:telephone itemname="电话" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:telephone>
<field:mobile itemname="手机" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:mobile>
<field:fax itemname="传真" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:fax>
<field:mail itemname="电子邮箱" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:mail>
<field:website itemname="网址" type="text" isnull="true" default="" function="" maxlength="100" page="">
</field:website>
<field:info itemname="简介" type="htmltext" isnull="true" default="" function="" maxlength="1000" page="">
</field:info>
====备注====
一次性加入附加字段配置可能会出现错误提示,你可以先加一个,确定后修改这个模型,再一次加入其他附加字段配置。
=====================
采集数据规则模型:
{dede:note
rulename='Dede黄页模型'
etype='当前系统'
tablename='yp_archives,yp_addonyp'
autofield='ID'
synfield='aid'
channelid='15'
/}
{dede:field name='typeid' comment='栏目ID' intable='yp_archives' source='value'}{tid}{/dede:field}
{dede:field name='title' comment='文档标题' intable='yp_archives' source='export'}{/dede:field}
{dede:field name='sortrank' comment='排序级别' intable='yp_archives' source='function'}@me = time();{/dede:field}
{dede:field name='arcrank' comment='文档权限' intable='yp_archives' source='value'}{rank}{/dede:field}
{dede:field name='channel' comment='频道类型' intable='yp_archives' source='value'}{cid}{/dede:field}
{dede:field name='litpic' comment='缩略图' intable='yp_archives' source='function'}@me = @litpic;{/dede:field}
{dede:field name='pubdate' comment='发布时间' intable='yp_archives' source='function'}if(@me!="") @me = GetMkTime(@me);
else @me = time();{/dede:field}
{dede:field name='senddate' comment='录入时间' intable='yp_archives' source='function'}@me = time();{/dede:field}
{dede:field name='typeid' comment='栏目ID' intable='yp_addonyp' source='value'}{tid}{/dede:field}
{dede:field name='person' comment='联系人' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='address' comment='地址' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='zip' comment='邮编' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='telephone' comment='电话' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='mobile' comment='手机' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='fax' comment='传真' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='website' comment='网址' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='mail' comment='电子邮箱' intable='yp_addonyp' source='export'}{/dede:field}
{dede:field name='info' comment='信息' intable='yp_addonyp' source='export'}{/dede:field}
=====备注=====
前缀根据自己的修改。字段根据自己建立的自定义模型修改即可。
=============
欢迎DEDE高手指正。
转落伍的 在这里备份下