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']);
}註釋掉