🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 织梦核心改动 - 忘记密码 织梦忘记密码 表\_admin 密码c3949ba59abbe56e057f对应123456 - 常见路径 ``` <pre class="calibre14">``` 面包屑修改文件位置`include<span class="token">/</span>typelink<span class="token2">.</span>class<span class="token2">.</span>php` list分页文件 `include<span class="token">/</span>arc<span class="token2">.</span>listview<span class="token2">.</span>class<span class="token2">.</span>php` 搜索页分页` include<span class="token">/</span>arc<span class="token2">.</span>searchview<span class="token2">.</span>class<span class="token2">.</span>php` 后台模块管理空白<span class="token2">,</span>删除`data<span class="token">/</span>module<span class="token">/</span>moduleurllist<span class="token2">.</span>txt`文件让其重新生成<span class="token2">,</span>空白的文件 ``` ``` - 自定义模型无法移动 ``` <pre class="calibre14">``` dede<span class="token">/</span>archives_do<span class="token2">.</span>php文件 $typeOptions <span class="token">=</span> $tl<span class="token">-</span><span class="token">></span><span class="token1">GetOptionArray</span><span class="token2">(</span><span class="token3">0</span><span class="token2">,</span> $admin_catalogs<span class="token2">,</span> <span class="token3">0</span><span class="token2">)</span><span class="token2">;</span> 最后一个改为<span class="token3">0</span> ``` ``` - 表说明 栏目表 arctype 图集表 addonimages 文章表 archives 文章附加表 addonarticle 自定义表单表 diyforms 文章模型表单 channeltype - channel支持autoindex ``` <pre class="calibre14">``` include<span class="token">/</span>taglib<span class="token">/</span>channel<span class="token2">.</span>lib<span class="token2">.</span>php <span class="token3">140</span>行加入 调用 <span class="token">~</span>autoindex<span class="token">~</span> $linkOkstr <span class="token">=</span> <span class="token1">str_replace</span><span class="token2">(</span><span class="token4">"~autoindex~"</span><span class="token2">,</span>$GLOBALS<span class="token2">[</span><span class="token4">'autoindex'</span><span class="token2">]</span><span class="token">+</span><span class="token3">1</span><span class="token2">,</span>$linkOkstr<span class="token2">)</span><span class="token2">;</span> 支持 entypename id typelink typename autoindex rel ``` ``` - 搜索表单 ``` <pre class="calibre14">``` <span class="token"><</span>form name<span class="token">=</span><span class="token4">"formsearch"</span> action<span class="token">=</span><span class="token4">"/plus/search.php"</span><span class="token">></span><span class="token"><</span>input name<span class="token">=</span><span class="token4">"q"</span> type<span class="token">=</span><span class="token4">"text"</span> class<span class="token">=</span><span class="token4">"s1"</span> id<span class="token">=</span><span class="token4">"search"</span> value<span class="token">=</span><span class="token4">"在这里搜索..."</span> onfocus<span class="token">=</span><span class="token4">"if(this.value=='在这里搜索...'){this.value='';}"</span> onblur<span class="token">=</span><span class="token4">"if(this.value==''){this.value='在这里搜索...';}"</span> <span class="token">/</span><span class="token">></span> <span class="token"><</span>button type<span class="token">=</span><span class="token4">"submit"</span> class<span class="token">=</span><span class="token4">"s2"</span> onmouseover<span class="token">=</span><span class="token4">"this.style.cursor='pointer'"</span><span class="token">></span>搜索<span class="token"><</span><span class="token">/</span>button<span class="token">></span> <span class="token"><</span><span class="token">/</span>form<span class="token">></span> ``` ``` - 搜索页支持栏目 ``` <pre class="calibre14">``` 文件include<span class="token">/</span>arc<span class="token2">.</span>searchview<span class="token2">.</span>class<span class="token2">.</span>php <span class="token1">require_once</span><span class="token2">(</span>DEDEINC<span class="token2">.</span><span class="token4">"/taglib/channelartlist.lib.php"</span><span class="token2">)</span><span class="token2">;</span> <span class="token1">require_once</span><span class="token2">(</span>DEDEINC<span class="token2">.</span><span class="token4">"/taglib/type.lib.php"</span><span class="token2">)</span><span class="token2">;</span> <span class="token5">else</span> <span class="token5">if</span><span class="token2">(</span>$tagname<span class="token">==</span><span class="token4">"channelartlist"</span><span class="token2">)</span> <span class="token2">{</span> $this<span class="token">-</span><span class="token">></span>dtp<span class="token">-</span><span class="token">></span><span class="token1">Assign</span><span class="token2">(</span>$tagid<span class="token2">,</span><span class="token1">lib_channelartlist</span><span class="token2">(</span>$ctag<span class="token2">,</span>$this<span class="token2">)</span><span class="token2">)</span><span class="token2">;</span> <span class="token2">}</span><span class="token5">else</span> <span class="token5">if</span><span class="token2">(</span>$tagname<span class="token">==</span><span class="token4">"type"</span><span class="token2">)</span> <span class="token2">{</span> $this<span class="token">-</span><span class="token">></span>dtp<span class="token">-</span><span class="token">></span><span class="token1">Assign</span><span class="token2">(</span>$tagid<span class="token2">,</span><span class="token1">lib_type</span><span class="token2">(</span>$ctag<span class="token2">,</span>$this<span class="token2">)</span><span class="token2">)</span><span class="token2">;</span> <span class="token2">}</span> ``` ``` - 子栏目调用,没有时候不显示同级栏目,include\\taglib\\channel.lib.php,改成如下 ``` <pre class="calibre14">``` <span class="token5">if</span><span class="token2">(</span>$type<span class="token">==</span><span class="token4">'son'</span> <span class="token">&&</span> $reid<span class="token">!=</span><span class="token3">0</span> <span class="token">&&</span> $totalRow<span class="token">==</span><span class="token3">0</span> <span class="token">&&</span> $noself<span class="token">==</span><span class="token4">''</span><span class="token2">)</span> <span class="token2">{</span>dede<span class="token2">:</span>channel type<span class="token">=</span><span class="token4">'son'</span> noself<span class="token">=</span><span class="token4">'yes'</span> <span class="token2">}</span> <span class="token"><</span>a href<span class="token">=</span><span class="token4">"[field:typeurl/]"</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>typename<span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span> <span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>channel<span class="token2">}</span> ``` ``` - 百度编辑器div标签自动替换成了P标签的解决方法: ``` <pre class="calibre14">``` 在ueditor<span class="token2">.</span>config<span class="token2">.</span>js里加入这一行: allowDivTransToP<span class="token2">:</span><span class="token3">false</span> 去掉li里面加p 搜索 进入编辑器的li要套p标签 去掉第一个each ``` ``` - 手机端不生成index.html \\m\\index.php ``` <pre class="calibre14">``` $row<span class="token2">[</span><span class="token4">'showmod'</span><span class="token2">]</span> <span class="token">=</span> <span class="token1">isset</span><span class="token2">(</span>$row<span class="token2">[</span><span class="token4">'showmod'</span><span class="token2">]</span><span class="token2">)</span><span class="token">?</span> $row<span class="token2">[</span><span class="token4">'showmod'</span><span class="token2">]</span> <span class="token2">:</span> <span class="token3">0</span><span class="token2">;</span> <span class="token5">if</span> <span class="token2">(</span>$row<span class="token2">[</span><span class="token4">'showmod'</span><span class="token2">]</span> <span class="token">==</span> <span class="token3">1</span><span class="token2">)</span> <span class="token2">{</span> $pv<span class="token">-</span><span class="token">></span><span class="token1">SaveToHtml</span><span class="token2">(</span><span class="token1">dirname</span><span class="token2">(</span>__FILE__<span class="token2">)</span><span class="token2">.</span><span class="token4">'/index.html'</span><span class="token2">)</span><span class="token2">;</span> <span class="token1">include</span><span class="token2">(</span><span class="token1">dirname</span><span class="token2">(</span>__FILE__<span class="token2">)</span><span class="token2">.</span><span class="token4">'/../index.html'</span><span class="token2">)</span><span class="token2">;</span> <span class="token1">exit</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> <span class="token2">}</span> <span class="token5">else</span> <span class="token2">{</span> $pv<span class="token">-</span><span class="token">></span><span class="token1">Display</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> <span class="token1">exit</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> <span class="token2">}</span> 改成 $pv<span class="token">-</span><span class="token">></span><span class="token1">SetTemplet</span><span class="token2">(</span>$cfg_basedir <span class="token2">.</span> $cfg_templets_dir <span class="token2">.</span> <span class="token4">"/"</span> <span class="token2">.</span> $row<span class="token2">[</span><span class="token4">'templet'</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span> $pv<span class="token">-</span><span class="token">></span><span class="token1">Display</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> <span class="token1">exit</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> ``` ``` - 手机端实现 上一篇下一篇 include/arc.archives.class.php 新增移动端判断 ``` <pre class="calibre14">``` <span class="token5">if</span> <span class="token2">(</span> <span class="token1">defined</span><span class="token2">(</span><span class="token4">'DEDEMOB'</span><span class="token2">)</span> <span class="token2">)</span> <span class="token2">{</span> $mlink <span class="token">=</span> <span class="token4">'view.php?aid='</span><span class="token2">.</span>$preRow<span class="token2">[</span><span class="token4">'id'</span><span class="token2">]</span><span class="token2">;</span> <span class="token2">}</span> <span class="token5">else</span> <span class="token2">{</span> $mlink <span class="token">=</span> <span class="token1">GetFileUrl</span><span class="token2">(</span>$preRow<span class="token2">[</span><span class="token4">'id'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'typeid'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'senddate'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'title'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'ismake'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'arcrank'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'namerule'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'typedir'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'money'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'filename'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'moresite'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'siteurl'</span><span class="token2">]</span><span class="token2">,</span>$preRow<span class="token2">[</span><span class="token4">'sitepath'</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span> <span class="token2">}</span> <span class="token5">if</span> <span class="token2">(</span> <span class="token1">defined</span><span class="token2">(</span><span class="token4">'DEDEMOB'</span><span class="token2">)</span> <span class="token2">)</span> <span class="token2">{</span> $mlink <span class="token">=</span> <span class="token4">'view.php?aid='</span><span class="token2">.</span>$nextRow<span class="token2">[</span><span class="token4">'id'</span><span class="token2">]</span><span class="token2">;</span> <span class="token2">}</span> <span class="token5">else</span> <span class="token2">{</span> $mlink <span class="token">=</span> <span class="token1">GetFileUrl</span><span class="token2">(</span>$nextRow<span class="token2">[</span><span class="token4">'id'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'typeid'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'senddate'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'title'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'ismake'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'arcrank'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'namerule'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'typedir'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'money'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'filename'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'moresite'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'siteurl'</span><span class="token2">]</span><span class="token2">,</span>$nextRow<span class="token2">[</span><span class="token4">'sitepath'</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span> <span class="token2">}</span> ``` ``` - 修改文章后自动更新摘要描述 管理目录 article\_edit.php 113行 ``` <pre class="calibre14">``` $description改成 <span class="token1">strip_tags</span><span class="token2">(</span>$body<span class="token2">)</span> ``` ``` - 图集上传图片错误修改 ``` <pre class="calibre14">``` include<span class="token">/</span>uploadsafe<span class="token2">.</span>inc<span class="token2">.</span>php 里的第<span class="token3">45</span>行的 imtypes 改成imgtypes 加个g ``` ``` - 修改友情链接图片不能显示 ``` <pre class="calibre14">``` include<span class="token">/</span>datalistcp<span class="token2">.</span>class<span class="token2">.</span>php <span class="token3">237</span>行 $replacement <span class="token">=</span><span class="token1">substr</span><span class="token2">(</span>$ra<span class="token2">[</span>$i<span class="token2">]</span><span class="token2">,</span> <span class="token3">0</span><span class="token2">,</span> <span class="token3">2</span><span class="token2">)</span><span class="token2">.</span><span class="token1">substr</span><span class="token2">(</span>$ra<span class="token2">[</span>$i<span class="token2">]</span><span class="token2">,</span> <span class="token3">2</span><span class="token2">)</span><span class="token2">;</span> ``` ``` - 自定义表单编辑 显示空表单 ``` <pre class="calibre14">``` 在dede\templets\diy_edit_content<span class="token2">.</span>htm 注释掉 <span class="token5">if</span><span class="token2">(</span>$row<span class="token2">[</span>$field<span class="token2">]</span><span class="token">==</span><span class="token4">''</span><span class="token2">)</span> <span class="token5">continue</span><span class="token2">;</span> ``` ``` - 对于单页管理不能使用编辑器 找到模板编器前面增加 `$GLOBALS['cfg_html_editor']='ckeditor';` 例如templets\_one\_add.htm templets\_one\_edit.html