管理員
積分信息:
威望:6005
金錢:9076056
貢獻:6116
儲蓄:2146643647
|
演示
http://192.210.219.88/~pole1010/upload/plugin.php?id=virtualimage:virtualimage
發現到會影響
1.安裝虛擬形象後上傳圖片本地無法預覽
2.驗證碼無法顯示
空白原因:
FTP 設置 source/plugin/virtualimage/data/ 目錄為 0777已設置
產生問題是這個語法大家看一下來如何修改讓他恢復以上問題
source/function/function_core.php
[18/8] 版本:
找
- function avatar($uid, $size = 'middle', $returnsrc = FALSE, $real = FALSE, $static = FALSE, $ucenterurl = '') {
- global $_G;
- 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 : '<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.'" />';
- }
- }
複製代碼
取代:
- function avatar($uid, $size = 'middle', $returnsrc = FALSE, $real = FALSE, $static = FALSE, $ucenterurl = '') {
- global $_G;
- 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
|