ja_mageia


 


本站遵守 Creative Commons License 许可 转载时务必以超链接形式标明文章原始出处和作者信息 
  • Narrow screen resolution
  • Wide screen resolution
  • Increase font size
  • Decrease font size
  • Default font size
Home IT Knowledge Joomla Export Content 和 mtwMigrator: 绝妙的迁移组件
Joomla
Export Content 和 mtwMigrator: 绝妙的迁移组件 PDF Print E-mail
(0 votes, average 0 out of 5)
Written by Administrator   
Saturday, 29 March 2008 19:59
Joomla 1.5.1推出有一段时间了,很多人都很希望能完美的把网站从Joomla 1.0.x 迁移到Joomla 1.5.1,官方网站上也有迁移的组件可供使用,但是这个组件使用并不方便,而且是单项迁移,功能有限。下面要介绍一个迄今为止最为快速、安全、可靠、功能最为强大的迁移组件 Export content。

Export content 组件的功能如下:
在Joomla 1.0.x 网站之间 正向、反向迁移内容
在Joomla 1.5.x 网站之间 正向、反向迁移内容
在Joomla 1.0.x 和Joomla 1.5.x网站之间 正向、反向迁移内容

当然这个组件只是迁移内容和所有相关的单元类别,但是在迁移的过程中,并不需要像官方迁移组件那样,预先删除所有第三方插件,使用极为方便。

展示站点:
源站点:bluelibrary.net      Joomla 1.0.13
目站点:bluelibrry.net/jm15/index      Joomla 1.5.1
看到了吗?所有的内容都被迁移过来了

在源站点安装组件com_export_content_1.7(For Joomla 1.0.x)后,打开控制面板,选择Export-Compile Site Data by sections,这个选项可以按section导出文章,接着可以看到组件列出了所有可用的section,选择section(我这里是全部选择,因为是迁移),然后点击右上角的Compile For 1.5+,把section、category和文章导出成Joomla 1.5.x的格式。过几秒钟后,导出完成,点击右上角的Download 1.5+ Data,选择Download Compiled Conetnt for Joomla 1.5+,把数据下载到本地硬盘。
导出后的数据文件名为 import_content_data.zip,此时你可以发现这个文件就是一个可以安装的组件。
接下来在目标站点上安装组件com_export_content_2.0(For Joomla 1.5.x),然后把 import_content_data.zip也作为一个组件安装,之后在组件菜单上会多出一个import这一项,不要理会,直接选 Export content,打开控制面板,点击Transfer Imported Data By Sections,这里应该出现的是源站点上的Section(刚才导出的Section,这些数据一定要安装 import_content_data.zip后才会出现),我这里选择全部的Section,点击右上角菜单 Insert,出现确认导入文章的页面,上面列出了所有需要导入的文章列表,点击Save,导入完成。
需要注意的是,目标站点上不需要预先建立相应的Section和category,因为组件会把Section和category连同文章一起导入,因此预先建立的话会出现重复的Section和category。

组件作者网站 http://www.bestdownloadsites.com
由于作者的一时疏忽 下载的组件在使用中不能迁移中文字符的,我让作者修改,作者非常的快速,2天之内搞定。
组件com_export_content_1.7(For Joomla 1.0.x) 编辑convert_img.php 大约2210行
你可以看到代码
/****************************************
High end numeric converter
******************************************/
function high_order($text){
$text = preg_replace('/([\xc0-\xdf].)/se', "'&#' . ((ord(substr('$1', 0, 1)) - 192) * 64 + (ord(substr('$1', 1,
1)) - 128)) . ';'", $text);
$text = preg_replace('/([\xe0-\xef]..)/se', "'&#' . ((ord(substr('$1', 0, 1)) - 224) * 4096 + (ord(substr('$1',
1, 1)) - 128) * 64 + (ord(substr('$1', 2, 1)) - 128)) . ';'", $text);

 return $text;
}

修改为
function high_order($text){
return $text;
}

接着在23行找到代码
function numeric_html($text){
这个模块的代码一直会延续到2208行
修改为
function numeric_html($text){
return $text;
    //return $text;
}

我这里有修改后的版本 哪位想要 发邮件给我 Jaleo.fu[at]Gmail.com

最近又发现一款迁移组件mtwMigrator
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,3895/Itemid,35/

这个是Joomla 1.5的组件,装上后,在控制面板里填上参数,参数为源站点的数据库名字,用户名等,
然后点击迁移,就会把源数据库里的用户名、单元、分类、内容、菜单等导入。我大致试验了下,不错,挺方便的。这个比 Export content 组件多了导入用户名、菜单等功能。
作者在Joomla官方论坛里也发表了这个组件,看起来挺受欢迎的。
http://forum.joomla.org/viewtopic.php?f=430&t=262727

Last Updated on Sunday, 08 February 2009 07:15
 

Add comment


Security code
Refresh

Login Form



Who's Online

We have 3 guests online