- 最後登錄
- 2012-8-5
- 在線時間
- 978 小時
- UID
- 275
- 閱讀權限
- 140
- 精華
- 71
- 帖子
- 3799
- 日誌
- 0
- EXP
- 6040 點
- 金幣
- 4990 個
- 註冊時間
- 2008-3-27
- 帖子
- 3799
- EXP
- 6040 點
- 金幣
- 4990 個
- 好友
- 0
- 註冊時間
- 2008-3-27
|
作 者: T.O.M.
AL8 版: alan888
適用版本: Discuz! 6.1.0, Discuz! 6.1.F
說 明: 根據 Discuz! 6.1 插件格式整理, 完善的後台管理只須匯入 "discuz_plugin_virtualimage.txt" 及 "discuz_plugin_images_admin.txt", 而不用修改任可後台文件, 功能設定包括編輯及加入形象, 批量修改形象價格, 修改會員形象等
版本更新:
1. 在不使用 "形象過期" 及 "強制使用形象" 情況下, 在帖中顯示形象將不會增加數據庫查詢次數;
2. 在不使用 "形象過期" 及 "強制使用形象" 情況下, 在不同情況下將不會增加或減少數據庫查詢次數;
3. 修正 "刷新形象" 不生效的問題;
4. 修正使用 "形象過期" 時帖中還顯示過期的形象;
5. 調整數據庫更容易調用形象而不會增加或減少數據庫查詢次數;
6. 將大量寫在模板中的 javascript 集中處理;
7. 在修改虛擬形像插件時簡化修改內容;
8. 修正部份模板在編寫上的錯誤;
9. 由其他 Discuz 版本升級至 Discuz 6.1.0 (UC 版本) 所有原來會員的形象可以順利升級及正常使用;
10. 修正 "虛擬形像 For 6.1 測試版" 的所發現的錯誤;
注 意:
1. 照相館必須服務器支援 GD 庫才可正常使用
2. 由於 Internet Explorer 6 對 div + css 的兼容不足, 部份形象可能出現移位現象
由於本插件修改較多及容易出錯, 修改時請先備份所有文件及加倍小心
虛擬形像 For 6.1 全新安裝辦法 (合用於 Discuz 6.1.0 及 6.1F)
1. 下載程式附件 virtualimage_61_Big5 (繁體中文), virtualimage_61_UTF8.rar (UTF-8 繁體中文) 或 virtualimage_61_GBK.rar (簡體中文) 解壓後將 upload 目錄下所有文件按原設定上載至相關目錄
2. 下載下列附件 VLimages.part01.rar 至 VLimages.part09.rar 解壓後上載至相關目錄
3. 將 virtualimage/photo 的目錄屬性設為 "777"
4. 執行 images_install.php , 安裝完畢後僅記刪除 images_install.php
例: 在網址列輸入 http://網址/images_install.php, 然後按指示執行
注意: 在 MySQL 4.1 或已上版本執行時請注意在 config.inc.php 的 $dbcharset 對應碼設定, 如沒有設定將按 config.inc.php 的 $charset 內的語系進行安裝
5. 後台→擴展→插件設置→導入→按 "瀏覽" 及選取 "discuz_plugin_virtualimage.txt"→勾選 "允許導入不同版本 Discuz! 的插件(易產生錯誤!!)"→提交
6. 後台→擴展→插件設置→導入→按 "瀏覽" 及選取 "discuz_plugin_images_admin.txt"→勾選 "允許導入不同版本 Discuz! 的插件(易產生錯誤!!)"→提交
7. 後台→擴展→插件設置→設置→在 "虛擬形象" 點擊 "[插件參數設置] " 及設定好各項細節
注意: "選擇交易方式" 內請填上 extcredits 後的編號, 例如 "2" = 現金 (注意: 只需填上編號)
Discuz 6.1F 文件修改
8. 修改 viewthread.php
找- $postlist = $attachtags = $attachlist = array();
複製代碼 在上面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 再找在下面加上- /*Hack virtualimage*/
- if (!empty($imagesdatas) && ($image_use=='1' || $beold=='1')){
- $vimages = '';
- require_once('./virtualimage/global.php');
- $vimages = images_showimages($imagesdatas);
- unset($imagesdatas);
- }elseif(!empty($viids)){
- $vimages = "var image_url = '{$image_url}';\r\n";
- foreach($viids as $viid){
- $vimages .= "showimage('Show".$viid[pid]."','".$viid[viid]."');\r\n";
- unset($viids);
- }
- }
- /*Hack virtualimage*/
複製代碼 找 (注意不連後面的 "," 號)在後面插入找在後面插入- , $image_url, $image_use, $imagesdatas, $beold, $viids
複製代碼 找更換為- /* hack virtualimage*/
- if ($post['gender']!='0' && $post['anonymous']=='0' && ($image_use=='1' ||!empty($post['viid']))){
- if ($image_use == '1' || $beold == '1'){
- $post['viid'] = '';
- $imagesdata['gender'] = $post['gender'];
- $imagesdata['pid'] = $post['pid'];
- $imagesdata['uid'] = $post['uid'];
- $imagesdatas[] = $imagesdata;
- }else{
- $viid['viid'] = $post['viid'];
- $viid['pid'] = $post['pid'];
- $viids[] = $viid;
- }
- $post['avatar'] = "<div class=\"imagefixeddiv\"><div class=\"imagefixed\"><table summary=\"meminfo\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"border-top:none;\"><div id=\"Show{$post['pid']}\" class=\"viavatar\"></div></td></tr></table></div>";
- }elseif($post['avatar']) {
- /* hack virtualimage*/
複製代碼 找- $post['avatar'] .= '<div class="avatar"><img src="'.$_DCACHE['usergroups'][$post['groupid']]['groupavatar'].'" border="0" alt="" />';
- }
- $post['avatar'] .= '</div>';
複製代碼 更換為- /* hack virtualimage*/
- $post['avatar'] .= '</div><p><img src="'.$_DCACHE['usergroups'][$post['groupid']]['groupavatar'].'" border="0" alt="" /></p>';
- }else{
- $post['avatar'] .= '</div>';
- }
- /* hack virtualimage*/
複製代碼 9. 修改 space.php
找在下面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 找更換為- /*hack virtualimage*/
- if ($member['gender']!='0' && ($image_use == '1' || !empty($member['viid']))){
- if($image_use == '1' || $beold == '1'){
- require_once DISCUZ_ROOT.'./virtualimage/global.php';
- $imageviid = discuz_vi($member[uid],$member[gender],$beold,0);
- }else{
- $imageviid = $member[viid];
- }
- $member['avatar'] = "<DIV id=\"Show{$member['uid']}\" class=\"imagefr1\"></DIV>
- <script type=\"text/javascript\">
- var image_url = '{$image_url}';
- showimage('Show{$member[uid]}','{$imageviid}');
- </script>
- ";
- }elseif($member['avatar']) {
- /*hack virtualimage*/
複製代碼 10. 修改 memcp.php
找在下面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 找更換為- m.uid, m.gender, m.groupid, m.viid
複製代碼 找在上面加上- /*hack virtualimage*/
- if ($member['gender']!='0' && ($image_use == '1' || !empty($member['viid']))){
- if($image_use == '1' || $beold == '1'){
- require_once DISCUZ_ROOT.'./virtualimage/global.php';
- $imageviid = discuz_vi($member[uid],$member[gender],$beold,0);
- }else{
- $imageviid = $member[viid];
- }
- $avatar = "<DIV id=\"Show{$member['uid']}\" class=\"imagefr1\"></DIV>
- <script type=\"text/javascript\">
- var image_url = '{$image_url}';
- showimage('Show{$member[uid]}','{$imageviid}');
- </script>
- ";
- }
- /*hack virtualimage*/
複製代碼 11. 修改 eccredit.php
找在下面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 找在後面插入找更換為- /*hack virtualimage*/
- if ($member['gender']!='0' && ($image_use == '1' || !empty($member['viid']))){
- if($image_use == '1' || $beold == '1'){
- require_once DISCUZ_ROOT.'./virtualimage/global.php';
- $imageviid = discuz_vi($member[uid],$member[gender],$beold,0);
- }else{
- $imageviid = $member[viid];
- }
- $member['avatar'] = "<DIV id=\"Show{$member['uid']}\" class=\"imagefr1\"></DIV>
- <script type=\"text/javascript\">
- var image_url = '{$image_url}';
- showimage('Show{$member[uid]}','{$imageviid}');
- </script>
- ";
- }elseif($member['avatar']) {
- /*hack virtualimage*/
複製代碼 找- $member['avatar'] .= '<br /><img src="'.$_DCACHE['usergroups'][$member['groupid']]['groupavatar'].'" border="0" alt="" />';
- }
- $member['avatar'] .= '</div>';
複製代碼 更換為- $member['avatar'] .= '</div><p><img src="'.$_DCACHE['usergroups'][$member['groupid']]['groupavatar'].'" border="0" alt="" /></p>';
- }else{
- $member['avatar'] .= '</div>';
- }
複製代碼 12. 修改 include/global.func.php
找- $show_message .= $url_forward && empty($inajax) ? '<script>setTimeout("window.location.href =\''.$url_forward.'\';", '.$msgforward['refreshtime'].');</script>' : '';
複製代碼 更換為- $show_message .= $url_forward && empty($inajax) ? '<script>setTimeout("window.location.href =\''.str_replace('&', '&', $url_forward).'\';", '.$msgforward['refreshtime'].');</script>' : '';
複製代碼 13. 修改 include/viewthread_poll.inc.php, include/viewthread_activity.inc.php, include/viewthread_reward.inc.php, include/viewthread_trade.inc.php (此文件要修改 2 處), include/viewthread_video.inc.php, include/viewthread_debate.inc.php 共 6 個文件, 修改辦法相同
找 (注意不連後面的 "," 號)在後面插入找在下面加上- /*Hack virtualimage*/
- if (!empty($imagesdatas) && ($image_use=='1' || $beold=='1')){
- $vimages = '';
- require_once('./virtualimage/global.php');
- $vimages = images_showimages($imagesdatas);
- unset($imagesdatas);
- }elseif(!empty($viids)){
- $vimages = "var image_url = '{$image_url}';\r\n";
- foreach($viids as $viid){
- $vimages .= "showimage('Show".$viid[pid]."','".$viid[viid]."');\r\n";
- unset($viids);
- }
- }
- /*Hack virtualimage*/
複製代碼 14. 修改 include/javascript/common.js
在文件最尾部份加上- function showimage(showpid,currface) {
- if(currface == '') {
- currface = 0;
- }
- var faceArray = currface.split('-');
- if(faceArray[6] != 0){
- faceArray[8] = 0;
- faceArray[9] = 0;
- }
- if(faceArray[12] != 0) {
- faceArray[6] = 0;
- faceArray[8] = 0;
- faceArray[9] = 0;
- faceArray[10] = 0;
- faceArray[11] = 0;
- faceArray[13] = 0;
- faceArray[14] = 0;
- faceArray[17] = 0;
- faceArray[18] = 0;
- faceArray[20] = 0;
- faceArray[21] = 0;
- faceArray[22] = 0;
- }
- var s='';
- for(var i=0; i < 26; i++) {
- if(faceArray != '0'){
- s += '<img src="'+image_url+i+'/'+faceArray+'.gif" style="padding:0px; position:absolute; width:140px; height:226px;z-index: '+i+'" alt="" />';
- }
- }
- s += '<img src="'+image_url+'blank.gif" style="padding:0px; position:absolute; width:140px; height:226px;" alt="" />';
- $(showpid).innerHTML = s;
- }
複製代碼 15. 修改 css_common 模板 (所有風格及日後新增風格如有此文件均要修改), 完成後到後台執行 "更新 css 文件緩存"
在文件最尾部份加上- /*virtualimage*/
- .vispace{width:1em;}
- .perinfo{font-family: Tahoma, Verdana; font-size: 11px; color: #202020;margin-left:5px; text-align:left;}
- .perinfo p{width: 125px; margin: 0 0 0px 8px; text-align: left; background: url(../../images/virtualimage/cool/little.gif) no-repeat 0 50%; padding-left:15px; border-bottom: 1px solid #CDCDCD;}
- .redtext{font-family: Tahoma, Verdana; font-size: 12px; color: #990000;}
- .imagefr1, .imagesshow{padding-top: 0px; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; width: 140px; height: 226px; position: relative; border: 1px solid {BORDERCOLOR};text-align:left;}
- .imagefr{padding:0px; position:absolute; top:0px; left:0px; width:140px; height:226px;}
- .viside{border: 1px solid {BORDERCOLOR}; width: 163px; background-image: url(../../images/virtualimage/cool/biao-bg.gif); padding: 8px; margin-bottom:15px; float: left; -moz-border-radius:8px; text-align:center;}
- .showimages{border: 1px solid {BORDERCOLOR}; background: {ALTBG1}; width: 163px; padding: 8px; margin-bottom:15px;-moz-border-radius:8px;}
- .images_iamges{border: 1px solid {BORDERCOLOR}; width: 140px; background: {ALTBG1}; padding: 10px; -moz-border-radius:8px;}
- .images_iamges dt, .bold{font-weight: bold;}
- .images_iamges dt img{margin-top:5px; margin-bottom:5px; border: 1px solid {COMMONBOXBORDER}; width: 92px;
- height: 92px;}
- .images_iamges dd, .images_show dd{padding:2px; margin-left:15px; text-align: left;}
- .images_iamges dd img, .images_show dd img, .images_show dt, .images_show dl, .images_iamges dl{ margin:0px}
- .subhead{font-weight:bold; text-align:center; background:{ALTBG1}; border: 1px solid {COMMONBOXBORDER}; font-size: 1.2em; padding:7px;}
- .images_show{border: 1px solid {BORDERCOLOR}; background: {ALTBG1}; padding: 10px;}
- .images_show dt img{margin-top:5px; margin-bottom:5px; border: 1px solid {COMMONBOXBORDER}; height: 230px;}
- .imagetmp{padding: 0px; position: absolute; top: 0px; left: 0px; width: 280px; height: 226px;}
- /*virtualimage*/
複製代碼 16. 修改 css_viewthread 模板 (所有風格及日後新增風格如有此文件均要修改), 完成後到後台執行 "更新 css 文件緩存"
在文件最尾部份加上- /*virtualimage*/
- .imagefixeddiv {height:235px;width:140px;margin-top:-5px;}
- .imagefixed {padding:0px;vertical-align: top; position:absolute;margin-top:-5px; width:185px;}
- div.viavatar{margin: 5px; padding: 0px; width:140px; position:relative; height: 226px;}
- /*virtualimage*/
複製代碼 17. 修改 viewthread 模板 (所有風格及日後新增風格如有此文件均要修改)
找- <!--{if $relatedthreadlist && $qihoo['relate']['position']}-->
複製代碼 在上面加上- <!--{if $vimages}-->
- <script type="text/javascript">
- $vimages
- </script>
- <!--{/if}-->
複製代碼 18. 修改 viewthread_poll, viewthread_reward, viewthread_trade, viewthread_video, viewthread_debate, viewthread_activity 模板共 6 個模板, 修改辦法相同 (所有風格及日後新增風格如有此文件均要修改)
找- <!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['interthread']) && $thread['replies']}--><div class="ad_column" id="ad_interthread">$advlist[interthread]</div><!--{else}--><div id="ad_interthread"></div><!--{/if}-->
複製代碼 在下面加上- <!--{if $vimages}-->
- <script type="text/javascript">
- $vimages
- </script>
- <!--{/if}-->
複製代碼 19. 修改 actions.lang.php 語言包
找在下面加上20. 如設定 "是否開啟強制使用" 是否時, 會員必須到 "虛擬形像設計中心" 在 " 個人設置" 內將 "打開或關閉虛擬形像" 設定為 "啟用" 才可正常顯示會員的形像
~完成~
Discuz 6.1.0 文件修改 (按 20080606 版本為準)
8. 修改 viewthread.php
找- $postlist = $attachtags = $attachlist = array();
複製代碼 在上面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 再找在下面加上- /*Hack virtualimage*/
- if (!empty($imagesdatas) && ($image_use=='1' || $beold=='1')){
- $vimages = '';
- require_once('./virtualimage/global.php');
- $vimages = images_showimages($imagesdatas);
- unset($imagesdatas);
- }elseif(!empty($viids)){
- $vimages = "var image_url = '{$image_url}';\r\n";
- foreach($viids as $viid){
- $vimages .= "showimage('Show".$viid[pid]."','".$viid[viid]."');\r\n";
- unset($viids);
- }
- }
- /*Hack virtualimage*/
複製代碼 找 (注意不連後面的 "," 號)在後面插入找在後面插入- , $image_url, $image_use, $imagesdatas, $beold, $viids
複製代碼 找- $post['avatar'] = '<div class="avatar">'.discuz_uc_avatar($post['authorid']);
- if($_DCACHE['usergroups'][$post['groupid']]['groupavatar']) {
- $post['avatar'] .= '<br /><img src="'.$_DCACHE['usergroups'][$post['groupid']]['groupavatar'].'" border="0" alt="" />';
- }
- $post['avatar'] .= '</div>';
- } else {
- $post['avatar'] = '';
- }
複製代碼 更換為- /* hack virtualimage*/
- if ($post['gender']!='0' && $post['anonymous']=='0' && ($image_use=='1' ||!empty($post['viid']))){
- if ($image_use == '1' || $beold == '1'){
- $post['viid'] = '';
- $imagesdata[gender] = $post[gender];
- $imagesdata[pid] = $post[pid];
- $imagesdata[uid] = $post[uid];
- $imagesdatas[] = $imagesdata;
- }else{
- $viid['viid'] = $post['viid'];
- $viid['pid'] = $post['pid'];
- $viids[] = $viid;
- }
- $post['avatar'] = "<div class=\"imagefixeddiv\"><div class=\"imagefixed\"><table summary=\"meminfo\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"border-top:none;\"><div id=\"Show{$post['pid']}\" class=\"viavatar\"></div></td></tr></table></div>";
- }else{
- $post['avatar'] = '<div class="avatar">'.discuz_uc_avatar($post['authorid']);
- }
- if($_DCACHE['usergroups'][$post['groupid']]['groupavatar']) {
- $post['avatar'] .= '</div><p><img src="'.$_DCACHE['usergroups'][$post['groupid']]['groupavatar'].'" border="0" alt="" /></p>';
- }else{
- $post['avatar'] .= '</div>';
- }
- } else {
- $post['avatar'] = '';
- }
- /* hack virtualimage*/
複製代碼 9. 修改 space.php
找在下面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 找- $member['usernameenc'] = rawurlencode($member['username']);
複製代碼 在下面加上- /*hack virtualimage*/
- if ($member['gender']!='0' && ($image_use == '1' || !empty($member['viid']))){
- if($image_use == '1' || $beold == '1'){
- require_once DISCUZ_ROOT.'./virtualimage/global.php';
- $imageviid = discuz_vi($member[uid],$member[gender],$beold,0);
- }else{
- $imageviid = $member[viid];
- }
- $avatar = "<DIV id=\"Show{$member['uid']}\" class=\"imagefr1\"></DIV>
- <script type=\"text/javascript\">
- var image_url = '{$image_url}';
- showimage('Show{$member[uid]}','{$imageviid}');
- </script>";
- }else{
- $avatar = "<div class=\"avatar\">".discuz_uc_avatar($member[uid])."</div>";
- }
- /*hack virtualimage*/
複製代碼 10. 修改 memcp.php
找在下面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 找- lastvisit, lastip, lastpost
複製代碼 在後面插入找- $member['postperday'] = $timestamp - $member['regdate'] > 86400
複製代碼 在上面加上- /*hack virtualimage*/
- if ($member['gender']!='0' && ($image_use == '1' || !empty($member['viid']))){
- if($image_use == '1' || $beold == '1'){
- require_once DISCUZ_ROOT.'./virtualimage/global.php';
- $imageviid = discuz_vi($member[uid],$member[gender],$beold,0);
- }else{
- $imageviid = $member[viid];
- }
- $avatar = "<td><DIV id=\"Show{$member['uid']}\" class=\"imagefr1\"></DIV>
- <script type=\"text/javascript\">
- var image_url = '{$image_url}';
- showimage('Show{$member[uid]}','{$imageviid}');
- </script>
- <p class=\"memberinfo_avatar\"><a href=\"space.php?uid=".$discuz_uid."\">".$discuz_userss."</a></p></td>";
- }else{
- $avatar = "<td class=\"memberinfo_avatar\">".discuz_uc_avatar($member[uid])."<p><a href=\"space.php?uid=".$discuz_uid."\">".$discuz_userss."</a></p></td>";
- }
- /*hack virtualimage*/
複製代碼 11. 修改 eccredit.php
找複製代碼 在下面加上- /*hack virtualimage*/
- require_once './forumdata/cache/plugin_virtualimage.php';
- $image_url = $_DPLUGIN['virtualimage']['vars']['imageurl'];
- $image_use = $_DPLUGIN['virtualimage']['vars']['orderuse'];
- $beold = $_DPLUGIN['virtualimage']['vars']['beold'];
- /*hack virtualimage*/
複製代碼 找在後面插入找- $member['avatar'] = '<div class="avatar">'.discuz_uc_avatar($member['uid']);
複製代碼 在上面加上- /*hack virtualimage*/
- if ($member['gender']!='0' && ($image_use == '1' || !empty($member['viid']))){
- if($image_use == '1' || $beold == '1'){
- require_once DISCUZ_ROOT.'./virtualimage/global.php';
- $imageviid = discuz_vi($member[uid],$member[gender],$beold,0);
- }else{
- $imageviid = $member[viid];
- }
- $member['avatar'] = "<DIV id=\"Show{$member['uid']}\" class=\"imagefr1\"></DIV>
- <script type=\"text/javascript\">
- var image_url = '{$image_url}';
- showimage('Show{$member[uid]}','{$imageviid}');
- </script>
- ";
- }else{
- /*hack virtualimage*/
複製代碼 找- $member['avatar'] .= '<br /><img src="'.$_DCACHE['usergroups'][$member['groupid']]['groupavatar'].'" border="0" alt="" />';
- }
- $member['avatar'] .= '</div>';
複製代碼 更換為- $member['avatar'] .= '</div><p><img src="'.$_DCACHE['usergroups'][$member['groupid']]['groupavatar'].'" border="0" alt="" /></p>';
- }else{
- $member['avatar'] .= '</div>';
- }
- }
複製代碼 12. 修改 include/global.func.php
找- $show_message .= $url_forward && empty($inajax) ? '<script>setTimeout("window.location.href =\''.$url_forward.'\';", '.$msgforward['refreshtime'].');</script>' : '';
複製代碼 更換為- $show_message .= $url_forward && empty($inajax) ? '<script>setTimeout("window.location.href =\''.str_replace('&', '&', $url_forward).'\';", '.$msgforward['refreshtime'].');</script>' : '';
複製代碼 13. 修改 include/viewthread_poll.inc.php, include/viewthread_activity.inc.php, include/viewthread_reward.inc.php, include/viewthread_trade.inc.php (此文件要修改 2 處), include/viewthread_video.inc.php, include/viewthread_debate.inc.php 共 6 個文件, 修改辦法相同
找 (注意不連後面的 "," 號)在後面插入找在下加上面- /*Hack virtualimage*/
- if (!empty($imagesdatas) && ($image_use=='1' || $beold=='1')){
- $vimages = '';
- require_once('./virtualimage/global.php');
- $vimages = images_showimages($imagesdatas);
- unset($imagesdatas);
- }elseif(!empty($viids)){
- $vimages = "var image_url = '{$image_url}';\r\n";
- foreach($viids as $viid){
- $vimages .= "showimage('Show".$viid[pid]."','".$viid[viid]."');\r\n";
- unset($viids);
- }
- }
- /*Hack virtualimage*/
複製代碼 14. 修改 include/javascript/common.js
在文件最尾部份加上- function showimage(showpid,currface) {
- if(currface == '') {
- currface = 0;
- }
- var faceArray = currface.split('-');
- if(faceArray[6] != 0){
- faceArray[8] = 0;
- faceArray[9] = 0;
- }
- if(faceArray[12] != 0) {
- faceArray[6] = 0;
- faceArray[8] = 0;
- faceArray[9] = 0;
- faceArray[10] = 0;
- faceArray[11] = 0;
- faceArray[13] = 0;
- faceArray[14] = 0;
- faceArray[17] = 0;
- faceArray[18] = 0;
- faceArray[20] = 0;
- faceArray[21] = 0;
- faceArray[22] = 0;
- }
- var s='';
- for(var i=0; i < 26; i++) {
- if(faceArray != '0'){
- s += '<img src="'+image_url+i+'/'+faceArray+'.gif" style="padding:0px; position:absolute; width:140px; height:226px;z-index: '+i+'" alt="" />';
- }
- }
- s += '<img src="'+image_url+'blank.gif" style="padding:0px; position:absolute; width:140px; height:226px;" alt="" />';
- $(showpid).innerHTML = s;
- }
複製代碼 15. 修改 css_common 模板 (所有風格及日後新增風格如有此文件均要修改), 完成後到後台執行 "更新 css 文件緩存"
在文件最尾部份加上- /*virtualimage*/
- .vispace{width:1em;}
- .perinfo{font-family: Tahoma, Verdana; font-size: 11px; color: #202020;margin-left:5px; text-align:left;}
- .perinfo p{
- width: 125px; margin: 0 0 0px 8px; text-align: left; background: url(../../images/virtualimage/cool/little.gif) no-repeat 0 50%; padding-left:15px; border-bottom: 1px solid #CDCDCD;}
- .redtext{font-family: Tahoma, Verdana; font-size: 12px; color: #990000;}
- .imagefr1 {margin: 2px Auto; padding-top: 0px; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; width: 140px; height: 226px; position: relative; border: 1px solid {BORDERCOLOR};}
- .imagefr{padding:0px; position:absolute; top:0px; left:0px; width:140px; height:226px;}
- .viside{border: 1px solid {BORDERCOLOR}; width: 163px; background-image: url(../../images/virtualimage/cool/biao-bg.gif); padding: 8px; margin-bottom:15px; float: left; -moz-border-radius:8px; text-align:center; }
- .showimages{border: 1px solid {BORDERCOLOR}; background: {ALTBG1}; width: 163px; padding: 8px; margin-bottom:15px;-moz-border-radius:8px;}
- .images_iamges{border: 1px solid {BORDERCOLOR}; width: 140px; background: {ALTBG1}; padding: 10px; -moz-border-radius:8px; }
- .images_iamges dt, .bold{font-weight: bold;}
- .images_iamges dt img { margin-top:5px; margin-bottom:5px; border: 1px solid {COMMONBOXBORDER}; width: 92px;
- height: 92px;}
- .images_iamges dd, .images_show dd{padding:2px; margin-left:15px; text-align: left;}
- .images_iamges dd img, .images_show dd img, .images_show dt, .images_show dl, .images_iamges dl{margin:0px}
- .subhead{font-weight:bold; text-align:center; background:{ALTBG1}; border: 1px solid {COMMONBOXBORDER}; font-size: 1.2em; padding:7px;}
- .images_show{border: 1px solid {BORDERCOLOR}; background: {ALTBG1}; padding: 10px;}
- .images_show dt img{margin-top:5px; margin-bottom:5px; border: 1px solid {COMMONBOXBORDER}; height: 230px;}
- .imagetmp { padding: 0px; position: absolute; top: 0px; left: 0px; width: 280px; height: 226px;}
- .imagesshow {padding-top: 0px; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; width: 140px; height: 226px; position: relative; border: 1px solid {BORDERCOLOR};text-align:left;}
- /*virtualimage*/
複製代碼 16. 修改 css_viewthread 模板 (所有風格及日後新增風格如有此文件均要修改), 完成後到後台執行 "更新 css 文件緩存"
在文件最尾部份加上- /*virtualimage*/
- .imagefixeddiv {height:235px;width:140px;margin-top:-5px;}
- .imagefixed {padding:0px;vertical-align: top; position:absolute;margin-top:-5px; width:185px;}
- div.viavatar{margin: 5px; padding: 0px; width:140px; position:relative; height: 226px;}
- /*virtualimage*/
複製代碼 17. 修改 viewthread 模板 (所有風格及日後新增風格如有此文件均要修改)
找- <!--{if $relatedthreadlist && $qihoo['relate']['position']}-->
複製代碼 在上面加上- <!--{if $vimages}-->
- <script type="text/javascript">
- $vimages
- </script>
- <!--{/if}-->
複製代碼 18. 修改 viewpro_classic 模板 (所有風格及日後新增風格如有此文件均要修改)
找- <div class="avatar">
- {echo discuz_uc_avatar($member[uid])}
- </div>
複製代碼 更換為19. 修改 memcp_home 模板 (所有風格及日後新增風格如有此文件均要修改)
找- <td class="memberinfo_avatar">
- {echo discuz_uc_avatar($discuz_uid)}
- <p><a href="space.php?uid=$discuz_uid">$discuz_userss</a></p>
- </td>
複製代碼 更換為20. 修改 viewthread_poll, viewthread_reward, viewthread_trade, viewthread_video, viewthread_debate, viewthread_activity 模板共 6 個模板, 修改辦法相同 (所有風格及日後新增風格如有此文件均要修改)
找- <!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['interthread']) && $thread['replies']}--><div class="ad_column" id="ad_interthread">$advlist[interthread]</div><!--{else}--><div id="ad_interthread"></div><!--{/if}-->
複製代碼 在下面加上- <!--{if $vimages}-->
- <script type="text/javascript">
- $vimages
- </script>
- <!--{/if}-->
複製代碼 21. 修改 actions.lang.php 語言包
找在下面加上22. 如設定 "是否開啟強制使用" 是否時, 會員必須到 "虛擬形像設計中心" 在 " 個人設置" 內將 "打開或關閉虛擬形像" 設定為 "啟用" 才可正常顯示會員的形像
~完成~
全新安裝步驟全部完成
從其他版本升級至虛擬形像 For 6.1 辦法 (合用於 Discuz 6.1.0 及 6.1F)
1. 如果是目前使用 For Discuz 5.0(含) 及以下版本,
- 先往 虛擬形像 For 6.0, 按帖內升級辦法升級至 虛擬形像 For 6.0 版本 (只要執行 images_install.php 升級數據, 不用修改任何文件),
- 下載本帖程式附件 virtualimage_61_Big5 (繁體中文) 解壓後將 upload 目錄下所有文件按原設定上載至相關目錄
- 執行本帖插件包內的 upvi61.php 升級數據,
- 再按上參考 Discuz 6.1.0 或 6.1F 從第八步開始的修改辦法修改相關文件,
- 修改完成後往後台執行 "更新緩存" 及 刪除 images_install.php 和 upvi61.php 兩個文件
2. 如果是目前使用 For Discuz 5.5(含) 及以上版本,
- 下載本帖程式附件 virtualimage_61_Big5 (繁體中文) 解壓後將 upload 目錄下所有文件按原設定上載至相關目錄
- 執行本帖插件包內的 upvi61.php 升級數據,
- 然後按上參考 Discuz 6.1.0 或 6.1F 從第八步開始的修改辦法修改相關文件,
- 修改完成後往後台執行 "更新緩存" 及 刪除 upvi61.php 文件
3. 如果是目前使用 For Discuz 6.1 測試版本,
這個版本與正式版相差不大, 雖然修改辦法有些差異, 但不會影響整體性能, 如果在加回該帖說明的修正後已可以正常使用
[ 本帖最後由 dlalden 於 2008-11-9 16:21 編輯 ] |
|