czjlcl123
QQ:784742798-力所能及,无偿援助
级别: 一星会员
楼主  发表于: 2008-01-01 14:55

 首页调用(2008.1.10更新):全自适应for6.0

以前版本信息
http://www.phpwind.net/read-htm-tid-551540.html

2008.1.10更新说明:
1、解决小分辨率换行问题
2、

一、本调用特点:
1、全自适应:不管客户端的屏幕分辨率是多少,都能完美整体显示,flash幻灯片也实现了自适应显示;
2、版块显示:实现了不显示“隐藏”、“认证”等版块功能;
3、根据官方home代码,改进了flash调用图片代码,效率更高;
4、更多的使用了“div+css”代码,提高代码执行效率;




二、演示图片如下,由于我的论坛在内部局域网,不方便给大家演示,因此我将选择最新安装成功的论坛地址作为演示地址,希望大家赶快试用哦;非本站演示地址:

Click Here To EnLarge




三、安装方法:
1、找到“template”目录里的相应风格目录,打开index,htm,找到1-2行代码




Copy code

<!--<?php print <<<EOT
-->





替换为:




Copy code

<!--<?php
//幻灯图开始
$config['time']=10;//10天内的图片主题
$sql = $config['time']>0 ? " AND t.postdate>".($timestamp-86400*$config['time']) : '';
$query = $db->query("SELECT t.tid,t.subject,tm.aid FROM pw_threads t LEFT JOIN $pw_tmsgs tm ON t.tid=tm.tid LEFT JOIN pw_forums f ON t.fid=f.fid WHERE 1 $sql and t.ifupload='1' AND tm.aid!='' AND f.f_type<>'hidden' ORDER BY t.postdate desc LIMIT 5");
while($rt = $db->fetch_array($query)){
    $aid = unserialize($rt['aid']);
    foreach($aid as $key=>$value){
    if($value['type']=='img'){
        $value['attachurl'] = geturl($value['attachurl'],'lf');
        $pics  .= $extra.$value['attachurl'][0];
        $links  .= $extra."read.php?tid=$rt[tid]";
        $texts .= $extra.$rt['subject'];
        $extra = '|';break;
        }
    }
}

//幻灯图结束


