用户名 密码 记住我 还未注册?

文章管理 - 文章管理模块常见问题

文章管理 :: 文章管理

文章管理模块常见问题


模块克隆指南
作者简介: bestjovi
bestjovi为 Xoops China 活跃会员
文章管理模块支持方便的模块克隆复制。(Revised by Oread555 based on DJ version on December 21, 2006,2007年2月8日再次修改 oread555)

复制步骤如下:

第一步:拷贝模块的完整目录,目录改名为新建模块目录名,比如article2

第二步:修改新建模块目录中所有/templates/和/templates/blocks/目录下的文件,将"article"前缀修改为新建模块目录名的前缀。例如,重命名article_index.html为article2_index.html

第三步:打开新建模块目录中的文件"/include/var.php",设置变量值$GLOBALS["ART_DB_PREFIX"], 把原来的值“art”改写成一个新值,例如“art2”

第四步:编辑新建模块目录中/sql/mysql.sql,把所有数据表的前缀修改为第三步中设定的值,比如说刚才所举的例子“art2”

具体修改举例说明:把 "CREATE TABLE `art_article`" 改为 "CREATE TABLE `art2_article`" (必要步骤)。尤其请新手注意, 除数据表名称以外,数据表中的字段名称务必保持不变。

第五步:安装修改后的模块article2。完成!

以上每步都是必须步骤。




In English:

To make a clone:

Step 1: Make a copy of the article folder and rename it with the new module dirname, for instance, article2.

Step 2: In the file /include/vars.php,reset the value for $GLOBALS["ART_DB_PREFIX"]. Change the original value "art" to something else you prefer, for instance, "art2" (this step is required).

Step 3: Edit /sql/mysql.sql, change all table prefixes to the value specified above: in our example--"art2". For instance, change "CREATE TABLE `art_article`" to "CREATE TABLE `art2_article`" (this step is required).

Please Note: You MUST leave field names in those tables as they are. Please make sure you understand the difference btw table prefixes and field names. Field names refer to the registers of specific contents listed in each table, while table prefixes refer to parts of the names of the table.

Step 4: Change all name prefixes of template files to the new module dirname, including all templates in /templates/ and /templates/blocks/. For example, change article_index.html to article2_index.html (this step is required).

Step 5: Now you can install the cloned module as regular. If you have used substitute names that are the same as given in the examples, after installation, you will get a new module "article2".

If you have further questions, please visit our website for more information.
副标题
  1. 基本问题
  2. 文章模块的模板系统
  3. 模块克隆指南
页面:
« 1 2 (3)
<< 文章管理模块快速上手指南 文章管理模块评测报告 >>
分类
Xoops 模块 模块其他

跟踪网址
  • 文章地址: http://xoops.org.cn/modules/article/view.article.php/c2/3
  • 跟踪地址: http://xoops.org.cn/modules/article/trackback.php/3
API: 工具箱 短消息 Email PDF 书签 打印 | RSS | RDF | ATOM
Copyright© bestjovi & XOOPS CHINA
网友个人意见,不代表本站立场。对于发言内容,由发表者自负责任。
发表者 树状展开
spartacus
发表日期: 10月21日 16:02  更新: 10月21日 16:02
新进会员
注册日期: 09月29日
来自:
发表总数: 3
 评: 文章管理模块常见问题
测试一下。。。看看怎么用
BAOKGOOD
发表日期: 07月18日 17:41  更新: 07月18日 17:41
新进会员
注册日期: 05月29日
来自:
发表总数: 4
 评论: 文章管理模块常见问题
文章管理模块复制重点在于修改MYSQL.SQL

找查表名 CREATE TABLE

看到如下
CREATE TABLE `artdb_artcat`

然后修改
CREATE TABLE `artdb_artcat`

修改为
CREATE TABLE `在这修改_artcat`

边搜索边修改多处即可
westdream
发表日期: 05月23日 13:19  更新: 05月23日 13:19
高级会员
注册日期: 04月18日
来自: 厦门
发表总数: 88
 评论: 文章管理模块常见问题
能不能上传附件呢?
msryat
发表日期: 11月05日 19:13  更新: 11月05日 19:13
中级会员
注册日期: 11月05日
来自: ali
发表总数: 63
 评论: 文章管理模块常见问题