主题 : 首页五格每个格的大小怎么调,代码如下
级别: 二星会员
UID: 1632593
精华: 0
发帖: 314
威望: 0 点
金钱: -5 两
贡献值: 0 点
PW积分: 2 点
在线时间: 149(时)
注册时间: 2008-05-04
最后登录: 2009-06-30
楼主  发表于: 2008-06-10 21:58

0 首页五格每个格的大小怎么调,代码如下

演示地址www.bo-ran.com


<!--<?php
//首页调用开始
//默认只显示开放、正规板块,不显示隐藏、投票、认证板块

//幻灯图开始
$cachepics=R_P."data/bbscache/index_toppics.php";//幻灯图片缓存文件
$cachepicstime=3;//幻灯图片缓存自动更新时间,单位秒
//下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
$showforum="(pf.f_type = 'forum' or pf.f_type = 'former')";
if (($timestamp-@filemtime($cachepics)>=$cachepicstime)){
$query=$db->query("SELECT pt.tid,pt.fid,pt.subject,pa.attachurl FROM pw_threads pt
,pw_attachs pa,pw_forums pf where pt.tid = pa.tid and pt.fid = pf.fid and pa.type='img' and pt.ifcheck='1' and ".$showforum." and pf.password = ''
ORDER BY pt.postdate DESC
LIMIT 60
"); //可以根据需要调整,我这里是估算每个主题有10张图片的情况下。

$imgcontent="<?php\n";
$pics=$links=$texts="";
$rs_i=0;
while ($imginfo = $db->fetch_array($query) and $rs_i<6) {//只调用5个主题的图片
if(($rs_tid!=$imginfo[tid])&&(eregi("\.(jpg|gif|png)$",$imginfo[attachurl]))){
$pics.=$db_bbsurl."/".$attachpath."/".$imginfo[attachurl]."|";
$links.=$db_bbsurl."/read.php?tid=".$imginfo[tid]."|";
$texts.=$imginfo[subject]."|";
$rs_i++;//同一主题的只要最后上传的那张图片
}
$rs_tid=$imginfo[tid];
}

$pics=substr($pics,0,-1);
$links=substr($links,0,-1);
$texts=substr($texts,0,-1);

$pics='$pics="'.$pics.'";';
$links='$links="'.$links.'";';
$texts='$texts="'.$texts.'";';

$imgcontent = $imgcontent.$pics."\n".$links."\n".$texts."\n?>";
writeover($cachepics,$imgcontent);
}
@require_once($cachepics);
//幻灯图结束


//会员排行+主题排行开始
$cachelist=R_P."data/bbscache/index_toplist.php";//主题排行缓存文件
$cachelisttime=30;//主题排行自动更新时间,单位秒
//下一句设置要显示的板块类型,forum开放板块,former正规板块,hidden隐藏板块
$showforum="(pf.f_type = 'forum' or pf.f_type = 'former')";
if(($timestamp-@filemtime($cachelist)>=$cachelisttime)){
$listnum=10;//主题显示个数
$listlength=26;//主题标题长度
$listnum1=10;//会员在线时间排行显示个数
$memberonline=$memberposttoday=$newthreads=$digestthreads=$replythreads="";

//会员在线时间排行开始
$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,$listnum1");
$c_i=1;//初始化图片序号
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;
if($lv > 48) $lv = 48;
$memberonline.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='profile.php?action=show&uid=$members[uid]' title='在线等级:{$lv} 级\n在线时长:{$members[onlinetime]} 小时\n升级剩余时间:{$more} 小时'>$members[username]</a> <img src='$imgpath/top/{$lv}.gif'><br />";
$c_i++;
}
unset($members);
unset($c_i);
//会员在线时间排行结束

//会员当日发帖排行开始
$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");
$c_i=1;//初始化图片序号
while($members=$db->fetch_array($query)){
$memberposttoday.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='profile.php?action=show&uid=$members[uid]'>$members[username]</a>  $members[todaypost]<br />";
$c_i++;
}
unset($members);
unset($c_i);
//会员当日发帖排行结束

//最新发表主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.hits FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where  pt.ifcheck='1' and ".$showforum." and pf.password = '' order by pt.postdate desc limit 0,$listnum");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=date("Y-m-j g:i",$threads[postdate]);
$subject=substrs($threads[subject],$listlength);
$newthreads.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='read.php?tid=$threads[tid]' title='主题:$threads[subject]\n作者:$threads[author]\n时间:$threads[postdate]\n浏览:$threads[hits] 次'>$subject</a><br />";
$c_i++;
}
unset($threads);
unset($c_i);
//最新发表主题结束

