diff --git a/src/dede/album_add.php b/src/dede/album_add.php index 66aea10e..97b73d70 100755 --- a/src/dede/album_add.php +++ b/src/dede/album_add.php @@ -386,6 +386,19 @@ else if($dopost=='save') $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "   请选择你的后续操作: diff --git a/src/dede/album_edit.php b/src/dede/album_edit.php index d1462787..a8f3caef 100755 --- a/src/dede/album_edit.php +++ b/src/dede/album_edit.php @@ -433,6 +433,19 @@ else if($dopost=='save') $arcUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "   请选择你的后续操作: diff --git a/src/dede/archives_add.php b/src/dede/archives_add.php index 357b98d0..0577e2f9 100755 --- a/src/dede/archives_add.php +++ b/src/dede/archives_add.php @@ -233,6 +233,19 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "   请选择你的后续操作: 继续发布文档 diff --git a/src/dede/archives_edit.php b/src/dede/archives_edit.php index 4f116c67..be52e060 100755 --- a/src/dede/archives_edit.php +++ b/src/dede/archives_edit.php @@ -242,6 +242,19 @@ else if($dopost=='save') $artUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "   请选择你的后续操作: diff --git a/src/dede/article_add.php b/src/dede/article_add.php index cd3ab5fe..35d6bef1 100755 --- a/src/dede/article_add.php +++ b/src/dede/article_add.php @@ -285,6 +285,17 @@ else if($dopost=='save') } ClearMyAddon($arcID, $title); + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } //返回成功信息 $msg = "   请选择你的后续操作: diff --git a/src/dede/article_edit.php b/src/dede/article_edit.php index a4771f12..14927ae6 100755 --- a/src/dede/article_edit.php +++ b/src/dede/article_edit.php @@ -258,6 +258,18 @@ else if($dopost=='save') $artUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } //返回成功信息 $msg = " diff --git a/src/dede/content_list.php b/src/dede/content_list.php index 0d84fe85..ca1cde8d 100755 --- a/src/dede/content_list.php +++ b/src/dede/content_list.php @@ -21,6 +21,7 @@ $mid = isset($mid) ? intval($mid) : 0; if(!isset($keyword)) $keyword = ''; if(!isset($flag)) $flag = ''; +if(!isset($f)) $f = ''; if(!isset($arcrank)) $arcrank = ''; if(!isset($dopost)) $dopost = ''; @@ -132,7 +133,7 @@ if(empty($channelid) } if($channelid < -1 ) { - header("location:content_sg_list.php?cid=$cid&channelid=$channelid&keyword=$keyword"); + header("location:content_sg_list.php?f=$f&cid=$cid&channelid=$channelid&keyword=$keyword"); exit(); } diff --git a/src/dede/inc/fieldtype.txt b/src/dede/inc/fieldtype.txt index d03e8dbe..8771bd1e 100755 --- a/src/dede/inc/fieldtype.txt +++ b/src/dede/inc/fieldtype.txt @@ -13,4 +13,5 @@ addon,附件类型 select,使用select下拉框 radio,使用radio选项卡 checkbox,checkbox多选框 -stepselect,联动类型 \ No newline at end of file +stepselect,联动类型 +relation,关联内容 \ No newline at end of file diff --git a/src/dede/inc/inc_admin_channel.php b/src/dede/inc/inc_admin_channel.php index 58943fd4..4514b64b 100755 --- a/src/dede/inc/inc_admin_channel.php +++ b/src/dede/inc/inc_admin_channel.php @@ -60,6 +60,12 @@ function GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen) $fields[0] = " `$fieldname` varchar(100) NOT NULL default '';"; $fields[1] = "varchar(100)"; } + else if($dtype=="relation") { + if(empty($dfvalue)) $dfvalue = ''; + + $fields[0] = " `$fieldname` TEXT NOT NULL default '$dfvalue';"; + $fields[1] = "TEXT"; + } else if($dtype=="textchar") { if(empty($dfvalue)) $dfvalue = ''; diff --git a/src/dede/inc/inc_archives_all.php b/src/dede/inc/inc_archives_all.php index 258b83bf..3c069ca7 100755 --- a/src/dede/inc/inc_archives_all.php +++ b/src/dede/inc/inc_archives_all.php @@ -131,6 +131,12 @@ function GetFormItem($ctag) $formitem = str_replace("~form~",$innertext,$formitem); return $formitem; } + else if ($ctag->GetAtt("type")=="relation") { + $innertext = "\r\n"; + $formitem = str_replace("~name~",$ctag->GetAtt('itemname'),$formitem); + $formitem = str_replace("~form~",$innertext,$formitem); + return $formitem; + } else { if($ctag->GetAtt('default')!="") $dfvalue = $ctag->GetAtt('default'); diff --git a/src/dede/inc/inc_menu.php b/src/dede/inc/inc_menu.php index 5df53eda..ff2f4877 100755 --- a/src/dede/inc/inc_menu.php +++ b/src/dede/inc/inc_menu.php @@ -145,7 +145,7 @@ $adminMenu1 - + diff --git a/src/dede/js/list.js b/src/dede/js/list.js index d6426457..80568552 100755 --- a/src/dede/js/list.js +++ b/src/dede/js/list.js @@ -132,6 +132,9 @@ function getOneItem() function selAll() { + if (typeof document.form2.arcID.length === "undefined") { + document.form2.arcID.checked = true; + } for(i=0;iExecuteNoneQuery(" ALTER TABLE `$trueTable` ADD $ntabsql "); + $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); if(!$rs) { $gerr = $dsql->GetError(); @@ -155,4 +158,13 @@ foreach($fields as $k=>$v) $f .= ($f=='' ? $k : ' '.$k); } +// 获取频道模型 +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while($row=$dsql->GetObject()) +{ + $channelArray[$row->id]['typename'] = $row->typename; + $channelArray[$row->id]['nid'] = $row->nid; +} + require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); diff --git a/src/dede/mychannel_field_edit.php b/src/dede/mychannel_field_edit.php index 7e203d90..1fcc0005 100755 --- a/src/dede/mychannel_field_edit.php +++ b/src/dede/mychannel_field_edit.php @@ -5,6 +5,7 @@ * @version $Id: mychannel_field_edit.php 1 15:22 2010年7月20日Z tianya $ * @package DedeCMS.Administrator * @copyright Copyright (c) 2007 - 2020, DesDev, Inc. + * @copyright Copyright (c) 2020, DedeBIZ.COM * @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com */ @@ -37,6 +38,16 @@ foreach($ds as $d) $dds = explode(',', trim($d)); $fieldtypes[$dds[0]] = $dds[1]; } + +// 获取频道模型 +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while($crow=$dsql->GetObject()) +{ + $channelArray[$crow->id]['typename'] = $crow->typename; + $channelArray[$crow->id]['nid'] = $crow->nid; +} + //保存更改 /*-------------------- function _SAVE() diff --git a/src/dede/soft_add.php b/src/dede/soft_add.php index 9f6c8d4b..902ea692 100755 --- a/src/dede/soft_add.php +++ b/src/dede/soft_add.php @@ -296,6 +296,19 @@ else if($dopost=='save') $arcUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "   请选择你的后续操作: diff --git a/src/dede/soft_edit.php b/src/dede/soft_edit.php index 2bef6724..525d8aa0 100755 --- a/src/dede/soft_edit.php +++ b/src/dede/soft_edit.php @@ -320,6 +320,19 @@ else if($dopost=='save') $arcUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "   请选择你的后续操作: diff --git a/src/dede/spec_add.php b/src/dede/spec_add.php index 0e90c600..0720f9e5 100755 --- a/src/dede/spec_add.php +++ b/src/dede/spec_add.php @@ -228,6 +228,19 @@ else if($dopost=='save') $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; } ClearMyAddon($arcID, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "   请选择你的后续操作: diff --git a/src/dede/spec_edit.php b/src/dede/spec_edit.php index 57c56638..fa0e9dc8 100755 --- a/src/dede/spec_edit.php +++ b/src/dede/spec_edit.php @@ -272,6 +272,19 @@ else if($dopost=='save') $artUrl = $cfg_phpurl."/view.php?aid=$id"; } ClearMyAddon($id, $title); + + // 自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id,true,true,$isremote); + } + } + } + } + //返回成功信息 $msg = "  请选择你的后续操作: 发布新专题 diff --git a/src/dede/templets/content_i_list.htm b/src/dede/templets/content_i_list.htm index 8c24364d..5d4e5c93 100755 --- a/src/dede/templets/content_i_list.htm +++ b/src/dede/templets/content_i_list.htm @@ -133,14 +133,14 @@ - + - -
请选择类目:请选择类目: + 关键字: @@ -156,8 +156,8 @@ - + +
diff --git a/src/dede/templets/content_s_list.htm b/src/dede/templets/content_s_list.htm index e083f403..026e3e7e 100755 --- a/src/dede/templets/content_s_list.htm +++ b/src/dede/templets/content_s_list.htm @@ -193,21 +193,21 @@ - + - - diff --git a/src/dede/templets/content_select_list.htm b/src/dede/templets/content_select_list.htm index a87905eb..66e13e38 100755 --- a/src/dede/templets/content_select_list.htm +++ b/src/dede/templets/content_select_list.htm @@ -109,21 +109,21 @@ @@ -249,22 +281,22 @@
请选择类目:请选择类目: + 关键字: - + +
- + - -
请选择类目:请选择类目: + 关键字: - + +
diff --git a/src/dede/templets/content_sg_list.htm b/src/dede/templets/content_sg_list.htm index e93311ed..97c569b0 100755 --- a/src/dede/templets/content_sg_list.htm +++ b/src/dede/templets/content_sg_list.htm @@ -105,6 +105,20 @@ return allSel; } + function getCheckboxItem2() { + var allSel = ""; + if (document.form2.arcID.value) return document.form2.arcID.value; + for (i = 0; i < document.form2.arcID.length; i++) { + if (document.form2.arcID[i].checked) { + if (allSel == "") + allSel = document.form2.arcID[i].value; + else + allSel = allSel + "," + document.form2.arcID[i].value; + } + } + return allSel; + } + //获得选中其中一个的id function getOneItem() { var allSel = ""; @@ -125,6 +139,7 @@ } } } + function noSelAll() { for (i = 0; i < document.form2.arcID.length; i++) { if (document.form2.arcID[i].checked) { @@ -132,6 +147,16 @@ } } } + + function ReturnValue() { + if (window.opener.document..value == "") { + window.opener.document..value = getCheckboxItem2(); + } else { + window.opener.document..value += "," + getCheckboxItem2(); + } + window.opener = null; + window.close(); + } @@ -227,6 +252,13 @@ onClick="moveArc(event,this,)" class="coolbg"> 移动   删除  + + 把选定值加到列表 +
- + - -
请选择类目:请选择类目: + 关键字: - + +
diff --git a/src/dede/templets/diy_add.htm b/src/dede/templets/diy_add.htm index 02c14f79..56246f2f 100755 --- a/src/dede/templets/diy_add.htm +++ b/src/dede/templets/diy_add.htm @@ -5,14 +5,17 @@ 新增频道 + + + + + + + + + + -
+
频道管理
@@ -85,23 +94,23 @@

[field:description/]...

- +
-
+ 自自由列表管理 >> 增加一个列表:
-
- +
@@ -124,8 +133,8 @@ + @@ -136,8 +145,8 @@ + @@ -245,12 +254,12 @@ @@ -266,10 +275,10 @@   - - 由高到低 - - 由低到高 + + -
目录默认页名称: - - 不使用目录默认主页
命名规则:列表模板: -
最大列出页数:
高级筛选: - - 带缩略图 - - 推荐 - - 专题 关键字: + + +  关键字: (","逗号分开)
循环内的单行记录样式(InnerText):[
  +   +
@@ -305,6 +315,13 @@
+ \ No newline at end of file diff --git a/src/dede/templets/freelist_edit.htm b/src/dede/templets/freelist_edit.htm index a9e598ff..4e4f49f1 100755 --- a/src/dede/templets/freelist_edit.htm +++ b/src/dede/templets/freelist_edit.htm @@ -5,8 +5,11 @@ 更改自由列表 + + +