fengyunjn
发表于 2008-12-12 14:46:28
占位等待问题编辑
转载请注明本内容来自: 克米设计论坛
官方地址:http://www.comiis.com/dz/bbs/
本贴地址:http://www.comiis.com/dz/bbs/viewthread.php?tid=864
yujilai
发表于 2008-12-14 16:14:12
首页图片调用代码如下:$hack_cut_str =36; //修改标题显示字数
$new_comiiskm_threadlist = array();
$sort_time = $today - (60*60*24*100); //本周
$hack_cut_comiismsstr=80;
$comiisphoto= array();
$query = $db->query("SELECT attach.aid, attach.attachment, attach.uid, t.tid, t.fid, t.subject,p.dateline, p.message FROM {$tablepre}attachments attach LEFT JOIN {$tablepre}threads t ON t.tid=attach.tid LEFT JOIN {$tablepre}posts p on p.tid=attach.tid WHERE t.fid in(168) AND filetype IN ('image/pjpeg','image/gif') GROUP BY attach.tid ORDER BY rand() DESC LIMIT 8");
while ($comiisphoto = $db->fetch_array($query)) {
$comiisphoto['uid'] = $comiisphoto['uid'];
$comiisphoto['fnn'] = $isnum;
$comiisphoto['message']=comiis_ubb($comiisphoto['message']);
$comiisphoto['photo_message'] = comiisleftstr($comiisphoto['message'],$hack_cut_comiismsstr);
$comiisphoto['photo_dateline'] = gmdate("$dateformat $timeformat", $comiisphoto['dateline'] + $timeoffset * 3600);
$comiisphoto['photo_id'] = $comiisphoto['aid'];
$comiisphoto['photo_picurl'] = 'attachments/'.$comiisphoto['attachment'];
$comiisphoto['photo_tid'] = $comiisphoto['tid'];
$comiisphoto['photo_fid'] = $comiisphoto['fid'];
$comiisphoto['photo_subject'] = comiisleftstr($comiisphoto['subject'],$hack_cut_str);
if($comiisphoto['highlight']) {
$string = sprintf('%02d', $comiisphoto['highlight']);
$stylestr = sprintf('%03b', $string);
$comiisphoto['highlight'] = 'style="';
$comiisphoto['highlight'] .= $stylestr ? 'font-weight: bold;' : '';
$comiisphoto['highlight'] .= $stylestr ? 'font-style: italic;' : '';
$comiisphoto['highlight'] .= $stylestr ? 'text-decoration: underline;' : '';
$comiisphoto['highlight'] .= $string ? 'color: '.$colorarray[$string] : '';
$comiisphoto['highlight'] .= '"';
} else {
$comiisphoto['highlight'] = '';
}
$new_comiiskm_threadlist[] = $comiisphoto;
}这个是随机调用论坛帖子里的图片,如何修改成调用最近发布的帖子呢?
yujilai
发表于 2008-12-14 17:27:03
问题解决,感谢克米分享这么好的首页风格
yuhuajie
发表于 2008-12-16 11:16:35
我有多少米币
suoshou
发表于 2008-12-16 21:04:29
先下载试试看:) :) :) :)
mcd880
发表于 2008-12-17 07:34:30
那里有密闭呢
lfcar
发表于 2008-12-18 23:57:17
有几个问题帮解决!着急!
1、A1: 论坛精华带图片附件的帖子自动随机调用。只能调用一部分!当我把精华删掉之后,从新设一些精华贴后,
刷新后出现(个别精华帖内没有图片或者图片是转载其他地方的)
Fatal error: Maximum execution time of 30 seconds exceeded in D:\lfwlqs\include\db_mysql.class.php on line 66
2、 B1: 指定版块图片随机调用。修改板块后出现同样问题!(可能图片是转载其他地方的)
请尽快解决!
[ 本帖最后由 lfcar 于 2008-12-19 00:11 编辑 ]
oktime
发表于 2008-12-19 23:25:15
下载了,顶
bbs21291
发表于 2008-12-20 01:05:03
:handshake ;P
111111
发表于 2008-12-20 17:48:44
:loveliness: :loveliness: