ϴupload ļĶ Ȼ޸


޸ķ
1ҷĿ¼ templates/Լ/ʽ.css

(ͼƬַע޸ĺ: background-image: url(../images/tips-close.png);):

/**/
#related_topics {
  float: center;
  padding: 5px;
  margin: 0 0 2px;
  border: 1px dashed gray;
  background-color: #f3f3f3;
  width: 500px;
  overflow: hidden;
  text-align: left;
  font-family: Arial, sans-serifarial, Verdana, Helvetica;
  font-size: 12px;
  line-height: 1.5;
  color: black;
}

#related_topics span.close {
  margin-left: 405px;
}

#related_topics span.close a {
  background-repeat: no-repeat;
  background-position: center center;
  background-image: url(../images/tips-close.png);
  padding: 4px;
  background-repeat: no-repeat;
  text-decoration: none;  
}
#related_topics UL {	PADDING-RIGHT: 0px;	PADDING-LEFT: 0px;	PADDING-BOTTOM: 0px;	MARGIN: 0px 0px 0.5em;	PADDING-TOP: 0px} 
#related_topics UL LI {	PADDING-RIGHT: 0px;	PADDING-LEFT: 0px;	PADDING-BOTTOM: 0px;	MARGIN: 0px 0px 0.25em 15px;	PADDING-TOP: 0px}
#related_topics li {
  list-style: square;
  margin: 5px 5px 5px 15px;
}


2޸ viewthread.php

  :

$thread = $sdb->fetch_first("SELECT * FROM {$tablepre}threads t WHERE tid='$tid'".($auditstatuson ? '' : " AND displayorder>='0'"));

if(!$thread) {
	showmessage('thread_nonexistence');
}


ں:


//Start
$toplcslist = '';
if ($tid){
$query = $db->query( "SELECT fid, authorid  FROM {$tablepre}posts WHERE tid  = '$tid'" );
$toplcs = $db->fetch_array( $query );
//$query = $db->query("SELECT subject,tid  FROM {$tablepre}posts WHERE first = 1 AND authorid='{$toplcs['authorid']}' AND fid='{$toplcs['fid']}' ORDER BY dateline  LIMIT 5");

$query = $db->query("SELECT *   FROM {$tablepre}posts AS t1 JOIN (SELECT ROUND(RAND() * ((SELECT MAX(pid) FROM {$tablepre}posts)-(SELECT MIN(pid) FROM {$tablepre}posts))+(SELECT MIN(pid) FROM {$tablepre}posts)) AS pid) AS t2 
WHERE t1.pid >= t2.pid AND t1.first = 1 AND t1.authorid='{$toplcs['authorid']}' AND t1.fid='{$toplcs['fid']}' AND tid!='$tid' ORDER BY t1.pid LIMIT 5");

while ($rs = $db->fetch_array($query)) {
$rs['dateline'] = gmdate("$dateformat $timeformat", $rs['dateline'] + $timeoffset * 3600);
$toplcslist[] = $rs;
}
if ( !$toplcslist)
{$query = $db->query("SELECT *   FROM {$tablepre}posts AS t1 JOIN (SELECT ROUND(RAND() * ((SELECT MAX(pid) FROM {$tablepre}posts)-(SELECT MIN(pid) FROM {$tablepre}posts))+(SELECT MIN(pid) FROM {$tablepre}posts)) AS pid) AS t2 
WHERE t1.pid >= t2.pid AND t1.first = 1   AND t1.fid='{$toplcs['fid']}' AND tid!='$tid' ORDER BY t1.pid LIMIT 5");
while ($rs = $db->fetch_array($query)) {
$rs['dateline'] = gmdate("$dateformat $timeformat", $rs['dateline'] + $timeoffset * 3600);
$toplcslist[] = $rs;
}

}
}
//End




3޸ templates/Լ(ûоdefault)/viewthread_node.htm



<div id="post_rate_div_$post[pid]"></div>
<!--{/if}-->
<!--{/if}-->

ں

<!--{if $post['first']}-->
{template viewthread_topics}
<!--{/if}-->


»!!!!!

ϴ OK  