<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>鲸云论坛 - 二次开发</title>
    <link>http://43.154.28.57/forum-38-1.html</link>
    <description>Latest 20 threads of 二次开发</description>
    <copyright>Copyright(C) 鲸云论坛</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Sat, 13 Jun 2026 23:15:17 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>http://43.154.28.57/static/image/common/logo_88_31.gif</url>
      <title>鲸云论坛</title>
      <link>http://43.154.28.57/</link>
    </image>
    <item>
      <title>目录结构</title>
      <link>http://43.154.28.57/thread-177-1-1.html</link>
      <description><![CDATA[下面是Discuz! 的文件目录及对应的描述。日常的开发中主要会涉及到source和template目录。虽然目录和文件都很多，但是实际上结构还是很清晰，大多数情况下通过文件名和目录就能知道某个文件的作用。比如：
        \\source\\class\\discuz\\discuz_censor.php  用来处理敏 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:38:47 +0000</pubDate>
    </item>
    <item>
      <title>用户输入数据的处理</title>
      <link>http://43.154.28.57/thread-176-1-1.html</link>
      <description><![CDATA[Discus! X2.5之前版本对$_GET和$_POST的值默认是进行addslashes处理，函数在使用此值时信任外部数据的安全性，但这样处理的弊端是容易生产二次注射的漏洞，为了防止此类漏洞的产生，函数必须不信任任何数据外部数据的安全性，为此我们做了以下的处理增强系统安全：
[*]$ ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:38:14 +0000</pubDate>
    </item>
    <item>
      <title>数据库DB层</title>
      <link>http://43.154.28.57/thread-175-1-1.html</link>
      <description><![CDATA[原DB类的改进
Discuz! X2.5新版对数据库DB层进行了功能和安全方面的加强：
[*]addslashes的处理
仅insert(),update(),delete() 方法对传入其的数组形式的参数进行 intval 或 addslashes 安全处理，字符串形式的参数将不处理，请注意
[*]新添加的方法 fetch_all($sql),or ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:37:44 +0000</pubDate>
    </item>
    <item>
      <title>模板机制</title>
      <link>http://43.154.28.57/thread-174-1-1.html</link>
      <description><![CDATA[Discuz! X2.5 拥有完善的模版机制，支持模版和程序的分离，方便模版风格的扩展开发。通常模版文件存放在template目录下，文件格式为 htm。在加载模版的时候通常就是简单的一句：
其中 dir 为目录名称，filename 为文件名称。这个时候 Discuz! 的模版引擎主要进行了如下 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:36:42 +0000</pubDate>
    </item>
    <item>
      <title>缓存机制</title>
      <link>http://43.154.28.57/thread-173-1-1.html</link>
      <description><![CDATA[Discuz! 缓存Discuz! X2.5 的 config_global.php 中有这样一行代码
这就是 Discuz! 内置的缓存方式，如果填写 \'sql\' 则为使用数据库缓存，填写 \'file\' 则为使用文件缓存。内存级缓存缓存层的引入是为了解决MYSQL自身对高并发处理的性能瓶颈，目前产品缓存层采用主流的Ke ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:35:03 +0000</pubDate>
    </item>
    <item>
      <title>后台页面开发</title>
      <link>http://43.154.28.57/thread-172-1-1.html</link>
      <description><![CDATA[[*]创建项目
在 ./source/admincp/menu/ 目录下创建 menu_mynav.php 文件 在“管理中心-全局”中加一个项目，需要在 menu_mynav.php 中给 $menu[\'global\'] 数组变量，为其添加一个键值。如：
创建一个语言包文件 ./source/language/lang_admincp_mynav.php 您可以在此 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:33:50 +0000</pubDate>
    </item>
    <item>
      <title>DIY 专题、频道制作</title>
      <link>http://43.154.28.57/thread-171-1-1.html</link>
      <description><![CDATA[[*]频道是将门户信息分类展示的形式，一个社区除了门户、广场、群组、家园与应用等核心功能外，还可以根据运营需要开设婚嫁、房产、汽车等频道。专题是服务于集中报道和深度报道的一种展现形式，集中体现某项热点事件。论坛中创建频道、专题的位置, 分别如图所示：
频 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:26:54 +0000</pubDate>
    </item>
    <item>
      <title>DIY 模块模板</title>
      <link>http://43.154.28.57/thread-170-1-1.html</link>
      <description><![CDATA[系统在后台提供了模块模板功能，为管理员在前台 DIY 提供模板样式，在这里可以很方便的管理 DIY 时所使用的模块模板。首先我们来看如何添加模块模板：添加模块模板
操作路径：【后台】=&gt;【门户】=&gt;【模块模板】选择添加所需要的数据类型(程序会根据所选择的数据类型，提 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:24:52 +0000</pubDate>
    </item>
    <item>
      <title>数据调用</title>
      <link>http://43.154.28.57/thread-169-1-1.html</link>
      <description><![CDATA[数据调用是在后台直接添加配置生成站内外数据调用代码的一种方法，效果与在前台DIY的数据模块配置调用数据基本一致。不同的是后台数据调用生成的代码，可以直接放到模板或者站外网站中显示对应数据，不再需要DIY区域。
添加数据调用模块
操作路径：【后台】=&gt;【门户】=&gt; ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:24:09 +0000</pubDate>
    </item>
    <item>
      <title>DIY 使用指导</title>
      <link>http://43.154.28.57/thread-168-1-1.html</link>
      <description><![CDATA[DIY功能主要是利用页面拖拽技术，在不编写代码的情况下实现快速布局页面、聚合调用站内数据的功能。下面我们来看如何使用DIY功能 以及如何美化DIY的数据模块。基本DIY流程
[*]以管理员身份登录网站前台，点击头部右上方“DIY”按钮，进入DIY模式：


[*]进入DIY模式后， ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:22:23 +0000</pubDate>
    </item>
    <item>
      <title>模板文件附录</title>
      <link>http://43.154.28.57/thread-167-1-1.html</link>
      <description><![CDATA[公共模板文件夹 ./template/default/common/
论坛模板文件夹 ./template/default/forum/
群组模板文件夹 ./template/default/group/
空间家园模板文件夹 ./template/default/home/
会员模板文件夹 ./template/default/member/
首页模板文件夹 ./template/default/portal ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:21:27 +0000</pubDate>
    </item>
    <item>
      <title>标签语法</title>
      <link>http://43.154.28.57/thread-166-1-1.html</link>
      <description><![CDATA[Discuz! X 模板的解析主要是 ./source/class/class_template.php 文件解析处理的，如果需要深入了解请可以看看这个文件！
[*]模板嵌套语法



[*]逻辑判断 if...else


直接执行 PHP 代码标签：


直接输出变量，等同于 PHP 的 , 花括号可以省略但不建议去掉。（模块程 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:20:57 +0000</pubDate>
    </item>
    <item>
      <title>CSS扩展</title>
      <link>http://43.154.28.57/thread-165-1-1.html</link>
      <description><![CDATA[在默认模板基础上简单的修改、附加扩展 CSS 时只需在对应的模板套系下添加一个对应的扩展 CSS 文件即可, 例如修改或扩展 common.css 中的代码, 只需在创建的模板套系目录对应位置：common/ 文件夹下新建一个 extend_common.css 文件, 然后追加需要修改或者扩展的 CSS 代 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:18:46 +0000</pubDate>
    </item>
    <item>
      <title>CSS缓存</title>
      <link>http://43.154.28.57/thread-164-1-1.html</link>
      <description><![CDATA[CSS缓存存放：./data/cache/ 目录中，以 “style_风格自增编号_应用入口关键字_所在页面的mod值.css”形式保存
自建新套系模板文件可以通过创建 ./template/mytest/common/extend_common.css 或 extend_module.css 进行 CSS 扩展, 其中这两个文件的CSS样式脚本会通过 Di ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:16:56 +0000</pubDate>
    </item>
    <item>
      <title>模板缓存</title>
      <link>http://43.154.28.57/thread-163-1-1.html</link>
      <description><![CDATA[模板缓存存放：所有的模板缓存均被解析成 php 文件存放在 ./data/template 中, 以 “数字_模板标示符组合.tpl.php”形式保存。
页面缓存刷新原理：当开发者编辑过模板文件之后, Discuz! 模板解析器会匹配模板 htm 文件与缓存 php 文件的最后修改时间, 如过模板 htm 文件 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:16:04 +0000</pubDate>
    </item>
    <item>
      <title>html书写规范</title>
      <link>http://43.154.28.57/thread-162-1-1.html</link>
      <description><![CDATA[前言介绍
本文档主要收集了Discuz! 模板开发过程中的一些资料, 主要包括：html书写注意事项, Discuz! 模板语法规则, CSS扩展规则等一些开发文档资料。概述了新建风格的详细流程和开发过程中需要注意的一些事项, 使您更加快捷高效的进行Discuz! 的模板前端开发工作。
HTM ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:15:12 +0000</pubDate>
    </item>
    <item>
      <title>模板概述</title>
      <link>http://43.154.28.57/thread-161-1-1.html</link>
      <description><![CDATA[模板套系与风格区别
[*]模板套系：统一的一类模板，集中放置并打包的系列。
[*]风格：应用了某个模板套系下的模板展示方案。


风格管理中常量介绍

[*]匹配模板：对应的模板套系。
[*]扩展配色：在风格基础上，可供用户选择的配色方案，它对应 ./template/mytest/style ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:14:12 +0000</pubDate>
    </item>
    <item>
      <title>模板制作</title>
      <link>http://43.154.28.57/thread-160-1-1.html</link>
      <description><![CDATA[扩展新模板论坛模板文件, 默认放置在 网站根目录 /template/default/ 下, 如果想修改默认模板的话, 直接修改此文件夹下的模板即可。Discuz! X 程序读取模板的流程为, 先读取当前模板套系目录下的模板文件, 如 yourstyle 文件夹下 common/header.htm 文件, 如果没有这个 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:12:05 +0000</pubDate>
    </item>
    <item>
      <title>准备工作</title>
      <link>http://43.154.28.57/thread-159-1-1.html</link>
      <description><![CDATA[插件实现流程
开始编写社区插件，您应当首先对插件实现的流程有一个大致的了解，以下是我们推荐的插件编写流程：
[*]熟练使用 Discuz! 社区系统后，对希望完善或补充的个性化功能进行评估，进而提出插件的功能需求。
[*]对插件做一个概括性的设计，例如：需要使用什么菜 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:10:57 +0000</pubDate>
    </item>
    <item>
      <title>参数读取</title>
      <link>http://43.154.28.57/thread-158-1-1.html</link>
      <description><![CDATA[编写插件程序时，可能需要读取一些插件的信息，如果插件需要使用者进行配置，还需要读取使用者设置的参数值。Discuz! 允许插件程序使用数据库读取和缓存读取这两种方法获取插件信息和参数。Discuz! 的插件接口已经对插件信息进行了合理的缓存，使用缓存读取的方式，将比 ...]]></description>
      <category>二次开发</category>
      <author>鲸云网络</author>
      <pubDate>Sun, 05 Jan 2020 01:10:29 +0000</pubDate>
    </item>
  </channel>
</rss>