//社区精华主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck='1' and pt.digest > 0 and ".$showforum." and pf.password = '' order by pt.postdate desc limit 0,$listnum");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=date("Y-m-j g:i",$threads[postdate]);
$threads[lastpost]=date("Y-m-j g:i",$threads[lastpost]);
$subject=substrs($threads[subject],$listlength);
$digestthreads.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='read.php?tid=$threads[tid]' title='主题标题:$threads[subject]\n主题作者:$threads[author]\n发表时间:$threads[postdate]\n浏览次数:$threads[hits] 次\n最新回复:$threads[lastposter]\n回复时间:$threads[lastpost]\n回复次数:$threads[replies] 次'>$subject</a><br />";
$c_i++;
}
unset($threads);
unset($c_i);
//社区精华主题结束

//最新回复主题开始
$query = $db->query("SELECT pt.tid,pt.author,pt.subject,pt.postdate,pt.lastpost,pt.lastposter,pt.hits,pt.replies FROM pw_threads pt LEFT JOIN pw_forums pf USING(fid) where pt.ifcheck = '1' and pt.replies > 0 and ".$showforum." and pf.password = '' order by lastpost desc limit 0,$listnum");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=date("Y-m-j g:i",$threads[postdate]);
$threads[lastpost]=date("Y-m-j g:i",$threads[lastpost]);
$subject=substrs($threads[subject],$listlength);
$replythreads.="<img src='$imgpath/top/c_".$c_i.".gif' align='absmiddle' width='11' height='11'> <a href='read.php?tid=$threads[tid]' title='主题标题:$threads[subject]\n主题作者:$threads[author]\n发表时间:$threads[postdate]\n浏览次数:$threads[hits] 次\n最新回复:$threads[lastposter]\n回复时间:$threads[lastpost]\n回复次数:$threads[replies] 次'>$subject</a><br />";
$c_i++;
}
unset($threads);
unset($c_i);
//最新回复主题结束

@writeover($cachelist,"<?php\n\$memberonline=\"$memberonline\";\n\$memberposttoday=\"$memberposttoday\";\n\$newthreads=\"$newthreads\";\n\$digestthreads=\"$digestthreads\";\n\$replythreads=\"$replythreads\";\n?>");
}
@require_once($cachelist);
//会员排行+主题排行结束

//首页调用结束
[ 此贴被博然不是疯子在2008-06-12 01:29重新编辑 ]
博然影视站www.bo-ran.com
级别: 二星会员
UID: 1632593
精华: 0
发帖: 314
威望: 0 点
金钱: -5 两
贡献值: 0 点
PW积分: 2 点
在线时间: 149(时)
注册时间: 2008-05-04
最后登录: 2009-06-30
沙发  发表于: 2008-06-10 22:48

     
博然影视站www.bo-ran.com
级别: 二星会员
UID: 1632593
精华: 0
发帖: 314
威望: 0 点
金钱: -5 两
贡献值: 0 点
PW积分: 2 点
在线时间: 149(时)
注册时间: 2008-05-04
最后登录: 2009-06-30
地毯  发表于: 2008-06-11 01:07

有没有人知道起码进来告诉一声呀


成空帖了
博然影视站www.bo-ran.com
级别: 四星会员
UID: 914313
精华: 0
发帖: 2701
威望: 279 点
金钱: 2205 两
贡献值: 0 点
PW积分: 10 点
群组: PW挖坟行动组
在线时间: 128(时)
注册时间: 2006-09-23
最后登录: 2009-07-03
3楼  发表于: 2008-06-11 15:57

没演示吗?
级别: 新手上路
UID: 1651564
精华: 0
发帖: 30
威望: 0 点
金钱: 23 两
贡献值: 0 点
PW积分: 0 点
在线时间: 2(时)
注册时间: 2008-05-23
最后登录: 2008-06-18
4楼  发表于: 2008-06-11 16:19

你写的真的太好了,不错。很厉害
我要是有你一半的技术可以了!!!!!!!!!!!


长沙电工培训 欢迎您的报名
[2008-6-1 17:22:54]
湖南手机维修学校 请选湖湘人自己的品牌学校[2008-6-1 15:03:46]
湖南电脑维修学校 首选湖湘人自己的品牌学校[2008-6-1 14:59:16]
湖南家电维修学校 要选就选湖湘人自己的学校[2008-6-1 14:49:39]
www.hxpxxx.com欢迎您!
级别: 二星会员
UID: 1632593
精华: 0
发帖: 314
威望: 0 点
金钱: -5 两
贡献值: 0 点
PW积分: 2 点
在线时间: 149(时)
注册时间: 2008-05-04
最后登录: 2009-06-30
5楼  发表于: 2008-06-12 01:29

引用
引用第3楼xiaoj8mao于2008-06-11 15:57发表的  :
没演示吗?



www.bo-ran.com
博然影视站www.bo-ran.com
做我想做的
级别: 一星会员
UID: 1635666
精华: 0
发帖: 144
威望: 2 点
金钱: 16 两
贡献值: 0 点
PW积分: 15 点
在线时间: 134(时)
注册时间: 2008-05-07
最后登录: 2009-05-27
6楼  发表于: 2008-06-12 17:18

要调整的不在这里,在下面代码里
依依花园:www.11huayuan.cn
衡阳学生论坛:www.0734ss.cn
级别: 初来乍到
UID: 1671757
精华: 0
发帖: 9
威望: 0 点
金钱: 0 两
贡献值: 0 点
PW积分: 5 点
在线时间: 2(时)
注册时间: 2008-06-11
最后登录: 2008-06-20
7楼  发表于: 2008-06-12 17:20

在你index.htm那个文件的下面width="24%是设置的
级别: 二星会员
UID: 1632593
精华: 0
发帖: 314
威望: 0 点
金钱: -5 两
贡献值: 0 点
PW积分: 2 点
在线时间: 149(时)
注册时间: 2008-05-04
最后登录: 2009-06-30
8楼  发表于: 2008-06-13 16:41

引用
引用第7楼dlxu于2008-06-12 17:20发表的  :
在你index.htm那个文件的下面width="24%是设置的

谢谢了~~~
博然影视站www.bo-ran.com
级别: 新手上路
UID: 1673581
精华: 0
发帖: 30
威望: 0 点
金钱: 0 两
贡献值: 0 点
PW积分: 5 点
在线时间: 0(时)
注册时间: 2008-06-13
最后登录: 2008-06-13
9楼  发表于: 2008-06-13 17:16

  有点看不懂
这是啥
级别: 六星会员
UID: 951037
精华: 0
发帖: 20220
威望: 5829 点
金钱: 22 两
贡献值: 1 点
PW积分: 17 点
群组: PHPWind官方团队
在线时间: 3632(时)
注册时间: 2006-10-29
最后登录: 2009-07-04
10楼  发表于: 2008-06-13 17:23

帮顶下
本坛“我的论坛我的站 ”欢迎你去写下你的成长经历!
级别: 论坛版主

UID: 762554
精华: 0
发帖: 32973
威望: 1002643 点
金钱: 1505 两
贡献值: 634 点
PW积分: 62 点
群组: PW共产党
在线时间: 3078(时)
注册时间: 2006-06-08
最后登录: 2009-07-03
11楼  发表于: 2008-06-13 17:23

在还有段代码上  有%几的
杭州滨江思拓电脑 :http://www.78st.cn
78视听小论坛 :http://www.78st.cn/bbs
E吧咨询台 :http://www.e887.cn
酒吧视听 :http://www.98st.cn
本坛“我的论坛我的站 ”欢迎你去写下你的成长经历!留下个脚印