聲明︰
1.只作美化及修改小虫
2.版權歸作者
3.如發現侵權,請任何有權力的人刪了此貼
原插件地址︰
http://www.discuz.net/viewthread ... hlight=%CD%B7%CF%F1
適用版本︰6.1有uc(所有編碼版本) 6.1f不適合
注意︰除BIG5版外,其他編碼版本在進行 安裝步驟1 到 4 的時候,請自動把代碼轉成你所需要的版本再加入,附件裡就不用轉,直接上傳
演示︰
網址︰
http://forum.520fun.com
賬號(pw) : test / test
[attach]61878[/attach]
[attach]61879[/attach]
[attach]61880[/attach]
修改前請備份:
1 .\templates\default\templates.lang.php
2 .\templates\default\messages.lang.php
3 .\templates\default\memcp_profile.htm
4 .\templates\default\personal_navbar.htm
5 .\include\global.func.php
安裝(安裝前請下載附件)︰
第一步
打開 .\templates\default\templates.lang.php
找
'memcp_novideo' => '目前沒有發表的視頻',
在下面加入
'memcp_dz_avatar'=>'論壇頭像',
'memcp_avatar_upload'=>'自定義頭像',
'memcp_avatar_upload_note'=>'I. 注意事項:',
'memcp_avatar_upload_location'=>'II. 上傳位置',
'memcp_avatar_upload_tips'=>'1. 上傳的頭像格式只限 <strong>.JPG</strong> 和 <strong>.GIF</strong>;<br>2. 上傳的文件大小不得超過 $maxsizeshow KB;<br>3. 上傳的頭像寬不得超過 $maxlength 像素 和高不得超過 $maxheight 像素;<br>4. 自定義頭像優先級比論壇頭像高, 刪除後顯示論壇頭像。',
'memcp_remoteavatar_upload'=>'上傳遠程頭像',
'memcp_remoteavatar_upload_note'=>'I. 注意事項:',
'memcp_remoteavatar_upload_location'=>'II. 遠程頭像位置(填寫url, 如 [img]http://xxxx.com/abc.gif[/img])',
'memcp_remoteavatar_upload_tips'=>'1. 上傳的頭像格式只限 <strong>.JPG</strong> 和 <strong>.GIF</strong>;<br>2. 上傳的頭像寬不得超過 $maxlength 像素 和高不得超過 $maxheight 像素;<br>3. 遠程頭像優先級比自定義頭像高, 刪除後顯示自定義頭像。',
第二步
打開 .\templates\default\messages.lang.php
找
'admin_cpanel_noaccess_ip' => '對不起,管理員設定了只有特定 IP 地址範圍才能訪問系統設置,您的地址不在被允許\的範圍內',
在下面加入
'profile_uploadavatar_nopremission' => '您沒有足夠的權限上傳頭像。',
'profile_uploadavatar_wrongfiletype' => '您上傳的文件格式不正確,請返回重新上傳。',
'profile_uploadavatar_filetoobig' => '您上傳的頭像文件超過了系統定義的大小,請返回重新上傳。',
'profile_uploadavatar_toobig' => '您上傳的頭像文件超過了系統定義的寬 $maxlength 像素,高 $maxheight 像素,請返回重新上傳。',
'profile_customavatardir_nonexistence' => '自定義頭像目錄 ./images/avatars/customavatars 不存在,請聯繫管理員。',
'profile_remoteavatar_upload_succeed' => '您遠程頭像上傳已成功更新,現在將轉入個人資料頁。',
'profile_remoteavatar_delete_succeed' => '您遠程頭像成功刪除, 將顯示自定義或論壇頭像。',
'profile_avatar_upload_succeed' => '您頭像上傳已成功更新,現在將轉入個人資料頁。',
'profile_avatar_delete_succeed' => '您自定義頭像成功刪除, 將顯示論壇頭像。',
第三步
打開 .\templates\default\memcp_profile.htm
找
改成
<a href='uploadavatar.php'>{lang memcp_avatar_upload}</a> | <a href='remoteavatar.php'>{lang memcp_remoteavatar_upload}</a> <br /><br />$uc_avatarflash
第四步
打開 .\include\global.func.php
找
return UC_API.'/avatar.php?uid='.$uid.'&size='.$size;
在上面加入
global $db, $tablepre;
$query = $db->fetch_first("SELECT avatar FROM {$tablepre}memberfields where uid = $uid");
if($query['avatar'] != "") return $query['avatar'];
$avatar = $discuz_root.'./images/avatars/customavatars/'.$uid.'.jpg';
if(file_exists($avatar)) return $avatar;
第五步( 純為外觀,可跳過 )
打開 .\templates\default\personal_navbar.htm
找
<!--{if $BASESCRIPT == 'memcp.php'}-->
改成
<!--{if $BASESCRIPT == 'memcp.php' || $BASESCRIPT == 'remoteavatar.php' || $BASESCRIPT == 'uploadavatar.php'}-->
找
<li<!--{if !$action}--> class="current"<!--{/if}-->><a href="memcp.php">{lang memcp_home}</a></li>
改成
<!--{if $BASESCRIPT == 'remoteavatar.php' || $BASESCRIPT == 'uploadavatar.php'}--> <li><a href="memcp.php">{lang memcp_home}</a></li>
<!--{else}--><li<!--{if !$action}--> class="current"<!--{/if}-->><a href="memcp.php">{lang memcp_home}</a></li><!--{/if}-->
找
<li<!--{if $action == 'profile'}--> class="current"<!--{/if}-->><a href="memcp.php?action=profile">{lang memcp_profile}</a></li>
改成
<li<!--{if $action == 'profile' || $BASESCRIPT == 'remoteavatar.php' || $BASESCRIPT == 'uploadavatar.php'}--> class="current"<!--{/if}-->><a href="memcp.php?action=profile">{lang memcp_profile}</a></li>
第六步: 打開 upload文件夾, 上傳upload內的所有文件( upload 目錄不要上傳 )
第七步: 後台更新緩存