加入收藏 | 设为首页 | 会员中心 | 我要投稿 焦作站长网 (https://www.0391zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

六酷社区论坛HOME页清新格调免费版 下载

发布时间:2020-03-16 19:41:16 所属栏目:PHP教程 来源:互联网
导读:六酷社区论坛HOME页清新格调免费版 下载


$hotmember1 = ''; 
$query = $db->query("SELECT username, uid, posts FROM {$tablepre}members ORDER BY posts DESC LIMIT 0, 10"); 
while($member = $db->fetch_array($query)) { 
       $hotmember1.="<table width='100%' border='0' cellspacing='0' cellpadding='0' style='margin-top:4px'><tr><td width='5%'> </td> 
<td width='89%' bgcolor='#FFFFFF'><table width='95%' border='0' align='center' cellpadding='0' cellspacing='0'> 
  <tr><td width='75%' valign='bottom' ><a href='viewpro.php?uid=$member[uid]' target='_blank' class='mainlink1' >$member[username]</a></td><td width='25%'><div align='right'>$member[posts]</div></td></tr></table></td></tr></table>"; 
           } 

$hotmember1调用变量名
DESC LIMIT 0, 10");后面的10为调用条数

---------------------------------------------


7、论坛精华贴调用:
代码

复制代码 代码如下:


//社区精华TOP 
$jingthreads = ''; 
$query = $db->query("SELECT * FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f . fid =t . fid where digest  ORDER BY `t` . `lastpost`  DESC LIMIT 0, 7"); 
while($thread = $db->fetch_array($query)) { 
        $thread[subject] = cutstr($thread[subject], 35); 
        $jingthreads.="<table width='100%' border='0' cellspacing='0' cellpadding='2'><tr><td width='85%'><a  href='viewthread.php?tid=$thread[tid]' target='_blank' title='作者:$thread[author] 版块:$thread[name]' class='mainlink1'>·$thread[subject] </a></td></tr></table>" ; 
}  

$jingthreads调用变量名
DESC LIMIT 0, 7");后面的7为调用条数
($thread[subject], 35);后面的35为显示字符数

---------------------------------------------

8、论坛最新贴调用:
代码

复制代码 代码如下:


//最新文章 
$replythreads = ''; 
$query = $db->query("SELECT author, views, tid, subject, lastpost FROM {$tablepre}threads ORDER BY dateline DESC LIMIT 0, 10"); 
while($thread = $db->fetch_array($query)) { 
        $thread[subject] = cutstr($thread[subject], 27); 
        $thread[lastpost] = gmdate("Y-m-j g:i", $thread[lastpost] + $timeoffset * 3600); 
        $replythreads.=" <LI><a href='viewthread.php?tid=$thread[tid]' title='作者:$thread[author] 回复:$thread[lastpost]' target=_blank>$thread[subject]</A><br />"; 


$replythreads调用变量名
DESC LIMIT 0, 10");后面的10为调用条数
($thread[subject], 27);后面的27为显示字符数

---------------------------------------------

9、友情链接调用
代码

复制代码 代码如下:


$tightlink_text = $tightlink_logo = ''; 
$query = $db->query("SELECT * FROM {$tablepre}forumlinks ORDER BY displayorder"); 
                        while($flink = $db->fetch_array($query)) { 
                                if($flink['note']) { 
                                        if($flink['logo']) { 
                                                $forumlink['type'] = 1; 
                                                $forumlink['logo'] = $flink['logo']; 
                                        } else { 
                                                $forumlink['type'] = 2; 
                                        } 
                                        $data[] = $forumlink; 
                                } else { 
                                        if($flink['logo']) { 
                                                $tightlink_logo .= "<a href="$flink[url]"  
target="_blank" class='mainlink1'><img src="$flink[logo]" border="0" alt="$flink 
[name]"  alt="$flink[content]"></a> "; 
                                        } else { 
                                                $tightlink_text .= "<a href="$flink[url]"  
target="_blank" class='mainlink1'>[$flink[name]]</a> "; 
                                        } 
                                } 
                        } 
                        if($tightlink_logo || $tightlink_text) { 
                                $tightlink_logo .= $tightlink_logo ? '<br>' : ''; 
                                $data[] = array('type' => 3, 'content' =>  
$tightlink_logo.$tightlink_text); 
                        } 

说明:
$flink[content]是LOGO链接调用变量
$flink[content]是文字链接调用变量
两个要同时都有

---------------------------------------------
12、生成静态HTML页的方法
打开main.php
查找:

复制代码 代码如下:

(编辑:焦作站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读