设为首页收藏本站

Discuz! 官方站

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3405|回复: 22

[发布] Avatar preview on forumdisplay for discuz 6.1.0

[复制链接]

0

主题

0

听众

438

积分

Conqueror

Rank: 3Rank: 3

UID
869484
帖子
325
威望
11
在线时间
1 小时
注册时间
2007-12-17
发表于 2008-4-27 14:44:53 |显示全部楼层
pree view avatar on formdisplay   from ucenter avatar
support for discuz 6.1.0  GBK . UTF8
I finished this post, the post才被people to the very top of the original posts: http://www.discuz.net/thread-794704-1-1.html

I am Thai  support discuz thai community : http://www.cazdesign.com/forums/index.php
screen shot :

forumdemo222333.PNG


demo : http://www.buachompoox.com/forum-2-1.html

skin preemod v. 1.0 for dz6.1.0 : http://www.discuz.net/thread-907430-1-1.html

modify list

1. templates/default/forumdisplay.htm   view
  1.      <td class="author">
  2.                                         <cite>
  3.                                         <!--{if $thread['authorid'] && $thread['author']}-->
  4.                                                 <a href="space.php?uid=$thread[authorid]">$thread[author]</a>
  5.                                         <!--{else}-->
  6.                                                 <!--{if $forum['ismoderator']}-->
  7.                                                         <a href="space.php?uid=$thread[authorid]">{lang anonymous}</a>
  8.                                                 <!--{else}-->
  9.                                                         {lang anonymous}
  10.                                                 <!--{/if}-->
  11.                                         <!--{/if}-->
  12.                                         </cite>
  13.                                         <em>$thread[dateline]</em>
  14.                                 </td>
复制代码
replace with
  1. <td class="author">

  2. <div style="float:left;width:26px;padding-top:5px;">
  3. <a href="space.php?action=viewpro&uid=$thread[authorid]" style="float: left"><img src="http://youdomain/ucenter/avatar.php?uid=$thread[authorid]&size=small" class="ava_border" width="24px" height="24px" style="border: 1px solid #C0C0C0" alt="<img src='http://youdomain/ucenter/avatar.php?uid=$thread[authorid]&size=middle' border='0' hspace='2' vspace='2' class='ava_border' width='100px' height='100px'>
  4. name : $thread[author].
  5. date : $thread[dateline]"/></a></div>
  6. <div style="float:left;padding:5px 0 0 10px;">
  7. <cite>
  8. <div style="width:73px;height:18px;overflow:hidden;">
  9.                     <!--{if $thread['authorid'] && $thread['author']}-->
  10.                         <a href="space.php?action=viewpro&uid=$thread[authorid]">$thread[author]</a>
  11.                     <!--{else}-->
  12.                         <!--{if $forum['ismoderator']}-->
  13.                             <a href="space.php?action=viewpro&uid=$thread[authorid]">{lang anonymous}</a>
  14.                         <!--{else}-->
  15.                             {lang anonymous}
  16.                         <!--{/if}-->
  17.                     <!--{/if}-->
  18. </div><p  style="margin:-5px 0 0 0;font-family:Tahoma;font-size: 8pt">$thread[dateline]</p></cite>
  19. </div>

  20.                 </td>
复制代码
change  http://youdomain/ucenter/   for your ucenter

2. include/javascript/common.js   put  the  code  under last line
  1. //www.chenhailm.comALT
  2. var sPop = null;
  3. var postSubmited = false;
  4. document.write("<style type='text/css'id='defaultPopStyle'>");
  5. document.write(".cPopText { font-family: Verdana, Tahoma; background-color: #DDEEFF; border: 1px #8899AA dashed; font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; filter: Alpha(Opacity=80)}");

  6. document.write("</style>");
  7. document.write("<div id='popLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");



  8. function showPopupText(event) {
  9.         if(event.srcElement) o = event.srcElement; else o = event.target;
  10.         if(!o) {
  11.                 return;
  12.         }
  13.         MouseX = event.clientX;
  14.         MouseY = event.clientY;
  15.         if(o.alt != null && o.alt != '') {
  16.                 o.pop = o.alt;
  17.                 o.alt = '';
  18.         }
  19.         if(o.title != null && o.title != '') {
  20.                 o.pop = o.title;
  21.                 o.title = '';
  22.         }
  23.         if(o.pop != sPop) {
  24.                 sPop = o.pop;
  25.                 if(sPop == null || sPop == '') {
  26.                         $('popLayer').style.visibility = "hidden";
  27.                 } else {
  28.                         popStyle = o.dyclass != null ? o.dyclass : 'popupmenu_popup';
  29.                         $('popLayer').style.visibility = "visible";
  30.                         showIt();
  31.                 }
  32.         }
  33. }

  34. function showIt() {
  35.         $('popLayer').className = popStyle;
  36.         $('popLayer').innerHTML = sPop.replace(/</g,"<").replace(/>/g,">").replace(/\n/g,"<br>");
  37.                
  38.         var bodySL, bodyST;
  39.         if(window.pageXOffset){
  40.                 bodySL=window.pageXOffset;
  41.         }else if(document.documentElement&&document.documentElement.scrollLeft){
  42.                 bodySL=document.documentElement.scrollLeft;
  43.         }else if(document.body){
  44.                 bodySL=document.body.scrollLeft; //author: meizz
  45.         }
  46.         
  47.         if(window.pageYOffset){
  48.                 bodyST=window.pageYOffset;
  49.         }else if(document.documentElement&&document.documentElement.scrollTop){
  50.                 bodyST=document.documentElement.scrollTop;
  51.         }else if(document.body){
  52.                 bodyST=document.body.scrollTop;
  53.         }
  54.         
  55.         var bodyCW, bodyCH;
  56.         if(window.innerWidth){
  57.                 bodyCW=window.innerWidth;
  58.         }else if(document.documentElement&&document.documentElement.clientWidth){
  59.                 bodyCW=document.documentElement.clientWidth;
  60.         }else if(document.body){
  61.                 bodyCW=document.body.clientWidth; //author: meizz
  62.         }
  63.         
  64.         if(window.innerHeight){
  65.                 bodyCH=window.innerHeight;
  66.         }else if(document.documentElement&&document.documentElement.clientHeight){
  67.                 bodyCH=document.documentElement.clientHeight;
  68.         }else if(document.body){
  69.                 bodyCH=document.body.clientHeight;
  70.         }

  71.         if($('popLayer').clientWidth>300){
  72.                 var popWidth = 300;
  73.         }else{
  74.                 var popWidth = $('popLayer').clientWidth;
  75.         }
  76.         
  77.         var popWidth = $('popLayer').clientWidth;
  78.         var popHeight = $('popLayer').clientHeight;
  79.         var popLeftAdjust = MouseX + 12 + popWidth > bodyCW ? -popWidth - 24 : 0;
  80.         var popTopAdjust = MouseY + 12 + popHeight > bodyCH ? -popHeight - 24 : 0;
  81.         $('popLayer').style.left = (MouseX + 12 + bodySL + popLeftAdjust) + 'px';
  82.         $('popLayer').style.top = (MouseY + 12 + bodyST + popTopAdjust) + 'px';
  83. }

  84. if(!document.onmouseover) {
  85.         document.onmouseover = function(e) {
  86.                 var event = e ? e : window.event;
  87.                 showPopupText(event);
  88.         };
  89. }
  90. //www.chenhailm.comALT
