http://www.cazdesign.com/forums/attachments/day_080523/20080523_67410dca07cab6426f98YTjX2v6khI1P.png
แก้ไขไฟล์index.php หาโค้ด คัดลอกไปที่คลิปบอร์ด
$hack_cut_str =60;
$fids = array();
if (file_exists("./forumdata/cache/cache_forums.php")){
require_once "./forumdata/cache/cache_forums.php";
if (is_array($_DCACHE['forums'])){
foreach ($_DCACHE['forums'] as $k => $v){
if (!strstr(',sub,forum,',','.$v['type'].',')) continue;
$fids[$k] = 5;
}
}
}
if (count($fids) < 1){
$query = $db->query("SELECT fid FROM {$tablepre}forums WHERE type='forum' OR type='sub'");
while ($row = $db->fetch_array($query)){
$fids[$row['fid']] = 5;
}
}
$limit_counts = 0;
foreach ($fids as $k => $v){
$sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT $v) UNION ";
}
if ($sql){
$sql = substr($sql,0,strlen($sql)-6);
}
$query = $db->query($sql);
while ($row = $db->fetch_array($query)){
$row['view_subject'] = cutstr($row['subject'],$hack_cut_str);
$row['date']= gmdate("$dateformat", $row['dateline'] + $timeoffset * 3600);
${'new_no'.$row['fid'].'_threadlist'}[] = $row;
}
เปลี่ยนเป็น
คัดลอกไปที่คลิปบอร์ด//??????--??
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$hack_cut_str =60; // ????????
$fids = array();
if (file_exists("./forumdata/cache/cache_forums.php")){
require_once "./forumdata/cache/cache_forums.php";
if (is_array($_DCACHE['forums'])){
foreach ($_DCACHE['forums'] as $k => $v){
if (!strstr(',sub,forum,',','.$v['type'].',')) continue;
$fids[$k] = 5; // ?????????????????????
}
}
}
if (count($fids) < 1){
$query = $db->query("SELECT fid FROM {$tablepre}forums WHERE type='forum' OR type='sub'");
while ($row = $db->fetch_array($query)){
$fids[$row['fid']] = 5; // ?????????????????????
}
}
$limit_counts = 0;
foreach ($fids as $k => $v){
$sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT $v) UNION ";
}
if ($sql){
$sql = substr($sql,0,strlen($sql)-6);
}
$query = $db->query($sql);
while ($row = $db->fetch_array($query)){
$row['view_subject'] = cutstr($row['subject'],$hack_cut_str);
$row['date']= gmdate("$dateformat", $row['dateline'] + $timeoffset * 3600);
if($row['highlight']) {
$string = sprintf('%02d', $row['highlight']);
$stylestr = sprintf('%03b', $string);
$row['highlight'] = 'style="';
$row['highlight'] .= $stylestr ? 'font-weight: bold;' : '';
$row['highlight'] .= $stylestr ? 'font-style: italic;' : '';
$row['highlight'] .= $stylestr ? 'text-decoration: underline;' : '';
$row['highlight'] .= $string ? 'color: '.$colorarray[$string] : '';
$row['highlight'] .= '"';
} else {
$row['highlight'] = '';
}
${'new_no'.$row['fid'].'_threadlist'}[] = $row;
}
//??????--??
ตัวนี้ทำงัย ทำตามแล้ว ไม่เห็นได้เลย
[ แก้ไขล่าสุด veverman เมื่อ 2008-6-30 11:46 ] สวยๆทั้งนั้นเลย ขอบคุณมากๆเลยครับ หุหุหุแหล่มมากมาย