虚位以待(AD)
虚位以待(AD)
首页 > CMS教程 > Phpwind > phpwind8.7板块列表显示用户小头像

phpwind8.7板块列表显示用户小头像
类别:Phpwind   作者:码皇   来源:互联网   点击:

需要修改的文件分别为:thread phptemplatewindthread_maincommon htm 1、打开根目录文件:thread php 查找:复制代码$query= $this-db-query("SELECT * FROM pw_threads WHERE tidIN($toptids) ORDER BY spec ,魔客吧
需要修改的文件分别为:
thread.php
templatewindthread_maincommon.htm




1、打开根目录文件:thread.php

查找:
复制代码
  1. $query= $this->db->query("SELECT * FROM pw_threads WHERE tidIN($toptids) ORDER BY specialsort DESC,lastpost DESC $limit");

替换为:
复制代码
  1. $query= $this->db->query("SELECT t.*,m.icon AS uicon FROM pw_threads tLEFT JOIN pw_members m ON t.authorid=m.uid WHERE tid IN($toptids) ORDERBY specialsort DESC,lastpost DESC $limit");

查找:
复制代码
  1. $query= $this->db->query("SELECT * FROM pw_threads t WHERE t.fid=" .S::sqlEscape($this->fid) . " $sqladd ORDER BYt.{$this->threadSearch->order} {$this->threadSearch->asc} " .S::sqlLimit($offset, $limit2));

替换为:
复制代码
  1. $query= $this->db->query("SELECT t.*,m.icon AS uicon FROM pw_threads tLEFT JOIN pw_members m ON t.authorid=m.uid WHERE t.fid=" .S::sqlEscape($this->fid) . " $sqladd ORDER BYt.{$this->threadSearch->order} {$this->threadSearch->asc} " .S::sqlLimit($offset, $limit2));
查找:
复制代码
  1. $attachtype    = array('1' => 'img', '2' => 'txt', '3' => 'zip');
在下面增加:
复制代码
  1. require_once (R_P . 'require/showimg.php');
查找:
复制代码
  1. $foruminfo['allowhtm']== 1 && $htmurl =$db_readdir.'/'.$this->fid.'/'.date('ym',$thread['postdate']).'/'.$thread['tid'].'.html';

在上面增加:
复制代码
  1. list($thread['uicon']) = showfacedesign($thread['uicon'], 1, 's');

2、打开模板文件:templatewindthread_maincommon.htm(这里的wind是模板目录)


查找:270行附近的(有很多个这样的,要在270行附近的才是)
复制代码
  1. <td class="author">

替换为:
复制代码
  1. <td class="authorImg">
  2.                                     <ahref="{$db_userurl}$thread[authorid]" target="_blank"><imgclass="fl" style="margin-right:5px;width:32px;height:32px;"src="{$thread[uicon]}" alt="{$thread["author']}" /></a>
查找到:
复制代码
  1. <trclass="tr4"><td width="30"></td><tdstyle="padding-left:0;">普通主题</td&gt;<tdwidth="95"></td><td width="60"></td><tdwidth="95"></td></tr>
替换为:
复制代码
  1. <trclass="tr4"><td width="30"></td><tdstyle="padding-left:0;">普通主题</td&gt;<tdclass="authorImg"></td><td width="60"></td><tdwidth="95"></td></tr>
查找到(首页格式):
复制代码
  1. <td class="author">
  2.                 <a href="u.php?username=$NT_A[rawauthor]" target="_blank" class=" _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&username={$cardusername}" data-card-key="{$NT_A[author]}">$NT_A[author]</a>
替换为:
复制代码
  1. <td class="author" style="width:120px">
  2.                 <a href="u.php?username=$NT_A[rawauthor]" target="_blank" class=" _cardshow" data-card-url="pw_ajax.php?action=smallcard&type=showcard&username={$cardusername}" data-card-key="{$NT_A[author]}">$NT_A[author]</a>

查找到(次页格式): 复制代码
  1. <td class="author"><a href="u.php?username=$thread[lastposter]" target="_blank" class=" _cardshow" data-card-url="pw_ajax.php? action=smallcard&type=showcard&username={$cardusername}" data-card-key="{$thread['lastposter']}">$thread[lastposter]</a><p><a href="read.php?tid={$thread[tid]}&page=e#a"title="$thread[lstpdate]">$thread[lstptime]</a></p></td>

替换为:
复制代码
  1. <td class="author" style="width:95px"><a href="u.php?username=$thread[lastposter]" target="_blank" class=" _cardshow" data-card-url="pw_ajax.php? action=smallcard&type=showcard&username={$cardusername}" data-card-key="{$thread['lastposter']}">$thread[lastposter]</a><p><a href="read.php?tid={$thread[tid]}&page=e#a"title="$thread[lstpdate]">$thread[lstptime]</a></p></td>

登录后台,模式->论坛模式->风格模版->选择你的风格[编辑]->自定义css样式添加下面样式

复制代码
  1. /*帖子列表头像样式*/
  2. .authorImg { width:132px; } /*根据实际修改*/
  3. .authorImg a { display:block; }
  4. .authorImg a img { padding:1px; border:1px solid #EEE; }
  5. .authorImg a:hover img { padding:1px; border:1px solid #CCC; }


傻瓜包子(已更新):

傻瓜包子.zip


相关热词搜索: phpwind8 7板块列表显示用户小头像