//排行开始
$thselect="pt.tid,pt.fid,pt.author,pt.subject,pt.postdate,pt.replies,pt.lastpost,pt.lastposter,pt.hits,pt.digest,pt.dig,pt.ifmark FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pf.f_type <> 'hidden'";
$listnum=10;//显示个数
$listlength=40;//标题长度
$cachelist=R_P."data/bbscache/index_toplist123.php";//主题排行缓存文件
$cachelisttime=20;//主题排行缓存时间
//会员排行开始
if(($timestamp-@filemtime($cachelist)>=$cachelisttime)){
$timelv=$hotmember=$monmember=$newthreads=$digestthreads=$hitsthreads=$digthreads=$replythreads=$ifmarkthreads="";
$query = $db->query("SELECT m.uid,m.username,md.onlinetime FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.onlinetime order by md.onlinetime desc limit 0,$listnum");
while($members=$db->fetch_array($query)){
$members[onlinetime]=(int)($members[onlinetime]/3600);
$i=0;
while((5*$i*$i+15*$i)<=$members[onlinetime])
{$i++;
$C=5*$i*$i+15*$i;
$N=$i;
}
$more= $C-$members[onlinetime];
$lv= $N;
$timelv.="<div class=divindex><div class=fr style='margin-top:3px'><img src='$imgpath/lv/{$lv}.gif' alt='在线等级:{$lv} 级\n在线时长:{$members[onlinetime]} 小时\n升级剩余时间:{$more} 小时'></div><a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a></div>";
}
unset($members);

$query=$db->query("SELECT m.uid,m.username,md.todaypost FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>'$tdtime' ORDER BY md.todaypost DESC limit 0,$listnum");
while($members=$db->fetch_array($query)){
$hotmember.="<div class=divindex><div class=fr>[$members[todaypost]]</div><a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a></div>";
}
unset($members);

$query=$db->query("SELECT m.uid,m.username,md.monthpost FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>'$montime' ORDER BY md.monthpost DESC limit 0,$listnum");
while($members=$db->fetch_array($query)){
$monmember.="<div class=divindex><div class=fr>[$members[monthpost]]</div><a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a></div>";
}
unset($members);
//会员排行结束
@include_once(D_P.'data/bbscache/forum_cache.php');
$query = $db->query("SELECT ".$thselect." order by pt.postdate desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[forum]=substrs($forum[$threads['fid']]['name']);
$threads[lastpost]=get_date($threads[lastpost]);
$threads[subjects]=substrs($threads[subject]);
$threads[subject]=substrs($threads[subject],$listlength);
$newthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标  题:$threads[subjects]\n作  者:$threads[author]\n回  复:$threads[replies]\n点  击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
}
unset($threads);
$query = $db->query("SELECT ".$thselect." and pt.digest > 0 order by pt.postdate desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[forum]=substrs($forum[$threads['fid']]['name']);
$threads[lastpost]=get_date($threads[lastpost]);
$threads[subjects]=substrs($threads[subject]);
$threads[subject]=substrs($threads[subject],$listlength);
$digestthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标  题:$threads[subjects]\n作  者:$threads[author]\n回  复:$threads[replies]\n点  击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
}
unset($threads);
$query = $db->query("SELECT ".$thselect." and pt.hits > 200 and pt.replies > 10 order by pt.lastpost desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[forum]=substrs($forum[$threads['fid']]['name']);
$threads[lastpost]=get_date($threads[lastpost]);
$threads[subjects]=substrs($threads[subject]);
$threads[subject]=substrs($threads[subject],$listlength);
$hitsthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标  题:$threads[subjects]\n作  者:$threads[author]\n回  复:$threads[replies]\n点  击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
}
unset($threads);
$query = $db->query("SELECT ".$thselect." and pt.dig > 0 order by pt.postdate desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[forum]=substrs($forum[$threads['fid']]['name']);
$threads[lastpost]=get_date($threads[lastpost]);
$threads[subjects]=substrs($threads[subject]);
$threads[subject]=substrs($threads[subject],$listlength);
$digthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标  题:$threads[subjects]\n作  者:$threads[author]\n回  复:$threads[replies]\n点  击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
}
unset($threads);
$query = $db->query("SELECT ".$thselect." and pt.replies > 0 order by pt.lastpost desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[forum]=substrs($forum[$threads['fid']]['name']);
$threads[lastpost]=get_date($threads[lastpost]);
$threads[subjects]=substrs($threads[subject]);
$threads[subject]=substrs($threads[subject],$listlength);
$replythreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标  题:$threads[subjects]\n作  者:$threads[author]\n回  复:$threads[replies]\n点  击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
}
unset($threads);
$query = $db->query("SELECT ".$thselect." and pt.ifmark > 0 order by pt.postdate desc limit 0,$listnum");
while($threads=$db->fetch_array($query)){
$threads[forum]=substrs($forum[$threads['fid']]['name']);
$threads[lastpost]=get_date($threads[lastpost]);
$threads[subjects]=substrs($threads[subject]);
$threads[subject]=substrs($threads[subject],$listlength);
$ifmarkthreads.="<div class=divindex><span class=fr style='text-align:left'>【$threads[author]】</span>[<a href='thread.php?fid=$threads[fid]'><b>$threads[forum]</b></a>]<a href='read.php?tid=$threads[tid]' title='标  题:$threads[subjects]\n作  者:$threads[author]\n回  复:$threads[replies]\n点  击:$threads[hits]\n回复时间:$threads[lastpost]\n最后回复:$threads[lastposter]'>$threads[subject]</a></div>";
}
unset($threads);
@writeover($cachelist,"<?php\n\$hitsthreads=\"$hitsthreads\";\n\$ifmarkthreads=\"$ifmarkthreads\";\n\$monmember=\"$monmember\";\n\$hotmember=\"$hotmember\";\n\$timelv=\"$timelv\";\n\$newthreads=\"$newthreads\";\n\$digestthreads=\"$digestthreads\";\n\$replythreads=\"$replythreads\";\n\$digthreads=\"$digthreads\";\n?>");
}
@require_once($cachelist); 
print <<<EOT
-->






2、找到以下代码




Copy code

<!--
EOT;
}foreach($catedb as $k=>$cate){
if($forumdb[$cate[fid]]){
if($cate[across]){print <<<EOT
-->





在其上面添加以下代码:




Copy code

<!--
EOT;
}print <<<EOT
-->
<!--css-->
<style type="text/css">
.li1{FONT-WEIGHT: bold; FONT-SIZE: 12px;text-align:center;background: url('$imgpath/hot/54_Label_1a_1.gif');height:24px}
.li11{text-align:center;background: url('$imgpath/hot/54_Label_1b_1.gif');height:24px}
#listnb{margin:0;padding:0;float:left;height:240px;}
#tpbg{margin:0;padding:0;height:24px;line-height:24px;background-image: url('$imgpath/hot/ttbg.gif');text-align:center;}
#ctbg{margin:0;padding:0;height:240;background-image: url('$imgpath/hot/listbg.gif');line-height:24px;overflow:hidden;}
.divindex{overflow:hidden;height:24px}
</style>
<!--css-->

<div class="t">
<script language="JavaScript" src="js/tx1.js"></script>
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
    <tr>
        <td width="28%" id="tpbg">====最新图片====</td>
        <td class="li1" id="lin1" onmouseover="ShowA('1')" title="最新发表的主题-以发贴时间为准">最新主题</td>
        <td class="li11" id="lin2" onmouseover="ShowA('2')" title="最新回复的主题-以回复时间为准">最新回复</td>
        <td class="li11" id="lin3" onmouseover="ShowA('3')" title="最新精华主题-精华帖子">精华推荐</td>
        <td class="li11" id="lin4" onmouseover="ShowA('4')" title="最新评分主题-评分帖子">评分推荐</td>
        <td class="li11" id="lin5" onmouseover="ShowA('5')" title="会员推荐主题-会员通过帖子里的推荐功能推荐的帖子,目前设置为1">会员推荐</td>
        <td class="li11" id="lin6" onmouseover="ShowA('6')" title="近期热点主题-回复10以上,点击200以上的帖子">近期热点</td>
        <td class="li1" id="linn1" onmouseover="Showb('1')" title="本日会员发贴排行">本日排行</td>
        <td class="li11" id="linn2" onmouseover="Showb('2')" title="本月会员发贴排行">本月排行</td>
        <td class="li11" id="linn3" onmouseover="Showb('3')" title="会员在线时间排行">在线排行</td>
    </tr>
    <tbody>
    <tr>
        <td width="28%">
              <script language="javascript">
            var swf_width="100%"
            var swf_height=240
            var config='5|0xFFFFFF|0x0099ff|50|0xffffff|0x0099ff|0x000000'
            // config 设置分别为: 自动播放时间(秒)|文字颜色|文字背景色|文字背景透明度|按键数字色|当前按键色|普通按键色
            var files='$pics'
            var links='$links'
            var texts='$texts'
            document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[url]http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6[/url],0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
            document.write('<param name="movie" value="{$imgpath}/focus.swf" />');
            document.write('<param name="quality" value="high" />');
            document.write('<param name="menu" value="false" />');
            document.write('<param name=wmode value="opaque" />');
            document.write('<param name="FlashVars" value="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'" />');
            document.write('<embed src="{$imgpath}/focus.swf" wmode="opaque" FlashVars="config='+config+'&bcastr_flie='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'& menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="[url]http://www.macromedia.com/go/getflashplayer"[/url] />');
            document.write('</object>');
      </script>
        </td>
        <td colspan="6" width="48%">
        <div id="ctbg">
            <img src="$imgpath/hot/bbs_inbg43.gif" style="float:left">
            <div id="A1">$newthreads</div>
            <div id="A2" style="DISPLAY: none">$replythreads</div>
            <div id="A3" style="DISPLAY: none">$digestthreads</div>
            <div id="A4" style="DISPLAY: none">$ifmarkthreads</div>
            <div id="A5" style="DISPLAY: none">$digthreads</div>
            <div id="A6" style="DISPLAY: none">$hitsthreads</div>
        </div>
        </td>
        <td colspan="3" width="24%">
        <div id="ctbg">
            <img src="$imgpath/hot/bbs_inbg43.gif" style="float:left">
            <div id="b1">$hotmember</div>
            <div id="b2" style="DISPLAY: none">$monmember</div>
            <div id="b3" style="DISPLAY: none">$timelv</div>
        </div>
        </td>
       
    </tr>
    </tbody>
</table>
</div>







3、将附件里解压的文件夹覆盖到论坛根目录,就安装完毕,进入你修改的风格,查看效果吧;注意你的图片目录可能是images目录也可能是image目录,如果不能显示图片的话,请换到另外一个目录试试;




特别说明:根据目前6.0风格特点,template文件夹只有默认的“wind”风格,如果你只想在某个特定那个风格里使用本帖的调用,你可以在template文件建一个以该风格命名的文件夹如“blue”,然后把wind风格目录里的index.htm文件复制到这个目录里,然后修改即可;




4、欢迎使用本插件,有什么问题可以及时反馈;




5、请有分的给加个分,没分的给捧个场,吧帖子顶起来,谢谢大家
[ 此贴被czjlcl123在2008-01-10 18:38重新编辑 ]
附件: 首页调用(2008.1.10).rar (55 K) 下载次数:1591
附件: 无flash调用 首页调用(2008.1.10).rar (42 K) 下载次数:537
本帖最近评分记录:
  • 威望:+1(xmyjm) 谢谢,不知能否用在6.32上
  • 威望:+5(木逸) 感谢分享
  • 威望:+3(xscac)
  • 威望:+1(laoli99) 优秀文章-欢迎进行技术交 ..
  • 威望:+3(hzbllsx) ...............
  • 威望:+3(楓) 图片没调用
  • 威望:+3(风上人) 很好很强大。。支持
  • scream
    http://bbs.yyx8.cn
    级别: 四星会员
    1楼  发表于: 2008-01-01 14:57
    沙发
    情人论坛
    级别: 四星会员
    2楼  发表于: 2008-01-01 15:11
     
    babyfirst
    级别: 二星会员
    3楼  发表于: 2008-01-01 15:18
    占位
    b81334548
    宁教我负天下人,休教天下人负我
    级别: 五星会员
    4楼  发表于: 2008-01-01 15:20
    我也来个~~~
    急招论坛友情链接  百度.谷歌收录正常就可以
    我的:bbs.5y44.com
    联系QQ:81334548
    特酷地带
    http://bbs.tekuu.com
    级别: 新手上路
    5楼  发表于: 2008-01-01 15:21
    不错,我来试试
    scream
    http://bbs.yyx8.cn
    级别: 四星会员
    6楼  发表于: 2008-01-01 15:24
    好象什么都点不了?
    czjlcl123
    QQ:784742798-力所能及,无偿援助
    级别: 一星会员
    7楼  发表于: 2008-01-01 15:29
    Quote:
    引用第6楼scream于2008-01-01 15:24发表的  :
    好象什么都点不了?


    你需要把附件里js目录里的tx1.js文件上传到你论坛根目录js文件夹里,我看了,你论坛的js目录里没有那个文件
    rusong
    低调的生活着..
    级别: 二星会员
    8楼  发表于: 2008-01-01 15:35
    下来试试
    〓偉◎耔〓
    级别: 新手上路
    9楼  发表于: 2008-01-01 15:39
    元旦最新修改插件..一定要支持了..
    bigydz
    我 谁都不认识 我
    级别: 二星会员
    10楼  发表于: 2008-01-01 15:39
    正好在 试试
    87304008
    www.ludengxia.cn
    级别: 一星会员
    11楼  发表于: 2008-01-01 15:39