qingdanet 发表于 2011-2-21 15:46:27

求购模版复制

要修改的文件:
file\setting\buy.sql
module\buy\admin\config.inc.php
module\buy\admin\install.inc.php
module\buy\admin\uninstall.inc.php
module\buy\common.inc.php
include\global.func.php

第一步
先把数据库中的xxxx_buy表和xxxx_buy_data表改成
xxxx_buy_6
表和
xxxx_buy_data_6
表.(xxxx是表前缀)

第二部 修改文件
a.file\setting\buy.sql
把文件中的destoon_buy和destoon_buy_data改成destoon_buy_6

destoon_buy_data_6




b. module\buy\admin\config.inc.php

把 $MCFG['copy'] = false;
$MCFG['uninstall'] = true;
$MCFG['moduleid'] = 6;

改成

$MCFG['copy'] = true;
$MCFG['uninstall'] = true;


$CT = 1;改成
$CT = true;




c. module\buy\admin\install.inc.php

把$setting = include(DT_ROOT.'/file/setting/module-'.$moduleid.'.php');

改成 $setting = include(DT_ROOT.'/file/setting/module-6.php');



$sql = file_get(DT_ROOT.'/file/setting/'.$module.'.sql');
sql_execute($sql);

改为

$sql = file_get(DT_ROOT.'/file/setting/'.$module.'.sql');
$sql = str_replace('_6', '_'.$moduleid, $sql);
$sql = str_replace('求购', $modulename, $sql);
sql_execute($sql);




d. module\buy\admin\uninstall.inc.php

把 $db->query("DROP TABLE IF EXISTS `".$DT_PRE.$module."`");
$db->query("DROP TABLE IF EXISTS `".$DT_PRE.$module."_data`");

改为

$db->query("DROP TABLE IF EXISTS `".$DT_PRE.$module."_".$moduleid."`");
$db->query("DROP TABLE IF EXISTS `".$DT_PRE.$module."_data_".$moduleid."`");


e. module\buy\common.inc.php

把$table = $DT_PRE.$module;
$table_data = $DT_PRE.$module.'_data';

改为

$table = $DT_PRE.$module.'_'.$moduleid;
$table_data = $DT_PRE.$module.'_data'.'_'.$moduleid;


f. include\global.func.php



return in_array($module, array('article', 'info')) ? $DT_PRE.$module.'_data_'.$moduleid : $DT_PRE.$module.'_data';
} else {
return in_array($module, array('article', 'info')) ? $DT_PRE.$module.'_'.$moduleid : $DT_PRE.$module;

改为

return in_array($module, array(
'buy',
'article', 'info')) ? $DT_PRE.$module.'_data_'.$moduleid : $DT_PRE.$module.'_data';
} else {
return in_array($module, array(
'buy',
'article', 'info')) ? $DT_PRE.$module.'_'.$moduleid : $DT_PRE.$module;


修改的时候注意备份数据库。

希望对大家有所帮助。
其实求购跟供应差不多。供应多了产品功能。复制起来不好操作。建议用求购来做。

xuanwuizu 发表于 2011-2-21 23:04:59


http://bbs.destoon.com/static/image/smiley/default/smile.gif
非常不错,顶个

yanli0418 发表于 2011-3-11 10:48:13


我改了为什么改后 后台和所有页面打开都是空白?

yhfeng 发表于 2011-3-11 11:10:04


纯粹观望、看了也不会搞~

huangyiqiu 发表于 2011-3-11 13:45:54


看来不错撒,收藏了。。

qingdanet 发表于 2011-3-23 08:43:02


求购复制出现问题的可以加我QQ:327761033 乐意与大家交流
页: [1]
查看完整版本: 求购模版复制