【原作】:已忘記
【5.0】:翡璃月
【5.5】:翡璃月
【修正 by 風星】 【數據升級】:無
【數據查詢增加】:否
附註:使用此插件 請將後台附件設置 修改 下載附件來路檢查 打勾:
是 演示圖
==================================================
attachment.php 找
複製程式
periodscheck('attachbanperiods');
$attachexists = $ispaid = FALSE;
if(!empty($aid)) {
$query = $db->query("SELECT * FROM {$tablepre}attachments WHERE aid='$aid'");
if($attach = $db->fetch_array($query)) {
$query = $db->query("SELECT tid, fid, price, special FROM {$tablepre}threads WHERE tid='$attach[tid]' AND displayorder>=Ɔ'");
$thread = $db->fetch_array($query);
if($thread['fid']) {
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}posts WHERE pid='$attach[pid]' AND invisible=Ɔ'");
if($db->result($query, 0)) {
$attachexists = TRUE;
}
}
}
}
改成
periodscheck('attachbanperiods');
$attachexists = $ispaid = FALSE;
if(!empty($aid)) {
$query = $db->query("SELECT * FROM {$tablepre}attachments WHERE aid='$aid'");
if($attach = $db->fetch_array($query)) {
$query = $db->query("SELECT tid, fid, price, special FROM {$tablepre}threads WHERE tid='$attach[tid]' AND displayorder>=Ɔ'");
$thread = $db->fetch_array($query);
if($thread['fid']) {
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}posts WHERE pid='$attach[pid]' AND invisible=Ɔ'");
$query = $db->query("SELECT author FROM {$tablepre}posts WHERE pid='$attach[pid]' AND invisible=Ɔ'");
if($db->result($query, 0)) {
if($db->num_rows($query)) {
$attach['author'] = $db->result($query, 0);
$attachexists = TRUE;
}
}
}
}
}
找
複製程式
dheader('Content-Disposition: inline; filename='.$attach['filename'].'.thumb.jpg');
改成
dheader('Content-Disposition: inline; filename="['.$bbname.' by '.$attach['author'].'] '.$attach['filename'].'.thumb.jpg"');
找
複製程式
if($isimage && !empty($noupdate)) {
dheader('Content-Disposition: inline; filename='.$attach['filename']);
} else {
dheader('Content-Disposition: attachment; filename='.$attach['filename']);
}
改成
if($isimage && !empty($noupdate)) {
dheader('Content-Disposition: inline; filename="['.$bbname.' by '.$attach['author'].'] '.$attach['filename'].'"');
} else {
dheader('Content-Disposition: attachment; filename="['.$bbname.' by '.$attach['author'].'] '.$attach['filename'].'"');
}