集成到帝国CMS 7.2
版权所有 2009-2019 荆门泽优软件有限公司
保留所有权利
官方网站:http://www.ncmem.com/index.aspx
产品首页:http://www.ncmem.com/webapp/wordpaster/index.aspx
开发文档:http://www.ncmem.com/doc/view.aspx?id=29adc89a08ed489498160458cddfa51b
控件下载:http://www.ncmem.com/webapp/wordpaster/pack.aspx
示例下载:http://www.ncmem.com/webapp/wordpaster/versions.aspx
联系信箱:1085617561@qq.com
联系QQ:1085617561
现已提供帝国CMS插件包,您可以直接上传插件包使用:http://www.ncmem.com/doc/view.aspx?id=402ace605ef1474b94a43a64203b28fd
手动整合步骤如下:
帝国默认添加新闻页面
1.上传插件目录
从php-ckeditor4x示例中复制imagepaster和excelpaster
目标位置:
/e/admin/ecmseditor/infoeditor/plugins/
2.复制WordPaster目录
目标位置:/e/admin/ecmseditor/WordPaster
3.添加头
修改文件:/e/admin/ecmseditor/eshoweditor.php
新增代码:
代码如下:
$base_path=’ecmseditor/’;
$wp_js = “<link type=\”text/css\” rel=\”Stylesheet\” href=\”$base_path”.”WordPaster/css/WordPaster.css\” />
<link type=\”text/css\” rel=\”Stylesheet\” href=\”$base_path”.”WordPaster/js/skygqbox.css\” />
<script type=\”text/javascript\” src=\”$base_path”.”WordPaster/js/json2.min.js\” charset=\”utf-8\”></script>
<script type=\”text/javascript\” src=\”$base_path”.”WordPaster/js/jquery-1.4.min.js\” charset=\”utf-8\”></script>
<script type=\”text/javascript\” src=\”$base_path”.”WordPaster/js/w.edge.js\” charset=\”utf-8\”></script>
<script type=\”text/javascript\” src=\”$base_path”.”WordPaster/js/w.app.js\” charset=\”utf-8\”></script>
<script type=\”text/javascript\” src=\”$base_path”.”WordPaster/js/w.file.js\” charset=\”utf-8\”></script>
<script type=\”text/javascript\” src=\”$base_path”.”WordPaster/js/WordPaster.js\” charset=\”utf-8\”></script>
<script type=\”text/javascript\” src=\”$base_path”.”WordPaster/js/skygqbox.js\” charset=\”utf-8\”></script>”;
$loadjs='<input type=hidden id=doecmseditor_eaddcs value=”‘.$addcs.'”> <script type=”text/javascript” src=”‘.$basepath.’ckeditor.js?&empirecms=1″></script>’.$wp_js;
4.添加插件
修改文件:/e/admin/ecmseditor/infoeditor/config.js
工具栏中增加按钮
增加插件
5.添加插件和初始化WordPaster插件
修改文件:/e/admin/ecmseditor/eshoweditor.php
6.上传文件上传模块,upload.php
修改文件:WordPaster/upload.php
这里使用帝国CMS的文件上传功能
文件上传部分修改代码如下:
代码如下:
$timeDir = date(“Y”).”/”.date(“m”).”-“.date(“d”);
$pathRel = “/empirecms/d/file/p/$timeDir/”;
//C:\wamp64\www\empirecms\e\admin\ecmseditor\WordPaster/upload/2019/10-10
$uploadDir = dirname(__FILE__).’\..\..\..\..\\d\\file\\p\\’.$timeDir;
$curDomain = “http://”.$_SERVER[“HTTP_HOST”];
//相对路径 http://www.ncmem.com/upload/2012-1-10/
$relatPath = $curDomain .$pathRel;
整合后的效果: