管理員
積分信息:
威望:6003
金錢:9076013
貢獻:6114
儲蓄:2146643647
|
演示
http://192.210.219.88/~pole1010/upload/plugin.php?id=virtualimage:virtualimage
發現到會影響
1.安裝虛擬形象後上傳圖片本地無法預覽已經修正
2.驗證碼無法顯示已經修正
3.空白原因:請把FTP 設置 source/plugin/virtualimage/data/ 目錄為 777已設置
4.下載附件後解壓縮上傳根目錄
5.這一定要改(附件下載這項已經修改完畢直接覆蓋即可),這影響到連接頭像及UCenter应用管理通信問題(曾經修改過以下文件要用修改)
source/function/function_core.php
找
- function avatar($uid, $size = 'middle', $returnsrc = FALSE, $real = FALSE, $static = FALSE, $ucenterurl = '') {
- global $_G;
- if($_G['setting']['plugins']['func'][HOOKTYPE]['avatar']) {
- $_G['hookavatar'] = '';
- $param = func_get_args();
- hookscript('avatar', 'global', 'funcs', array('param' => $param), 'avatar');
- if($_G['hookavatar']) {
- return $_G['hookavatar'];
- }
- }
- static $staticavatar;
- if($staticavatar === null) {
- $staticavatar = $_G['setting']['avatarmethod'];
- }
- $ucenterurl = empty($ucenterurl) ? $_G['setting']['ucenterurl'] : $ucenterurl;
- $size = in_array($size, array('big', 'middle', 'small')) ? $size : 'middle';
- $uid = abs(intval($uid));
- if(!$staticavatar && !$static) {
- return $returnsrc ? $ucenterurl.'/avatar.php?uid='.$uid.'&size='.$size.($real ? '&type=real' : '') : '<img src="'.$ucenterurl.'/avatar.php?uid='.$uid.'&size='.$size.($real ? '&type=real' : '').'" />';
- } else {
- $uid = sprintf("%09d", $uid);
- $dir1 = substr($uid, 0, 3);
- $dir2 = substr($uid, 3, 2);
- $dir3 = substr($uid, 5, 2);
- $file = $ucenterurl.'/data/avatar/'.$dir1.'/'.$dir2.'/'.$dir3.'/'.substr($uid, -2).($real ? '_real' : '').'_avatar_'.$size.'.jpg';
- return $returnsrc ? $file : '<img src="'.$file.'" onerror="this.onerror=null;this.src=\''.$ucenterurl.'/images/noavatar_'.$size.'.gif\'" />';
- }
- }
複製代碼
以下替代
- function avatar($uid, $size = 'middle', $returnsrc = FALSE, $real = FALSE, $static = FALSE, $ucenterurl = '') {
- global $_G;
- if($_G['setting']['plugins']['func'][HOOKTYPE]['avatar']) {
- $_G['hookavatar'] = '';
- $param = func_get_args();
- hookscript('avatar', 'global', 'funcs', array('param' => $param), 'avatar');
- if($_G['hookavatar']) {
- return $_G['hookavatar'];
- }
- }
- static $staticavatar;
- if($staticavatar === null) {
- $staticavatar = $_G['setting']['avatarmethod'];
- }
- $ucenterurl = empty($ucenterurl) ? $_G['setting']['ucenterurl'] : $ucenterurl;
- $size = in_array($size, array('big', 'middle', 'small')) ? $size : 'middle';
- $uid = abs(intval($uid));
- $vic = $vi = '';
- if(!$_G['cache']['plugin']['virtualimage']['imageclose']) {
- include_once DISCUZ_ROOT.'./source/plugin/virtualimage/virtualimage.class.php';
- $vic = new VI();
- $vi = $vic->VI($uid , $size , $returnsrc , $real , $static , $ucenterurl);
- }
- if(!$vi) {
- if(!$staticavatar && !$static) {
- return $returnsrc ? $ucenterurl.'/avatar.php?uid='.$uid.'&size='.$size : '<img src="'.$ucenterurl.'/avatar.php?uid='.$uid.'&size='.$size.($real ? '&type=real' : '').'" />';
- } else {
- $uid = sprintf("%09d", $uid);
- $dir1 = substr($uid, 0, 3);
- $dir2 = substr($uid, 3, 2);
- $dir3 = substr($uid, 5, 2);
- $file = $ucenterurl.'/data/avatar/'.$dir1.'/'.$dir2.'/'.$dir3.'/'.substr($uid, -2).($real ? '_real' : '').'_avatar_'.$size.'.jpg';
- return $returnsrc ? $file : '<img src="'.$file.'" onerror="this.onerror=null;this.src=\''.$ucenterurl.'/images/noavatar_'.$size.'.gif\'" />';
- }
- } else {
- return $vi;
- }
- }
複製代碼 更新緩存
|
本帖子中包含更多資源
您需要 登錄 才可以下載或查看,沒有帳號?立即註冊
x
|