标签 织梦 下的文章

方法如下:

  行业的联动类别字段是:vocation   。 为了方便大家看  我  vocation  都改成 :“自定义联动类别字段名”      相信大家能看的懂! 第一修改: include\taglib\infolink.lib.php

[php]
require_once(DEDEROOT.'/data/enums/infotype.php');下面添加
require_once(DEDEROOT.'/data/enums/自定义联动类别字段名.php');

function lib_infolink(&$ctag,&$refObj)
{
global $dsql,$nativeplace,$infotype,$自定义联动类别字段名,$hasSetEnumJs,$cfg_cmspath,$cfg_mainsite;
global $em_nativeplaces,$em_infotypes,$em_自定义联动类别字段名s; //看清楚,这里后面的个S

$fields = array('nativeplace'=>'','infotype'=>'','自定义联动类别字段名'=> '','typeid'=>$typeid, 'channelid'=>$channelid,'linkallplace'=>'','linkalltype'=> '','linkeall自定义联动类别字段名'=>'');

$fields['nativeplace'] = $fields['infotype'] = $fields['自定义联动类别字段名'] = '';

============================================================

$fields['linkalltype'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}& amp;nativeplace={$nativeplace}'>不限</a>";

//下面添加一行

$fields['linkeall自定义联动类别字段名'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}& amp;nativeplace={$nativeplace}'>不限</a>";[/php]

==============================================================

搜索 if(is_array($ctp->CTags)) 在这句上面添加

[php]
//自定义联动类别字段链接
if(empty($自定义联动类别字段名))
{
foreach($em_自定义联动类别字段名s as $eid=>$em)
{
if($eid % 500 != 0) continue;
$fields['自定义联动类别字段名'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}& amp;自定义联动类别字段名={$eid}&nativeplace={$nativeplace}'>{$em}</a& gt;";
}
}
else
{
$sontype = ( ($自定义联动类别字段名 % 500 != 0) ? $自定义联动类别字段名 : 0 );
$toptype = ( ($自定义联动类别字段名 % 500 == 0) ? $自定义联动类别字段名 : ( $自定义联动类别字段名-($membertypeP0) ) );
$fields['自定义联动类别字段名'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}& amp;自定义联动类别字段名={$toptype}&nativeplace={$nativeplace}'><b> {$em_自定义联动类别字段名s[$toptype]}</b></a> ";
foreach($em_自定义联动类别字段名s as $eid=>$em)
{
if($eid < $toptype+1 || $eid > $toptype+499) continue;
if($eid == $自定义联动类别字段名) {
$fields['自定义联动类别字段名'] .= " <b>{$em}</b>";
}
else {
$fields['自定义联动类别字段名'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}& amp;自定义联动类别字段名={$eid}&nativeplace={$nativeplace}'>{$em}</a& gt;";
}
}
}

//以上文件修改完了!
[/php]

第二修改: plus\list.php 文件

搜索 $infotype = ( (empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype ); 在下面添加一句

[php]
$自定义联动类别字段名 = ( (empty($自定义联动类别字段名) || !is_numeric($自定义联动类别字段名)) ? 0 : $自定义联动类别字段名 );

再搜索 if(!empty($infotype)) $cArr['infotype'] = $infotype; 在下面添加

if(!empty($自定义联动类别字段名)) $cArr['自定义联动类别字段名'] = $自定义联动类别字段名;

[/php]

第三修改:include\arc.sglistview.class.php 文件

搜索 if(!empty($this->searchArr['keyword'])) 在上面添加

[php]
//自定义联动类别

if(!empty($this->searchArr['自定义联动类别字段名']))
{
if($this->searchArr['自定义联动类别字段名'] % 500 ==0 )
{
$naddQuery .= " And arc.自定义联动类别字段名 >= '{$this->searchArr['自定义联动类别字段名']}' And arc.自定义联动类别字段名 < '".($this->searchArr['自定义联动类别字段名']+500)."'";
}
else
{
$naddQuery .= "And arc.自定义联动类别字段名 = '{$this->searchArr['自定义联动类别字段名']}'";
}
}

[/php]

第四修改:include\taglib\infoguide.lib.php
找到

[php]$fields['infotype'] .= '<script language="javascript">MakeTopSelect("infotype", '.$infotype.');</script>'."\r\n";[/php]

在其下面添加:

[php]
$fields['自定义联动类别字段名'] .= "<input type='hidden' id='hidden_自定义联动类别字段名' name='自定义联动类别字段名' value='{$自定义联动类别字段名}' />\r\n";
$fields['自定义联动类别字段名'] .= "<span class='infosearchtxt'>类型:</span><span id='span_自定义联动类别字段名'></span>\r\n";
$fields['自定义联动类别字段名'] .= "<span id='span_自定义联动类别字段名_son'></span><br />\r\n";
$fields['自定义联动类别字段名'] .= "<script language='javascript' type='text/javascript' src='{$cfg_mainsite}{$cmspath}data/enums/自定义联动类别字段名.js'></script& gt;\r\n";
$fields['自定义联动类别字段名'] .= '<script language="javascript">MakeTopSelect("自定义联动类别字段名", '.$自定义联动类别字段名.');</script>'."\r\n";[/php]

以上四个页面全部改完之后,请你到所属模型里添加字段!

我以vocation为例吧 我的频道页面用的是分类信息模型 infos 那么我就要在这里里面添加一个字段 vocation 数据类型选择 联动!

然后点击一键生成,就算好了!

1:概览

织梦CMS主要有11个文件夹和三个文件。

2:详细解析

1data文件夹

这个文件夹主要是存放数据的。

Admin文件夹:存放后台管理的数据的,比如程序的版本、备案号、作者等信息。

Backupdata 文件夹:这个是存放数据库备份文件的地方。
Cache文件夹:缓存

Enums文件夹:

Js文件夹:生成栏目的时候生成的JS文件。

Mark文件夹:

Moduls文件夹:程序选择或者设定的模块。

Rss文件夹:订阅信息,。

Sessions文件夹:验证用户登录的。

Textdata文件夹:一些以文本类型保存的文档。

Tplcathe文件夹:缓存文件。

Ziptmp文件夹:零时压缩文件存放的地方

Common.inc.hph 这个文件时存放自己的数据库配置的文件。

Config..cache.inc.php :网站的配置文件,比如网站的网址,屏蔽的关键词、首页链接地址,默认编辑器、首页名称等等

2./dede 目录 dede后台

3./html 目录 生成的静态的HTML文件存放的地方。

4Images 文件夹 存放系统的图片

Include文件夹:网站的核心文件、网站的编辑器、类库等信息。

config_base.php 环境定义文件。用于检测系统环境,定义工作目录,保存数据库链接信息,引入常用函数等,建议不要修改。
config_hand.php 系统配置文件。定义系统常用的配置信息定义,可从后台管理直接生成该文件。
config_passport.php 通行证文件
config_rglobals.php 检测系统外部变量
config_rglobals_magic.php 同上
inc_archives_view.php 用于浏览文档或对文档生成HTML
inc_arclist_view.php 用于浏览频道列表或对内容列表生成HTML
inc_arcmember_view.php 用于浏览会员发布的文档
inc_arcpart_view.php 用于解析和创建全局性质的模板,如频道封面,主页,单个页面等
inc_arcsearch_view.php 用于文档搜索
inc_arcspec_view.php 用于浏览所有专题列表或对专题列表生成HTML
inc_channel_unit.php 用户解析特定频道的附加数据结构信息
inc_channel_unit_functions.php 系统共用函数集合
inc_downclass.php 防采集随机字符串函数
inc_freelist_view.php 用于对特定内容列表生成HTML
inc_functions.php 可供用户使用的函数集合
inc_imgbt.php GetTypeidSelMember
inc_memberlogin.php 用于用户登录及获得会员状态
inc_photograph.php 用于处理系统中的图片,例如水印,缩略图等
inc_photowatermark_config.php 图片处理参数定义
inc_rss_view.php 用于浏览频道RSS或对RSS生成静态文件
inc_separate_functions.php SpGetArcList函数,用于获得文档列表
inc_sitemap.php 用于生成网站地图
inc_type_tree.php 用于选择栏目的目录树
inc_type_tree_member.php 同上,会员使用
inc_typelink.php 用于显示文章的位置和栏目位置等
inc_typeunit_admin.php 用于频道管理时的一些复杂操作,主要用于后台
inc_typeunit_menu.php 同上
inc_userlogin.php 用于管理员登录
inc_vote.php 用于管理投票
jump.php 用于超链接跳转
pub_charset.php 共用字符处理函数,GB/UTF-8/Unicode/BIG5等互换
pub_collection.php 用于采集
pub_collection_functions.php 采集用函数
pub_datalist.php 后台管理用数据列表
pub_datalist_dm.php 同上,不使用模板
pub_db_mysql.php 用于操作数据库
pub_dedehtml2.php 用于采集中的HTML解析
pub_dedehtml.php HTML解析器
pub_dedetag.php 用于dede模板标签解析
pub_httpdown.php 用于下载http中的资源
pub_oxwindow.php 后台程序扩展
pub_splitword_www.php 织梦分词算法
validateimg.php 验证码
vdimgck.php 验证码

/inc 共用函数目录

inc_fun_funAdmin.php 获取拼音码等函数
inc_fun_funString.php html代码处理等函数
inc_fun_SpGetArcList.php 获取文档列表

5. Install 系统的安装文件。安装之后最好删除

6. Member :会员文件夹,里面有会员空间的模板,配置等信息。

7Plug 文件夹 :存放一些插件,比如一些新闻、图片调用等

8

9./special 专题生成目录

10. /templets 网站模板目录

11. default 默认模板目录

article_article.htm 普通文章页面模板
article_default.htm 一般文档页面模板
article_flash.htm flash页面模板
article_image.htm 图集页面模板
article_soft.htm 软件页面模板
article_spec.htm 专题页面模板
index.htm 网站首页模板
index_article.htm 文章频道封面模板
index_article_webart1.htm
index_article_webart2.htm
index_article_webart.htm
index_default.htm 一般文档封面模板
index_flash.htm flash频道封面模板
index_image.htm 图集频道封面模板
index_soft.htm 频道封面模板
list_article.htm 文章列表模板
list_default.htm 一般文档列表目录模板
list_flash.htm flash文档列表模板
list_free.htm 自由列表模板
list_image.htm 图集列表模板
list_soft.htm 软件列表模板
list_spec.htm 专题列表模板

/img 模板图片目录(含样式表

/plus 辅助插件模板目录
download_links_templet.htm 下载链接模板
feedback_confirm.htm 评论确认模板
feedback_templet.htm 用户评论模板
feedback_templet_js.htm
flink-add.htm 友情链接添加模板
flink-list.htm 友情链接列表模板
guestbook.htm 留言本模板
heightsearch.htm 高级搜索模板
js.htm
recommend.htm 推荐好友模板
rss.htm RSS的XML模板
rssmap.htm RSS订阅文件
showphoto.htm 图片显示模板
sitemap.htm 网站地图模板
view_msg.htm 会员提示信息模板
vote.htm 投票结果显示模板

12. /upimg 采集,后者用户上传的附件所在的目录

13. base.css 基本样式表

14.index.php 网站默认首页

15.robots.txt 搜索控制文件