1.下载压缩问包
地址:
http://www.rayfile.com/files/907ac963-25b2-11e3-87d2-0015c55db73d/
2.解压文件复制
addons\theme\stv1\_static\下的images复制到本身项目的
addons\theme\stv1\_static\目录下
3.复制
addons\theme\stv1\_static\js下的
plugins和uploadify复制到
本身项目的
addons\theme\stv1\_static\目录下
4.修改
addons\theme\stv1\_static\js下的
module.weibo.js文件中insert_image更改成
insert_image: { // 弹出插入图片框
click: function () {
var target = this.parentModel.parentModel.childModels['mini_editor'][0];
var postfeed = this.parentModel.childEvents[$(this).attr('rel')][0];
core.plugInit('multimage', this, $(target).find('textarea'), postfeed);
}
}
5.修改apps\public\Lib\Action下的FeedAction.class.php文件下添加
function multimageBox()
{
$var = "";
$html = $this->fetch('multimageBox');
//unset($var,$data);
$arr =array(
"unid"=>"A25627E9",
"status"=>1,
"total"=>9,
"html"=>$html
);
exit(json_encode($arr));
}
6.apps\public\Tpl\default\Feed这个目录下复制multimageBox.html到本身对应的目录
7.addons\theme\stv1\_static\css下的global.css最后样式复制到本身对应的样式文件中.
测试图片上传
也可直接解压后覆盖到本身的项目中.注意保存本身的文件.
若是出现问题不能上传
修改core\OpenSociax\App.class.php中这个execWidget属性
if(strtoupper($_SERVER['REQUEST_METHOD'])=='POST' && stripos($_SERVER['HTTP_REFERER'], SITE_URL)!==0) {
die('illegal request.'.$_SERVER['HTTP_REFERER']);
}注释掉