复制代码
3. templates/default/css_common.htm    input  code  to  last under line
  1. img.show_border, a img.show_border        {padding: 4px; background: #fff; border: 1px solid #bebebe}
  2. a:hover img.img_border        {border-color: #FF9900}
  3. img.img_border, a img.img_border        {border: 5px solid #FFFFFF}
  4. a:hover img.ava_border        {border-color: #FF9900}
  5. img.ava_border, a img.ava_border        {border:1px solid #ccc; padding:2px; margin:0px; background-color:#fff;}
复制代码
4.  update cache to finish

[ 本帖最后由 buachompoox 于 2008-4-27 15:29 编辑 ]
已有 1 人评分金币 收起 理由
shy9000 + 1 Good!

总评分: 金币 + 1   查看全部评分

0

主题

0

听众

132

积分

Member

Rank: 2

UID
922635
帖子
165
威望
0
在线时间
0 小时
注册时间
2008-4-20
发表于 2008-4-27 14:48:24 |显示全部楼层
kanbudong.................
落花听雨轩:http://www.51tingyu.cn
回复

使用道具 举报

jease      

2

主题

0

听众

2060

积分

King

UCenter Home Support Team Mast

Rank: 6Rank: 6

UID
624162
帖子
1194
威望
46
在线时间
32 小时
注册时间
2007-1-22
发表于 2008-4-27 14:58:53 |显示全部楼层
thanks
please introduce
回复

使用道具 举报

shy9000      

97

主题

6

听众

2393

积分

King

Kai.Lu站长

Rank: 6Rank: 6

UID
757019
帖子
2601
威望
25
在线时间
253 小时
注册时间
2007-7-15
发表于 2008-4-27 15:06:54 |显示全部楼层
Thank you
Where are you from?
回复

使用道具 举报

0

主题

0

听众

438

积分

Conqueror

Rank: 3Rank: 3

UID
869484
帖子
325
威望
11
在线时间
1 小时
注册时间
2007-12-17
发表于 2008-4-27 15:20:20 |显示全部楼层
I come from thai
回复

使用道具 举报

ny165      

6

主题

0

听众

540

积分

Lord

三木

Rank: 4

UID
377362
帖子
465
威望
0
在线时间
64 小时
注册时间
2006-6-1
发表于 2008-4-27 15:23:34 |显示全部楼层
Which people   ?
回复

使用道具 举报

ny165      

6

主题

0

听众

540

积分

Lord

三木

Rank: 4

UID
377362
帖子
465
威望
0
在线时间
64 小时
注册时间
2006-6-1
发表于 2008-4-27 15:25:12 |显示全部楼层
Thai  ?
回复

使用道具 举报

头像被屏蔽

0

主题

0

听众

736

积分

Banned to Post

我是奶皮厚的骗子

UID
915131
帖子
824
威望
3
在线时间
0 小时
注册时间
2008-4-3
发表于 2008-4-27 15:26:17 |显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

ny165      

6

主题

0

听众

540

积分

Lord

三木

Rank: 4

UID
377362
帖子
465
威望
0
在线时间
64 小时
注册时间
2006-6-1
发表于 2008-4-27 15:27:12 |显示全部楼层

回复 8# qq283793686 的帖子

不是展示  
楼主貌似不是我国人
回复

使用道具 举报

McFog      

0

主题

0

听众

205

积分

Conqueror

Rank: 3Rank: 3

UID
783242
帖子
91
威望
10
在线时间
5 小时
注册时间
2007-8-22
发表于 2008-4-27 15:28:23 |显示全部楼层
泰国人啊
本人系马甲一名

本人言行与其他任何人无关,请勿对号入座
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

Archiver|手机版|北京康盛新创科技有限责任公司 ( 京ICP证110024号|京网文[2011]0019-007号   

GMT+8, 2012-5-26 01:58 , Processed in 0.110796 second(s), 18 queries , Gzip On, Memcache On.

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部