虚拟形像 AL8 v1版 头像与虚拟形象共存的方法 FOR 5.0正式版
http://www.discuz.net/thread-421175-1-6.html
请先看原帖
前7步是一样的
第八步修改这样改
修改 viewthread.php
找- $postlist = $attachtags = array();
复制代码 上面加上- //-----------------------------virtualimage
- require_once './forumdata/cache/plugin_virtualimage.php';
- $imagesset = $_DPLUGIN['virtualimage']['vars'];
- unset($_DPLUGIN['virtualimage']['vars']);
- if($imagesset[openalpha]==1){
- $alpha = "FILTER: alpha(opacity=\"+WearArray[i]+\")";
- }
- $imagesdatas = '';
- //-----------------------------
复制代码 找在後面加上找- } else {
- $post['avatar'] = '';
- }
复制代码 下面加上- //------------------------------------------------------------virtualimage
- if ($post[gender]==1){
- $imagesdata[tempequip] = '0-0-0-0-0-0-0-0-init-init-0-init-0-init-init-0-0-0-init-0-0-0-0-0-0-0'; //male initial
- $imagesdata[sex] = "m";
- $imagesdata[upid] = "init";
- }else if ($post[gender]==2){
- $imagesdata[tempequip] = '0-0-0-0-0-0-0-0-initf-initf-0-initf-0-initf-initf-0-0-0-initf-0-0-0-0-0-0-0'; //female initial
- $imagesdata[sex] = "f";
- $imagesdata[upid] = "initf";
- }
- $imagesdata[pid] = $post[pid];
- $imagesdata[uid] = $post[uid];
- $imagesdatas[] = $imagesdata;
- $post['ava'] = "
- <!-- virtualimage start-->
- <div id=Show{$post['pid']}
- style=\"padding-right: 0px; padding-left: 0px; left: 0px; padding-bottom: 0px; width: 140px; padding-top: 0px; position: relative; top: 0px; height: 226px\"></div>
- <!-- virtualimage end-->";
- //--------------------------------------------------------------
复制代码 找- $relatedthreadlist = array();
复制代码 上面加上- //--------------------------------------------virtualimage
- if($imagesdatas!=''){
- $vimages = '';
- require_once('./virtualimage/global.php');
- $vimages = images_showimages($imagesdatas,$alhpa,$imagesset[imageurl]);
- unset($imagesdatas,$imagesdata,$alpha);
- }
复制代码 修改 viewthread 模板
找- <!--{if !empty($advlist['thread'][$post['count']])}--><tr class="t_infoline"><td class="line" style="padding: 5px">[{lang advertisement}] $advlist[thread][$post[count]]</td></tr><!--{/if}-->
- <!--{/if}-->
- </table></td></tr></table></div>
- <!--{/loop}-->
复制代码 后面加上- <!--{if $post['authorid'] && $post['username'] && !$post['anonymous']}-->$vimages<!--{/if}-->
复制代码 再找- <!--{elseif $post['avatar'] && $showavatars}-->
- <table width="95%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; overflow: hidden">
- <tr><td align="center">$post[avatar]</td></tr></table><br>
- <!--{else}-->
- <br><br>
- <!--{/if}-->
复制代码 下面加上- <table width="95%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; overflow: hidden">
- <tr><td align="center">$post[ava]</td></tr></table><br>
复制代码 完成。。
大家也可以自己把- <table width="95%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; overflow: hidden">
- <tr><td align="center">$post[ava]</td></tr></table><br>
复制代码 加到比如帖子内容里面。。防止个人信息栏过大
感谢18楼原帖由 iioo2005 于 2006-10-20 10:40 发表
有两个意见
一是在修改viewthread.php中的那段时,最后在开头加上
if($post['useimages']==1){
结尾加回 "}"
那便减轻没有用 virtualimage 的用户查讯
二是在 viewthread.htm摸版中的 $post[ava]
改为 <!--{if $post['useimages']==1}-->$post[ava]><!--{/if}-->
这样就不是强制所有的用户都开启虚拟形象了 演示等我截图
[ 本帖最后由 Flash菲 于 2006-10-20 15:40 编辑 ] |